@fullstacksjs/eslint-config 14.3.0 → 14.5.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/cjs/modules/base.js +1 -0
- package/cjs/modules/cypress.js +1 -0
- package/cjs/modules/imports.js +1 -0
- package/cjs/modules/jest.js +1 -0
- package/cjs/modules/next.js +1 -0
- package/cjs/modules/node.js +1 -0
- package/cjs/modules/perfectionist.js +7 -2
- package/cjs/modules/playwright.js +39 -9
- package/cjs/modules/prettier.js +1 -0
- package/cjs/modules/promise.js +1 -0
- package/cjs/modules/react.js +3 -2
- package/cjs/modules/regex.js +20 -0
- package/cjs/modules/storybook.js +2 -0
- package/cjs/modules/stylistic.js +1 -0
- package/cjs/modules/tailwind.js +12 -7
- package/cjs/modules/tests.js +1 -0
- package/cjs/modules/typescript.js +1 -0
- package/cjs/modules/vitest.js +3 -2
- package/package.json +18 -17
- package/src/modules/base.mjs +1 -0
- package/src/modules/cypress.mjs +1 -0
- package/src/modules/imports.mjs +1 -0
- package/src/modules/jest.mjs +1 -0
- package/src/modules/next.mjs +1 -0
- package/src/modules/node.mjs +1 -0
- package/src/modules/perfectionist.mjs +7 -2
- package/src/modules/playwright.mjs +39 -9
- package/src/modules/prettier.mjs +1 -0
- package/src/modules/promise.mjs +1 -0
- package/src/modules/react.mjs +4 -3
- package/src/modules/regex.mjs +20 -0
- package/src/modules/storybook.mjs +2 -0
- package/src/modules/stylistic.mjs +1 -0
- package/src/modules/tailwind.mjs +13 -7
- package/src/modules/tests.mjs +1 -0
- package/src/modules/typescript.mjs +1 -0
- package/src/modules/vitest.mjs +3 -2
package/cjs/modules/base.js
CHANGED
package/cjs/modules/cypress.js
CHANGED
|
@@ -10,6 +10,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
/** @return { import('eslint').Linter.Config } */
|
|
11
11
|
function cypress() {
|
|
12
12
|
return {
|
|
13
|
+
name: 'cypress',
|
|
13
14
|
files: _globs.globs.e2e,
|
|
14
15
|
plugins: {
|
|
15
16
|
cypress: _eslintPluginCypress.default
|
package/cjs/modules/imports.js
CHANGED
package/cjs/modules/jest.js
CHANGED
|
@@ -15,6 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
15
|
function jest(options = {}) {
|
|
16
16
|
const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
|
|
17
17
|
return {
|
|
18
|
+
name: 'jest',
|
|
18
19
|
files: _globs.globs.test,
|
|
19
20
|
plugins: {
|
|
20
21
|
jest: _eslintPluginJest.default
|
package/cjs/modules/next.js
CHANGED
package/cjs/modules/node.js
CHANGED
|
@@ -11,18 +11,23 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
11
11
|
*/
|
|
12
12
|
function perfectionist() {
|
|
13
13
|
return {
|
|
14
|
+
name: 'perfectionist',
|
|
14
15
|
plugins: {
|
|
15
16
|
perfectionist: _eslintPluginPerfectionist.default
|
|
16
17
|
},
|
|
17
18
|
rules: {
|
|
18
19
|
'perfectionist/sort-array-includes': 'warn',
|
|
20
|
+
'perfectionist/sort-arrays': 'off',
|
|
19
21
|
'perfectionist/sort-classes': 'off',
|
|
22
|
+
'perfectionist/sort-decorators': 'off',
|
|
20
23
|
'perfectionist/sort-enums': 'off',
|
|
21
|
-
'perfectionist/sort-exports': 'warn',
|
|
22
24
|
'perfectionist/sort-export-attributes': 'warn',
|
|
23
|
-
'perfectionist/sort-
|
|
25
|
+
'perfectionist/sort-exports': 'warn',
|
|
26
|
+
'perfectionist/sort-heritage-clauses': 'warn',
|
|
24
27
|
'perfectionist/sort-import-attributes': 'warn',
|
|
28
|
+
'perfectionist/sort-imports': 'warn',
|
|
25
29
|
'perfectionist/sort-interfaces': 'off',
|
|
30
|
+
'perfectionist/sort-modules': 'off',
|
|
26
31
|
'perfectionist/sort-intersection-types': ['warn', {
|
|
27
32
|
groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
|
|
28
33
|
}],
|
|
@@ -10,6 +10,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
/** @return { import('eslint').Linter.Config } */
|
|
11
11
|
function playwright() {
|
|
12
12
|
return {
|
|
13
|
+
name: 'playwright',
|
|
13
14
|
plugins: {
|
|
14
15
|
playwright: _eslintPluginPlaywright.default
|
|
15
16
|
},
|
|
@@ -17,34 +18,63 @@ function playwright() {
|
|
|
17
18
|
rules: {
|
|
18
19
|
'playwright/consistent-spacing-between-blocks': 'warn',
|
|
19
20
|
'playwright/expect-expect': 'error',
|
|
20
|
-
'playwright/
|
|
21
|
+
'playwright/max-expects': 'off',
|
|
21
22
|
'playwright/max-nested-describe': ['warn', {
|
|
22
23
|
max: 5
|
|
23
24
|
}],
|
|
25
|
+
'playwright/missing-playwright-await': 'error',
|
|
26
|
+
'playwright/no-commented-out-tests': 'warn',
|
|
27
|
+
'playwright/no-conditional-expect': 'warn',
|
|
28
|
+
'playwright/no-conditional-in-test': 'warn',
|
|
24
29
|
'playwright/no-duplicate-hooks': 'error',
|
|
30
|
+
'playwright/no-duplicate-slow': 'off',
|
|
25
31
|
'playwright/no-element-handle': 'warn',
|
|
26
32
|
'playwright/no-eval': 'warn',
|
|
27
|
-
'playwright/no-page-pause': 'warn',
|
|
28
|
-
'playwright/no-slowed-test': 'warn',
|
|
29
|
-
'playwright/no-skipped-test': 'warn',
|
|
30
|
-
'playwright/no-standalone-expect': 'warn',
|
|
31
33
|
'playwright/no-focused-test': 'warn',
|
|
32
34
|
'playwright/no-force-option': 'warn',
|
|
33
|
-
'playwright/no-
|
|
34
|
-
'playwright/no-
|
|
35
|
+
'playwright/no-get-by-title': 'off',
|
|
36
|
+
'playwright/no-hooks': 'off',
|
|
35
37
|
'playwright/no-nested-step': 'warn',
|
|
36
38
|
'playwright/no-networkidle': 'warn',
|
|
37
|
-
'playwright/no-
|
|
39
|
+
'playwright/no-nth-methods': 'off',
|
|
40
|
+
'playwright/no-page-pause': 'warn',
|
|
41
|
+
'playwright/no-raw-locators': 'off',
|
|
42
|
+
'playwright/no-restricted-locators': 'off',
|
|
43
|
+
'playwright/no-restricted-matchers': 'off',
|
|
44
|
+
'playwright/no-restricted-roles': 'off',
|
|
45
|
+
'playwright/no-skipped-test': 'warn',
|
|
46
|
+
'playwright/no-slowed-test': 'warn',
|
|
47
|
+
'playwright/no-standalone-expect': 'warn',
|
|
38
48
|
'playwright/no-unsafe-references': 'warn',
|
|
39
|
-
'playwright/no-useless-not': 'warn',
|
|
40
49
|
'playwright/no-unused-locators': 'warn',
|
|
50
|
+
'playwright/no-useless-await': 'error',
|
|
51
|
+
'playwright/no-useless-not': 'warn',
|
|
41
52
|
'playwright/no-wait-for-navigation': 'warn',
|
|
42
53
|
'playwright/no-wait-for-selector': 'warn',
|
|
43
54
|
'playwright/no-wait-for-timeout': 'warn',
|
|
55
|
+
'playwright/prefer-comparison-matcher': 'off',
|
|
56
|
+
'playwright/prefer-equality-matcher': 'off',
|
|
57
|
+
'playwright/prefer-hooks-in-order': 'off',
|
|
58
|
+
'playwright/prefer-hooks-on-top': 'off',
|
|
59
|
+
'playwright/prefer-locator': 'off',
|
|
60
|
+
'playwright/prefer-lowercase-title': 'off',
|
|
61
|
+
'playwright/prefer-native-locators': 'off',
|
|
62
|
+
'playwright/prefer-strict-equal': 'off',
|
|
63
|
+
'playwright/prefer-to-be': 'off',
|
|
64
|
+
'playwright/prefer-to-contain': 'off',
|
|
65
|
+
'playwright/prefer-to-have-count': 'off',
|
|
66
|
+
'playwright/prefer-to-have-length': 'off',
|
|
44
67
|
'playwright/prefer-web-first-assertions': 'warn',
|
|
68
|
+
'playwright/require-hook': 'off',
|
|
69
|
+
'playwright/require-soft-assertions': 'off',
|
|
70
|
+
'playwright/require-tags': 'off',
|
|
71
|
+
'playwright/require-to-pass-timeout': 'off',
|
|
72
|
+
'playwright/require-to-throw-message': 'off',
|
|
73
|
+
'playwright/require-top-level-describe': 'off',
|
|
45
74
|
'playwright/valid-describe-callback': 'warn',
|
|
46
75
|
'playwright/valid-expect-in-promise': 'warn',
|
|
47
76
|
'playwright/valid-expect': 'warn',
|
|
77
|
+
'playwright/valid-test-tags': 'off',
|
|
48
78
|
'playwright/valid-title': 'warn'
|
|
49
79
|
}
|
|
50
80
|
};
|
package/cjs/modules/prettier.js
CHANGED
package/cjs/modules/promise.js
CHANGED
|
@@ -10,6 +10,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
/** @return { import('eslint').Linter.Config } */
|
|
11
11
|
function promise(options = {}) {
|
|
12
12
|
return {
|
|
13
|
+
name: 'promise',
|
|
13
14
|
plugins: {
|
|
14
15
|
promise: _eslintPluginPromise.default
|
|
15
16
|
},
|
package/cjs/modules/react.js
CHANGED
|
@@ -15,6 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
15
|
function react(options = {}) {
|
|
16
16
|
const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
|
|
17
17
|
return {
|
|
18
|
+
name: 'react',
|
|
18
19
|
files: [_globs.globs.js, _globs.globs.jsx, _globs.globs.ts, _globs.globs.tsx],
|
|
19
20
|
plugins: {
|
|
20
21
|
..._eslintPlugin.default.configs.all.plugins,
|
|
@@ -118,9 +119,9 @@ function react(options = {}) {
|
|
|
118
119
|
'react-hooks/preserve-manual-memoization': 'error',
|
|
119
120
|
'react-hooks/purity': 'error',
|
|
120
121
|
'react-hooks/refs': 'error',
|
|
121
|
-
'react-hooks/set-state-in-effect': 'error',
|
|
122
|
+
'react-hooks/set-state-in-effect': (0, _conditions.strict)('error'),
|
|
122
123
|
'react-hooks/set-state-in-render': 'error',
|
|
123
|
-
'react-hooks/static-components': 'error',
|
|
124
|
+
'react-hooks/static-components': (0, _conditions.strict)('error'),
|
|
124
125
|
'react-hooks/unsupported-syntax': 'warn',
|
|
125
126
|
'react-hooks/use-memo': 'error',
|
|
126
127
|
'react-hooks/incompatible-library': 'warn',
|
package/cjs/modules/regex.js
CHANGED
|
@@ -13,6 +13,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
13
13
|
*/
|
|
14
14
|
function regex(options = {}) {
|
|
15
15
|
return {
|
|
16
|
+
name: 'regex',
|
|
16
17
|
plugins: {
|
|
17
18
|
regexp: plugin
|
|
18
19
|
},
|
|
@@ -24,10 +25,13 @@ function regex(options = {}) {
|
|
|
24
25
|
rules: {
|
|
25
26
|
'regexp/confusing-quantifier': 'warn',
|
|
26
27
|
'regexp/control-character-escape': 'error',
|
|
28
|
+
'regexp/grapheme-string-literal': 'off',
|
|
29
|
+
'regexp/hexadecimal-escape': 'warn',
|
|
27
30
|
'regexp/letter-case': 'warn',
|
|
28
31
|
'regexp/match-any': 'error',
|
|
29
32
|
'regexp/negation': 'error',
|
|
30
33
|
'regexp/no-contradiction-with-assertion': 'error',
|
|
34
|
+
'regexp/no-control-character': 'off',
|
|
31
35
|
'regexp/no-dupe-characters-character-class': 'error',
|
|
32
36
|
'regexp/no-dupe-disjunctions': 'error',
|
|
33
37
|
'regexp/no-empty-alternative': 'warn',
|
|
@@ -47,9 +51,12 @@ function regex(options = {}) {
|
|
|
47
51
|
'regexp/no-missing-g-flag': 'error',
|
|
48
52
|
'regexp/no-non-standard-flag': 'error',
|
|
49
53
|
'regexp/no-obscure-range': 'error',
|
|
54
|
+
'regexp/no-octal': 'off',
|
|
50
55
|
'regexp/no-optional-assertion': 'error',
|
|
51
56
|
'regexp/no-potentially-useless-backreference': 'warn',
|
|
57
|
+
'regexp/no-standalone-backslash': 'warn',
|
|
52
58
|
'regexp/no-super-linear-backtracking': 'error',
|
|
59
|
+
'regexp/no-super-linear-move': 'off',
|
|
53
60
|
'regexp/no-trivially-nested-assertion': 'error',
|
|
54
61
|
'regexp/no-trivially-nested-quantifier': 'error',
|
|
55
62
|
'regexp/no-unused-capturing-group': 'error',
|
|
@@ -71,19 +78,32 @@ function regex(options = {}) {
|
|
|
71
78
|
'regexp/optimal-quantifier-concatenation': 'error',
|
|
72
79
|
'regexp/prefer-character-class': 'error',
|
|
73
80
|
'regexp/prefer-d': 'error',
|
|
81
|
+
'regexp/prefer-escape-replacement-dollar-char': 'warn',
|
|
82
|
+
'regexp/prefer-lookaround': 'off',
|
|
83
|
+
'regexp/prefer-named-backreference': 'warn',
|
|
84
|
+
'regexp/prefer-named-capture-group': 'off',
|
|
85
|
+
'regexp/prefer-named-replacement': 'off',
|
|
74
86
|
'regexp/prefer-plus-quantifier': 'error',
|
|
75
87
|
'regexp/prefer-predefined-assertion': 'error',
|
|
88
|
+
'regexp/prefer-quantifier': 'off',
|
|
76
89
|
'regexp/prefer-question-quantifier': 'error',
|
|
77
90
|
'regexp/prefer-range': 'error',
|
|
91
|
+
'regexp/prefer-regexp-exec': 'warn',
|
|
92
|
+
'regexp/prefer-regexp-test': 'warn',
|
|
93
|
+
'regexp/prefer-result-array-groups': 'warn',
|
|
78
94
|
'regexp/prefer-set-operation': 'error',
|
|
79
95
|
'regexp/prefer-star-quantifier': 'error',
|
|
80
96
|
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
81
97
|
'regexp/prefer-w': 'error',
|
|
98
|
+
'regexp/require-unicode-regexp': 'off',
|
|
99
|
+
'regexp/require-unicode-sets-regexp': 'off',
|
|
82
100
|
'regexp/simplify-set-operations': 'error',
|
|
83
101
|
'regexp/sort-alternatives': 'warn',
|
|
84
102
|
'regexp/sort-character-class-elements': 'warn',
|
|
85
103
|
'regexp/sort-flags': 'warn',
|
|
86
104
|
'regexp/strict': 'error',
|
|
105
|
+
'regexp/unicode-escape': 'warn',
|
|
106
|
+
'regexp/unicode-property': 'warn',
|
|
87
107
|
'regexp/use-ignore-case': 'error',
|
|
88
108
|
'no-invalid-regexp': 'off',
|
|
89
109
|
'no-useless-backreference': 'off',
|
package/cjs/modules/storybook.js
CHANGED
|
@@ -10,6 +10,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
/** @return { import('eslint').Linter.Config } */
|
|
11
11
|
function storybook() {
|
|
12
12
|
return {
|
|
13
|
+
name: 'storybook',
|
|
13
14
|
files: _globs.globs.storybook,
|
|
14
15
|
plugins: {
|
|
15
16
|
storybook: _eslintPluginStorybook.default
|
|
@@ -21,6 +22,7 @@ function storybook() {
|
|
|
21
22
|
'storybook/hierarchy-separator': 'warn',
|
|
22
23
|
'storybook/meta-satisfies-type': 'warn',
|
|
23
24
|
'storybook/no-redundant-story-name': 'warn',
|
|
25
|
+
'storybook/no-renderer-packages': 'warn',
|
|
24
26
|
'storybook/no-uninstalled-addons': 'error',
|
|
25
27
|
'storybook/prefer-pascal-case': 'warn',
|
|
26
28
|
'storybook/story-exports': 'error',
|
package/cjs/modules/stylistic.js
CHANGED
package/cjs/modules/tailwind.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _conditions = require("../utils/conditions.js");
|
|
7
8
|
/**
|
|
8
9
|
* @param { import('../index.js').Options } options
|
|
9
10
|
* @return { Promise<import('eslint').Linter.Config> }
|
|
@@ -11,6 +12,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
11
12
|
async function tailwind(options = {}) {
|
|
12
13
|
const plugin = await Promise.resolve().then(() => require('eslint-plugin-better-tailwindcss'));
|
|
13
14
|
return {
|
|
15
|
+
name: 'tailwind',
|
|
14
16
|
plugins: {
|
|
15
17
|
'better-tailwindcss': plugin.default ?? plugin
|
|
16
18
|
},
|
|
@@ -24,17 +26,20 @@ async function tailwind(options = {}) {
|
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
28
|
rules: {
|
|
27
|
-
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
28
|
-
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
29
|
-
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
30
|
-
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
31
29
|
'better-tailwindcss/enforce-canonical-classes': 'warn',
|
|
32
|
-
'better-tailwindcss/enforce-logical-properties': 'warn',
|
|
33
30
|
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
34
|
-
'better-tailwindcss/enforce-consistent-
|
|
31
|
+
'better-tailwindcss/enforce-consistent-important-position': 'warn',
|
|
32
|
+
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
|
|
35
33
|
'better-tailwindcss/enforce-consistent-variable-syntax': 'error',
|
|
34
|
+
'better-tailwindcss/enforce-consistent-variant-order': 'warn',
|
|
35
|
+
'better-tailwindcss/enforce-logical-properties': (0, _conditions.strict)('warn'),
|
|
36
36
|
'better-tailwindcss/enforce-shorthand-classes': 'warn',
|
|
37
|
-
'better-tailwindcss/
|
|
37
|
+
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
38
|
+
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
39
|
+
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
40
|
+
'better-tailwindcss/no-restricted-classes': 'warn',
|
|
41
|
+
'better-tailwindcss/no-unknown-classes': (0, _conditions.strict)('warn'),
|
|
42
|
+
'better-tailwindcss/no-unnecessary-whitespace': 'warn'
|
|
38
43
|
}
|
|
39
44
|
};
|
|
40
45
|
}
|
package/cjs/modules/tests.js
CHANGED
|
@@ -15,6 +15,7 @@ var _namingConvention = require("../utils/naming-convention.js");
|
|
|
15
15
|
function typescript(options = {}) {
|
|
16
16
|
const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
|
|
17
17
|
return {
|
|
18
|
+
name: 'typescript',
|
|
18
19
|
files: [_globs.globs.ts, _globs.globs.tsx],
|
|
19
20
|
plugins: {
|
|
20
21
|
'@typescript-eslint': _typescriptEslint.plugin
|
package/cjs/modules/vitest.js
CHANGED
|
@@ -12,6 +12,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
12
12
|
*/
|
|
13
13
|
function vitest() {
|
|
14
14
|
return {
|
|
15
|
+
name: 'vitest',
|
|
15
16
|
files: _globs.globs.test,
|
|
16
17
|
plugins: {
|
|
17
18
|
vitest: _eslintPlugin.default
|
|
@@ -78,7 +79,7 @@ function vitest() {
|
|
|
78
79
|
'vitest/prefer-hooks-in-order': 'warn',
|
|
79
80
|
'vitest/prefer-hooks-on-top': 'warn',
|
|
80
81
|
'vitest/prefer-importing-vitest-globals': 'off',
|
|
81
|
-
'vitest/prefer-lowercase-title': '
|
|
82
|
+
'vitest/prefer-lowercase-title': 'off',
|
|
82
83
|
'vitest/prefer-mock-promise-shorthand': 'warn',
|
|
83
84
|
'vitest/prefer-mock-return-shorthand': 'warn',
|
|
84
85
|
'vitest/prefer-snapshot-hint': 'warn',
|
|
@@ -93,7 +94,7 @@ function vitest() {
|
|
|
93
94
|
'vitest/prefer-to-have-length': 'warn',
|
|
94
95
|
'vitest/prefer-todo': 'warn',
|
|
95
96
|
'vitest/prefer-vi-mocked': 'warn',
|
|
96
|
-
'vitest/require-hook': '
|
|
97
|
+
'vitest/require-hook': 'off',
|
|
97
98
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'warn',
|
|
98
99
|
'vitest/require-mock-type-parameters': 'off',
|
|
99
100
|
'vitest/require-to-throw-message': 'warn',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"postbuild": "./postbuild",
|
|
26
26
|
"prepublishOnly": "pinst --disable",
|
|
27
27
|
"postpublish": "pinst --enable",
|
|
28
|
+
"check:rules": "node scripts/check-missing-rules.mjs",
|
|
28
29
|
"pre-commit": "npm run test && lint-staged && npm run spell"
|
|
29
30
|
},
|
|
30
31
|
"main": "./cjs/index.js",
|
|
@@ -37,45 +38,45 @@
|
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@eslint-react/eslint-plugin": "5.
|
|
41
|
-
"@eslint/compat": "2.0
|
|
42
|
-
"@next/eslint-plugin-next": "16.2.
|
|
41
|
+
"@eslint-react/eslint-plugin": "5.8.3",
|
|
42
|
+
"@eslint/compat": "2.1.0",
|
|
43
|
+
"@next/eslint-plugin-next": "16.2.6",
|
|
43
44
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
44
|
-
"@vitest/eslint-plugin": "1.6.
|
|
45
|
+
"@vitest/eslint-plugin": "1.6.17",
|
|
45
46
|
"deepmerge": "4.3.1",
|
|
46
47
|
"eslint-plugin-better-tailwindcss": "4.5.0",
|
|
47
|
-
"eslint-plugin-cypress": "6.4.
|
|
48
|
+
"eslint-plugin-cypress": "6.4.1",
|
|
48
49
|
"eslint-plugin-import-x": "4.16.2",
|
|
49
50
|
"eslint-plugin-jest": "29.15.2",
|
|
50
51
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
51
|
-
"eslint-plugin-n": "18.0.
|
|
52
|
+
"eslint-plugin-n": "18.0.1",
|
|
52
53
|
"eslint-plugin-perfectionist": "5.9.0",
|
|
53
|
-
"eslint-plugin-playwright": "2.10.
|
|
54
|
+
"eslint-plugin-playwright": "2.10.4",
|
|
54
55
|
"eslint-plugin-prettier": "5.5.5",
|
|
55
56
|
"eslint-plugin-promise": "7.3.0",
|
|
56
57
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
57
58
|
"eslint-plugin-regexp": "3.1.0",
|
|
58
|
-
"eslint-plugin-storybook": "10.
|
|
59
|
+
"eslint-plugin-storybook": "10.4.0",
|
|
59
60
|
"globals": "17.6.0",
|
|
60
|
-
"local-pkg": "1.1
|
|
61
|
-
"typescript-eslint": "8.59.
|
|
61
|
+
"local-pkg": "1.2.1",
|
|
62
|
+
"typescript-eslint": "8.59.4"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@eslint/eslintrc": "3.3.5",
|
|
65
66
|
"@eslint/js": "10.0.1",
|
|
66
|
-
"@semantic-release/github": "12.0.
|
|
67
|
+
"@semantic-release/github": "12.0.8",
|
|
67
68
|
"@semantic-release/npm": "13.1.5",
|
|
68
|
-
"@semantic-release/release-notes-generator": "14.1.
|
|
69
|
+
"@semantic-release/release-notes-generator": "14.1.1",
|
|
69
70
|
"@types/eslint": "9.6.1",
|
|
70
71
|
"cspell": "10.0.0",
|
|
71
|
-
"eslint": "10.
|
|
72
|
+
"eslint": "10.4.0",
|
|
72
73
|
"husky": "9.1.7",
|
|
73
|
-
"jest": "30.
|
|
74
|
-
"lint-staged": "
|
|
74
|
+
"jest": "30.4.2",
|
|
75
|
+
"lint-staged": "17.0.5",
|
|
75
76
|
"pinst": "3.0.0",
|
|
76
77
|
"prettier": "3.8.3",
|
|
77
78
|
"semantic-release": "25.0.3",
|
|
78
|
-
"storybook": "10.
|
|
79
|
+
"storybook": "10.4.0",
|
|
79
80
|
"typescript": "6.0.3",
|
|
80
81
|
"unbuild": "3.6.1"
|
|
81
82
|
},
|
package/src/modules/base.mjs
CHANGED
package/src/modules/cypress.mjs
CHANGED
package/src/modules/imports.mjs
CHANGED
package/src/modules/jest.mjs
CHANGED
package/src/modules/next.mjs
CHANGED
package/src/modules/node.mjs
CHANGED
|
@@ -5,16 +5,21 @@ import plugin from 'eslint-plugin-perfectionist';
|
|
|
5
5
|
*/
|
|
6
6
|
function perfectionist() {
|
|
7
7
|
return {
|
|
8
|
+
name: 'perfectionist',
|
|
8
9
|
plugins: { perfectionist: plugin },
|
|
9
10
|
rules: {
|
|
10
11
|
'perfectionist/sort-array-includes': 'warn',
|
|
12
|
+
'perfectionist/sort-arrays': 'off',
|
|
11
13
|
'perfectionist/sort-classes': 'off',
|
|
14
|
+
'perfectionist/sort-decorators': 'off',
|
|
12
15
|
'perfectionist/sort-enums': 'off',
|
|
13
|
-
'perfectionist/sort-exports': 'warn',
|
|
14
16
|
'perfectionist/sort-export-attributes': 'warn',
|
|
15
|
-
'perfectionist/sort-
|
|
17
|
+
'perfectionist/sort-exports': 'warn',
|
|
18
|
+
'perfectionist/sort-heritage-clauses': 'warn',
|
|
16
19
|
'perfectionist/sort-import-attributes': 'warn',
|
|
20
|
+
'perfectionist/sort-imports': 'warn',
|
|
17
21
|
'perfectionist/sort-interfaces': 'off',
|
|
22
|
+
'perfectionist/sort-modules': 'off',
|
|
18
23
|
'perfectionist/sort-intersection-types': [
|
|
19
24
|
'warn',
|
|
20
25
|
{
|
|
@@ -5,37 +5,67 @@ import { globs } from '../utils/globs.mjs';
|
|
|
5
5
|
/** @return { import('eslint').Linter.Config } */
|
|
6
6
|
function playwright() {
|
|
7
7
|
return {
|
|
8
|
+
name: 'playwright',
|
|
8
9
|
plugins: { playwright: plugin },
|
|
9
10
|
files: globs.e2e,
|
|
10
11
|
rules: {
|
|
11
12
|
'playwright/consistent-spacing-between-blocks': 'warn',
|
|
12
13
|
'playwright/expect-expect': 'error',
|
|
13
|
-
'playwright/
|
|
14
|
+
'playwright/max-expects': 'off',
|
|
14
15
|
'playwright/max-nested-describe': ['warn', { max: 5 }],
|
|
16
|
+
'playwright/missing-playwright-await': 'error',
|
|
17
|
+
'playwright/no-commented-out-tests': 'warn',
|
|
18
|
+
'playwright/no-conditional-expect': 'warn',
|
|
19
|
+
'playwright/no-conditional-in-test': 'warn',
|
|
15
20
|
'playwright/no-duplicate-hooks': 'error',
|
|
21
|
+
'playwright/no-duplicate-slow': 'off',
|
|
16
22
|
'playwright/no-element-handle': 'warn',
|
|
17
23
|
'playwright/no-eval': 'warn',
|
|
18
|
-
'playwright/no-page-pause': 'warn',
|
|
19
|
-
'playwright/no-slowed-test': 'warn',
|
|
20
|
-
'playwright/no-skipped-test': 'warn',
|
|
21
|
-
'playwright/no-standalone-expect': 'warn',
|
|
22
24
|
'playwright/no-focused-test': 'warn',
|
|
23
25
|
'playwright/no-force-option': 'warn',
|
|
24
|
-
'playwright/no-
|
|
25
|
-
'playwright/no-
|
|
26
|
+
'playwright/no-get-by-title': 'off',
|
|
27
|
+
'playwright/no-hooks': 'off',
|
|
26
28
|
'playwright/no-nested-step': 'warn',
|
|
27
29
|
'playwright/no-networkidle': 'warn',
|
|
28
|
-
'playwright/no-
|
|
30
|
+
'playwright/no-nth-methods': 'off',
|
|
31
|
+
'playwright/no-page-pause': 'warn',
|
|
32
|
+
'playwright/no-raw-locators': 'off',
|
|
33
|
+
'playwright/no-restricted-locators': 'off',
|
|
34
|
+
'playwright/no-restricted-matchers': 'off',
|
|
35
|
+
'playwright/no-restricted-roles': 'off',
|
|
36
|
+
'playwright/no-skipped-test': 'warn',
|
|
37
|
+
'playwright/no-slowed-test': 'warn',
|
|
38
|
+
'playwright/no-standalone-expect': 'warn',
|
|
29
39
|
'playwright/no-unsafe-references': 'warn',
|
|
30
|
-
'playwright/no-useless-not': 'warn',
|
|
31
40
|
'playwright/no-unused-locators': 'warn',
|
|
41
|
+
'playwright/no-useless-await': 'error',
|
|
42
|
+
'playwright/no-useless-not': 'warn',
|
|
32
43
|
'playwright/no-wait-for-navigation': 'warn',
|
|
33
44
|
'playwright/no-wait-for-selector': 'warn',
|
|
34
45
|
'playwright/no-wait-for-timeout': 'warn',
|
|
46
|
+
'playwright/prefer-comparison-matcher': 'off',
|
|
47
|
+
'playwright/prefer-equality-matcher': 'off',
|
|
48
|
+
'playwright/prefer-hooks-in-order': 'off',
|
|
49
|
+
'playwright/prefer-hooks-on-top': 'off',
|
|
50
|
+
'playwright/prefer-locator': 'off',
|
|
51
|
+
'playwright/prefer-lowercase-title': 'off',
|
|
52
|
+
'playwright/prefer-native-locators': 'off',
|
|
53
|
+
'playwright/prefer-strict-equal': 'off',
|
|
54
|
+
'playwright/prefer-to-be': 'off',
|
|
55
|
+
'playwright/prefer-to-contain': 'off',
|
|
56
|
+
'playwright/prefer-to-have-count': 'off',
|
|
57
|
+
'playwright/prefer-to-have-length': 'off',
|
|
35
58
|
'playwright/prefer-web-first-assertions': 'warn',
|
|
59
|
+
'playwright/require-hook': 'off',
|
|
60
|
+
'playwright/require-soft-assertions': 'off',
|
|
61
|
+
'playwright/require-tags': 'off',
|
|
62
|
+
'playwright/require-to-pass-timeout': 'off',
|
|
63
|
+
'playwright/require-to-throw-message': 'off',
|
|
64
|
+
'playwright/require-top-level-describe': 'off',
|
|
36
65
|
'playwright/valid-describe-callback': 'warn',
|
|
37
66
|
'playwright/valid-expect-in-promise': 'warn',
|
|
38
67
|
'playwright/valid-expect': 'warn',
|
|
68
|
+
'playwright/valid-test-tags': 'off',
|
|
39
69
|
'playwright/valid-title': 'warn',
|
|
40
70
|
},
|
|
41
71
|
};
|
package/src/modules/prettier.mjs
CHANGED
package/src/modules/promise.mjs
CHANGED
package/src/modules/react.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import a11yPlugin from 'eslint-plugin-jsx-a11y';
|
|
|
3
3
|
import hooksPlugin from 'eslint-plugin-react-hooks';
|
|
4
4
|
import { parser } from 'typescript-eslint';
|
|
5
5
|
|
|
6
|
-
import { predicate } from '../utils/conditions.mjs';
|
|
6
|
+
import { predicate, strict } from '../utils/conditions.mjs';
|
|
7
7
|
import { globs } from '../utils/globs.mjs';
|
|
8
8
|
|
|
9
9
|
/** @return { import('eslint').Linter.Config } */
|
|
@@ -11,6 +11,7 @@ function react(options = {}) {
|
|
|
11
11
|
const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
|
|
12
12
|
|
|
13
13
|
return {
|
|
14
|
+
name: 'react',
|
|
14
15
|
files: [globs.js, globs.jsx, globs.ts, globs.tsx],
|
|
15
16
|
plugins: {
|
|
16
17
|
...reactPlugin.configs.all.plugins,
|
|
@@ -125,9 +126,9 @@ function react(options = {}) {
|
|
|
125
126
|
'react-hooks/preserve-manual-memoization': 'error',
|
|
126
127
|
'react-hooks/purity': 'error',
|
|
127
128
|
'react-hooks/refs': 'error',
|
|
128
|
-
'react-hooks/set-state-in-effect': 'error',
|
|
129
|
+
'react-hooks/set-state-in-effect': strict('error'),
|
|
129
130
|
'react-hooks/set-state-in-render': 'error',
|
|
130
|
-
'react-hooks/static-components': 'error',
|
|
131
|
+
'react-hooks/static-components': strict('error'),
|
|
131
132
|
'react-hooks/unsupported-syntax': 'warn',
|
|
132
133
|
'react-hooks/use-memo': 'error',
|
|
133
134
|
'react-hooks/incompatible-library': 'warn',
|
package/src/modules/regex.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import * as plugin from 'eslint-plugin-regexp';
|
|
|
6
6
|
*/
|
|
7
7
|
function regex(options = {}) {
|
|
8
8
|
return {
|
|
9
|
+
name: 'regex',
|
|
9
10
|
plugins: { regexp: plugin },
|
|
10
11
|
settings: {
|
|
11
12
|
regexp: {
|
|
@@ -15,10 +16,13 @@ function regex(options = {}) {
|
|
|
15
16
|
rules: {
|
|
16
17
|
'regexp/confusing-quantifier': 'warn',
|
|
17
18
|
'regexp/control-character-escape': 'error',
|
|
19
|
+
'regexp/grapheme-string-literal': 'off',
|
|
20
|
+
'regexp/hexadecimal-escape': 'warn',
|
|
18
21
|
'regexp/letter-case': 'warn',
|
|
19
22
|
'regexp/match-any': 'error',
|
|
20
23
|
'regexp/negation': 'error',
|
|
21
24
|
'regexp/no-contradiction-with-assertion': 'error',
|
|
25
|
+
'regexp/no-control-character': 'off',
|
|
22
26
|
'regexp/no-dupe-characters-character-class': 'error',
|
|
23
27
|
'regexp/no-dupe-disjunctions': 'error',
|
|
24
28
|
'regexp/no-empty-alternative': 'warn',
|
|
@@ -38,9 +42,12 @@ function regex(options = {}) {
|
|
|
38
42
|
'regexp/no-missing-g-flag': 'error',
|
|
39
43
|
'regexp/no-non-standard-flag': 'error',
|
|
40
44
|
'regexp/no-obscure-range': 'error',
|
|
45
|
+
'regexp/no-octal': 'off',
|
|
41
46
|
'regexp/no-optional-assertion': 'error',
|
|
42
47
|
'regexp/no-potentially-useless-backreference': 'warn',
|
|
48
|
+
'regexp/no-standalone-backslash': 'warn',
|
|
43
49
|
'regexp/no-super-linear-backtracking': 'error',
|
|
50
|
+
'regexp/no-super-linear-move': 'off',
|
|
44
51
|
'regexp/no-trivially-nested-assertion': 'error',
|
|
45
52
|
'regexp/no-trivially-nested-quantifier': 'error',
|
|
46
53
|
'regexp/no-unused-capturing-group': 'error',
|
|
@@ -62,19 +69,32 @@ function regex(options = {}) {
|
|
|
62
69
|
'regexp/optimal-quantifier-concatenation': 'error',
|
|
63
70
|
'regexp/prefer-character-class': 'error',
|
|
64
71
|
'regexp/prefer-d': 'error',
|
|
72
|
+
'regexp/prefer-escape-replacement-dollar-char': 'warn',
|
|
73
|
+
'regexp/prefer-lookaround': 'off',
|
|
74
|
+
'regexp/prefer-named-backreference': 'warn',
|
|
75
|
+
'regexp/prefer-named-capture-group': 'off',
|
|
76
|
+
'regexp/prefer-named-replacement': 'off',
|
|
65
77
|
'regexp/prefer-plus-quantifier': 'error',
|
|
66
78
|
'regexp/prefer-predefined-assertion': 'error',
|
|
79
|
+
'regexp/prefer-quantifier': 'off',
|
|
67
80
|
'regexp/prefer-question-quantifier': 'error',
|
|
68
81
|
'regexp/prefer-range': 'error',
|
|
82
|
+
'regexp/prefer-regexp-exec': 'warn',
|
|
83
|
+
'regexp/prefer-regexp-test': 'warn',
|
|
84
|
+
'regexp/prefer-result-array-groups': 'warn',
|
|
69
85
|
'regexp/prefer-set-operation': 'error',
|
|
70
86
|
'regexp/prefer-star-quantifier': 'error',
|
|
71
87
|
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
72
88
|
'regexp/prefer-w': 'error',
|
|
89
|
+
'regexp/require-unicode-regexp': 'off',
|
|
90
|
+
'regexp/require-unicode-sets-regexp': 'off',
|
|
73
91
|
'regexp/simplify-set-operations': 'error',
|
|
74
92
|
'regexp/sort-alternatives': 'warn',
|
|
75
93
|
'regexp/sort-character-class-elements': 'warn',
|
|
76
94
|
'regexp/sort-flags': 'warn',
|
|
77
95
|
'regexp/strict': 'error',
|
|
96
|
+
'regexp/unicode-escape': 'warn',
|
|
97
|
+
'regexp/unicode-property': 'warn',
|
|
78
98
|
'regexp/use-ignore-case': 'error',
|
|
79
99
|
|
|
80
100
|
'no-invalid-regexp': 'off',
|
|
@@ -5,6 +5,7 @@ import { globs } from '../utils/globs.mjs';
|
|
|
5
5
|
/** @return { import('eslint').Linter.Config } */
|
|
6
6
|
function storybook() {
|
|
7
7
|
return {
|
|
8
|
+
name: 'storybook',
|
|
8
9
|
files: globs.storybook,
|
|
9
10
|
plugins: { storybook: plugin },
|
|
10
11
|
rules: {
|
|
@@ -14,6 +15,7 @@ function storybook() {
|
|
|
14
15
|
'storybook/hierarchy-separator': 'warn',
|
|
15
16
|
'storybook/meta-satisfies-type': 'warn',
|
|
16
17
|
'storybook/no-redundant-story-name': 'warn',
|
|
18
|
+
'storybook/no-renderer-packages': 'warn',
|
|
17
19
|
'storybook/no-uninstalled-addons': 'error',
|
|
18
20
|
'storybook/prefer-pascal-case': 'warn',
|
|
19
21
|
'storybook/story-exports': 'error',
|
|
@@ -6,6 +6,7 @@ import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
|
6
6
|
*/
|
|
7
7
|
function stylistic() {
|
|
8
8
|
return {
|
|
9
|
+
name: 'stylistic',
|
|
9
10
|
plugins: { '@stylistic': stylisticPlugin },
|
|
10
11
|
rules: {
|
|
11
12
|
'@stylistic/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never', propElementValues: 'always' }],
|
package/src/modules/tailwind.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { strict } from '../utils/conditions.mjs';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @param { import('..').Options } options
|
|
3
5
|
* @return { Promise<import('eslint').Linter.Config> }
|
|
@@ -5,6 +7,7 @@
|
|
|
5
7
|
async function tailwind(options = {}) {
|
|
6
8
|
const plugin = await import('eslint-plugin-better-tailwindcss');
|
|
7
9
|
return {
|
|
10
|
+
name: 'tailwind',
|
|
8
11
|
plugins: { 'better-tailwindcss': plugin.default ?? plugin },
|
|
9
12
|
settings: {
|
|
10
13
|
'better-tailwindcss': {
|
|
@@ -16,17 +19,20 @@ async function tailwind(options = {}) {
|
|
|
16
19
|
},
|
|
17
20
|
},
|
|
18
21
|
rules: {
|
|
19
|
-
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
20
|
-
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
21
|
-
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
22
|
-
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
23
22
|
'better-tailwindcss/enforce-canonical-classes': 'warn',
|
|
24
|
-
'better-tailwindcss/enforce-logical-properties': 'warn',
|
|
25
23
|
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
26
|
-
'better-tailwindcss/enforce-consistent-
|
|
24
|
+
'better-tailwindcss/enforce-consistent-important-position': 'warn',
|
|
25
|
+
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
|
|
27
26
|
'better-tailwindcss/enforce-consistent-variable-syntax': 'error',
|
|
27
|
+
'better-tailwindcss/enforce-consistent-variant-order': 'warn',
|
|
28
|
+
'better-tailwindcss/enforce-logical-properties': strict('warn'),
|
|
28
29
|
'better-tailwindcss/enforce-shorthand-classes': 'warn',
|
|
29
|
-
'better-tailwindcss/
|
|
30
|
+
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
31
|
+
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
32
|
+
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
33
|
+
'better-tailwindcss/no-restricted-classes': 'warn',
|
|
34
|
+
'better-tailwindcss/no-unknown-classes': strict('warn'),
|
|
35
|
+
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
30
36
|
},
|
|
31
37
|
};
|
|
32
38
|
}
|
package/src/modules/tests.mjs
CHANGED
|
@@ -12,6 +12,7 @@ function typescript(options = {}) {
|
|
|
12
12
|
const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
|
|
13
13
|
|
|
14
14
|
return {
|
|
15
|
+
name: 'typescript',
|
|
15
16
|
files: [globs.ts, globs.tsx],
|
|
16
17
|
plugins: { '@typescript-eslint': plugin },
|
|
17
18
|
languageOptions: {
|
package/src/modules/vitest.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { globs } from '../utils/globs.mjs';
|
|
|
7
7
|
*/
|
|
8
8
|
function vitest() {
|
|
9
9
|
return {
|
|
10
|
+
name: 'vitest',
|
|
10
11
|
files: globs.test,
|
|
11
12
|
plugins: { vitest: plugin },
|
|
12
13
|
languageOptions: {
|
|
@@ -72,7 +73,7 @@ function vitest() {
|
|
|
72
73
|
'vitest/prefer-hooks-in-order': 'warn',
|
|
73
74
|
'vitest/prefer-hooks-on-top': 'warn',
|
|
74
75
|
'vitest/prefer-importing-vitest-globals': 'off',
|
|
75
|
-
'vitest/prefer-lowercase-title': '
|
|
76
|
+
'vitest/prefer-lowercase-title': 'off',
|
|
76
77
|
'vitest/prefer-mock-promise-shorthand': 'warn',
|
|
77
78
|
'vitest/prefer-mock-return-shorthand': 'warn',
|
|
78
79
|
'vitest/prefer-snapshot-hint': 'warn',
|
|
@@ -87,7 +88,7 @@ function vitest() {
|
|
|
87
88
|
'vitest/prefer-to-have-length': 'warn',
|
|
88
89
|
'vitest/prefer-todo': 'warn',
|
|
89
90
|
'vitest/prefer-vi-mocked': 'warn',
|
|
90
|
-
'vitest/require-hook': '
|
|
91
|
+
'vitest/require-hook': 'off',
|
|
91
92
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'warn',
|
|
92
93
|
'vitest/require-mock-type-parameters': 'off',
|
|
93
94
|
'vitest/require-to-throw-message': 'warn',
|