@pob/eslint-config 55.3.0 → 56.1.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/CHANGELOG.md +115 -0
- package/lib/_base.js +11 -9
- package/lib/base/commonjs.js +3 -3
- package/lib/base/module.js +3 -3
- package/lib/index.js +6 -6
- package/lib/node/_base.js +24 -24
- package/lib/node/commonjs.js +7 -7
- package/lib/node/module.js +13 -13
- package/lib/node-commonjs.js +11 -11
- package/lib/node-module.js +11 -11
- package/lib/plugins/import/import-base.js +38 -38
- package/lib/plugins/import/import-commonjs.js +2 -2
- package/lib/plugins/import/import-module.js +2 -2
- package/lib/plugins/unicorn.js +115 -115
- package/lib/root-commonjs.js +3 -3
- package/lib/root-module.js +3 -3
- package/lib/rules/best-practices.js +174 -174
- package/lib/rules/code-quality.js +3 -3
- package/lib/rules/dev-only.js +4 -4
- package/lib/rules/errors.js +41 -41
- package/lib/rules/modules/base.js +2 -2
- package/lib/rules/modules/commonjs.js +3 -3
- package/lib/rules/modules/esm.js +5 -5
- package/lib/rules/style.js +8 -8
- package/package.json +2 -1
- package/utils.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,121 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [51.0.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-09-01)
|
|
7
|
+
## [51.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-10-03)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix react/function-component-definition rule and enable func-names ([e656eba](https://github.com/christophehurpeau/eslint-config-pob/commit/e656ebaba4639a0eb547ef11dc9d3fbf32aec60e))
|
|
12
|
+
## [51.1.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-10-18)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* fix no-restricted-exports rule ([a1dd956](https://github.com/christophehurpeau/eslint-config-pob/commit/a1dd956448099f77f3adadca1ce031044a3a4492))
|
|
17
|
+
## [51.1.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-10-19)
|
|
18
|
+
## [51.2.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-10)
|
|
19
|
+
## [51.2.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-14)
|
|
20
|
+
## [52.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-28)
|
|
21
|
+
|
|
22
|
+
### ⚠ BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* change import/extensions to ignorePackages
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* change import/extensions to ignorePackages ([1833642](https://github.com/christophehurpeau/eslint-config-pob/commit/183364280552d484acd37bbf3b9816d88c1f6bfe))
|
|
29
|
+
## [52.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-28)
|
|
30
|
+
|
|
31
|
+
### Reverts
|
|
32
|
+
|
|
33
|
+
* Revert "feat!: change import/extensions to ignorePackages" ([22d14bc](https://github.com/christophehurpeau/eslint-config-pob/commit/22d14bc6d6f94cae03a547cf53d939f6c1c756a7))
|
|
34
|
+
## [53.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-28)
|
|
35
|
+
|
|
36
|
+
### ⚠ BREAKING CHANGES
|
|
37
|
+
|
|
38
|
+
* feat: change import/extensions to ignorePackages
|
|
39
|
+
|
|
40
|
+
### Reverts
|
|
41
|
+
|
|
42
|
+
* feat: change import/extensions to ignorePackages ([0a15b9e](https://github.com/christophehurpeau/eslint-config-pob/commit/0a15b9e80b990a8f6277a1bd19481a9fe72f3f22))
|
|
43
|
+
## [54.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-02-17)
|
|
44
|
+
|
|
45
|
+
### ⚠ BREAKING CHANGES
|
|
46
|
+
|
|
47
|
+
* replace eslint-plugin-node by eslint-plugin-n
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
* replace eslint-plugin-node by eslint-plugin-n ([7d9764c](https://github.com/christophehurpeau/eslint-config-pob/commit/7d9764cf80fffcd4381056624eb06887a3d86e3f))
|
|
52
|
+
## [54.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-02-24)
|
|
53
|
+
## [55.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-20)
|
|
54
|
+
|
|
55
|
+
### ⚠ BREAKING CHANGES
|
|
56
|
+
|
|
57
|
+
* remove eslint-config-airbnb-base
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* remove eslint-config-airbnb-base ([295a348](https://github.com/christophehurpeau/eslint-config-pob/commit/295a34808018f395e22d935772ac9e614bc6bd47))
|
|
62
|
+
## [55.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* properly configure module vs commonjs ([8ae7ffd](https://github.com/christophehurpeau/eslint-config-pob/commit/8ae7ffdb3b37f1ec898b4ce8694420253ff3260d))
|
|
67
|
+
## [55.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
|
|
71
|
+
* remove max-lines ([38d7fda](https://github.com/christophehurpeau/eslint-config-pob/commit/38d7fdaa36f40a6f7434fea242bf6a72bef4bcca))
|
|
72
|
+
## [55.2.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
|
|
73
|
+
|
|
74
|
+
### Features
|
|
75
|
+
|
|
76
|
+
* enable max-params ([93f60a1](https://github.com/christophehurpeau/eslint-config-pob/commit/93f60a12ffa4a94a8adf0f74866c8f2c81c37c2e))
|
|
77
|
+
## [55.2.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
|
|
78
|
+
|
|
79
|
+
### Bug Fixes
|
|
80
|
+
|
|
81
|
+
* remove generator-star-spacing ([a9bf679](https://github.com/christophehurpeau/eslint-config-pob/commit/a9bf679717e27b3e3cb86c25af17d89cae205f59))
|
|
82
|
+
## [55.3.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-05-05)
|
|
83
|
+
|
|
84
|
+
### Features
|
|
85
|
+
|
|
86
|
+
* change curly to warn and add test ([83e0e27](https://github.com/christophehurpeau/eslint-config-pob/commit/83e0e27dbb8f6403cc18862fff606ae517fe2dbb))
|
|
87
|
+
* change quote rule to warn and add test ([a4a5ba2](https://github.com/christophehurpeau/eslint-config-pob/commit/a4a5ba20269fc0c78c3672867c56a87de1f791dd))
|
|
88
|
+
* remove optional peer dependencies ([ddddeb2](https://github.com/christophehurpeau/eslint-config-pob/commit/ddddeb27d606f16dbf6c38b2f61c3a7bfe20510d))
|
|
89
|
+
## [56.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-05-05)
|
|
90
|
+
|
|
91
|
+
### ⚠ BREAKING CHANGES
|
|
92
|
+
|
|
93
|
+
* use standard quotes
|
|
94
|
+
|
|
95
|
+
### Features
|
|
96
|
+
|
|
97
|
+
* use standard quotes ([0083d81](https://github.com/christophehurpeau/eslint-config-pob/commit/0083d816bbe4e320eabe3c23a8d4edaa561df8a3))
|
|
98
|
+
## [56.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-07-27)
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
* pob plugin ([fd99ec8](https://github.com/christophehurpeau/eslint-config-pob/commit/fd99ec8711409b3bc9b960f7eb2e0b2e67984381))
|
|
103
|
+
|
|
104
|
+
Version bump for dependency: @pob/eslint-plugin
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## [56.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.3.0...v56.0.0) (2024-05-05)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### ⚠ BREAKING CHANGES
|
|
111
|
+
|
|
112
|
+
* use standard quotes
|
|
113
|
+
|
|
114
|
+
### Features
|
|
115
|
+
|
|
116
|
+
* use standard quotes ([0083d81](https://github.com/christophehurpeau/eslint-config-pob/commit/0083d816bbe4e320eabe3c23a8d4edaa561df8a3))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
6
121
|
## [55.3.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.2.1...v55.3.0) (2024-05-05)
|
|
7
122
|
|
|
8
123
|
|
package/lib/_base.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
5
|
-
|
|
5
|
+
"eslint:recommended",
|
|
6
|
+
"plugin:@pob/base",
|
|
6
7
|
...[
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
"./plugins/unicorn",
|
|
9
|
+
"./rules/best-practices",
|
|
10
|
+
"./rules/code-quality",
|
|
11
|
+
"./rules/errors",
|
|
12
|
+
"./rules/style",
|
|
13
|
+
"./plugins/import/import-base",
|
|
14
|
+
"./plugins/import/import-commonjs",
|
|
14
15
|
].map(require.resolve),
|
|
15
16
|
],
|
|
17
|
+
plugins: ["@pob/eslint-plugin"],
|
|
16
18
|
};
|
package/lib/base/commonjs.js
CHANGED
package/lib/base/module.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
extends: [
|
|
4
|
+
extends: ["./_base", "./base/commonjs"].map(require.resolve),
|
|
5
5
|
|
|
6
6
|
overrides: [
|
|
7
7
|
{
|
|
8
|
-
files: [
|
|
9
|
-
extends: [
|
|
8
|
+
files: ["*.mjs"],
|
|
9
|
+
extends: ["./base/module", "./plugins/import/import-module"].map(
|
|
10
10
|
require.resolve,
|
|
11
11
|
),
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
files: [
|
|
15
|
-
extends: [
|
|
14
|
+
files: ["*.cjs"],
|
|
15
|
+
extends: ["./base/commonjs", "./plugins/import/import-commonjs"].map(
|
|
16
16
|
require.resolve,
|
|
17
17
|
),
|
|
18
18
|
},
|
package/lib/node/_base.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.overrideRules = {
|
|
4
4
|
// Disable rules already checked by import plugin
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
"n/no-unpublished-require": "off",
|
|
6
|
+
"n/no-extraneous-require": "off",
|
|
7
|
+
"n/no-unpublished-import": "off",
|
|
8
|
+
"n/no-extraneous-import": "off",
|
|
9
|
+
"n/no-missing-require": "off",
|
|
10
|
+
"n/no-missing-import": "off",
|
|
11
11
|
|
|
12
12
|
// Allow process.exit
|
|
13
|
-
|
|
13
|
+
"n/no-process-exit": "off",
|
|
14
14
|
|
|
15
15
|
// ensure deprecated eslint rules are disabled
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
"callback-return": "off",
|
|
17
|
+
"global-require": "off",
|
|
18
|
+
"handle-callback-err": "off",
|
|
19
|
+
"no-mixed-requires": "off",
|
|
20
|
+
"no-new-require": "off",
|
|
21
|
+
"no-path-concat": "off",
|
|
22
|
+
"no-process-env": "off",
|
|
23
|
+
"no-process-exit": "off",
|
|
24
|
+
"no-restricted-modules": "off",
|
|
25
|
+
"no-sync": "off",
|
|
26
26
|
|
|
27
27
|
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/import/extensions.md
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
"import/extensions": [
|
|
29
|
+
"error",
|
|
30
|
+
"ignorePackages",
|
|
31
31
|
{
|
|
32
|
-
mjs:
|
|
33
|
-
cjs:
|
|
34
|
-
js:
|
|
32
|
+
mjs: "always",
|
|
33
|
+
cjs: "always",
|
|
34
|
+
js: "never",
|
|
35
35
|
},
|
|
36
36
|
],
|
|
37
37
|
};
|
package/lib/node/commonjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
const { env, overrideRules } = require(
|
|
3
|
+
const { env, overrideRules } = require("./_base");
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
|
-
plugins: [
|
|
7
|
-
extends: [
|
|
6
|
+
plugins: ["n"],
|
|
7
|
+
extends: ["plugin:n/recommended-script"],
|
|
8
8
|
env,
|
|
9
9
|
|
|
10
10
|
parserOptions: {
|
|
@@ -17,8 +17,8 @@ module.exports = {
|
|
|
17
17
|
|
|
18
18
|
rules: {
|
|
19
19
|
...overrideRules,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
"unicorn/prefer-module": "off",
|
|
21
|
+
"n/no-new-require": "error",
|
|
22
|
+
"n/no-path-concat": "error",
|
|
23
23
|
},
|
|
24
24
|
};
|
package/lib/node/module.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
const { env, overrideRules } = require(
|
|
3
|
+
const { env, overrideRules } = require("./_base");
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
|
-
plugins: [
|
|
7
|
-
extends: [
|
|
6
|
+
plugins: ["n"],
|
|
7
|
+
extends: ["plugin:n/recommended-module"],
|
|
8
8
|
parserOptions: {
|
|
9
|
-
sourceType:
|
|
9
|
+
sourceType: "module",
|
|
10
10
|
// https://node.green/#ES2020
|
|
11
11
|
// most 2020 features are supported in node 14
|
|
12
12
|
// top level await is introduced in 2022
|
|
@@ -16,17 +16,17 @@ module.exports = {
|
|
|
16
16
|
env,
|
|
17
17
|
rules: {
|
|
18
18
|
...overrideRules,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
"unicorn/prefer-module": "error",
|
|
20
|
+
"unicorn/import-index": "off",
|
|
21
21
|
|
|
22
22
|
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/import/extensions.md
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"import/extensions": [
|
|
24
|
+
"error",
|
|
25
|
+
"ignorePackages",
|
|
26
26
|
{
|
|
27
|
-
mjs:
|
|
28
|
-
cjs:
|
|
29
|
-
js:
|
|
27
|
+
mjs: "always",
|
|
28
|
+
cjs: "always",
|
|
29
|
+
js: "always",
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
},
|
package/lib/node-commonjs.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"./_base",
|
|
6
|
+
"./base/commonjs",
|
|
7
|
+
"./plugins/import/import-commonjs",
|
|
8
|
+
"./node/commonjs",
|
|
9
9
|
].map(require.resolve),
|
|
10
10
|
|
|
11
11
|
overrides: [
|
|
12
12
|
{
|
|
13
|
-
files: [
|
|
13
|
+
files: ["*.mjs"],
|
|
14
14
|
extends: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
"./_base",
|
|
16
|
+
"./base/module",
|
|
17
|
+
"./plugins/import/import-module",
|
|
18
|
+
"./node/module",
|
|
19
19
|
].map(require.resolve),
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
files: [
|
|
22
|
+
files: ["*.cjs"],
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
};
|
package/lib/node-module.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"./_base",
|
|
6
|
+
"./base/module",
|
|
7
|
+
"./plugins/import/import-module",
|
|
8
|
+
"./node/module",
|
|
9
9
|
].map(require.resolve),
|
|
10
10
|
|
|
11
11
|
overrides: [
|
|
12
12
|
{
|
|
13
|
-
files: [
|
|
13
|
+
files: ["*.cjs"],
|
|
14
14
|
extends: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
"./_base",
|
|
16
|
+
"./base/commonjs",
|
|
17
|
+
"./plugins/import/import-commonjs",
|
|
18
|
+
"./node/commonjs",
|
|
19
19
|
].map(require.resolve),
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
files: [
|
|
22
|
+
files: ["*.mjs"],
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
};
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
plugins: [
|
|
4
|
+
plugins: ["import"],
|
|
5
5
|
|
|
6
6
|
settings: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
"import/extensions": [".js", ".mjs"],
|
|
8
|
+
"import/core-modules": [],
|
|
9
|
+
"import/ignore": ["node_modules"],
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
rules: {
|
|
13
13
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
|
|
14
|
-
|
|
14
|
+
"import/no-unresolved": ["error", { commonjs: true, caseSensitive: true }],
|
|
15
15
|
|
|
16
16
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/named.md
|
|
17
|
-
|
|
17
|
+
"import/named": "error",
|
|
18
18
|
|
|
19
19
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/export.md
|
|
20
|
-
|
|
20
|
+
"import/export": "error",
|
|
21
21
|
|
|
22
22
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
|
|
23
|
-
|
|
23
|
+
"import/no-named-as-default": "error",
|
|
24
24
|
|
|
25
25
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
|
|
26
|
-
|
|
26
|
+
"import/no-named-as-default-member": "error",
|
|
27
27
|
|
|
28
28
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
|
|
29
|
-
|
|
29
|
+
"import/no-deprecated": "off",
|
|
30
30
|
|
|
31
31
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
|
|
32
|
-
|
|
32
|
+
"import/no-extraneous-dependencies": "error",
|
|
33
33
|
|
|
34
34
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md
|
|
35
|
-
|
|
35
|
+
"import/no-mutable-exports": "error",
|
|
36
36
|
|
|
37
37
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-amd.md
|
|
38
|
-
|
|
38
|
+
"import/no-amd": "error",
|
|
39
39
|
|
|
40
40
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/first.md
|
|
41
|
-
|
|
41
|
+
"import/first": "error",
|
|
42
42
|
|
|
43
43
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
|
|
44
|
-
|
|
44
|
+
"import/no-duplicates": "error",
|
|
45
45
|
|
|
46
46
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md
|
|
47
|
-
|
|
47
|
+
"import/newline-after-import": "error",
|
|
48
48
|
|
|
49
49
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
|
|
50
|
-
|
|
50
|
+
"import/prefer-default-export": "off",
|
|
51
51
|
|
|
52
52
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md
|
|
53
|
-
|
|
53
|
+
"import/no-absolute-path": "error",
|
|
54
54
|
|
|
55
55
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
|
|
56
|
-
|
|
56
|
+
"import/no-dynamic-require": "error",
|
|
57
57
|
|
|
58
58
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
|
|
59
|
-
|
|
59
|
+
"import/no-webpack-loader-syntax": "error",
|
|
60
60
|
|
|
61
61
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-default.md
|
|
62
|
-
|
|
62
|
+
"import/no-named-default": "error",
|
|
63
63
|
|
|
64
64
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-self-import.md
|
|
65
|
-
|
|
65
|
+
"import/no-self-import": "error",
|
|
66
66
|
|
|
67
67
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-cycle.md
|
|
68
|
-
|
|
68
|
+
"import/no-cycle": ["error", { maxDepth: "∞" }],
|
|
69
69
|
|
|
70
70
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md
|
|
71
|
-
|
|
71
|
+
"import/no-useless-path-segments": ["error", { commonjs: true }],
|
|
72
72
|
|
|
73
73
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-import-module-exports.md
|
|
74
|
-
|
|
74
|
+
"import/no-import-module-exports": "error",
|
|
75
75
|
|
|
76
76
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-relative-packages.md
|
|
77
|
-
|
|
77
|
+
"import/no-relative-packages": "error",
|
|
78
78
|
|
|
79
79
|
// https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-empty-named-blocks.md
|
|
80
|
-
|
|
80
|
+
"import/no-empty-named-blocks": "error",
|
|
81
81
|
|
|
82
82
|
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
"import/order": [
|
|
84
|
+
"error",
|
|
85
85
|
{
|
|
86
86
|
groups: [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
"builtin",
|
|
88
|
+
"external",
|
|
89
|
+
"internal",
|
|
90
|
+
"parent",
|
|
91
|
+
"sibling",
|
|
92
|
+
"index",
|
|
93
93
|
],
|
|
94
|
-
alphabetize: { order:
|
|
95
|
-
|
|
94
|
+
alphabetize: { order: "asc", caseInsensitive: false },
|
|
95
|
+
"newlines-between": "never",
|
|
96
96
|
},
|
|
97
97
|
],
|
|
98
98
|
},
|