@shelf/eslint-config 6.1.1 → 6.2.1
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/README.md +1 -2
- package/base.js +7 -0
- package/common/overrides.js +6 -0
- package/frontend-typescript.js +1 -0
- package/package.json +7 -6
- package/rules/default-barrel-exports.js +21 -0
- package/typescript.js +1 -0
package/README.md
CHANGED
package/base.js
CHANGED
|
@@ -11,6 +11,10 @@ import preferEs6 from './rules/prefer-es6.js';
|
|
|
11
11
|
import importOrder from './rules/import-order.js';
|
|
12
12
|
import sortImports from './rules/sort-imports.js';
|
|
13
13
|
import comments from './rules/comments.js';
|
|
14
|
+
import defaultBarrelExports, {
|
|
15
|
+
barrelPagesOverride,
|
|
16
|
+
barrelPlugin,
|
|
17
|
+
} from './rules/default-barrel-exports.js';
|
|
14
18
|
|
|
15
19
|
const jestFormattingCompat = fixupPluginRules(jestFormatting);
|
|
16
20
|
|
|
@@ -29,6 +33,7 @@ export default [
|
|
|
29
33
|
plugins: {
|
|
30
34
|
prettier,
|
|
31
35
|
'@stylistic': stylistic,
|
|
36
|
+
...barrelPlugin,
|
|
32
37
|
},
|
|
33
38
|
|
|
34
39
|
languageOptions: {
|
|
@@ -51,6 +56,7 @@ export default [
|
|
|
51
56
|
...importOrder,
|
|
52
57
|
...sortImports,
|
|
53
58
|
...comments,
|
|
59
|
+
...defaultBarrelExports,
|
|
54
60
|
'comma-dangle': 'off',
|
|
55
61
|
camelcase: 'error',
|
|
56
62
|
eqeqeq: ['error', 'smart'],
|
|
@@ -61,4 +67,5 @@ export default [
|
|
|
61
67
|
'require-await': 'error',
|
|
62
68
|
},
|
|
63
69
|
},
|
|
70
|
+
barrelPagesOverride,
|
|
64
71
|
];
|
package/common/overrides.js
CHANGED
|
@@ -9,6 +9,12 @@ export default {
|
|
|
9
9
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
|
+
noUnusedVarsInTypes: {
|
|
13
|
+
files: ['**/types.ts', '**/types/**/*.ts'],
|
|
14
|
+
rules: {
|
|
15
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
12
18
|
allowRequireInConfigs: {
|
|
13
19
|
files: [
|
|
14
20
|
'*wallaby.config.js',
|
package/frontend-typescript.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "ESLint Config for Shelf Projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "shelfio/eslint-config",
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
"@eslint/eslintrc": "3.3.5",
|
|
31
31
|
"@eslint/js": "10.0.1",
|
|
32
32
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
34
|
-
"@typescript-eslint/parser": "8.
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "8.57.0",
|
|
34
|
+
"@typescript-eslint/parser": "8.57.0",
|
|
35
35
|
"eslint-config-next": "16.1.6",
|
|
36
36
|
"eslint-config-prettier": "10.1.8",
|
|
37
37
|
"eslint-plugin-babel": "5.3.1",
|
|
38
|
+
"eslint-plugin-barrel-files": "3.0.1",
|
|
38
39
|
"eslint-plugin-import": "2.32.0",
|
|
39
40
|
"eslint-plugin-jest": "29.15.0",
|
|
40
41
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
@@ -44,16 +45,16 @@
|
|
|
44
45
|
"eslint-plugin-react": "7.37.5",
|
|
45
46
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
46
47
|
"eslint-plugin-shelf-no-need-lodash-methods": "2.0.8",
|
|
47
|
-
"eslint-plugin-sonarjs": "4.0.
|
|
48
|
+
"eslint-plugin-sonarjs": "4.0.2",
|
|
48
49
|
"eslint-plugin-testing-library": "7.16.0",
|
|
49
50
|
"eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
|
|
50
51
|
"globals": "17.4.0",
|
|
51
|
-
"typescript-eslint": "8.
|
|
52
|
+
"typescript-eslint": "8.57.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"eslint": "10.0.3",
|
|
55
56
|
"husky": "9.1.7",
|
|
56
|
-
"lint-staged": "16.
|
|
57
|
+
"lint-staged": "16.4.0",
|
|
57
58
|
"prettier": "3.8.1"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import barrelFiles from 'eslint-plugin-barrel-files';
|
|
2
|
+
|
|
3
|
+
export const barrelPlugin = {'barrel-files': barrelFiles};
|
|
4
|
+
|
|
5
|
+
const defaultBarrelExports = {
|
|
6
|
+
'import/no-default-export': 'warn',
|
|
7
|
+
'import/prefer-default-export': 'off',
|
|
8
|
+
'barrel-files/avoid-barrel-files': [
|
|
9
|
+
'warn',
|
|
10
|
+
{
|
|
11
|
+
amountOfExportsToConsiderModuleAsBarrel: 0,
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const barrelPagesOverride = {
|
|
17
|
+
files: ['pages/**/*.{js,jsx,ts,tsx}'],
|
|
18
|
+
rules: {'import/no-default-export': 'off'},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default defaultBarrelExports;
|