@shelf/eslint-config 5.3.4 → 5.4.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/base.js +4 -4
- package/frontend-typescript.js +2 -2
- package/package.json +13 -14
- package/typescript.js +9 -8
package/base.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import jestFormatting from 'eslint-plugin-jest-formatting';
|
|
2
2
|
import prettier from 'eslint-plugin-prettier';
|
|
3
3
|
import jestPlugin from 'eslint-plugin-jest';
|
|
4
|
-
import
|
|
4
|
+
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
5
5
|
import stylistic from '@stylistic/eslint-plugin';
|
|
6
6
|
import env from './common/env.js';
|
|
7
|
-
import
|
|
7
|
+
import paddingLineRules from './rules/padding-line-between-statements.js';
|
|
8
8
|
import jestRules from './rules/jest.js';
|
|
9
9
|
import preferEs6 from './rules/prefer-es6.js';
|
|
10
10
|
import importOrder from './rules/import-order.js';
|
|
@@ -21,7 +21,7 @@ export default [
|
|
|
21
21
|
},
|
|
22
22
|
jestPlugin.configs['flat/recommended'],
|
|
23
23
|
jestPlugin.configs['flat/style'],
|
|
24
|
-
|
|
24
|
+
prettierRecommended,
|
|
25
25
|
{
|
|
26
26
|
plugins: {
|
|
27
27
|
prettier,
|
|
@@ -36,7 +36,7 @@ export default [
|
|
|
36
36
|
|
|
37
37
|
rules: {
|
|
38
38
|
'prettier/prettier': 'error',
|
|
39
|
-
...
|
|
39
|
+
...paddingLineRules,
|
|
40
40
|
...jestRules,
|
|
41
41
|
...preferEs6,
|
|
42
42
|
'no-empty': [
|
package/frontend-typescript.js
CHANGED
|
@@ -19,7 +19,7 @@ import typescriptRules from './rules/typescript.js';
|
|
|
19
19
|
import consistentTypeImports from './rules/consistent-type-imports.js';
|
|
20
20
|
import baseConfig from './base.js';
|
|
21
21
|
import env from './common/env.js';
|
|
22
|
-
import
|
|
22
|
+
import restrictedPackages from './rules/restricted-packages-import.js';
|
|
23
23
|
|
|
24
24
|
const __filename = fileURLToPath(import.meta.url);
|
|
25
25
|
const __dirname = path.dirname(__filename);
|
|
@@ -42,7 +42,7 @@ export default [
|
|
|
42
42
|
...baseConfig,
|
|
43
43
|
{
|
|
44
44
|
rules: {
|
|
45
|
-
...
|
|
45
|
+
...restrictedPackages,
|
|
46
46
|
'no-console': 'error',
|
|
47
47
|
'react-hooks/exhaustive-deps': 'error',
|
|
48
48
|
'sonarjs/cognitive-complexity': ['error', 18],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "ESLint Config for Shelf Projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "shelfio/eslint-config",
|
|
@@ -12,11 +12,6 @@
|
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=8.10"
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "echo ok",
|
|
17
|
-
"prepare": "husky",
|
|
18
|
-
"lint": "eslint . --fix"
|
|
19
|
-
},
|
|
20
15
|
"files": [
|
|
21
16
|
"common",
|
|
22
17
|
"rules",
|
|
@@ -35,13 +30,13 @@
|
|
|
35
30
|
"@eslint/eslintrc": "3.3.1",
|
|
36
31
|
"@eslint/js": "9.39.1",
|
|
37
32
|
"@stylistic/eslint-plugin": "5.6.1",
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
39
|
-
"@typescript-eslint/parser": "8.
|
|
40
|
-
"eslint-config-next": "16.0.
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "8.48.0",
|
|
34
|
+
"@typescript-eslint/parser": "8.48.0",
|
|
35
|
+
"eslint-config-next": "16.0.5",
|
|
41
36
|
"eslint-config-prettier": "10.1.8",
|
|
42
37
|
"eslint-plugin-babel": "5.3.1",
|
|
43
38
|
"eslint-plugin-import": "2.32.0",
|
|
44
|
-
"eslint-plugin-jest": "29.2.
|
|
39
|
+
"eslint-plugin-jest": "29.2.1",
|
|
45
40
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
46
41
|
"eslint-plugin-jsx": "0.1.0",
|
|
47
42
|
"eslint-plugin-n": "17.23.1",
|
|
@@ -50,16 +45,16 @@
|
|
|
50
45
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
51
46
|
"eslint-plugin-shelf-no-need-lodash-methods": "2.0.8",
|
|
52
47
|
"eslint-plugin-sonarjs": "3.0.5",
|
|
53
|
-
"eslint-plugin-testing-library": "7.13.
|
|
48
|
+
"eslint-plugin-testing-library": "7.13.5",
|
|
54
49
|
"eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
|
|
55
50
|
"globals": "16.5.0",
|
|
56
|
-
"typescript-eslint": "8.
|
|
51
|
+
"typescript-eslint": "8.48.0"
|
|
57
52
|
},
|
|
58
53
|
"devDependencies": {
|
|
59
54
|
"eslint": "9.39.1",
|
|
60
55
|
"husky": "9.1.7",
|
|
61
56
|
"lint-staged": "16.2.7",
|
|
62
|
-
"prettier": "3.
|
|
57
|
+
"prettier": "3.7.1"
|
|
63
58
|
},
|
|
64
59
|
"peerDependencies": {
|
|
65
60
|
"eslint": "9.x",
|
|
@@ -71,5 +66,9 @@
|
|
|
71
66
|
"lint-staged": {
|
|
72
67
|
"*.{html,md,yml}": "prettier --write",
|
|
73
68
|
"*.{ts,js,json}": "eslint --fix"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"test": "echo ok",
|
|
72
|
+
"lint": "eslint . --fix"
|
|
74
73
|
}
|
|
75
|
-
}
|
|
74
|
+
}
|
package/typescript.js
CHANGED
|
@@ -10,20 +10,20 @@ import js from '@eslint/js';
|
|
|
10
10
|
import {FlatCompat} from '@eslint/eslintrc';
|
|
11
11
|
import tsEslint from 'typescript-eslint';
|
|
12
12
|
import jestPlugin from 'eslint-plugin-jest';
|
|
13
|
-
import
|
|
13
|
+
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
14
14
|
import shelfNoLodash from 'eslint-plugin-shelf-no-need-lodash-methods';
|
|
15
15
|
import stylistic from '@stylistic/eslint-plugin';
|
|
16
16
|
import env from './common/env.js';
|
|
17
17
|
import jestRules from './rules/jest.js';
|
|
18
|
-
import
|
|
18
|
+
import paddingLineRules from './rules/padding-line-between-statements.js';
|
|
19
19
|
import preferEs6 from './rules/prefer-es6.js';
|
|
20
20
|
import importOrder from './rules/import-order.js';
|
|
21
21
|
import sortImports from './rules/sort-imports.js';
|
|
22
|
-
import
|
|
22
|
+
import typeAssertionRules from './rules/consistent-type-assertions.js';
|
|
23
23
|
import consistentTypeImports from './rules/consistent-type-imports.js';
|
|
24
24
|
import youDontNeedLodash from './rules/you-dont-need-lodash.js';
|
|
25
25
|
import typescriptRules from './rules/typescript.js';
|
|
26
|
-
import
|
|
26
|
+
import restrictedPackages from './rules/restricted-packages-import.js';
|
|
27
27
|
import overrides from './common/overrides.js';
|
|
28
28
|
|
|
29
29
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -45,7 +45,7 @@ export default [
|
|
|
45
45
|
},
|
|
46
46
|
jestPlugin.configs['flat/recommended'],
|
|
47
47
|
jestPlugin.configs['flat/style'],
|
|
48
|
-
|
|
48
|
+
prettierRecommended,
|
|
49
49
|
shelfNoLodash.configs.all,
|
|
50
50
|
{
|
|
51
51
|
plugins: {
|
|
@@ -87,13 +87,13 @@ export default [
|
|
|
87
87
|
'no-nested-ternary': 'error',
|
|
88
88
|
'prettier/prettier': 'error',
|
|
89
89
|
|
|
90
|
-
...
|
|
90
|
+
...paddingLineRules,
|
|
91
91
|
...jestRules,
|
|
92
92
|
...preferEs6,
|
|
93
93
|
...importOrder,
|
|
94
94
|
...sortImports,
|
|
95
95
|
'comma-dangle': 'off',
|
|
96
|
-
...
|
|
96
|
+
...typeAssertionRules,
|
|
97
97
|
camelcase: [
|
|
98
98
|
'error',
|
|
99
99
|
{
|
|
@@ -120,6 +120,7 @@ export default [
|
|
|
120
120
|
{
|
|
121
121
|
min: 1,
|
|
122
122
|
max: 22,
|
|
123
|
+
properties: 'never',
|
|
123
124
|
},
|
|
124
125
|
],
|
|
125
126
|
'no-unreachable': 'error',
|
|
@@ -128,7 +129,7 @@ export default [
|
|
|
128
129
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
129
130
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
130
131
|
...typescriptRules,
|
|
131
|
-
...
|
|
132
|
+
...restrictedPackages,
|
|
132
133
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
133
134
|
'no-restricted-syntax': [
|
|
134
135
|
'error',
|