@fullstacksjs/eslint-config 13.12.0 → 13.13.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 +9 -2
- package/cjs/modules/base.js +1 -1
- package/cjs/modules/jest.js +1 -0
- package/cjs/modules/perfectionist.js +4 -9
- package/cjs/modules/typescript.js +1 -0
- package/package.json +17 -17
- package/src/modules/base.mjs +1 -1
- package/src/modules/jest.mjs +1 -0
- package/src/modules/perfectionist.mjs +4 -8
- package/src/modules/typescript.mjs +1 -0
package/README.md
CHANGED
|
@@ -27,7 +27,10 @@ To use the configuration, all you need is to export the generated config by the
|
|
|
27
27
|
```js
|
|
28
28
|
import { defineConfig } from '@fullstacksjs/eslint-config';
|
|
29
29
|
|
|
30
|
-
export default defineConfig(
|
|
30
|
+
export default defineConfig({
|
|
31
|
+
typescript: {
|
|
32
|
+
tsconfigRootDir: import.meta.dirname, // Recommended when using TypeScript
|
|
33
|
+
});
|
|
31
34
|
```
|
|
32
35
|
|
|
33
36
|
### CJS
|
|
@@ -35,7 +38,11 @@ export default defineConfig();
|
|
|
35
38
|
```js
|
|
36
39
|
const { defineConfig } = require('@fullstacksjs/eslint-config');
|
|
37
40
|
|
|
38
|
-
module.exports = defineConfig(
|
|
41
|
+
module.exports = defineConfig({
|
|
42
|
+
typescript: {
|
|
43
|
+
tsconfigRootDir: __dirname, // Recommended when using TypeScript
|
|
44
|
+
}
|
|
45
|
+
});
|
|
39
46
|
```
|
|
40
47
|
|
|
41
48
|
## How Module Detection Works
|
package/cjs/modules/base.js
CHANGED
package/cjs/modules/jest.js
CHANGED
|
@@ -50,6 +50,7 @@ function jest() {
|
|
|
50
50
|
'jest/no-test-callback': 'off',
|
|
51
51
|
'jest/no-test-prefixes': 'error',
|
|
52
52
|
'jest/no-test-return-statement': 'off',
|
|
53
|
+
'jest/no-unneeded-async-expect-function': 'warn',
|
|
53
54
|
'jest/no-truthy-falsy': 'off',
|
|
54
55
|
'jest/prefer-called-with': 'error',
|
|
55
56
|
'jest/prefer-each': 'warn',
|
|
@@ -19,19 +19,14 @@ function perfectionist() {
|
|
|
19
19
|
'perfectionist/sort-classes': 'off',
|
|
20
20
|
'perfectionist/sort-enums': 'off',
|
|
21
21
|
'perfectionist/sort-exports': 'warn',
|
|
22
|
-
'perfectionist/sort-
|
|
22
|
+
'perfectionist/sort-export-attributes': 'warn',
|
|
23
|
+
'perfectionist/sort-imports': 'warn',
|
|
24
|
+
'perfectionist/sort-import-attributes': 'warn',
|
|
23
25
|
'perfectionist/sort-interfaces': 'off',
|
|
24
26
|
'perfectionist/sort-intersection-types': ['warn', {
|
|
25
27
|
groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
|
|
26
28
|
}],
|
|
27
|
-
'perfectionist/sort-jsx-props':
|
|
28
|
-
groups: ['attr', 'shorthand', 'size', 'unknown', 'callback', 'multiline'],
|
|
29
|
-
customGroups: {
|
|
30
|
-
callback: 'on*',
|
|
31
|
-
size: ['width', 'size', 'height'],
|
|
32
|
-
attr: ['dir', 'lang']
|
|
33
|
-
}
|
|
34
|
-
}],
|
|
29
|
+
'perfectionist/sort-jsx-props': 'off',
|
|
35
30
|
'perfectionist/sort-maps': 'off',
|
|
36
31
|
'perfectionist/sort-named-exports': 'warn',
|
|
37
32
|
'perfectionist/sort-named-imports': 'warn',
|
|
@@ -128,6 +128,7 @@ function typescript(options = {}) {
|
|
|
128
128
|
classes: true
|
|
129
129
|
}],
|
|
130
130
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
131
|
+
'@typescript-eslint/no-useless-default-assignment': 'warn',
|
|
131
132
|
'@typescript-eslint/no-useless-empty-export': 'warn',
|
|
132
133
|
'@typescript-eslint/parameter-properties': 'off',
|
|
133
134
|
'@typescript-eslint/prefer-as-const': 'warn',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.13.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"src",
|
|
16
16
|
"cjs"
|
|
17
17
|
],
|
|
18
|
+
"packageManager": "npm@11.7.0",
|
|
18
19
|
"scripts": {
|
|
19
20
|
"lint": "eslint .",
|
|
20
21
|
"spell": "cspell ./* --no-progress",
|
|
@@ -35,45 +36,45 @@
|
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@eslint-react/eslint-plugin": "2.3.
|
|
39
|
+
"@eslint-react/eslint-plugin": "2.3.13",
|
|
39
40
|
"@eslint/compat": "2.0.0",
|
|
40
|
-
"@next/eslint-plugin-next": "16.0.
|
|
41
|
+
"@next/eslint-plugin-next": "16.0.10",
|
|
41
42
|
"@stylistic/eslint-plugin": "5.6.1",
|
|
42
|
-
"@vitest/eslint-plugin": "1.5.
|
|
43
|
+
"@vitest/eslint-plugin": "1.5.2",
|
|
43
44
|
"deepmerge": "4.3.1",
|
|
44
|
-
"eslint-plugin-better-tailwindcss": "3.
|
|
45
|
+
"eslint-plugin-better-tailwindcss": "3.8.0",
|
|
45
46
|
"eslint-plugin-cypress": "5.2.0",
|
|
46
47
|
"eslint-plugin-import-x": "4.16.1",
|
|
47
|
-
"eslint-plugin-jest": "29.
|
|
48
|
+
"eslint-plugin-jest": "29.5.0",
|
|
48
49
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
49
50
|
"eslint-plugin-n": "17.23.1",
|
|
50
|
-
"eslint-plugin-perfectionist": "
|
|
51
|
-
"eslint-plugin-playwright": "2.
|
|
51
|
+
"eslint-plugin-perfectionist": "5.0.0",
|
|
52
|
+
"eslint-plugin-playwright": "2.4.0",
|
|
52
53
|
"eslint-plugin-prettier": "5.5.4",
|
|
53
54
|
"eslint-plugin-promise": "7.2.1",
|
|
54
55
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
55
56
|
"eslint-plugin-regexp": "2.10.0",
|
|
56
|
-
"eslint-plugin-storybook": "10.1.
|
|
57
|
+
"eslint-plugin-storybook": "10.1.10",
|
|
57
58
|
"globals": "16.5.0",
|
|
58
59
|
"local-pkg": "1.1.2",
|
|
59
|
-
"typescript-eslint": "8.
|
|
60
|
+
"typescript-eslint": "8.50.0"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@eslint/eslintrc": "3.3.3",
|
|
63
|
-
"@eslint/js": "9.39.
|
|
64
|
+
"@eslint/js": "9.39.2",
|
|
64
65
|
"@semantic-release/github": "12.0.2",
|
|
65
|
-
"@semantic-release/npm": "13.1.
|
|
66
|
+
"@semantic-release/npm": "13.1.3",
|
|
66
67
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
67
68
|
"@types/eslint": "9.6.1",
|
|
68
69
|
"cspell": "9.4.0",
|
|
69
|
-
"eslint": "9.39.
|
|
70
|
+
"eslint": "9.39.2",
|
|
70
71
|
"husky": "9.1.7",
|
|
71
72
|
"jest": "30.2.0",
|
|
72
73
|
"lint-staged": "16.2.7",
|
|
73
74
|
"pinst": "3.0.0",
|
|
74
|
-
"prettier": "3.7.
|
|
75
|
+
"prettier": "3.7.4",
|
|
75
76
|
"semantic-release": "25.0.2",
|
|
76
|
-
"storybook": "10.1.
|
|
77
|
+
"storybook": "10.1.10",
|
|
77
78
|
"typescript": "5.9.3",
|
|
78
79
|
"unbuild": "3.6.1"
|
|
79
80
|
},
|
|
@@ -99,7 +100,6 @@
|
|
|
99
100
|
}
|
|
100
101
|
},
|
|
101
102
|
"volta": {
|
|
102
|
-
"node": "
|
|
103
|
-
"npm": "11.6.2"
|
|
103
|
+
"node": "24.12.0"
|
|
104
104
|
}
|
|
105
105
|
}
|
package/src/modules/base.mjs
CHANGED
|
@@ -165,7 +165,7 @@ function base(options = {}) {
|
|
|
165
165
|
requireCatchParameter: true,
|
|
166
166
|
},
|
|
167
167
|
]),
|
|
168
|
-
'prefer-destructuring': ['warn', { object: true, array:
|
|
168
|
+
'prefer-destructuring': ['warn', { object: true, array: false }],
|
|
169
169
|
'prefer-exponentiation-operator': 'warn',
|
|
170
170
|
'prefer-numeric-literals': 'error',
|
|
171
171
|
'prefer-object-has-own': 'warn',
|
package/src/modules/jest.mjs
CHANGED
|
@@ -39,6 +39,7 @@ function jest() {
|
|
|
39
39
|
'jest/no-test-callback': 'off',
|
|
40
40
|
'jest/no-test-prefixes': 'error',
|
|
41
41
|
'jest/no-test-return-statement': 'off',
|
|
42
|
+
'jest/no-unneeded-async-expect-function': 'warn',
|
|
42
43
|
'jest/no-truthy-falsy': 'off',
|
|
43
44
|
'jest/prefer-called-with': 'error',
|
|
44
45
|
'jest/prefer-each': 'warn',
|
|
@@ -11,7 +11,9 @@ function perfectionist() {
|
|
|
11
11
|
'perfectionist/sort-classes': 'off',
|
|
12
12
|
'perfectionist/sort-enums': 'off',
|
|
13
13
|
'perfectionist/sort-exports': 'warn',
|
|
14
|
-
'perfectionist/sort-
|
|
14
|
+
'perfectionist/sort-export-attributes': 'warn',
|
|
15
|
+
'perfectionist/sort-imports': 'warn',
|
|
16
|
+
'perfectionist/sort-import-attributes': 'warn',
|
|
15
17
|
'perfectionist/sort-interfaces': 'off',
|
|
16
18
|
'perfectionist/sort-intersection-types': [
|
|
17
19
|
'warn',
|
|
@@ -32,13 +34,7 @@ function perfectionist() {
|
|
|
32
34
|
],
|
|
33
35
|
},
|
|
34
36
|
],
|
|
35
|
-
'perfectionist/sort-jsx-props':
|
|
36
|
-
'warn',
|
|
37
|
-
{
|
|
38
|
-
groups: ['attr', 'shorthand', 'size', 'unknown', 'callback', 'multiline'],
|
|
39
|
-
customGroups: { callback: 'on*', size: ['width', 'size', 'height'], attr: ['dir', 'lang'] },
|
|
40
|
-
},
|
|
41
|
-
],
|
|
37
|
+
'perfectionist/sort-jsx-props': 'off',
|
|
42
38
|
'perfectionist/sort-maps': 'off',
|
|
43
39
|
'perfectionist/sort-named-exports': 'warn',
|
|
44
40
|
'perfectionist/sort-named-imports': 'warn',
|
|
@@ -117,6 +117,7 @@ function typescript(options = {}) {
|
|
|
117
117
|
],
|
|
118
118
|
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: true }],
|
|
119
119
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
120
|
+
'@typescript-eslint/no-useless-default-assignment': 'warn',
|
|
120
121
|
'@typescript-eslint/no-useless-empty-export': 'warn',
|
|
121
122
|
'@typescript-eslint/parameter-properties': 'off',
|
|
122
123
|
'@typescript-eslint/prefer-as-const': 'warn',
|