ultracite 7.3.0 → 7.3.2
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 +4 -0
- package/config/biome/core/biome.jsonc +9 -16
- package/config/biome/jest/biome.jsonc +21 -0
- package/config/biome/type-aware/biome.jsonc +19 -0
- package/config/biome/vitest/biome.jsonc +21 -0
- package/config/eslint/angular/eslint.config.mjs +1 -0
- package/config/eslint/astro/eslint.config.mjs +1 -0
- package/config/eslint/astro/rules/astro.mjs +1 -3
- package/config/eslint/core/eslint.config.mjs +21 -38
- package/config/eslint/core/rules/eslint-typescript.mjs +1 -1
- package/config/eslint/core/rules/eslint.mjs +1 -1
- package/config/eslint/core/rules/import.mjs +17 -17
- package/config/eslint/core/rules/n.mjs +2 -2
- package/config/eslint/core/rules/storybook.mjs +1 -3
- package/config/eslint/core/rules/typescript.mjs +20 -21
- package/config/eslint/core/rules/unicorn.mjs +2 -2
- package/config/eslint/jest/eslint.config.mjs +25 -0
- package/config/eslint/next/eslint.config.mjs +1 -0
- package/config/eslint/qwik/eslint.config.mjs +1 -0
- package/config/eslint/react/eslint.config.mjs +4 -3
- package/config/eslint/react/rules/jsx-a11y.mjs +2 -2
- package/config/eslint/react/rules/query.mjs +1 -3
- package/config/eslint/react/rules/react.mjs +7 -7
- package/config/eslint/remix/eslint.config.mjs +1 -0
- package/config/eslint/solid/eslint.config.mjs +1 -0
- package/config/eslint/svelte/eslint.config.mjs +1 -0
- package/config/eslint/vitest/eslint.config.mjs +19 -0
- package/config/eslint/vitest/rules/vitest.mjs +36 -0
- package/config/eslint/vue/eslint.config.mjs +1 -0
- package/config/oxlint/core/.oxlintrc.json +7 -65
- package/config/oxlint/jest/.oxlintrc.json +74 -0
- package/config/oxlint/vitest/.oxlintrc.json +65 -0
- package/config/prettier/prettier.config.mjs +6 -6
- package/config/stylelint/stylelint.config.mjs +3 -3
- package/dist/index.js +114 -114
- package/package.json +36 -35
- /package/config/eslint/{core → jest}/rules/jest.mjs +0 -0
package/README.md
CHANGED
|
@@ -27,15 +27,19 @@ The interactive setup will guide you through selecting your formatter/linter, fr
|
|
|
27
27
|
## Key Features
|
|
28
28
|
|
|
29
29
|
### ⚡ Subsecond Performance
|
|
30
|
+
|
|
30
31
|
Built on Rust-based tools for instant code analysis. On-save checks feel seamless without interrupting your workflow.
|
|
31
32
|
|
|
32
33
|
### 🎯 Zero-Config by Design
|
|
34
|
+
|
|
33
35
|
Hundreds of preconfigured rules optimized for JavaScript and TypeScript projects. Customize when needed, but it works perfectly out of the box.
|
|
34
36
|
|
|
35
37
|
### 🤖 AI-Ready
|
|
38
|
+
|
|
36
39
|
Generate rules for 20+ AI agents including Claude Code, GitHub Copilot, Cursor, Gemini, and more. Ensures consistent code style across all team members and AI models.
|
|
37
40
|
|
|
38
41
|
### 🏗️ Monorepo Ready
|
|
42
|
+
|
|
39
43
|
Unified toolchain configuration across all packages and apps, eliminating duplicate config files while maintaining consistency.
|
|
40
44
|
|
|
41
45
|
---
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"maxAllowedComplexity": 20
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
"noExcessiveNestedTestSuites": "error",
|
|
140
139
|
"noExtraBooleanCast": "error",
|
|
141
140
|
"noFlatMapIdentity": "error",
|
|
142
141
|
"noForEach": "error",
|
|
@@ -226,12 +225,12 @@
|
|
|
226
225
|
"noProcessGlobal": "off",
|
|
227
226
|
"useUniqueElementIds": "off",
|
|
228
227
|
|
|
229
|
-
/** ------ Project/Scanner rules.
|
|
230
|
-
"noPrivateImports": "
|
|
231
|
-
"noUndeclaredDependencies": "
|
|
232
|
-
"noUnresolvedImports": "
|
|
233
|
-
"useImportExtensions": "
|
|
234
|
-
"useJsonImportAttributes": "
|
|
228
|
+
/** ------ Project/Scanner rules. Use ultracite/biome/type-aware to enable. ------ **/
|
|
229
|
+
"noPrivateImports": "off",
|
|
230
|
+
"noUndeclaredDependencies": "off",
|
|
231
|
+
"noUnresolvedImports": "off",
|
|
232
|
+
"useImportExtensions": "off",
|
|
233
|
+
"useJsonImportAttributes": "off",
|
|
235
234
|
|
|
236
235
|
/** ------------------------ CSS Rules ------------------------ **/
|
|
237
236
|
"noInvalidDirectionInLinearGradient": "error",
|
|
@@ -287,7 +286,6 @@
|
|
|
287
286
|
"style": {
|
|
288
287
|
/** ------------------------ JavaScript Rules ------------------------ **/
|
|
289
288
|
|
|
290
|
-
"noDoneCallback": "error",
|
|
291
289
|
"noEnum": "error",
|
|
292
290
|
"noExportedImports": "error",
|
|
293
291
|
"noInferrableTypes": "error",
|
|
@@ -403,15 +401,12 @@
|
|
|
403
401
|
"noDuplicateFields": "error",
|
|
404
402
|
"noDuplicateObjectKeys": "error",
|
|
405
403
|
"noDuplicateParameters": "error",
|
|
406
|
-
"noDuplicateTestHooks": "error",
|
|
407
404
|
"noEmptyBlockStatements": "error",
|
|
408
405
|
"noEmptyInterface": "error",
|
|
409
406
|
"noEvolvingTypes": "error",
|
|
410
407
|
"noExplicitAny": "error",
|
|
411
|
-
"noExportsInTest": "error",
|
|
412
408
|
"noExtraNonNullAssertion": "error",
|
|
413
409
|
"noFallthroughSwitchClause": "error",
|
|
414
|
-
"noFocusedTests": "error",
|
|
415
410
|
"noFunctionAssign": "error",
|
|
416
411
|
"noGlobalAssign": "error",
|
|
417
412
|
"noGlobalIsFinite": "error",
|
|
@@ -422,7 +417,6 @@
|
|
|
422
417
|
"noLabelVar": "error",
|
|
423
418
|
"noMisleadingCharacterClass": "error",
|
|
424
419
|
"noMisleadingInstantiator": "error",
|
|
425
|
-
"noMisplacedAssertion": "error",
|
|
426
420
|
"noMisrefactoredShorthandAssign": "error",
|
|
427
421
|
"noOctalEscape": "error",
|
|
428
422
|
"noPrototypeBuiltins": "error",
|
|
@@ -431,7 +425,6 @@
|
|
|
431
425
|
"noRedundantUseStrict": "error",
|
|
432
426
|
"noSelfCompare": "error",
|
|
433
427
|
"noShadowRestrictedNames": "error",
|
|
434
|
-
"noSkippedTests": "error",
|
|
435
428
|
"noSparseArray": "error",
|
|
436
429
|
"noTemplateCurlyInString": "error",
|
|
437
430
|
"noThenProperty": "error",
|
|
@@ -461,9 +454,9 @@
|
|
|
461
454
|
|
|
462
455
|
"noConsole": "off",
|
|
463
456
|
|
|
464
|
-
/** ------ Project/Scanner rules.
|
|
465
|
-
"noDeprecatedImports": "
|
|
466
|
-
"noImportCycles": "
|
|
457
|
+
/** ------ Project/Scanner rules. Use ultracite/biome/type-aware to enable. ------ **/
|
|
458
|
+
"noDeprecatedImports": "off",
|
|
459
|
+
"noImportCycles": "off",
|
|
467
460
|
|
|
468
461
|
/** ------------------------ CSS Rules ------------------------ **/
|
|
469
462
|
"noDuplicateAtImportRules": "error",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": false,
|
|
3
|
+
"$schema": "../../../node_modules/@biomejs/biome/configuration_schema.json",
|
|
4
|
+
"linter": {
|
|
5
|
+
"rules": {
|
|
6
|
+
"complexity": {
|
|
7
|
+
"noExcessiveNestedTestSuites": "error"
|
|
8
|
+
},
|
|
9
|
+
"style": {
|
|
10
|
+
"noDoneCallback": "error"
|
|
11
|
+
},
|
|
12
|
+
"suspicious": {
|
|
13
|
+
"noDuplicateTestHooks": "error",
|
|
14
|
+
"noExportsInTest": "error",
|
|
15
|
+
"noFocusedTests": "error",
|
|
16
|
+
"noMisplacedAssertion": "error",
|
|
17
|
+
"noSkippedTests": "error"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": false,
|
|
3
|
+
"$schema": "../../../node_modules/@biomejs/biome/configuration_schema.json",
|
|
4
|
+
"linter": {
|
|
5
|
+
"rules": {
|
|
6
|
+
"correctness": {
|
|
7
|
+
"noPrivateImports": "error",
|
|
8
|
+
"noUndeclaredDependencies": "error",
|
|
9
|
+
"noUnresolvedImports": "error",
|
|
10
|
+
"useImportExtensions": "error",
|
|
11
|
+
"useJsonImportAttributes": "error"
|
|
12
|
+
},
|
|
13
|
+
"suspicious": {
|
|
14
|
+
"noDeprecatedImports": "error",
|
|
15
|
+
"noImportCycles": "error"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": false,
|
|
3
|
+
"$schema": "../../../node_modules/@biomejs/biome/configuration_schema.json",
|
|
4
|
+
"linter": {
|
|
5
|
+
"rules": {
|
|
6
|
+
"complexity": {
|
|
7
|
+
"noExcessiveNestedTestSuites": "error"
|
|
8
|
+
},
|
|
9
|
+
"style": {
|
|
10
|
+
"noDoneCallback": "error"
|
|
11
|
+
},
|
|
12
|
+
"suspicious": {
|
|
13
|
+
"noDuplicateTestHooks": "error",
|
|
14
|
+
"noExportsInTest": "error",
|
|
15
|
+
"noFocusedTests": "error",
|
|
16
|
+
"noMisplacedAssertion": "error",
|
|
17
|
+
"noSkippedTests": "error"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -8,9 +8,7 @@ import compat from "eslint-plugin-compat";
|
|
|
8
8
|
import cypress from "eslint-plugin-cypress";
|
|
9
9
|
import github from "eslint-plugin-github";
|
|
10
10
|
import html from "eslint-plugin-html";
|
|
11
|
-
|
|
12
|
-
import * as importPlugin from "eslint-plugin-import";
|
|
13
|
-
import jest from "eslint-plugin-jest";
|
|
11
|
+
import { importX } from "eslint-plugin-import-x";
|
|
14
12
|
import n from "eslint-plugin-n";
|
|
15
13
|
import prettier from "eslint-plugin-prettier";
|
|
16
14
|
import promise from "eslint-plugin-promise";
|
|
@@ -19,13 +17,13 @@ import storybook from "eslint-plugin-storybook";
|
|
|
19
17
|
import unicorn from "eslint-plugin-unicorn";
|
|
20
18
|
import unusedImports from "eslint-plugin-unused-imports";
|
|
21
19
|
import globals from "globals";
|
|
20
|
+
|
|
22
21
|
import compatRules from "./rules/compat.mjs";
|
|
23
22
|
import cypressRules from "./rules/cypress.mjs";
|
|
24
|
-
import eslintRules from "./rules/eslint.mjs";
|
|
25
23
|
import eslintTypescriptRules from "./rules/eslint-typescript.mjs";
|
|
24
|
+
import eslintRules from "./rules/eslint.mjs";
|
|
26
25
|
import githubRules from "./rules/github.mjs";
|
|
27
26
|
import importRules from "./rules/import.mjs";
|
|
28
|
-
import jestRules from "./rules/jest.mjs";
|
|
29
27
|
import nRules from "./rules/n.mjs";
|
|
30
28
|
import prettierRules from "./rules/prettier.mjs";
|
|
31
29
|
import promiseRules from "./rules/promise.mjs";
|
|
@@ -36,13 +34,20 @@ import unicornRules from "./rules/unicorn.mjs";
|
|
|
36
34
|
import unusedImportsRules from "./rules/unused-imports.mjs";
|
|
37
35
|
|
|
38
36
|
const config = [
|
|
39
|
-
|
|
37
|
+
importX.flatConfigs.typescript,
|
|
40
38
|
{
|
|
41
39
|
ignores: ["**/dist/", "**/build/", "**/.next/", "**/.turbo/"],
|
|
42
40
|
},
|
|
43
41
|
{
|
|
42
|
+
files: [
|
|
43
|
+
"**/*.js",
|
|
44
|
+
"**/*.ts",
|
|
45
|
+
"**/*.json",
|
|
46
|
+
"**/*.mjs",
|
|
47
|
+
"**/*.cjs",
|
|
48
|
+
"**/*.html",
|
|
49
|
+
],
|
|
44
50
|
languageOptions: {
|
|
45
|
-
sourceType: "module",
|
|
46
51
|
globals: {
|
|
47
52
|
...globals.browser,
|
|
48
53
|
...globals.node,
|
|
@@ -51,25 +56,18 @@ const config = [
|
|
|
51
56
|
ecmaVersion: "latest",
|
|
52
57
|
sourceType: "module",
|
|
53
58
|
},
|
|
59
|
+
sourceType: "module",
|
|
54
60
|
},
|
|
55
|
-
files: [
|
|
56
|
-
"**/*.js",
|
|
57
|
-
"**/*.ts",
|
|
58
|
-
"**/*.json",
|
|
59
|
-
"**/*.mjs",
|
|
60
|
-
"**/*.cjs",
|
|
61
|
-
"**/*.html",
|
|
62
|
-
],
|
|
63
61
|
plugins: {
|
|
62
|
+
compat,
|
|
63
|
+
github,
|
|
64
|
+
"import-x": importX,
|
|
65
|
+
n,
|
|
64
66
|
prettier,
|
|
65
|
-
import: importPlugin,
|
|
66
67
|
promise,
|
|
67
|
-
n,
|
|
68
|
-
"unused-imports": unusedImports,
|
|
69
68
|
sonarjs,
|
|
70
|
-
compat,
|
|
71
69
|
unicorn,
|
|
72
|
-
|
|
70
|
+
"unused-imports": unusedImports,
|
|
73
71
|
},
|
|
74
72
|
rules: {
|
|
75
73
|
...eslintRules,
|
|
@@ -86,13 +84,12 @@ const config = [
|
|
|
86
84
|
},
|
|
87
85
|
|
|
88
86
|
settings: {
|
|
89
|
-
|
|
90
|
-
"import/parsers": {
|
|
87
|
+
"import-x/parsers": {
|
|
91
88
|
espree: [".js", ".cjs", ".mjs", ".ts"],
|
|
92
89
|
},
|
|
93
|
-
"import/resolver": {
|
|
94
|
-
typescript: true,
|
|
90
|
+
"import-x/resolver": {
|
|
95
91
|
node: true,
|
|
92
|
+
typescript: true,
|
|
96
93
|
},
|
|
97
94
|
},
|
|
98
95
|
},
|
|
@@ -113,20 +110,6 @@ const config = [
|
|
|
113
110
|
...typescriptRules,
|
|
114
111
|
},
|
|
115
112
|
},
|
|
116
|
-
{
|
|
117
|
-
files: ["**/*.test.js", "tests/**/*.js"],
|
|
118
|
-
languageOptions: {
|
|
119
|
-
globals: {
|
|
120
|
-
...globals.jest,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
plugins: {
|
|
124
|
-
jest,
|
|
125
|
-
},
|
|
126
|
-
rules: {
|
|
127
|
-
...jestRules,
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
113
|
{
|
|
131
114
|
files: ["**/*.cy.js"],
|
|
132
115
|
languageOptions: {
|
|
@@ -24,6 +24,7 @@ const config = {
|
|
|
24
24
|
"no-magic-numbers": "off",
|
|
25
25
|
"no-redeclare": "off",
|
|
26
26
|
"no-restricted-imports": "off",
|
|
27
|
+
"no-return-await": "off",
|
|
27
28
|
"no-shadow": "off",
|
|
28
29
|
"no-throw-literal": "off",
|
|
29
30
|
"no-unused-expressions": "off",
|
|
@@ -34,7 +35,6 @@ const config = {
|
|
|
34
35
|
"padding-line-between-statements": "off",
|
|
35
36
|
quotes: "off",
|
|
36
37
|
"require-await": "off",
|
|
37
|
-
"no-return-await": "off",
|
|
38
38
|
semi: "off",
|
|
39
39
|
"space-before-function-paren": "off",
|
|
40
40
|
"space-infix-ops": "off",
|
|
@@ -4,7 +4,6 @@ import plugin from "@eslint/js";
|
|
|
4
4
|
const baseRules = { ...plugin.configs.all.rules };
|
|
5
5
|
|
|
6
6
|
const overrideRules = {
|
|
7
|
-
"no-unused-private-class-members": "off",
|
|
8
7
|
"capitalized-comments": "off",
|
|
9
8
|
complexity: "off",
|
|
10
9
|
"id-length": ["error", { exceptions: ["x", "y", "z"] }],
|
|
@@ -14,6 +13,7 @@ const overrideRules = {
|
|
|
14
13
|
"max-statements": "off",
|
|
15
14
|
"no-ternary": "off",
|
|
16
15
|
"no-undefined": "off",
|
|
16
|
+
"no-unused-private-class-members": "off",
|
|
17
17
|
"one-var": "off",
|
|
18
18
|
"prefer-destructuring": [
|
|
19
19
|
"error",
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { rules } from "eslint-plugin-import";
|
|
1
|
+
import { rules } from "eslint-plugin-import-x";
|
|
2
2
|
|
|
3
3
|
const availableKeys = Object.keys(rules).filter(
|
|
4
4
|
(key) => !rules[key].meta.deprecated
|
|
5
5
|
);
|
|
6
6
|
|
|
7
7
|
const baseRules = Object.fromEntries(
|
|
8
|
-
availableKeys.map((key) => [`import/${key}`, "error"])
|
|
8
|
+
availableKeys.map((key) => [`import-x/${key}`, "error"])
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
const overrideRules = {
|
|
12
|
-
"import/
|
|
13
|
-
"import/
|
|
14
|
-
"import/
|
|
15
|
-
"import/
|
|
16
|
-
"import/
|
|
17
|
-
"import/no-
|
|
18
|
-
"import/
|
|
19
|
-
"import/
|
|
20
|
-
"import/
|
|
12
|
+
"import-x/enforce-node-protocol-usage": ["error", "always"],
|
|
13
|
+
"import-x/exports-last": "off",
|
|
14
|
+
"import-x/extensions": "off",
|
|
15
|
+
"import-x/group-exports": "off",
|
|
16
|
+
"import-x/max-dependencies": "off",
|
|
17
|
+
"import-x/no-default-export": "off",
|
|
18
|
+
"import-x/no-internal-modules": "off",
|
|
19
|
+
"import-x/no-named-as-default": "off",
|
|
20
|
+
"import-x/no-named-export": "off",
|
|
21
|
+
"import-x/no-namespace": "off",
|
|
22
|
+
"import-x/no-relative-parent-imports": "off",
|
|
23
|
+
"import-x/no-unassigned-import": "off",
|
|
24
|
+
"import-x/no-unresolved": "off",
|
|
25
|
+
"import-x/order": [
|
|
21
26
|
"error",
|
|
22
27
|
{
|
|
23
28
|
groups: [
|
|
@@ -32,12 +37,7 @@ const overrideRules = {
|
|
|
32
37
|
],
|
|
33
38
|
},
|
|
34
39
|
],
|
|
35
|
-
"import/prefer-default-export": "off",
|
|
36
|
-
"import/max-dependencies": "off",
|
|
37
|
-
"import/no-unassigned-import": "off",
|
|
38
|
-
"import/no-default-export": "off",
|
|
39
|
-
"import/no-named-export": "off",
|
|
40
|
-
"import/group-exports": "off",
|
|
40
|
+
"import-x/prefer-default-export": "off",
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const config = Object.assign(baseRules, overrideRules);
|
|
@@ -11,12 +11,12 @@ const baseRules = Object.fromEntries(
|
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const overrideRules = {
|
|
14
|
+
"n/file-extension-in-import": "off",
|
|
14
15
|
"n/no-missing-import": "off",
|
|
16
|
+
"n/no-process-env": "off",
|
|
15
17
|
"n/no-unsupported-features/es-builtins": "off",
|
|
16
18
|
"n/no-unsupported-features/es-syntax": "off",
|
|
17
19
|
"n/no-unsupported-features/node-builtins": "off",
|
|
18
|
-
"n/file-extension-in-import": "off",
|
|
19
|
-
"n/no-process-env": "off",
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const config = Object.assign(baseRules, overrideRules);
|
|
@@ -11,49 +11,48 @@ const baseRules = Object.fromEntries(
|
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const overrideRules = {
|
|
14
|
+
// Disabled for Prettier
|
|
15
|
+
"@typescript-eslint/block-spacing": "off",
|
|
16
|
+
"@typescript-eslint/brace-style": "off",
|
|
17
|
+
"@typescript-eslint/comma-dangle": "off",
|
|
18
|
+
"@typescript-eslint/comma-spacing": "off",
|
|
14
19
|
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
15
20
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
21
|
+
"@typescript-eslint/func-call-spacing": "off",
|
|
22
|
+
"@typescript-eslint/indent": "off",
|
|
23
|
+
"@typescript-eslint/key-spacing": "off",
|
|
24
|
+
"@typescript-eslint/keyword-spacing": "off",
|
|
25
|
+
"@typescript-eslint/lines-around-comment": "off",
|
|
26
|
+
"@typescript-eslint/lines-between-class-members": "off",
|
|
27
|
+
"@typescript-eslint/member-delimiter-style": "off",
|
|
16
28
|
"@typescript-eslint/naming-convention": [
|
|
17
29
|
"error",
|
|
18
30
|
{
|
|
19
|
-
selector: "default",
|
|
20
31
|
format: ["camelCase", "PascalCase", "snake_case"],
|
|
32
|
+
selector: "default",
|
|
21
33
|
},
|
|
22
34
|
{
|
|
23
|
-
selector: "objectLiteralProperty",
|
|
24
35
|
format: null,
|
|
25
36
|
modifiers: ["requiresQuotes"],
|
|
37
|
+
selector: "objectLiteralProperty",
|
|
26
38
|
},
|
|
27
39
|
],
|
|
28
40
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
41
|
+
"@typescript-eslint/no-extra-parens": "off",
|
|
42
|
+
"@typescript-eslint/no-magic-numbers": "off",
|
|
29
43
|
"@typescript-eslint/no-misused-promises": "off",
|
|
30
44
|
"@typescript-eslint/no-type-alias": "off",
|
|
31
|
-
"@typescript-eslint/prefer-readonly": "off",
|
|
32
|
-
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
33
|
-
"@typescript-eslint/sort-type-union-intersection-members": "off",
|
|
34
|
-
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
35
|
-
"@typescript-eslint/no-magic-numbers": "off",
|
|
36
|
-
|
|
37
|
-
// Disabled for Prettier
|
|
38
|
-
"@typescript-eslint/block-spacing": "off",
|
|
39
|
-
"@typescript-eslint/brace-style": "off",
|
|
40
|
-
"@typescript-eslint/comma-dangle": "off",
|
|
41
|
-
"@typescript-eslint/comma-spacing": "off",
|
|
42
|
-
"@typescript-eslint/func-call-spacing": "off",
|
|
43
|
-
"@typescript-eslint/indent": "off",
|
|
44
|
-
"@typescript-eslint/key-spacing": "off",
|
|
45
|
-
"@typescript-eslint/keyword-spacing": "off",
|
|
46
|
-
"@typescript-eslint/lines-around-comment": "off",
|
|
47
|
-
"@typescript-eslint/lines-between-class-members": "off",
|
|
48
|
-
"@typescript-eslint/member-delimiter-style": "off",
|
|
49
|
-
"@typescript-eslint/no-extra-parens": "off",
|
|
50
45
|
"@typescript-eslint/object-curly-spacing": "off",
|
|
51
46
|
"@typescript-eslint/padding-line-between-statements": "off",
|
|
47
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
48
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
52
49
|
"@typescript-eslint/quotes": "off",
|
|
53
50
|
"@typescript-eslint/semi": "off",
|
|
51
|
+
"@typescript-eslint/sort-type-union-intersection-members": "off",
|
|
54
52
|
"@typescript-eslint/space-before-blocks": "off",
|
|
55
53
|
"@typescript-eslint/space-before-function-paren": "off",
|
|
56
54
|
"@typescript-eslint/space-infix-ops": "off",
|
|
55
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
57
56
|
"@typescript-eslint/type-annotation-spacing": "off",
|
|
58
57
|
};
|
|
59
58
|
|
|
@@ -11,19 +11,19 @@ const baseRules = Object.fromEntries(
|
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const overrideRules = {
|
|
14
|
+
"unicorn/no-array-callback-reference": "off",
|
|
14
15
|
"unicorn/no-keyword-prefix": "off",
|
|
15
16
|
"unicorn/no-null": "off",
|
|
16
|
-
"unicorn/no-array-callback-reference": "off",
|
|
17
17
|
"unicorn/prefer-dom-node-dataset": "off",
|
|
18
18
|
"unicorn/prevent-abbreviations": [
|
|
19
19
|
"error",
|
|
20
20
|
{
|
|
21
21
|
allowList: {
|
|
22
|
+
generateStaticParams: true,
|
|
22
23
|
getInitialProps: true,
|
|
23
24
|
getServerSideProps: true,
|
|
24
25
|
getStaticPaths: true,
|
|
25
26
|
getStaticProps: true,
|
|
26
|
-
generateStaticParams: true,
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
],
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
2
|
+
|
|
3
|
+
import jest from "eslint-plugin-jest";
|
|
4
|
+
import globals from "globals";
|
|
5
|
+
|
|
6
|
+
import jestRules from "./rules/jest.mjs";
|
|
7
|
+
|
|
8
|
+
const config = [
|
|
9
|
+
{
|
|
10
|
+
files: ["**/*.test.{js,ts,jsx,tsx}", "tests/**/*.{js,ts,jsx,tsx}"],
|
|
11
|
+
languageOptions: {
|
|
12
|
+
globals: {
|
|
13
|
+
...globals.jest,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
jest,
|
|
18
|
+
},
|
|
19
|
+
rules: {
|
|
20
|
+
...jestRules,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export default config;
|
|
@@ -4,10 +4,11 @@ import query from "@tanstack/eslint-plugin-query";
|
|
|
4
4
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
5
|
import react from "eslint-plugin-react";
|
|
6
6
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
7
|
+
|
|
7
8
|
import jsxA11yRules from "./rules/jsx-a11y.mjs";
|
|
8
9
|
import queryRules from "./rules/query.mjs";
|
|
9
|
-
import reactRules from "./rules/react.mjs";
|
|
10
10
|
import reactHooksRules from "./rules/react-hooks.mjs";
|
|
11
|
+
import reactRules from "./rules/react.mjs";
|
|
11
12
|
|
|
12
13
|
const config = [
|
|
13
14
|
{
|
|
@@ -20,10 +21,10 @@ const config = [
|
|
|
20
21
|
},
|
|
21
22
|
},
|
|
22
23
|
plugins: {
|
|
24
|
+
"@tanstack/query": query,
|
|
25
|
+
"jsx-a11y": jsxA11y,
|
|
23
26
|
react,
|
|
24
27
|
"react-hooks": reactHooks,
|
|
25
|
-
"jsx-a11y": jsxA11y,
|
|
26
|
-
"@tanstack/query": query,
|
|
27
28
|
},
|
|
28
29
|
rules: {
|
|
29
30
|
...reactRules,
|
|
@@ -11,15 +11,15 @@ const baseRules = Object.fromEntries(
|
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const overrideRules = {
|
|
14
|
-
"jsx-a11y/no-autofocus": "off",
|
|
15
14
|
"jsx-a11y/label-has-associated-control": [
|
|
16
15
|
"error",
|
|
17
16
|
{
|
|
18
|
-
labelComponents: ["Label"],
|
|
19
17
|
controlComponents: ["Input", "Select", "Textarea", "Checkbox", "Radio"],
|
|
20
18
|
depth: 3,
|
|
19
|
+
labelComponents: ["Label"],
|
|
21
20
|
},
|
|
22
21
|
],
|
|
22
|
+
"jsx-a11y/no-autofocus": "off",
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const config = Object.assign(baseRules, overrideRules);
|
|
@@ -18,13 +18,6 @@ const overrideRules = {
|
|
|
18
18
|
namedComponents: "arrow-function",
|
|
19
19
|
},
|
|
20
20
|
],
|
|
21
|
-
"react/no-array-index-key": "off",
|
|
22
|
-
"react/no-arrow-function-lifecycle": "off",
|
|
23
|
-
"react/no-invalid-html-attribute": "off",
|
|
24
|
-
"react/no-multi-comp": "off",
|
|
25
|
-
"react/no-unused-class-component-methods": "off",
|
|
26
|
-
"react/react-in-jsx-scope": "off",
|
|
27
|
-
"react/require-default-props": "off",
|
|
28
21
|
"react/jsx-filename-extension": [
|
|
29
22
|
"error",
|
|
30
23
|
{
|
|
@@ -39,6 +32,13 @@ const overrideRules = {
|
|
|
39
32
|
"react/jsx-one-expression-per-line": "off",
|
|
40
33
|
"react/jsx-props-no-spreading": "off",
|
|
41
34
|
"react/jsx-sort-props": "off",
|
|
35
|
+
"react/no-array-index-key": "off",
|
|
36
|
+
"react/no-arrow-function-lifecycle": "off",
|
|
37
|
+
"react/no-invalid-html-attribute": "off",
|
|
38
|
+
"react/no-multi-comp": "off",
|
|
39
|
+
"react/no-unused-class-component-methods": "off",
|
|
40
|
+
"react/react-in-jsx-scope": "off",
|
|
41
|
+
"react/require-default-props": "off",
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const config = Object.assign(baseRules, overrideRules);
|