@w0s/eslint-config 7.0.0-rc.6 → 7.0.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
|
@@ -20,8 +20,10 @@ export default {
|
|
|
20
20
|
'dot-notation': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
21
21
|
eqeqeq: 'error',
|
|
22
22
|
'func-names': 'warn', // eslint-config-airbnb-base@15.0.0; style
|
|
23
|
+
'func-style': 'error',
|
|
23
24
|
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
24
25
|
'guard-for-in': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
26
|
+
'logical-assignment-operators': 'error',
|
|
25
27
|
'max-classes-per-file': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
26
28
|
'new-cap': 'error',
|
|
27
29
|
'no-alert': 'warn', // eslint-config-airbnb-base@15.0.0; best-practices
|
package/rules/import.js
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
/** @type {import("eslint").Linter.FlatConfig} */
|
|
4
4
|
export default {
|
|
5
5
|
rules: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Helpful warnings
|
|
8
|
+
*/
|
|
9
|
+
/* ✅ import/export */
|
|
10
|
+
/* import/no-deprecated TODO: parserPath or languageOptions.parser is required! */
|
|
9
11
|
'import/no-empty-named-blocks': 'error',
|
|
10
12
|
'import/no-extraneous-dependencies': [
|
|
11
13
|
'error',
|
|
@@ -19,46 +21,52 @@ export default {
|
|
|
19
21
|
'import/no-mutable-exports': 'error',
|
|
20
22
|
'import/no-named-as-default': 'off', // ✅ TODO: parserPath or languageOptions.parser is required! / 有効にする際は *.test.js での無効化を検討
|
|
21
23
|
'import/no-named-as-default-member': 'off', // ✅ TODO: parserPath or languageOptions.parser is required! / 有効にする際は *.test.js での無効化を検討
|
|
22
|
-
|
|
24
|
+
/* import/no-unused-modules */
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Module systems
|
|
28
|
+
*/
|
|
29
|
+
/* import/no-amd */
|
|
30
|
+
/* import/no-commonjs */
|
|
31
|
+
/* import/no-import-module-exports */
|
|
32
|
+
/* import/no-nodejs-modules */
|
|
33
|
+
/* import/unambiguous */
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Static analysis
|
|
37
|
+
*/
|
|
32
38
|
'import/default': 'off', // ✅ TODO: parserPath or languageOptions.parser is required!
|
|
33
|
-
|
|
39
|
+
/* ✅ import/named */
|
|
34
40
|
'import/namespace': 'off', // ✅ TODO: parserPath or languageOptions.parser is required!
|
|
35
41
|
'import/no-absolute-path': 'error',
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
/* import/no-cycle ⚠ This rule is comparatively computationally expensive */
|
|
43
|
+
/* import/no-dynamic-require */
|
|
44
|
+
/* import/no-internal-modules */
|
|
45
|
+
/* import/no-relative-packages */
|
|
46
|
+
/* import/no-relative-parent-imports */
|
|
47
|
+
/* import/no-restricted-paths */
|
|
42
48
|
'import/no-self-import': 'error',
|
|
43
|
-
|
|
49
|
+
/* ✅ import/no-unresolved */
|
|
44
50
|
'import/no-useless-path-segments': 'error',
|
|
45
51
|
'import/no-webpack-loader-syntax': 'error',
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Style guide
|
|
55
|
+
*/
|
|
56
|
+
/* import/consistent-type-specifier-style */
|
|
57
|
+
/* import/dynamic-import-chunkname */
|
|
58
|
+
/* import/exports-last */
|
|
51
59
|
'import/extensions': ['error', 'ignorePackages'],
|
|
52
60
|
'import/first': 'error',
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
/* import/group-exports */
|
|
62
|
+
/* import/max-dependencies */
|
|
55
63
|
'import/newline-after-import': 'error',
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
/* import/no-anonymous-default-export */
|
|
65
|
+
/* import/no-default-export */
|
|
66
|
+
/* ✅ import/no-duplicates */
|
|
59
67
|
'import/no-named-default': 'error',
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
/* import/no-named-export */
|
|
69
|
+
/* import/no-namespace */
|
|
62
70
|
'import/no-unassigned-import': 'error',
|
|
63
71
|
'import/order': 'error',
|
|
64
72
|
'import/prefer-default-export': 'error',
|