@pob/eslint-config 55.0.0 → 55.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 +20 -0
- package/lib/_base.js +16 -0
- package/lib/base/commonjs.js +10 -0
- package/lib/base/module.js +10 -0
- package/lib/index.js +18 -1
- package/lib/node/commonjs.js +0 -28
- package/lib/node/module.js +0 -20
- package/lib/node-commonjs.js +21 -1
- package/lib/node-module.js +21 -3
- package/lib/plugins/unicorn.js +0 -2
- package/lib/rules/best-practices.js +0 -1
- package/lib/rules/code-quality.js +0 -8
- package/package.json +2 -2
- package/lib/base.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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
|
+
## [55.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.0.1...v55.1.0) (2024-04-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* remove max-lines ([6978860](https://github.com/christophehurpeau/eslint-config-pob/commit/6978860f007cf6e6cfc065519a7d0f07b07af7f5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [55.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.0.0...v55.0.1) (2024-04-21)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* properly configure module vs commonjs ([0094461](https://github.com/christophehurpeau/eslint-config-pob/commit/0094461a633be153a734a4f52cfaa548f92a6e1e))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [55.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v54.0.2...v55.0.0) (2024-04-20)
|
|
7
27
|
|
|
8
28
|
|
package/lib/_base.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
extends: [
|
|
5
|
+
'eslint:recommended',
|
|
6
|
+
...[
|
|
7
|
+
'./plugins/unicorn',
|
|
8
|
+
'./rules/best-practices',
|
|
9
|
+
'./rules/code-quality',
|
|
10
|
+
'./rules/errors',
|
|
11
|
+
'./rules/style',
|
|
12
|
+
'./plugins/import/import-base',
|
|
13
|
+
'./plugins/import/import-commonjs',
|
|
14
|
+
].map(require.resolve),
|
|
15
|
+
],
|
|
16
|
+
};
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
module.exports =
|
|
3
|
+
module.exports = {
|
|
4
|
+
extends: ['./_base', './base/commonjs'].map(require.resolve),
|
|
5
|
+
|
|
6
|
+
overrides: [
|
|
7
|
+
{
|
|
8
|
+
files: ['*.mjs'],
|
|
9
|
+
extends: ['./base/module', './plugins/import/import-module'].map(
|
|
10
|
+
require.resolve,
|
|
11
|
+
),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
files: ['*.cjs'],
|
|
15
|
+
extends: ['./base/commonjs', './plugins/import/import-commonjs'].map(
|
|
16
|
+
require.resolve,
|
|
17
|
+
),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
package/lib/node/commonjs.js
CHANGED
|
@@ -21,32 +21,4 @@ module.exports = {
|
|
|
21
21
|
'n/no-new-require': 'error',
|
|
22
22
|
'n/no-path-concat': 'error',
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
overrides: [
|
|
26
|
-
{
|
|
27
|
-
files: ['*.mjs'],
|
|
28
|
-
extends: ['plugin:n/recommended-module'],
|
|
29
|
-
parserOptions: {
|
|
30
|
-
sourceType: 'module',
|
|
31
|
-
ecmaVersion: 2022,
|
|
32
|
-
},
|
|
33
|
-
rules: {
|
|
34
|
-
...overrideRules,
|
|
35
|
-
'unicorn/prefer-module': 'error',
|
|
36
|
-
'import/extensions': [
|
|
37
|
-
'error',
|
|
38
|
-
'ignorePackages',
|
|
39
|
-
{
|
|
40
|
-
mjs: 'always',
|
|
41
|
-
cjs: 'always',
|
|
42
|
-
js: 'always',
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
files: ['*.cjs'],
|
|
49
|
-
rules: {},
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
24
|
};
|
package/lib/node/module.js
CHANGED
|
@@ -30,24 +30,4 @@ module.exports = {
|
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
overrides: [
|
|
35
|
-
{
|
|
36
|
-
files: ['*.mjs'],
|
|
37
|
-
rules: {},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
files: ['*.cjs'],
|
|
41
|
-
extends: ['plugin:n/recommended-script'],
|
|
42
|
-
parserOptions: {
|
|
43
|
-
sourceType: 'script',
|
|
44
|
-
ecmaVersion: 2022,
|
|
45
|
-
},
|
|
46
|
-
rules: {
|
|
47
|
-
strict: ['error', 'safe'],
|
|
48
|
-
...overrideRules,
|
|
49
|
-
'unicorn/prefer-module': 'off',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
33
|
};
|
package/lib/node-commonjs.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
extends: [
|
|
4
|
+
extends: [
|
|
5
|
+
'./_base',
|
|
6
|
+
'./base/commonjs',
|
|
7
|
+
'./plugins/import/import-commonjs',
|
|
8
|
+
'./node/commonjs',
|
|
9
|
+
].map(require.resolve),
|
|
10
|
+
|
|
11
|
+
overrides: [
|
|
12
|
+
{
|
|
13
|
+
files: ['*.mjs'],
|
|
14
|
+
extends: [
|
|
15
|
+
'./_base',
|
|
16
|
+
'./base/module',
|
|
17
|
+
'./plugins/import/import-module',
|
|
18
|
+
'./node/module',
|
|
19
|
+
].map(require.resolve),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
files: ['*.cjs'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
5
25
|
};
|
package/lib/node-module.js
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
extends: [
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
extends: [
|
|
5
|
+
'./_base',
|
|
6
|
+
'./base/module',
|
|
7
|
+
'./plugins/import/import-module',
|
|
8
|
+
'./node/module',
|
|
9
|
+
].map(require.resolve),
|
|
10
|
+
|
|
11
|
+
overrides: [
|
|
12
|
+
{
|
|
13
|
+
files: ['*.cjs'],
|
|
14
|
+
extends: [
|
|
15
|
+
'./_base',
|
|
16
|
+
'./base/commonjs',
|
|
17
|
+
'./plugins/import/import-commonjs',
|
|
18
|
+
'./node/commonjs',
|
|
19
|
+
].map(require.resolve),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
files: ['*.mjs'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
7
25
|
};
|
package/lib/plugins/unicorn.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/eslint-config",
|
|
3
|
-
"version": "55.
|
|
3
|
+
"version": "55.1.0",
|
|
4
4
|
"description": "eslint config files",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"main": "./lib/index.js",
|
|
20
20
|
"exports": {
|
|
21
|
-
".": "./lib/
|
|
21
|
+
".": "./lib/index.js",
|
|
22
22
|
"./node-commonjs": "./lib/node-commonjs.js",
|
|
23
23
|
"./node-module": "./lib/node-module.js",
|
|
24
24
|
"./root-commonjs": "./lib/root-commonjs.js",
|
package/lib/base.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
extends: [
|
|
5
|
-
'eslint:recommended',
|
|
6
|
-
...[
|
|
7
|
-
'./plugins/unicorn',
|
|
8
|
-
'./rules/best-practices',
|
|
9
|
-
'./rules/code-quality',
|
|
10
|
-
'./rules/errors',
|
|
11
|
-
'./rules/style',
|
|
12
|
-
'./plugins/import/import-base',
|
|
13
|
-
'./plugins/import/import-commonjs',
|
|
14
|
-
].map(require.resolve),
|
|
15
|
-
],
|
|
16
|
-
|
|
17
|
-
parserOptions: {
|
|
18
|
-
sourceType: 'script',
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
rules: {
|
|
22
|
-
strict: ['error', 'safe'],
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
overrides: [
|
|
26
|
-
{
|
|
27
|
-
files: ['*.mjs'],
|
|
28
|
-
parserOptions: {
|
|
29
|
-
sourceType: 'module',
|
|
30
|
-
},
|
|
31
|
-
extends: [require.resolve('./plugins/import/import-module')],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
files: ['*.cjs'],
|
|
35
|
-
parserOptions: {
|
|
36
|
-
sourceType: 'script',
|
|
37
|
-
},
|
|
38
|
-
extends: [require.resolve('./plugins/import/import-commonjs')],
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
};
|