@zimbra/eslint-config 1.2.0 → 1.2.1-main.9ee37d0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zimbra/eslint-config",
|
|
3
|
-
"version": "1.2.0",
|
|
3
|
+
"version": "1.2.1-main.9ee37d0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ESLint configuration for Zimbra javascript projects.",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"lint": "eslint src --config eslint.config.mjs",
|
|
13
13
|
"lint:fix": "npm run lint -- --fix",
|
|
14
|
-
"prepublishOnly": "npm run lint && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags",
|
|
15
14
|
"prepare": "husky || true"
|
|
16
15
|
},
|
|
17
16
|
"engines": {
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { fixupPluginRules } from '@eslint/compat';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
|
|
4
|
-
import pluginPreactI18n from 'eslint-plugin-preact-i18n';
|
|
5
|
-
|
|
6
|
-
import { i18nRules, LANGUAGE_FILES_RELATIVE, i18nTextComponents } from '../rules/i18n.js';
|
|
7
|
-
|
|
8
|
-
const intlPath = process.env.ESLINT_INTL_PATH ?? 'src/intl';
|
|
9
|
-
|
|
10
|
-
const languageFilesAbsolute = LANGUAGE_FILES_RELATIVE.map(entry => ({
|
|
11
|
-
name: entry.name,
|
|
12
|
-
path: path.join(intlPath, entry.filename)
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
files: ['**/*.{js,jsx,mjs,cjs}'],
|
|
17
|
-
|
|
18
|
-
plugins: {
|
|
19
|
-
// TODO: Upgrade `pluginPreactI18n` to a modern version to ensure compatibility with current tooling and React/Preact best practices
|
|
20
|
-
'preact-i18n': fixupPluginRules(pluginPreactI18n)
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
rules: i18nRules,
|
|
24
|
-
|
|
25
|
-
settings: {
|
|
26
|
-
'preact-i18n': {
|
|
27
|
-
languageFiles: languageFilesAbsolute,
|
|
28
|
-
textComponents: i18nTextComponents
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import pluginReact from 'eslint-plugin-react';
|
|
2
|
-
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
3
|
-
|
|
4
|
-
import reactRules from '../rules/react.js';
|
|
5
|
-
import reactHooksRules from '../rules/react-hooks.js';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
files: ['**/*.{js,jsx,mjs,cjs}'],
|
|
9
|
-
|
|
10
|
-
plugins: {
|
|
11
|
-
react: pluginReact,
|
|
12
|
-
'react-hooks': pluginReactHooks
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
rules: {
|
|
16
|
-
...pluginReact.configs.recommended.rules,
|
|
17
|
-
...pluginReactHooks.configs.recommended.rules,
|
|
18
|
-
...reactRules,
|
|
19
|
-
...reactHooksRules
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
settings: {
|
|
23
|
-
// Requires exactly version 16.0. See: https://github.com/jsx-eslint/eslint-plugin-react/issues/1754
|
|
24
|
-
react: { pragma: 'createElement', version: '16.0' }
|
|
25
|
-
}
|
|
26
|
-
};
|