@nelsonlaidev/eslint-config 3.0.1 → 3.2.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/README.md +2 -3
- package/dist/index.d.mts +42 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +244 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -108,9 +108,8 @@ type Options = {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
// Optional
|
|
111
|
-
//
|
|
112
|
-
// Defaults to
|
|
113
|
-
// Set to true/false to override
|
|
111
|
+
// Disable ESLint rules that conflict with Prettier
|
|
112
|
+
// Defaults to true if Prettier is installed
|
|
114
113
|
prettier?: boolean
|
|
115
114
|
// Optional
|
|
116
115
|
// Specify files to ignore
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
import { ObjectKeyMatcher, ObjectValueMatcher, StringMatcher } from "eslint-plugin-better-tailwindcss/types";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
|
|
4
|
+
//#region src/types/import-x.d.ts
|
|
5
|
+
type NoNamespaceOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* A list of module names to ignore for the `no-namespace` rule.
|
|
8
|
+
*
|
|
9
|
+
* @default []
|
|
10
|
+
*/
|
|
11
|
+
ignore?: string[];
|
|
12
|
+
};
|
|
13
|
+
type NoUnassignedImportOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* A list of glob patterns to allow for the `no-unassigned-import` rule.
|
|
16
|
+
*
|
|
17
|
+
* @default []
|
|
18
|
+
*/
|
|
19
|
+
allow?: string[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Import-x configuration options.
|
|
23
|
+
*/
|
|
24
|
+
type ImportXOptions = {
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for the `no-namespace` rule.
|
|
27
|
+
*
|
|
28
|
+
* See [official docs](https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md) for more details.
|
|
29
|
+
*/
|
|
30
|
+
noNamespace?: NoNamespaceOptions;
|
|
31
|
+
/**
|
|
32
|
+
* Configuration for the `no-unassigned-import` rule.
|
|
33
|
+
*
|
|
34
|
+
* See [official docs](https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md) for more details.
|
|
35
|
+
*/
|
|
36
|
+
noUnassignedImport?: NoUnassignedImportOptions;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
4
39
|
//#region src/types/jsx.d.ts
|
|
5
40
|
type JsxOptions = {
|
|
6
41
|
a11y?: JsxA11yOptions;
|
|
@@ -400,16 +435,19 @@ type ConfigOptions = {
|
|
|
400
435
|
*/
|
|
401
436
|
playwright?: PlaywrightOptions;
|
|
402
437
|
/**
|
|
403
|
-
*
|
|
438
|
+
* Turn off all rules that are unnecessary or might conflict when using Prettier.
|
|
404
439
|
*
|
|
405
|
-
* Defaults to
|
|
406
|
-
* Set to true/false to override.
|
|
440
|
+
* Defaults to true if Prettier is installed.
|
|
407
441
|
*/
|
|
408
442
|
prettier?: boolean;
|
|
409
443
|
/**
|
|
410
444
|
* A list of file paths or glob patterns that ESLint should ignore.
|
|
411
445
|
*/
|
|
412
446
|
ignores?: string[];
|
|
447
|
+
/**
|
|
448
|
+
* Import-x configuration options.
|
|
449
|
+
*/
|
|
450
|
+
importX?: ImportXOptions;
|
|
413
451
|
};
|
|
414
452
|
type FlatConfig = Linter.Config;
|
|
415
453
|
//#endregion
|
|
@@ -424,5 +462,5 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
424
462
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
425
463
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
426
464
|
//#endregion
|
|
427
|
-
export { CanonicalClassesOptions, ConfigOptions, ConsistentClassOrderOptions, ExpectExpectOptions, FlatConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, JsxA11yOptions, JsxOptions, Matchers, MaxNestedDescribeOptions, MissingPlaywrightAwaitOptions, NoRestrictedClassesOptions, NoSkippedTestOptions, NoUnknownClassesOptions, NoUnnecessaryWhitespaceOptions, PlaywrightOptions, TailwindCSSOptions, ValidExpectOptions, ValidTestTagsOptions, ValidTitleOptions, VitestOptions, defineConfig };
|
|
465
|
+
export { CanonicalClassesOptions, ConfigOptions, ConsistentClassOrderOptions, ExpectExpectOptions, FlatConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, ImportXOptions, JsxA11yOptions, JsxOptions, Matchers, MaxNestedDescribeOptions, MissingPlaywrightAwaitOptions, NoNamespaceOptions, NoRestrictedClassesOptions, NoSkippedTestOptions, NoUnassignedImportOptions, NoUnknownClassesOptions, NoUnnecessaryWhitespaceOptions, PlaywrightOptions, TailwindCSSOptions, ValidExpectOptions, ValidTestTagsOptions, ValidTitleOptions, VitestOptions, defineConfig };
|
|
428
466
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/jsx.ts","../src/types/playwright.ts","../src/types/tailwindcss.ts","../src/types/vitest.ts","../src/types/config.ts","../src/base.ts","../src/globs.ts"],"mappings":";;;;KAAY,UAAA;EACV,IAAA,GAAO,cAAA;AAAA;AAAA,KAGG,cAAA;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/import-x.ts","../src/types/jsx.ts","../src/types/playwright.ts","../src/types/tailwindcss.ts","../src/types/vitest.ts","../src/types/config.ts","../src/base.ts","../src/globs.ts"],"mappings":";;;;KAAY,kBAAA;;;;AAAZ;;EAME,MAAA;AAAA;AAAA,KAGU,yBAAA;EAAA;;;;;EAMV,KAAA;AAAA;;;;KAMU,cAAA;EAaV;;;;;EAP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;;;;KCpKhB,aAAA;EJHA;;;EIOV,KAAA,EAAO,KAAA;AAAA;;;;;;KCGG,aAAA;ELDyB;;;EKKnC,KAAA;ELOU;;;;;EKDV,MAAA;ELcA;;;;;EKRA,WAAA,GAAc,kBAAA;;AJ1BhB;;EI8BE,GAAA,GAAM,UAAA;EJ7BN;;AAGF;;;EIgCE,MAAA,GAAS,aAAA;EJ5BT;;;;;EIkCA,UAAA,GAAa,iBAAA;EJpBO;;;;;EI0BpB,QAAA;EHhD6B;;;EGoD7B,OAAA;EHrCU;;;EGyCV,OAAA,GAAU,cAAA;AAAA;AAAA,KAGA,UAAA,GAAa,MAAA,CAAO,MAAA;;;cC3BnB,YAAA,GAAgB,OAAA,GAAS,aAAA,KAAuB,WAAA,EAAa,UAAA,OAAe,UAAA;;;cChC5E,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -5,25 +5,25 @@ import nextPlugin from "@next/eslint-plugin-next";
|
|
|
5
5
|
import stylisticPlugin from "@stylistic/eslint-plugin";
|
|
6
6
|
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
|
|
7
7
|
import vitestPlugin from "@vitest/eslint-plugin";
|
|
8
|
+
import gitignorePlugin from "eslint-config-flat-gitignore";
|
|
8
9
|
import tailwindcssPlugin from "eslint-plugin-better-tailwindcss";
|
|
9
10
|
import commandPlugin from "eslint-plugin-command/config";
|
|
10
11
|
import deMorganPlugin from "eslint-plugin-de-morgan";
|
|
11
|
-
import
|
|
12
|
+
import importXPlugin from "eslint-plugin-import-x";
|
|
12
13
|
import importZodPlugin from "eslint-plugin-import-zod";
|
|
13
14
|
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
|
|
14
15
|
import nodePlugin from "eslint-plugin-n";
|
|
15
16
|
import playwrightPlugin from "eslint-plugin-playwright";
|
|
16
|
-
import
|
|
17
|
-
import prettierPluginRecommended from "eslint-plugin-prettier/recommended";
|
|
17
|
+
import promisePlugin from "eslint-plugin-promise";
|
|
18
18
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
19
19
|
import regexpPlugin from "eslint-plugin-regexp";
|
|
20
20
|
import importSortPlugin from "eslint-plugin-simple-import-sort";
|
|
21
21
|
import sonarjsPlugin from "eslint-plugin-sonarjs";
|
|
22
22
|
import unicornPlugin from "eslint-plugin-unicorn";
|
|
23
23
|
import unusedImportsPlugin from "eslint-plugin-unused-imports";
|
|
24
|
-
import gitignorePlugin from "eslint-config-flat-gitignore";
|
|
25
24
|
import eslint from "@eslint/js";
|
|
26
25
|
import globals from "globals";
|
|
26
|
+
import { rules } from "eslint-config-prettier";
|
|
27
27
|
import { getDefaultAttributes, getDefaultCallees, getDefaultTags, getDefaultVariables } from "eslint-plugin-better-tailwindcss/api/defaults";
|
|
28
28
|
import parser from "@typescript-eslint/parser";
|
|
29
29
|
|
|
@@ -40,14 +40,7 @@ const comments = () => [{
|
|
|
40
40
|
plugins: { "@eslint-community/eslint-comments": commentsPlugin },
|
|
41
41
|
rules: {
|
|
42
42
|
...commentsPlugin.configs.recommended.rules,
|
|
43
|
-
"@eslint-community/eslint-comments/
|
|
44
|
-
"@eslint-community/eslint-comments/no-unused-disable": "error",
|
|
45
|
-
"@eslint-community/eslint-comments/no-restricted-disable": "error",
|
|
46
|
-
"@eslint-community/eslint-comments/no-use": ["error", { allow: [
|
|
47
|
-
"eslint-disable-next-line",
|
|
48
|
-
"eslint-disable",
|
|
49
|
-
"eslint-enable"
|
|
50
|
-
] }]
|
|
43
|
+
"@eslint-community/eslint-comments/no-unused-disable": "error"
|
|
51
44
|
}
|
|
52
45
|
}];
|
|
53
46
|
|
|
@@ -96,17 +89,47 @@ const importSort = () => [{
|
|
|
96
89
|
}];
|
|
97
90
|
|
|
98
91
|
//#endregion
|
|
99
|
-
//#region src/configs/
|
|
100
|
-
const
|
|
101
|
-
name: "nelsonlaidev/
|
|
102
|
-
plugins: { "import-
|
|
92
|
+
//#region src/configs/import-x.ts
|
|
93
|
+
const importX = (options = {}) => [{
|
|
94
|
+
name: "nelsonlaidev/import-x/rules",
|
|
95
|
+
plugins: { "import-x": importXPlugin },
|
|
103
96
|
rules: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"import-
|
|
107
|
-
"import-
|
|
108
|
-
"import-
|
|
109
|
-
|
|
97
|
+
...importXPlugin.configs.recommended.rules,
|
|
98
|
+
...importXPlugin.configs.typescript.rules,
|
|
99
|
+
"import-x/first": "error",
|
|
100
|
+
"import-x/newline-after-import": ["error", { count: 1 }],
|
|
101
|
+
"import-x/no-amd": "error",
|
|
102
|
+
"import-x/no-anonymous-default-export": "error",
|
|
103
|
+
"import-x/no-commonjs": "error",
|
|
104
|
+
"import-x/no-mutable-exports": "error",
|
|
105
|
+
"import-x/no-named-default": "error",
|
|
106
|
+
"import-x/no-namespace": ["error", { ignore: ["zod", ...options.noNamespace?.ignore ?? []] }],
|
|
107
|
+
"import-x/no-relative-packages": "error",
|
|
108
|
+
"import-x/no-self-import": "error",
|
|
109
|
+
"import-x/no-extraneous-dependencies": "error",
|
|
110
|
+
"import-x/no-absolute-path": "error",
|
|
111
|
+
"import-x/no-webpack-loader-syntax": "error",
|
|
112
|
+
"import-x/no-dynamic-require": "error",
|
|
113
|
+
"import-x/no-unassigned-import": ["error", { allow: [
|
|
114
|
+
"**/*.css",
|
|
115
|
+
"**/*.scss",
|
|
116
|
+
"**/*.less",
|
|
117
|
+
"server-only",
|
|
118
|
+
"client-only",
|
|
119
|
+
"@total-typescript/ts-reset",
|
|
120
|
+
"@testing-library/jest-dom/**",
|
|
121
|
+
"@testing-library/jest-dom",
|
|
122
|
+
"msw/{node,browser}",
|
|
123
|
+
"dotenv/config",
|
|
124
|
+
...options.noUnassignedImport?.allow ?? []
|
|
125
|
+
] }],
|
|
126
|
+
"import-x/no-useless-path-segments": "error",
|
|
127
|
+
"import-x/no-import-module-exports": "error",
|
|
128
|
+
"import-x/no-empty-named-blocks": "error",
|
|
129
|
+
"import-x/no-deprecated": "error",
|
|
130
|
+
"import-x/no-named-as-default": "off"
|
|
131
|
+
},
|
|
132
|
+
settings: { ...importXPlugin.configs.typescript.settings }
|
|
110
133
|
}];
|
|
111
134
|
|
|
112
135
|
//#endregion
|
|
@@ -139,8 +162,82 @@ const javascript = () => [{
|
|
|
139
162
|
plugins: { "unused-imports": unusedImportsPlugin },
|
|
140
163
|
rules: {
|
|
141
164
|
...eslint.configs.recommended.rules,
|
|
165
|
+
"accessor-pairs": "error",
|
|
166
|
+
"array-callback-return": "error",
|
|
167
|
+
"arrow-body-style": "error",
|
|
168
|
+
"block-scoped-var": "error",
|
|
169
|
+
complexity: "error",
|
|
170
|
+
"default-case": "error",
|
|
171
|
+
"default-case-last": "error",
|
|
172
|
+
eqeqeq: "error",
|
|
173
|
+
"func-names": "error",
|
|
174
|
+
"max-classes-per-file": "error",
|
|
175
|
+
"max-depth": "error",
|
|
176
|
+
"max-nested-callbacks": "error",
|
|
177
|
+
"new-cap": ["error", { capIsNew: false }],
|
|
178
|
+
"no-alert": "error",
|
|
179
|
+
"no-await-in-loop": "error",
|
|
180
|
+
"no-bitwise": "error",
|
|
181
|
+
"no-caller": "error",
|
|
182
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
183
|
+
"no-constructor-return": "error",
|
|
184
|
+
"no-else-return": "error",
|
|
185
|
+
"no-eq-null": "error",
|
|
186
|
+
"no-eval": "error",
|
|
187
|
+
"no-extend-native": "error",
|
|
188
|
+
"no-extra-bind": "error",
|
|
189
|
+
"no-extra-label": "error",
|
|
190
|
+
"no-implicit-coercion": "error",
|
|
191
|
+
"no-label-var": "error",
|
|
192
|
+
"no-labels": "error",
|
|
193
|
+
"no-lone-blocks": "error",
|
|
194
|
+
"no-lonely-if": "error",
|
|
195
|
+
"no-multi-assign": "error",
|
|
196
|
+
"no-multi-str": "error",
|
|
197
|
+
"no-new": "error",
|
|
198
|
+
"no-new-func": "error",
|
|
199
|
+
"no-new-wrappers": "error",
|
|
200
|
+
"no-object-constructor": "error",
|
|
201
|
+
"no-param-reassign": "error",
|
|
202
|
+
"no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
|
|
203
|
+
"no-promise-executor-return": "error",
|
|
204
|
+
"no-restricted-globals": "error",
|
|
205
|
+
"no-return-assign": "error",
|
|
206
|
+
"no-script-url": "error",
|
|
207
|
+
"no-self-compare": "error",
|
|
208
|
+
"no-sequences": "error",
|
|
209
|
+
"no-template-curly-in-string": "error",
|
|
210
|
+
"no-unassigned-vars": "error",
|
|
211
|
+
"no-unneeded-ternary": "error",
|
|
212
|
+
"no-useless-call": "error",
|
|
213
|
+
"no-useless-computed-key": "error",
|
|
214
|
+
"no-useless-concat": "error",
|
|
215
|
+
"no-useless-rename": "error",
|
|
216
|
+
"no-useless-return": "error",
|
|
217
|
+
"no-void": ["error", { allowAsStatement: true }],
|
|
218
|
+
"no-warning-comments": "error",
|
|
219
|
+
"operator-assignment": "error",
|
|
220
|
+
"prefer-destructuring": ["error", {
|
|
221
|
+
VariableDeclarator: {
|
|
222
|
+
array: false,
|
|
223
|
+
object: true
|
|
224
|
+
},
|
|
225
|
+
AssignmentExpression: {
|
|
226
|
+
array: false,
|
|
227
|
+
object: false
|
|
228
|
+
}
|
|
229
|
+
}],
|
|
230
|
+
"prefer-exponentiation-operator": "error",
|
|
231
|
+
"prefer-numeric-literals": "error",
|
|
232
|
+
"prefer-object-has-own": "error",
|
|
233
|
+
"prefer-object-spread": "error",
|
|
234
|
+
"prefer-template": "error",
|
|
235
|
+
"preserve-caught-error": "error",
|
|
236
|
+
radix: "error",
|
|
237
|
+
"symbol-description": "error",
|
|
238
|
+
"unicode-bom": "error",
|
|
239
|
+
yoda: "error",
|
|
142
240
|
"no-unused-vars": "off",
|
|
143
|
-
"@typescript-eslint/no-unused-vars": "off",
|
|
144
241
|
"unused-imports/no-unused-imports": "error",
|
|
145
242
|
"unused-imports/no-unused-vars": ["error", {
|
|
146
243
|
vars: "all",
|
|
@@ -193,10 +290,7 @@ const jsx = (options) => [{
|
|
|
193
290
|
const nextjs = () => [{
|
|
194
291
|
name: "nelsonlaidev/nextjs/rules",
|
|
195
292
|
plugins: { "@next/next": nextPlugin },
|
|
196
|
-
rules: {
|
|
197
|
-
...nextPlugin.configs["core-web-vitals"].rules,
|
|
198
|
-
"@next/next/no-html-link-for-pages": "off"
|
|
199
|
-
}
|
|
293
|
+
rules: { ...nextPlugin.configs["core-web-vitals"].rules }
|
|
200
294
|
}];
|
|
201
295
|
|
|
202
296
|
//#endregion
|
|
@@ -310,7 +404,30 @@ const playwright = (options) => [{
|
|
|
310
404
|
...options.validTestTags,
|
|
311
405
|
allowedTags: [...options.validTestTags?.allowedTags ?? []],
|
|
312
406
|
disallowedTags: [...options.validTestTags?.disallowedTags ?? []]
|
|
313
|
-
}]
|
|
407
|
+
}],
|
|
408
|
+
"playwright/no-commented-out-tests": "error",
|
|
409
|
+
"playwright/no-duplicate-hooks": "error",
|
|
410
|
+
"playwright/no-get-by-title": "error",
|
|
411
|
+
"playwright/no-nth-methods": "error",
|
|
412
|
+
"playwright/no-raw-locators": "error",
|
|
413
|
+
"playwright/no-restricted-locators": "error",
|
|
414
|
+
"playwright/no-restricted-matchers": "error",
|
|
415
|
+
"playwright/no-slowed-test": "error",
|
|
416
|
+
"playwright/prefer-comparison-matcher": "error",
|
|
417
|
+
"playwright/prefer-equality-matcher": "error",
|
|
418
|
+
"playwright/prefer-hooks-in-order": "error",
|
|
419
|
+
"playwright/prefer-hooks-on-top": "error",
|
|
420
|
+
"playwright/prefer-locator": "error",
|
|
421
|
+
"playwright/prefer-lowercase-title": "error",
|
|
422
|
+
"playwright/prefer-native-locators": "error",
|
|
423
|
+
"playwright/prefer-strict-equal": "error",
|
|
424
|
+
"playwright/prefer-to-be": "error",
|
|
425
|
+
"playwright/prefer-to-contain": "error",
|
|
426
|
+
"playwright/prefer-to-have-count": "error",
|
|
427
|
+
"playwright/prefer-to-have-length": "error",
|
|
428
|
+
"playwright/require-hook": "error",
|
|
429
|
+
"playwright/require-to-throw-message": "error",
|
|
430
|
+
"playwright/require-top-level-describe": "error"
|
|
314
431
|
}
|
|
315
432
|
}];
|
|
316
433
|
|
|
@@ -318,8 +435,32 @@ const playwright = (options) => [{
|
|
|
318
435
|
//#region src/configs/prettier.ts
|
|
319
436
|
const prettier = () => [{
|
|
320
437
|
name: "nelsonlaidev/prettier/rules",
|
|
321
|
-
|
|
322
|
-
|
|
438
|
+
rules
|
|
439
|
+
}];
|
|
440
|
+
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/configs/promise.ts
|
|
443
|
+
const promise = () => [{
|
|
444
|
+
name: "nelsonlaidev/promise/rules",
|
|
445
|
+
plugins: { promise: promisePlugin },
|
|
446
|
+
rules: {
|
|
447
|
+
"promise/always-return": "error",
|
|
448
|
+
"promise/avoid-new": "error",
|
|
449
|
+
"promise/catch-or-return": "error",
|
|
450
|
+
"promise/no-callback-in-promise": "error",
|
|
451
|
+
"promise/no-multiple-resolved": "error",
|
|
452
|
+
"promise/no-nesting": "error",
|
|
453
|
+
"promise/no-new-statics": "error",
|
|
454
|
+
"promise/no-promise-in-callback": "error",
|
|
455
|
+
"promise/no-return-in-finally": "error",
|
|
456
|
+
"promise/no-return-wrap": "error",
|
|
457
|
+
"promise/param-names": "error",
|
|
458
|
+
"promise/prefer-await-to-callbacks": "error",
|
|
459
|
+
"promise/prefer-await-to-then": "error",
|
|
460
|
+
"promise/prefer-catch": "error",
|
|
461
|
+
"promise/spec-only": "error",
|
|
462
|
+
"promise/valid-params": "error"
|
|
463
|
+
}
|
|
323
464
|
}];
|
|
324
465
|
|
|
325
466
|
//#endregion
|
|
@@ -334,6 +475,7 @@ const react = () => [{
|
|
|
334
475
|
rules: {
|
|
335
476
|
...reactPlugin.configs.all.rules,
|
|
336
477
|
...reactHooksPlugin.configs["recommended-latest"].rules,
|
|
478
|
+
"@eslint-react/jsx-dollar": "error",
|
|
337
479
|
"@eslint-react/naming-convention/filename": ["error", {
|
|
338
480
|
rule: "kebab-case",
|
|
339
481
|
excepts: [
|
|
@@ -344,7 +486,6 @@ const react = () => [{
|
|
|
344
486
|
String.raw`/^\[[^\]]+\]$/`
|
|
345
487
|
]
|
|
346
488
|
}],
|
|
347
|
-
"@eslint-react/no-complex-conditional-rendering": "off",
|
|
348
489
|
"@eslint-react/no-array-index-key": "off",
|
|
349
490
|
"@eslint-react/naming-convention/use-state": "off",
|
|
350
491
|
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "off",
|
|
@@ -435,48 +576,69 @@ const tailwindcss = (options) => {
|
|
|
435
576
|
|
|
436
577
|
//#endregion
|
|
437
578
|
//#region src/configs/typescript.ts
|
|
438
|
-
const typescript = () => [
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
579
|
+
const typescript = () => [
|
|
580
|
+
{
|
|
581
|
+
name: "nelsonlaidev/typescript/setup",
|
|
582
|
+
languageOptions: {
|
|
583
|
+
parser,
|
|
584
|
+
parserOptions: {
|
|
585
|
+
projectService: true,
|
|
586
|
+
tsconfigRootDir: process.cwd()
|
|
587
|
+
},
|
|
588
|
+
sourceType: "module"
|
|
445
589
|
},
|
|
446
|
-
|
|
590
|
+
plugins: { "@typescript-eslint": typescriptPlugin }
|
|
447
591
|
},
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
592
|
+
{
|
|
593
|
+
name: "nelsonlaidev/typescript/rules",
|
|
594
|
+
files: [GLOB_TS, GLOB_TSX],
|
|
595
|
+
rules: {
|
|
596
|
+
...typescriptPlugin.configs["eslint-recommended"].overrides[0].rules,
|
|
597
|
+
...typescriptPlugin.configs["strict-type-checked"].rules,
|
|
598
|
+
...typescriptPlugin.configs["stylistic-type-checked"].rules,
|
|
599
|
+
"@typescript-eslint/no-restricted-types": "error",
|
|
600
|
+
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
|
|
601
|
+
"@typescript-eslint/no-useless-empty-export": "error",
|
|
602
|
+
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
603
|
+
"@typescript-eslint/promise-function-async": "error",
|
|
604
|
+
"@typescript-eslint/require-array-sort-compare": "error",
|
|
605
|
+
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
606
|
+
"@typescript-eslint/class-methods-use-this": "error",
|
|
607
|
+
"@typescript-eslint/default-param-last": "error",
|
|
608
|
+
"@typescript-eslint/no-loop-func": "error",
|
|
609
|
+
"@typescript-eslint/no-invalid-this": "error",
|
|
610
|
+
"@typescript-eslint/no-shadow": "error",
|
|
611
|
+
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
612
|
+
"@typescript-eslint/array-type": ["error", {
|
|
613
|
+
default: "array-simple",
|
|
614
|
+
readonly: "array-simple"
|
|
615
|
+
}],
|
|
616
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
617
|
+
"@typescript-eslint/consistent-type-imports": ["error", {
|
|
618
|
+
prefer: "type-imports",
|
|
619
|
+
fixStyle: "separate-type-imports"
|
|
620
|
+
}],
|
|
621
|
+
"@typescript-eslint/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: false }],
|
|
622
|
+
"@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
|
|
623
|
+
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
624
|
+
"@typescript-eslint/only-throw-error": ["error", { allow: [{
|
|
625
|
+
from: "package",
|
|
626
|
+
package: "@tanstack/router-core",
|
|
627
|
+
name: "Redirect"
|
|
628
|
+
}] }],
|
|
629
|
+
"@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }],
|
|
630
|
+
"@typescript-eslint/no-unused-vars": "off"
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
name: "nelsonlaidev/typescript/declarations",
|
|
635
|
+
files: ["**/*.d.ts"],
|
|
636
|
+
rules: {
|
|
637
|
+
"@typescript-eslint/consistent-type-definitions": "off",
|
|
638
|
+
"@typescript-eslint/consistent-indexed-object-style": "off"
|
|
639
|
+
}
|
|
478
640
|
}
|
|
479
|
-
|
|
641
|
+
];
|
|
480
642
|
|
|
481
643
|
//#endregion
|
|
482
644
|
//#region src/configs/unicorn.ts
|
|
@@ -498,7 +660,15 @@ const vitest = (options) => [{
|
|
|
498
660
|
name: "nelsonlaidev/vitest/rules",
|
|
499
661
|
files: options.files,
|
|
500
662
|
plugins: { vitest: vitestPlugin },
|
|
501
|
-
rules: {
|
|
663
|
+
rules: {
|
|
664
|
+
...vitestPlugin.configs.all.rules,
|
|
665
|
+
"vitest/max-expects": "off",
|
|
666
|
+
"vitest/consistent-test-it": ["error", { fn: "test" }],
|
|
667
|
+
"vitest/prefer-mock-return-shorthand": "error",
|
|
668
|
+
"vitest/warn-todo": "error"
|
|
669
|
+
},
|
|
670
|
+
settings: { vitest: { typecheck: true } },
|
|
671
|
+
languageOptions: { globals: { ...vitestPlugin.environments.env.globals } }
|
|
502
672
|
}];
|
|
503
673
|
|
|
504
674
|
//#endregion
|
|
@@ -524,14 +694,15 @@ const defineConfig = (options = {}, ...userConfigs) => {
|
|
|
524
694
|
...deMorgan(),
|
|
525
695
|
...comments(),
|
|
526
696
|
...node(),
|
|
527
|
-
...
|
|
697
|
+
...importX(options.importX),
|
|
528
698
|
...command(),
|
|
529
699
|
...unicorn(),
|
|
530
700
|
...jsx(options.jsx ?? {}),
|
|
531
701
|
...typescript(),
|
|
532
702
|
...regexp(),
|
|
533
703
|
...stylistic(),
|
|
534
|
-
...zod()
|
|
704
|
+
...zod(),
|
|
705
|
+
...promise()
|
|
535
706
|
];
|
|
536
707
|
const isNextjsEnabled = options.nextjs ?? isNextjsInstalled;
|
|
537
708
|
const isReactEnabled = (options.react ?? isReactInstalled) || isNextjsEnabled;
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/configs/command.ts","../src/configs/comments.ts","../src/configs/de-morgan.ts","../src/configs/gitignore.ts","../src/configs/ignores.ts","../src/configs/import-sort.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/globs.ts","../src/configs/jsx.ts","../src/configs/nextjs.ts","../src/configs/node.ts","../src/defaults.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonarjs.ts","../src/configs/stylistic.ts","../src/configs/tailwindcss.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/zod.ts","../src/base.ts"],"sourcesContent":["import type { FlatConfig } from '../types'\n\nimport { commandPlugin } from '../plugins'\n\nexport const command = (): FlatConfig[] => [\n {\n ...commandPlugin(),\n name: 'nelsonlaidev/command/rules'\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { commentsPlugin } from '../plugins'\n\nexport const comments = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/eslint-comments/rules',\n plugins: {\n '@eslint-community/eslint-comments': commentsPlugin\n },\n rules: {\n ...commentsPlugin.configs.recommended.rules,\n\n '@eslint-community/eslint-comments/require-description': 'error',\n '@eslint-community/eslint-comments/no-unused-disable': 'error',\n '@eslint-community/eslint-comments/no-restricted-disable': 'error',\n '@eslint-community/eslint-comments/no-use': [\n 'error',\n { allow: ['eslint-disable-next-line', 'eslint-disable', 'eslint-enable'] }\n ]\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { deMorganPlugin } from '../plugins'\n\nexport const deMorgan = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/de-morgan/rules',\n plugins: {\n 'de-morgan': deMorganPlugin\n },\n rules: {\n ...deMorganPlugin.configs.recommended.rules\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport gitignorePlugin from 'eslint-config-flat-gitignore'\n\nexport const gitignore = (): FlatConfig[] => [\n gitignorePlugin({\n name: 'nelsonlaidev/gitignore'\n })\n]\n","import type { FlatConfig } from '../types'\n\nexport const ignores = (userIgnores: string[] = []): FlatConfig[] => [\n {\n name: 'nelsonlaidev/ignores',\n ignores: ['**/routeTree.gen.ts', ...userIgnores]\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { importSortPlugin } from '../plugins'\n\nexport const importSort = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-sort/rules',\n plugins: {\n 'import-sort': importSortPlugin\n },\n rules: {\n 'import-sort/imports': [\n 'error',\n {\n groups: [\n // Type imports (imports ending with \\u0000 are type-only imports)\n // The \\u0000 character is used internally by the import-sort plugin to mark type imports\n [\n String.raw`^.*\\u0000$`,\n String.raw`^node:.*\\u0000$`,\n String.raw`^@?\\w.*\\u0000$`,\n String.raw`^\\.\\..*\\u0000$`,\n String.raw`^\\..*\\u0000$`\n ],\n\n // Side effect imports (e.g., `import 'some-module'`)\n [String.raw`^\\u0000`],\n\n // Node.js builtins prefixed with `node:`\n ['^node:'],\n\n // Things that start with a letter (or digit or underscore), or `@` followed by a letter\n [String.raw`^@?\\w`],\n\n // Absolute imports (e.g., `import something from 'src/utils'`)\n ['^[^.]'],\n\n // Parent directory relative imports (e.g., `import something from '../utils'`)\n [String.raw`^\\.\\.`],\n\n // Current directory relative imports (e.g., `import something from './utils'`)\n [String.raw`^\\.`]\n ]\n }\n ],\n 'import-sort/exports': 'error'\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { importLitePlugin } from '../plugins'\n\nexport const imports = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/imports/rules',\n plugins: {\n 'import-lite': importLitePlugin\n },\n rules: {\n 'import-lite/first': 'error',\n 'import-lite/newline-after-import': ['error', { count: 1 }],\n 'import-lite/no-duplicates': 'error',\n 'import-lite/no-mutable-exports': 'error',\n 'import-lite/no-named-default': 'error'\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport eslint from '@eslint/js'\nimport globals from 'globals'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const javascript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/javascript/setup',\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: 'readonly',\n navigator: 'readonly',\n window: 'readonly'\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true\n },\n ecmaVersion: 2022,\n sourceType: 'module'\n },\n sourceType: 'module'\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n }\n },\n {\n name: 'nelsonlaidev/javascript/rules',\n plugins: {\n 'unused-imports': unusedImportsPlugin\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n 'no-unused-vars': 'off',\n '@typescript-eslint/no-unused-vars': 'off',\n\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_'\n }\n ]\n }\n }\n]\n","export const GLOB_SRC_EXT = '?([cm])[jt]s?(x)'\nexport const GLOB_SRC = '**/*.?([cm])[jt]s?(x)'\n\nexport const GLOB_JS = '**/*.?([cm])js'\nexport const GLOB_JSX = '**/*.?([cm])jsx'\n\nexport const GLOB_TS = '**/*.?([cm])ts'\nexport const GLOB_TSX = '**/*.?([cm])tsx'\n","import type { FlatConfig, JsxA11yOptions, JsxOptions } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsx = (options: JsxOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsx/setup',\n files: [GLOB_JSX, GLOB_TSX],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true\n }\n }\n }\n },\n {\n name: 'nelsonlaidev/jsx/rules',\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n 'jsx-a11y': jsxA11yPlugin\n },\n rules: {\n ...jsxA11yPlugin.flatConfigs.recommended.rules,\n\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/no-aria-hidden-on-focusable': 'error'\n },\n settings: {\n 'jsx-a11y': {\n ...options.a11y,\n components: {\n Button: 'button',\n Image: 'img',\n Input: 'input',\n Textarea: 'textarea',\n Link: 'a',\n ...options.a11y?.components\n }\n } satisfies JsxA11yOptions\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { nextPlugin } from '../plugins'\n\nexport const nextjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/nextjs/rules',\n plugins: {\n '@next/next': nextPlugin\n },\n rules: {\n ...nextPlugin.configs['core-web-vitals'].rules,\n\n // Unnecessary\n '@next/next/no-html-link-for-pages': 'off'\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { nodePlugin } from '../plugins'\n\nexport const node = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/node/rules',\n plugins: {\n n: nodePlugin\n },\n rules: {\n 'n/handle-callback-err': ['error', '^(err|error)$'],\n 'n/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-new-require': 'error',\n 'n/no-path-concat': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/process-exit-as-throw': 'error'\n }\n }\n]\n","import type {\n CanonicalClassesOptions,\n ConsistentClassOrderOptions,\n ExpectExpectOptions,\n MaxNestedDescribeOptions,\n MissingPlaywrightAwaitOptions,\n NoRestrictedClassesOptions,\n NoSkippedTestOptions,\n NoUnknownClassesOptions,\n NoUnnecessaryWhitespaceOptions,\n ValidExpectOptions,\n ValidTestTagsOptions,\n ValidTitleOptions\n} from './types'\n\nexport const DEFAULT_ROOT_FONT_SIZE = 16\n\nexport const CANONICAL_CLASSES_DEFAULT_OPTIONS: CanonicalClassesOptions = {\n rootFontSize: DEFAULT_ROOT_FONT_SIZE,\n collapse: true,\n logical: true\n}\n\nexport const CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS: ConsistentClassOrderOptions = {\n order: 'official',\n detectComponentClasses: false,\n componentClassOrder: 'preserve',\n componentClassPosition: 'start',\n unknownClassOrder: 'preserve',\n unknownClassPosition: 'start'\n}\n\nexport const NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS: NoRestrictedClassesOptions = {\n restrict: []\n}\n\nexport const NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS: NoUnknownClassesOptions = {\n ignore: [],\n detectComponentClasses: false\n}\n\nexport const NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS: NoUnnecessaryWhitespaceOptions = {\n allowMultiline: true\n}\n\nexport const EXPECT_EXPECT_DEFAULT_OPTIONS: ExpectExpectOptions = {\n assertFunctionNames: [],\n assertFunctionPatterns: []\n}\n\nexport const MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS: MaxNestedDescribeOptions = {\n max: 5\n}\n\nexport const MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS: MissingPlaywrightAwaitOptions = {\n customMatchers: []\n}\n\nexport const NO_SKIPPED_TEST_DEFAULT_OPTIONS: NoSkippedTestOptions = {\n allowConditional: false\n}\n\nexport const VALID_EXPECT_DEFAULT_OPTIONS: ValidExpectOptions = {\n minArgs: 1,\n maxArgs: 2\n}\n\nexport const VALID_TITLE_DEFAULT_OPTIONS: ValidTitleOptions = {\n ignoreSpaces: false,\n ignoreTypeOfStepName: true,\n ignoreTypeOfTestName: false,\n ignoreTypeOfDescribeName: false,\n disallowedWords: [],\n mustNotMatch: {},\n mustMatch: {}\n}\n\nexport const VALID_TEST_TAGS_DEFAULT_OPTIONS: ValidTestTagsOptions = {\n allowedTags: [],\n disallowedTags: []\n}\n","import type { FlatConfig, PlaywrightOptions } from '../types'\n\nimport globals from 'globals'\n\nimport {\n EXPECT_EXPECT_DEFAULT_OPTIONS,\n MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n VALID_EXPECT_DEFAULT_OPTIONS,\n VALID_TEST_TAGS_DEFAULT_OPTIONS,\n VALID_TITLE_DEFAULT_OPTIONS\n} from '../defaults'\nimport { playwrightPlugin } from '../plugins'\n\nexport const playwright = (options: PlaywrightOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/playwright/setup',\n languageOptions: {\n globals: globals['shared-node-browser']\n }\n },\n {\n name: 'nelsonlaidev/playwright/rules',\n files: options.files,\n plugins: {\n playwright: playwrightPlugin\n },\n settings: {\n playwright: {\n globalAliases: options.globalAliases,\n messages: options.messages\n }\n },\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n 'playwright/expect-expect': [\n 'error',\n {\n ...EXPECT_EXPECT_DEFAULT_OPTIONS,\n ...options.expectExpect,\n assertFunctionNames: [...(options.expectExpect?.assertFunctionNames ?? [])],\n assertFunctionPatterns: [...(options.expectExpect?.assertFunctionPatterns ?? [])]\n }\n ],\n 'playwright/max-nested-describe': [\n 'error',\n {\n ...MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n ...options.maxNestedDescribe\n }\n ],\n 'playwright/missing-playwright-await': [\n 'error',\n {\n ...MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n ...options.missingPlaywrightAwait,\n customMatchers: [...(options.missingPlaywrightAwait?.customMatchers ?? [])]\n }\n ],\n 'playwright/no-skipped-test': [\n 'error',\n {\n ...NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n ...options.noSkippedTest\n }\n ],\n 'playwright/valid-expect': [\n 'error',\n {\n ...VALID_EXPECT_DEFAULT_OPTIONS,\n ...options.validExpect\n }\n ],\n 'playwright/valid-title': [\n 'error',\n {\n ...VALID_TITLE_DEFAULT_OPTIONS,\n ...options.validTitle,\n disallowedWords: [...(options.validTitle?.disallowedWords ?? [])]\n }\n ],\n 'playwright/valid-test-tags': [\n 'error',\n {\n ...VALID_TEST_TAGS_DEFAULT_OPTIONS,\n ...options.validTestTags,\n allowedTags: [...(options.validTestTags?.allowedTags ?? [])],\n disallowedTags: [...(options.validTestTags?.disallowedTags ?? [])]\n }\n ]\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { prettierPlugin, prettierPluginRecommended } from '../plugins'\n\nexport const prettier = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/prettier/rules',\n plugins: {\n prettier: prettierPlugin\n },\n rules: {\n ...prettierPluginRecommended.rules\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { GLOB_SRC } from '../globs'\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\n\nexport const react = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/react/rules',\n files: [GLOB_SRC],\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin\n },\n rules: {\n ...reactPlugin.configs.all.rules,\n ...reactHooksPlugin.configs['recommended-latest'].rules,\n\n '@eslint-react/naming-convention/filename': [\n 'error',\n {\n rule: 'kebab-case',\n excepts: ['index', String.raw`/^_/`, String.raw`/^\\$/`, String.raw`/^[0-9]+$/`, String.raw`/^\\[[^\\]]+\\]$/`]\n }\n ],\n\n // Unnecessary\n '@eslint-react/no-complex-conditional-rendering': 'off',\n '@eslint-react/no-array-index-key': 'off',\n '@eslint-react/naming-convention/use-state': 'off',\n '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',\n 'react-hooks/set-state-in-effect': 'off',\n 'react-hooks/static-components': 'off'\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { regexpPlugin } from '../plugins'\n\nexport const regexp = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/regexp/rules',\n plugins: {\n regexp: regexpPlugin\n },\n rules: {\n ...regexpPlugin.configs.recommended.rules\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { sonarjsPlugin } from '../plugins'\n\nexport const sonarjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/sonarjs/rules',\n plugins: {\n sonarjs: sonarjsPlugin\n },\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n\n // Disable due to poor performance\n // https://community.sonarsource.com/t/eslint-plugin-sonarjs-performance-issues-on-large-codebase/138392\n 'sonarjs/no-commented-code': 'off',\n 'sonarjs/deprecation': 'off',\n 'sonarjs/arguments-order': 'off',\n\n // Unnecessary\n 'sonarjs/pseudo-random': 'off',\n 'sonarjs/function-return-type': 'off',\n 'sonarjs/prefer-read-only-props': 'off'\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { stylisticPlugin } from '../plugins'\n\nexport const stylistic = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/stylistic/rules',\n plugins: {\n '@stylistic': stylisticPlugin\n },\n rules: {\n '@stylistic/multiline-comment-style': ['error', 'separate-lines']\n }\n }\n]\n","import type { FlatConfig, TailwindCSSOptions } from '../types'\n\nimport {\n getDefaultAttributes,\n getDefaultCallees,\n getDefaultTags,\n getDefaultVariables\n} from 'eslint-plugin-better-tailwindcss/api/defaults'\n\nimport {\n CANONICAL_CLASSES_DEFAULT_OPTIONS,\n CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n DEFAULT_ROOT_FONT_SIZE,\n NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS\n} from '../defaults'\nimport { tailwindcssPlugin } from '../plugins'\n\nexport const tailwindcss = (options: TailwindCSSOptions): FlatConfig[] => {\n const shouldEnableShorthandRule = !options.canonicalClasses || options.canonicalClasses.logical === false\n\n return [\n {\n name: 'nelsonlaidev/tailwindcss/rules',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': [\n 'error',\n {\n ...CANONICAL_CLASSES_DEFAULT_OPTIONS,\n ...options.canonicalClasses\n }\n ],\n // The below rules are recommended to be disabled to avoid duplicate reports\n // when the canonical classes rule is enabled\n 'better-tailwindcss/enforce-consistent-important-position': 'off',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'off',\n 'better-tailwindcss/enforce-shorthand-classes': shouldEnableShorthandRule ? 'error' : 'off',\n\n 'better-tailwindcss/enforce-consistent-class-order': [\n 'error',\n {\n ...CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n ...options.consistentClassOrder\n }\n ],\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': [\n 'error',\n {\n ...NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n ...options.noRestrictedClasses,\n restrict: [...(options.noRestrictedClasses?.restrict ?? [])]\n }\n ],\n 'better-tailwindcss/no-unknown-classes': [\n 'error',\n {\n ...NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n ...options.noUnknownClasses,\n ignore: [...(options.noUnknownClasses?.ignore ?? [])]\n }\n ],\n 'better-tailwindcss/no-unnecessary-whitespace': [\n 'error',\n {\n ...NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n ...options.noUnnecessaryWhitespace\n }\n ]\n },\n settings: {\n 'better-tailwindcss': {\n ...options,\n rootFontSize: options.rootFontSize ?? DEFAULT_ROOT_FONT_SIZE,\n attributes: [...getDefaultAttributes(), ...(options.attributes ?? [])],\n callees: [...getDefaultCallees(), ...(options.callees ?? [])],\n variables: [...getDefaultVariables(), ...(options.variables ?? [])],\n tags: [...getDefaultTags(), ...(options.tags ?? [])]\n } satisfies TailwindCSSOptions\n }\n }\n ]\n}\n","import type { FlatConfig } from '../types'\n\nimport parser from '@typescript-eslint/parser'\n\nimport { GLOB_TS, GLOB_TSX } from '../globs'\nimport { typescriptPlugin } from '../plugins'\n\nexport const typescript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/typescript/setup',\n languageOptions: {\n parser,\n parserOptions: {\n projectService: true,\n tsconfigRootDir: process.cwd()\n },\n sourceType: 'module'\n },\n plugins: {\n '@typescript-eslint': typescriptPlugin\n }\n },\n {\n name: 'nelsonlaidev/typescript/rules',\n files: [GLOB_TS, GLOB_TSX],\n rules: {\n ...typescriptPlugin.configs['eslint-recommended'].overrides[0].rules,\n ...typescriptPlugin.configs['strict-type-checked'].rules,\n ...typescriptPlugin.configs['stylistic-type-checked'].rules,\n\n '@typescript-eslint/array-type': ['error', { default: 'array-simple' }],\n '@typescript-eslint/no-invalid-this': 'error',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n fixStyle: 'inline-type-imports'\n }\n ],\n '@typescript-eslint/consistent-type-exports': ['error', { fixMixedExportsWithInlineTypeSpecifier: true }],\n '@typescript-eslint/no-import-type-side-effects': 'error',\n '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],\n '@typescript-eslint/only-throw-error': [\n 'error',\n {\n allow: [\n {\n from: 'package',\n package: '@tanstack/router-core',\n name: 'Redirect'\n }\n ]\n }\n ],\n '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],\n\n // Too opinionated\n '@typescript-eslint/no-floating-promises': 'off',\n '@typescript-eslint/no-unsafe-member-access': 'off',\n '@typescript-eslint/no-unsafe-assignment': 'off',\n '@typescript-eslint/no-non-null-assertion': 'off',\n\n '@typescript-eslint/consistent-type-definitions': 'off'\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { unicornPlugin } from '../plugins'\n\nexport const unicorn = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/unicorn/rules',\n plugins: {\n unicorn: unicornPlugin\n },\n rules: {\n ...unicornPlugin.configs.recommended.rules,\n\n // Too opinionated\n 'unicorn/prevent-abbreviations': 'off',\n 'unicorn/no-null': 'off',\n\n // Unnecessary\n 'unicorn/no-document-cookie': 'off',\n 'unicorn/prefer-string-raw': 'off'\n }\n }\n]\n","import type { FlatConfig, VitestOptions } from '../types'\n\nimport { vitestPlugin } from '../plugins'\n\nexport const vitest = (options: VitestOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/vitest/rules',\n files: options.files,\n plugins: {\n vitest: vitestPlugin\n },\n rules: {\n ...vitestPlugin.configs.recommended.rules\n }\n }\n]\n","import type { FlatConfig } from '../types'\n\nimport { importZodPlugin } from '../plugins'\n\nexport const zod = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/zod/rules',\n plugins: {\n 'import-zod': importZodPlugin\n },\n rules: {\n 'import-zod/prefer-zod-namespace': 'error'\n }\n }\n]\n","import type { ConfigOptions, FlatConfig } from './types'\n\nimport { isPackageExists } from 'local-pkg'\n\nimport { command } from './configs/command'\nimport { comments } from './configs/comments'\nimport { deMorgan } from './configs/de-morgan'\nimport { gitignore } from './configs/gitignore'\nimport { ignores } from './configs/ignores'\nimport { importSort } from './configs/import-sort'\nimport { imports } from './configs/imports'\nimport { javascript } from './configs/javascript'\nimport { jsx } from './configs/jsx'\nimport { nextjs } from './configs/nextjs'\nimport { node } from './configs/node'\nimport { playwright } from './configs/playwright'\nimport { prettier } from './configs/prettier'\nimport { react } from './configs/react'\nimport { regexp } from './configs/regexp'\nimport { sonarjs } from './configs/sonarjs'\nimport { stylistic } from './configs/stylistic'\nimport { tailwindcss } from './configs/tailwindcss'\nimport { typescript } from './configs/typescript'\nimport { unicorn } from './configs/unicorn'\nimport { vitest } from './configs/vitest'\nimport { zod } from './configs/zod'\n\nconst isReactInstalled = isPackageExists('react')\nconst isNextjsInstalled = isPackageExists('next')\nconst isPrettierInstalled = isPackageExists('prettier')\n\nexport const defineConfig = (options: ConfigOptions = {}, ...userConfigs: FlatConfig[]): FlatConfig[] => {\n const configs = [\n ...gitignore(),\n ...ignores(options.ignores),\n ...javascript(),\n ...sonarjs(),\n ...importSort(),\n ...deMorgan(),\n ...comments(),\n ...node(),\n ...imports(),\n ...command(),\n ...unicorn(),\n ...jsx(options.jsx ?? {}),\n ...typescript(),\n ...regexp(),\n ...stylistic(),\n ...zod()\n ]\n\n const isNextjsEnabled = options.nextjs ?? isNextjsInstalled\n const isReactEnabled = (options.react ?? isReactInstalled) || isNextjsEnabled\n const isPrettierEnabled = options.prettier ?? isPrettierInstalled\n\n if (options.vitest) {\n configs.push(...vitest(options.vitest))\n }\n\n if (options.playwright) {\n configs.push(...playwright(options.playwright))\n }\n\n if (isReactEnabled) {\n configs.push(...react())\n }\n\n if (isNextjsEnabled) {\n configs.push(...nextjs())\n }\n\n if (options.tailwindcss) {\n configs.push(...tailwindcss(options.tailwindcss))\n }\n\n configs.push(...userConfigs)\n\n if (isPrettierEnabled) {\n // Must be added as the last item\n // https://github.com/prettier/eslint-plugin-prettier?tab=readme-ov-file#configuration-new-eslintconfigjs\n configs.push(...prettier())\n }\n\n return configs\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAa,gBAA8B,CACzC;CACE,GAAG,eAAe;CAClB,MAAM;CACP,CACF;;;;ACLD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,qCAAqC,gBACtC;CACD,OAAO;EACL,GAAG,eAAe,QAAQ,YAAY;EAEtC,yDAAyD;EACzD,uDAAuD;EACvD,2DAA2D;EAC3D,4CAA4C,CAC1C,SACA,EAAE,OAAO;GAAC;GAA4B;GAAkB;GAAgB,EAAE,CAC3E;EACF;CACF,CACF;;;;AClBD,MAAa,iBA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,SAAQ,KAAK,GAAG,YAAY;AAE5B,KAAI,kBAGF,SAAQ,KAAK,GAAG,UAAU,CAAC;AAG7B,QAAO"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/configs/command.ts","../src/configs/comments.ts","../src/configs/de-morgan.ts","../src/configs/gitignore.ts","../src/configs/ignores.ts","../src/configs/import-sort.ts","../src/configs/import-x.ts","../src/configs/javascript.ts","../src/globs.ts","../src/configs/jsx.ts","../src/configs/nextjs.ts","../src/configs/node.ts","../src/defaults.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/promise.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonarjs.ts","../src/configs/stylistic.ts","../src/configs/tailwindcss.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/zod.ts","../src/base.ts"],"sourcesContent":["import type { FlatConfig } from '../types'\n\nimport { commandPlugin } from '../plugins'\n\nexport const command = (): FlatConfig[] => [\n {\n ...commandPlugin(),\n name: 'nelsonlaidev/command/rules',\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { commentsPlugin } from '../plugins'\n\nexport const comments = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/eslint-comments/rules',\n plugins: {\n '@eslint-community/eslint-comments': commentsPlugin,\n },\n rules: {\n ...commentsPlugin.configs.recommended.rules,\n\n '@eslint-community/eslint-comments/no-unused-disable': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { deMorganPlugin } from '../plugins'\n\nexport const deMorgan = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/de-morgan/rules',\n plugins: {\n 'de-morgan': deMorganPlugin,\n },\n rules: {\n ...deMorganPlugin.configs.recommended.rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { gitignorePlugin } from '../plugins'\n\nexport const gitignore = (): FlatConfig[] => [\n gitignorePlugin({\n name: 'nelsonlaidev/gitignore',\n }),\n]\n","import type { FlatConfig } from '../types'\n\nexport const ignores = (userIgnores: string[] = []): FlatConfig[] => [\n {\n name: 'nelsonlaidev/ignores',\n ignores: ['**/routeTree.gen.ts', ...userIgnores],\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importSortPlugin } from '../plugins'\n\nexport const importSort = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-sort/rules',\n plugins: {\n 'import-sort': importSortPlugin,\n },\n rules: {\n 'import-sort/imports': [\n 'error',\n {\n groups: [\n // Type imports (imports ending with \\u0000 are type-only imports)\n // The \\u0000 character is used internally by the import-sort plugin to mark type imports\n [\n String.raw`^.*\\u0000$`,\n String.raw`^node:.*\\u0000$`,\n String.raw`^@?\\w.*\\u0000$`,\n String.raw`^\\.\\..*\\u0000$`,\n String.raw`^\\..*\\u0000$`,\n ],\n\n // Side effect imports (e.g., `import 'some-module'`)\n [String.raw`^\\u0000`],\n\n // Node.js builtins prefixed with `node:`\n ['^node:'],\n\n // Things that start with a letter (or digit or underscore), or `@` followed by a letter\n [String.raw`^@?\\w`],\n\n // Absolute imports (e.g., `import something from 'src/utils'`)\n ['^[^.]'],\n\n // Parent directory relative imports (e.g., `import something from '../utils'`)\n [String.raw`^\\.\\.`],\n\n // Current directory relative imports (e.g., `import something from './utils'`)\n [String.raw`^\\.`],\n ],\n },\n ],\n 'import-sort/exports': 'error',\n },\n },\n]\n","import type { FlatConfig, ImportXOptions } from '../types'\n\nimport { importXPlugin } from '../plugins'\n\nexport const importX = (options: ImportXOptions = {}): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-x/rules',\n plugins: {\n 'import-x': importXPlugin,\n },\n rules: {\n ...importXPlugin.configs.recommended.rules,\n ...importXPlugin.configs.typescript.rules,\n\n 'import-x/first': 'error',\n 'import-x/newline-after-import': ['error', { count: 1 }],\n 'import-x/no-amd': 'error',\n 'import-x/no-anonymous-default-export': 'error',\n 'import-x/no-commonjs': 'error',\n 'import-x/no-mutable-exports': 'error',\n 'import-x/no-named-default': 'error',\n 'import-x/no-namespace': ['error', { ignore: ['zod', ...(options.noNamespace?.ignore ?? [])] }],\n 'import-x/no-relative-packages': 'error',\n 'import-x/no-self-import': 'error',\n 'import-x/no-extraneous-dependencies': 'error',\n 'import-x/no-absolute-path': 'error',\n 'import-x/no-webpack-loader-syntax': 'error',\n 'import-x/no-dynamic-require': 'error',\n 'import-x/no-unassigned-import': [\n 'error',\n {\n allow: [\n '**/*.css',\n '**/*.scss',\n '**/*.less',\n 'server-only',\n 'client-only',\n '@total-typescript/ts-reset',\n '@testing-library/jest-dom/**',\n '@testing-library/jest-dom',\n 'msw/{node,browser}',\n 'dotenv/config',\n ...(options.noUnassignedImport?.allow ?? []),\n ],\n },\n ],\n 'import-x/no-useless-path-segments': 'error',\n 'import-x/no-import-module-exports': 'error',\n 'import-x/no-empty-named-blocks': 'error',\n 'import-x/no-deprecated': 'error',\n\n // This rule can trigger false positives in TypeScript projects.\n 'import-x/no-named-as-default': 'off',\n },\n settings: {\n ...importXPlugin.configs.typescript.settings,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport eslint from '@eslint/js'\nimport globals from 'globals'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const javascript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/javascript/setup',\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: 'readonly',\n navigator: 'readonly',\n window: 'readonly',\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error',\n },\n },\n {\n name: 'nelsonlaidev/javascript/rules',\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n // Enable more rules\n 'accessor-pairs': 'error',\n 'array-callback-return': 'error',\n 'arrow-body-style': 'error',\n 'block-scoped-var': 'error',\n complexity: 'error',\n 'default-case': 'error',\n 'default-case-last': 'error',\n eqeqeq: 'error',\n 'func-names': 'error',\n 'max-classes-per-file': 'error',\n 'max-depth': 'error',\n 'max-nested-callbacks': 'error',\n 'new-cap': ['error', { capIsNew: false }],\n 'no-alert': 'error',\n 'no-await-in-loop': 'error',\n 'no-bitwise': 'error',\n 'no-caller': 'error',\n 'no-console': ['error', { allow: ['warn', 'error'] }],\n 'no-constructor-return': 'error',\n 'no-else-return': 'error',\n 'no-eq-null': 'error',\n 'no-eval': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-label': 'error',\n 'no-implicit-coercion': 'error',\n 'no-label-var': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-lonely-if': 'error',\n 'no-multi-assign': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-wrappers': 'error',\n 'no-object-constructor': 'error',\n 'no-param-reassign': 'error',\n 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],\n 'no-promise-executor-return': 'error',\n 'no-restricted-globals': 'error',\n 'no-return-assign': 'error',\n 'no-script-url': 'error',\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-unassigned-vars': 'error',\n 'no-unneeded-ternary': 'error',\n 'no-useless-call': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-concat': 'error',\n 'no-useless-rename': 'error',\n 'no-useless-return': 'error',\n 'no-void': ['error', { allowAsStatement: true }],\n 'no-warning-comments': 'error',\n 'operator-assignment': 'error',\n 'prefer-destructuring': [\n 'error',\n {\n VariableDeclarator: { array: false, object: true },\n AssignmentExpression: { array: false, object: false },\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-numeric-literals': 'error',\n 'prefer-object-has-own': 'error',\n 'prefer-object-spread': 'error',\n 'prefer-template': 'error',\n 'preserve-caught-error': 'error',\n radix: 'error',\n 'symbol-description': 'error',\n 'unicode-bom': 'error',\n yoda: 'error',\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n 'no-unused-vars': 'off',\n\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n },\n },\n]\n","export const GLOB_SRC_EXT = '?([cm])[jt]s?(x)'\nexport const GLOB_SRC = '**/*.?([cm])[jt]s?(x)'\n\nexport const GLOB_JS = '**/*.?([cm])js'\nexport const GLOB_JSX = '**/*.?([cm])jsx'\n\nexport const GLOB_TS = '**/*.?([cm])ts'\nexport const GLOB_TSX = '**/*.?([cm])tsx'\n","import type { FlatConfig, JsxA11yOptions, JsxOptions } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsx = (options: JsxOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsx/setup',\n files: [GLOB_JSX, GLOB_TSX],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n },\n {\n name: 'nelsonlaidev/jsx/rules',\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n 'jsx-a11y': jsxA11yPlugin,\n },\n rules: {\n ...jsxA11yPlugin.flatConfigs.recommended.rules,\n\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/no-aria-hidden-on-focusable': 'error',\n },\n settings: {\n 'jsx-a11y': {\n ...options.a11y,\n components: {\n Button: 'button',\n Image: 'img',\n Input: 'input',\n Textarea: 'textarea',\n Link: 'a',\n ...options.a11y?.components,\n },\n } satisfies JsxA11yOptions,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nextPlugin } from '../plugins'\n\nexport const nextjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/nextjs/rules',\n plugins: {\n '@next/next': nextPlugin,\n },\n rules: {\n ...nextPlugin.configs['core-web-vitals'].rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nodePlugin } from '../plugins'\n\nexport const node = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/node/rules',\n plugins: {\n n: nodePlugin,\n },\n rules: {\n 'n/handle-callback-err': ['error', '^(err|error)$'],\n 'n/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-new-require': 'error',\n 'n/no-path-concat': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/process-exit-as-throw': 'error',\n },\n },\n]\n","import type {\n CanonicalClassesOptions,\n ConsistentClassOrderOptions,\n ExpectExpectOptions,\n MaxNestedDescribeOptions,\n MissingPlaywrightAwaitOptions,\n NoRestrictedClassesOptions,\n NoSkippedTestOptions,\n NoUnknownClassesOptions,\n NoUnnecessaryWhitespaceOptions,\n ValidExpectOptions,\n ValidTestTagsOptions,\n ValidTitleOptions,\n} from './types'\n\nexport const DEFAULT_ROOT_FONT_SIZE = 16\n\nexport const CANONICAL_CLASSES_DEFAULT_OPTIONS: CanonicalClassesOptions = {\n rootFontSize: DEFAULT_ROOT_FONT_SIZE,\n collapse: true,\n logical: true,\n}\n\nexport const CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS: ConsistentClassOrderOptions = {\n order: 'official',\n detectComponentClasses: false,\n componentClassOrder: 'preserve',\n componentClassPosition: 'start',\n unknownClassOrder: 'preserve',\n unknownClassPosition: 'start',\n}\n\nexport const NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS: NoRestrictedClassesOptions = {\n restrict: [],\n}\n\nexport const NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS: NoUnknownClassesOptions = {\n ignore: [],\n detectComponentClasses: false,\n}\n\nexport const NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS: NoUnnecessaryWhitespaceOptions = {\n allowMultiline: true,\n}\n\nexport const EXPECT_EXPECT_DEFAULT_OPTIONS: ExpectExpectOptions = {\n assertFunctionNames: [],\n assertFunctionPatterns: [],\n}\n\nexport const MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS: MaxNestedDescribeOptions = {\n max: 5,\n}\n\nexport const MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS: MissingPlaywrightAwaitOptions = {\n customMatchers: [],\n}\n\nexport const NO_SKIPPED_TEST_DEFAULT_OPTIONS: NoSkippedTestOptions = {\n allowConditional: false,\n}\n\nexport const VALID_EXPECT_DEFAULT_OPTIONS: ValidExpectOptions = {\n minArgs: 1,\n maxArgs: 2,\n}\n\nexport const VALID_TITLE_DEFAULT_OPTIONS: ValidTitleOptions = {\n ignoreSpaces: false,\n ignoreTypeOfStepName: true,\n ignoreTypeOfTestName: false,\n ignoreTypeOfDescribeName: false,\n disallowedWords: [],\n mustNotMatch: {},\n mustMatch: {},\n}\n\nexport const VALID_TEST_TAGS_DEFAULT_OPTIONS: ValidTestTagsOptions = {\n allowedTags: [],\n disallowedTags: [],\n}\n","import type { FlatConfig, PlaywrightOptions } from '../types'\n\nimport globals from 'globals'\n\nimport {\n EXPECT_EXPECT_DEFAULT_OPTIONS,\n MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n VALID_EXPECT_DEFAULT_OPTIONS,\n VALID_TEST_TAGS_DEFAULT_OPTIONS,\n VALID_TITLE_DEFAULT_OPTIONS,\n} from '../defaults'\nimport { playwrightPlugin } from '../plugins'\n\nexport const playwright = (options: PlaywrightOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/playwright/setup',\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n },\n {\n name: 'nelsonlaidev/playwright/rules',\n files: options.files,\n plugins: {\n playwright: playwrightPlugin,\n },\n settings: {\n playwright: {\n globalAliases: options.globalAliases,\n messages: options.messages,\n },\n },\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n 'playwright/expect-expect': [\n 'error',\n {\n ...EXPECT_EXPECT_DEFAULT_OPTIONS,\n ...options.expectExpect,\n assertFunctionNames: [...(options.expectExpect?.assertFunctionNames ?? [])],\n assertFunctionPatterns: [...(options.expectExpect?.assertFunctionPatterns ?? [])],\n },\n ],\n 'playwright/max-nested-describe': [\n 'error',\n {\n ...MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n ...options.maxNestedDescribe,\n },\n ],\n 'playwright/missing-playwright-await': [\n 'error',\n {\n ...MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n ...options.missingPlaywrightAwait,\n customMatchers: [...(options.missingPlaywrightAwait?.customMatchers ?? [])],\n },\n ],\n 'playwright/no-skipped-test': [\n 'error',\n {\n ...NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n ...options.noSkippedTest,\n },\n ],\n 'playwright/valid-expect': [\n 'error',\n {\n ...VALID_EXPECT_DEFAULT_OPTIONS,\n ...options.validExpect,\n },\n ],\n 'playwright/valid-title': [\n 'error',\n {\n ...VALID_TITLE_DEFAULT_OPTIONS,\n ...options.validTitle,\n disallowedWords: [...(options.validTitle?.disallowedWords ?? [])],\n },\n ],\n 'playwright/valid-test-tags': [\n 'error',\n {\n ...VALID_TEST_TAGS_DEFAULT_OPTIONS,\n ...options.validTestTags,\n allowedTags: [...(options.validTestTags?.allowedTags ?? [])],\n disallowedTags: [...(options.validTestTags?.disallowedTags ?? [])],\n },\n ],\n\n 'playwright/no-commented-out-tests': 'error',\n 'playwright/no-duplicate-hooks': 'error',\n 'playwright/no-get-by-title': 'error',\n 'playwright/no-nth-methods': 'error',\n 'playwright/no-raw-locators': 'error',\n 'playwright/no-restricted-locators': 'error',\n 'playwright/no-restricted-matchers': 'error',\n 'playwright/no-slowed-test': 'error',\n 'playwright/prefer-comparison-matcher': 'error',\n 'playwright/prefer-equality-matcher': 'error',\n 'playwright/prefer-hooks-in-order': 'error',\n 'playwright/prefer-hooks-on-top': 'error',\n 'playwright/prefer-locator': 'error',\n 'playwright/prefer-lowercase-title': 'error',\n 'playwright/prefer-native-locators': 'error',\n 'playwright/prefer-strict-equal': 'error',\n 'playwright/prefer-to-be': 'error',\n 'playwright/prefer-to-contain': 'error',\n 'playwright/prefer-to-have-count': 'error',\n 'playwright/prefer-to-have-length': 'error',\n 'playwright/require-hook': 'error',\n 'playwright/require-to-throw-message': 'error',\n 'playwright/require-top-level-describe': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { rules } from 'eslint-config-prettier'\n\nexport const prettier = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/prettier/rules',\n rules,\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { promisePlugin } from '../plugins'\n\nexport const promise = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/promise/rules',\n plugins: {\n promise: promisePlugin,\n },\n rules: {\n 'promise/always-return': 'error',\n 'promise/avoid-new': 'error',\n 'promise/catch-or-return': 'error',\n 'promise/no-callback-in-promise': 'error',\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-nesting': 'error',\n 'promise/no-new-statics': 'error',\n 'promise/no-promise-in-callback': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'promise/param-names': 'error',\n 'promise/prefer-await-to-callbacks': 'error',\n 'promise/prefer-await-to-then': 'error',\n 'promise/prefer-catch': 'error',\n 'promise/spec-only': 'error',\n 'promise/valid-params': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { GLOB_SRC } from '../globs'\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\n\nexport const react = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/react/rules',\n files: [GLOB_SRC],\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n rules: {\n ...reactPlugin.configs.all.rules,\n ...reactHooksPlugin.configs['recommended-latest'].rules,\n\n '@eslint-react/jsx-dollar': 'error',\n '@eslint-react/naming-convention/filename': [\n 'error',\n {\n rule: 'kebab-case',\n excepts: ['index', String.raw`/^_/`, String.raw`/^\\$/`, String.raw`/^[0-9]+$/`, String.raw`/^\\[[^\\]]+\\]$/`],\n },\n ],\n\n // Unnecessary\n '@eslint-react/no-array-index-key': 'off',\n '@eslint-react/naming-convention/use-state': 'off',\n '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',\n 'react-hooks/set-state-in-effect': 'off',\n 'react-hooks/static-components': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { regexpPlugin } from '../plugins'\n\nexport const regexp = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/regexp/rules',\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs.recommended.rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { sonarjsPlugin } from '../plugins'\n\nexport const sonarjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/sonarjs/rules',\n plugins: {\n sonarjs: sonarjsPlugin,\n },\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n\n // Disable due to poor performance\n // https://community.sonarsource.com/t/eslint-plugin-sonarjs-performance-issues-on-large-codebase/138392\n 'sonarjs/no-commented-code': 'off',\n 'sonarjs/deprecation': 'off',\n 'sonarjs/arguments-order': 'off',\n\n // Unnecessary\n 'sonarjs/pseudo-random': 'off',\n 'sonarjs/function-return-type': 'off',\n 'sonarjs/prefer-read-only-props': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { stylisticPlugin } from '../plugins'\n\nexport const stylistic = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/stylistic/rules',\n plugins: {\n '@stylistic': stylisticPlugin,\n },\n rules: {\n '@stylistic/multiline-comment-style': ['error', 'separate-lines'],\n },\n },\n]\n","import type { FlatConfig, TailwindCSSOptions } from '../types'\n\nimport {\n getDefaultAttributes,\n getDefaultCallees,\n getDefaultTags,\n getDefaultVariables,\n} from 'eslint-plugin-better-tailwindcss/api/defaults'\n\nimport {\n CANONICAL_CLASSES_DEFAULT_OPTIONS,\n CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n DEFAULT_ROOT_FONT_SIZE,\n NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n} from '../defaults'\nimport { tailwindcssPlugin } from '../plugins'\n\nexport const tailwindcss = (options: TailwindCSSOptions): FlatConfig[] => {\n const shouldEnableShorthandRule = !options.canonicalClasses || options.canonicalClasses.logical === false\n\n return [\n {\n name: 'nelsonlaidev/tailwindcss/rules',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': [\n 'error',\n {\n ...CANONICAL_CLASSES_DEFAULT_OPTIONS,\n ...options.canonicalClasses,\n },\n ],\n // The below rules are recommended to be disabled to avoid duplicate reports\n // when the canonical classes rule is enabled\n 'better-tailwindcss/enforce-consistent-important-position': 'off',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'off',\n 'better-tailwindcss/enforce-shorthand-classes': shouldEnableShorthandRule ? 'error' : 'off',\n\n 'better-tailwindcss/enforce-consistent-class-order': [\n 'error',\n {\n ...CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n ...options.consistentClassOrder,\n },\n ],\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': [\n 'error',\n {\n ...NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n ...options.noRestrictedClasses,\n restrict: [...(options.noRestrictedClasses?.restrict ?? [])],\n },\n ],\n 'better-tailwindcss/no-unknown-classes': [\n 'error',\n {\n ...NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n ...options.noUnknownClasses,\n ignore: [...(options.noUnknownClasses?.ignore ?? [])],\n },\n ],\n 'better-tailwindcss/no-unnecessary-whitespace': [\n 'error',\n {\n ...NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n ...options.noUnnecessaryWhitespace,\n },\n ],\n },\n settings: {\n 'better-tailwindcss': {\n ...options,\n rootFontSize: options.rootFontSize ?? DEFAULT_ROOT_FONT_SIZE,\n attributes: [...getDefaultAttributes(), ...(options.attributes ?? [])],\n callees: [...getDefaultCallees(), ...(options.callees ?? [])],\n variables: [...getDefaultVariables(), ...(options.variables ?? [])],\n tags: [...getDefaultTags(), ...(options.tags ?? [])],\n } satisfies TailwindCSSOptions,\n },\n },\n ]\n}\n","import type { FlatConfig } from '../types'\n\nimport parser from '@typescript-eslint/parser'\n\nimport { GLOB_TS, GLOB_TSX } from '../globs'\nimport { typescriptPlugin } from '../plugins'\n\nexport const typescript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/typescript/setup',\n languageOptions: {\n parser,\n parserOptions: {\n projectService: true,\n tsconfigRootDir: process.cwd(),\n },\n sourceType: 'module',\n },\n plugins: {\n '@typescript-eslint': typescriptPlugin,\n },\n },\n {\n name: 'nelsonlaidev/typescript/rules',\n files: [GLOB_TS, GLOB_TSX],\n rules: {\n ...typescriptPlugin.configs['eslint-recommended'].overrides[0].rules,\n ...typescriptPlugin.configs['strict-type-checked'].rules,\n ...typescriptPlugin.configs['stylistic-type-checked'].rules,\n\n '@typescript-eslint/no-restricted-types': 'error',\n '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',\n '@typescript-eslint/no-useless-empty-export': 'error',\n '@typescript-eslint/prefer-enum-initializers': 'error',\n '@typescript-eslint/promise-function-async': 'error',\n '@typescript-eslint/require-array-sort-compare': 'error',\n '@typescript-eslint/switch-exhaustiveness-check': 'error',\n '@typescript-eslint/class-methods-use-this': 'error',\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/no-loop-func': 'error',\n '@typescript-eslint/no-invalid-this': 'error',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-import-type-side-effects': 'error',\n '@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n { prefer: 'type-imports', fixStyle: 'separate-type-imports' },\n ],\n '@typescript-eslint/consistent-type-exports': ['error', { fixMixedExportsWithInlineTypeSpecifier: false }],\n '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],\n '@typescript-eslint/only-throw-error': [\n 'error',\n { allow: [{ from: 'package', package: '@tanstack/router-core', name: 'Redirect' }] },\n ],\n '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n name: 'nelsonlaidev/typescript/declarations',\n files: ['**/*.d.ts'],\n rules: {\n // We sometimes need to use `interface` in declaration files,\n // especially when we want to extend from a type from another package,\n // and that type is an interface.\n '@typescript-eslint/consistent-type-definitions': 'off',\n // Similar to the above rule, interfaces support index signatures only when\n // we define object types with them.\n '@typescript-eslint/consistent-indexed-object-style': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { unicornPlugin } from '../plugins'\n\nexport const unicorn = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/unicorn/rules',\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n ...unicornPlugin.configs.recommended.rules,\n\n // Too opinionated\n 'unicorn/prevent-abbreviations': 'off',\n 'unicorn/no-null': 'off',\n\n // Unnecessary\n 'unicorn/no-document-cookie': 'off',\n 'unicorn/prefer-string-raw': 'off',\n },\n },\n]\n","import type { FlatConfig, VitestOptions } from '../types'\n\nimport { vitestPlugin } from '../plugins'\n\nexport const vitest = (options: VitestOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/vitest/rules',\n files: options.files,\n plugins: {\n vitest: vitestPlugin,\n },\n rules: {\n ...vitestPlugin.configs.all.rules,\n\n // Too restrictive\n 'vitest/max-expects': 'off',\n\n 'vitest/consistent-test-it': ['error', { fn: 'test' }],\n 'vitest/prefer-mock-return-shorthand': 'error',\n 'vitest/warn-todo': 'error',\n },\n settings: {\n vitest: {\n typecheck: true,\n },\n },\n languageOptions: {\n globals: {\n ...vitestPlugin.environments.env.globals,\n },\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importZodPlugin } from '../plugins'\n\nexport const zod = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/zod/rules',\n plugins: {\n 'import-zod': importZodPlugin,\n },\n rules: {\n 'import-zod/prefer-zod-namespace': 'error',\n },\n },\n]\n","import type { ConfigOptions, FlatConfig } from './types'\n\nimport { isPackageExists } from 'local-pkg'\n\nimport { command } from './configs/command'\nimport { comments } from './configs/comments'\nimport { deMorgan } from './configs/de-morgan'\nimport { gitignore } from './configs/gitignore'\nimport { ignores } from './configs/ignores'\nimport { importSort } from './configs/import-sort'\nimport { importX } from './configs/import-x'\nimport { javascript } from './configs/javascript'\nimport { jsx } from './configs/jsx'\nimport { nextjs } from './configs/nextjs'\nimport { node } from './configs/node'\nimport { playwright } from './configs/playwright'\nimport { prettier } from './configs/prettier'\nimport { promise } from './configs/promise'\nimport { react } from './configs/react'\nimport { regexp } from './configs/regexp'\nimport { sonarjs } from './configs/sonarjs'\nimport { stylistic } from './configs/stylistic'\nimport { tailwindcss } from './configs/tailwindcss'\nimport { typescript } from './configs/typescript'\nimport { unicorn } from './configs/unicorn'\nimport { vitest } from './configs/vitest'\nimport { zod } from './configs/zod'\n\nconst isReactInstalled = isPackageExists('react')\nconst isNextjsInstalled = isPackageExists('next')\nconst isPrettierInstalled = isPackageExists('prettier')\n\nexport const defineConfig = (options: ConfigOptions = {}, ...userConfigs: FlatConfig[]): FlatConfig[] => {\n const configs = [\n ...gitignore(),\n ...ignores(options.ignores),\n ...javascript(),\n ...sonarjs(),\n ...importSort(),\n ...deMorgan(),\n ...comments(),\n ...node(),\n ...importX(options.importX),\n ...command(),\n ...unicorn(),\n ...jsx(options.jsx ?? {}),\n ...typescript(),\n ...regexp(),\n ...stylistic(),\n ...zod(),\n ...promise(),\n ]\n\n const isNextjsEnabled = options.nextjs ?? isNextjsInstalled\n const isReactEnabled = (options.react ?? isReactInstalled) || isNextjsEnabled\n const isPrettierEnabled = options.prettier ?? isPrettierInstalled\n\n if (options.vitest) {\n configs.push(...vitest(options.vitest))\n }\n\n if (options.playwright) {\n configs.push(...playwright(options.playwright))\n }\n\n if (isReactEnabled) {\n configs.push(...react())\n }\n\n if (isNextjsEnabled) {\n configs.push(...nextjs())\n }\n\n if (options.tailwindcss) {\n configs.push(...tailwindcss(options.tailwindcss))\n }\n\n configs.push(...userConfigs)\n\n if (isPrettierEnabled) {\n // Must be added as the last item\n // https://github.com/prettier/eslint-config-prettier#installation\n configs.push(...prettier())\n }\n\n return configs\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAa,gBAA8B,CACzC;CACE,GAAG,eAAe;CAClB,MAAM;CACP,CACF;;;;ACLD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,qCAAqC,gBACtC;CACD,OAAO;EACL,GAAG,eAAe,QAAQ,YAAY;EAEtC,uDAAuD;EACxD;CACF,CACF;;;;ACZD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,aAAa,gBACd;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF,CACF;;;;ACVD,MAAa,kBAAgC,CAC3C,gBAAgB,EACd,MAAM,0BACP,CAAC,CACH;;;;ACND,MAAa,WAAW,cAAwB,EAAE,KAAmB,CACnE;CACE,MAAM;CACN,SAAS,CAAC,uBAAuB,GAAG,YAAY;CACjD,CACF;;;;ACHD,MAAa,mBAAiC,CAC5C;CACE,MAAM;CACN,SAAS,EACP,e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AGnD,SAAQ,KAAK,GAAG,YAAY;AAE5B,KAAI,kBAGF,SAAQ,KAAK,GAAG,UAAU,CAAC;AAG7B,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nelsonlaidev/eslint-config",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"homepage": "https://github.com/nelsonlaidev/config/blob/main/packages/eslint-config/README.md",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/nelsonlaidev/config/issues"
|
|
@@ -31,15 +31,16 @@
|
|
|
31
31
|
"@vitest/eslint-plugin": "^1.6.6",
|
|
32
32
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
33
33
|
"eslint-config-prettier": "^10.1.8",
|
|
34
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
34
35
|
"eslint-plugin-better-tailwindcss": "^4.0.2",
|
|
35
36
|
"eslint-plugin-command": "^3.4.0",
|
|
36
37
|
"eslint-plugin-de-morgan": "^2.0.0",
|
|
37
|
-
"eslint-plugin-import-
|
|
38
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
38
39
|
"eslint-plugin-import-zod": "^1.2.1",
|
|
39
40
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
40
41
|
"eslint-plugin-n": "^17.23.2",
|
|
41
42
|
"eslint-plugin-playwright": "^2.5.1",
|
|
42
|
-
"eslint-plugin-
|
|
43
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
43
44
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
44
45
|
"eslint-plugin-regexp": "^3.0.0",
|
|
45
46
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|