@nice-move/eslint-config-react 0.13.21 → 0.13.23
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/index.mjs +12 -8
- package/lib/react.mjs +0 -1
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { dirname } from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
|
|
4
1
|
import { FlatCompat } from '@eslint/eslintrc';
|
|
5
2
|
import { create } from '@nice-move/eslint-config-base';
|
|
6
3
|
import hooks from 'eslint-config-airbnb/hooks';
|
|
@@ -11,12 +8,9 @@ import reactPlugin from 'eslint-plugin-react';
|
|
|
11
8
|
|
|
12
9
|
import react from './lib/react.mjs';
|
|
13
10
|
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = dirname(__filename);
|
|
16
|
-
|
|
17
11
|
const compat = new FlatCompat({
|
|
18
|
-
baseDirectory: __dirname,
|
|
19
|
-
resolvePluginsRelativeTo: __dirname,
|
|
12
|
+
baseDirectory: import.meta.__dirname,
|
|
13
|
+
resolvePluginsRelativeTo: import.meta.__dirname,
|
|
20
14
|
});
|
|
21
15
|
|
|
22
16
|
const files = ['**/*.{ts,js,tsx,jsx}'];
|
|
@@ -26,6 +20,15 @@ export default [
|
|
|
26
20
|
...compat.config(airbnb).map((config) => ({ ...config, files })),
|
|
27
21
|
...compat.config(airbnb2).map((config) => ({ ...config, files })),
|
|
28
22
|
),
|
|
23
|
+
{
|
|
24
|
+
files,
|
|
25
|
+
ignores: ['**/*.md/*'],
|
|
26
|
+
languageOptions: {
|
|
27
|
+
parserOptions: {
|
|
28
|
+
projectService: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
29
32
|
{
|
|
30
33
|
files,
|
|
31
34
|
...react,
|
|
@@ -35,6 +38,7 @@ export default [
|
|
|
35
38
|
files: ['**/*.md/*'],
|
|
36
39
|
rules: {
|
|
37
40
|
'react/react-in-jsx-scope': 'off',
|
|
41
|
+
'react/jsx-no-undef': 'warn',
|
|
38
42
|
},
|
|
39
43
|
},
|
|
40
44
|
reactPlugin.configs.flat['jsx-runtime'],
|
package/lib/react.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-move/eslint-config-react",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.23",
|
|
4
4
|
"description": "A `eslint` config for `react` project best practice",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
44
44
|
"eslint-plugin-react": "^7.37.5",
|
|
45
45
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
|
-
"globals": "^17.
|
|
46
|
+
"globals": "^17.3.0",
|
|
47
47
|
"settingz": "^0.2.0",
|
|
48
48
|
"typescript-eslint": "^8.54.0",
|
|
49
|
-
"@nice-move/eslint-config-base": "^0.13.
|
|
49
|
+
"@nice-move/eslint-config-base": "^0.13.23"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"eslint": "^9.39.2"
|