@nelsonlaidev/eslint-config 4.0.0 → 4.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # @nelsonlaidev/eslint-config
2
2
 
3
+ [![Version](https://img.shields.io/npm/v/@nelsonlaidev/eslint-config?style=flat&colorA=111111&colorB=000000)](https://npmx.dev/package/@nelsonlaidev/eslint-config)
4
+ [![Downloads](https://img.shields.io/npm/dt/@nelsonlaidev/eslint-config.svg?style=flat&colorA=222222&colorB=000000)](https://npmx.dev/package/@nelsonlaidev/eslint-config)
5
+ [![License](https://img.shields.io/npm/l/@nelsonlaidev/eslint-config?style=flat&colorA=333333&colorB=000000)](https://github.com/nelsonlaidev/config/blob/main/LICENSE)
6
+
3
7
  Personal ESLint configurations for Nelson Lai projects.
4
8
 
5
9
  ## Installation
@@ -97,5 +101,31 @@ type Options = {
97
101
  // Optional
98
102
  // Specify files to ignore
99
103
  ignores?: string[]
104
+ // Optional
105
+ // Configure TypeScript import resolver for monorepos
106
+ // Defaults to scanning root tsconfig.json and apps/**/{ts,js}config.json and packages/**/{ts,js}config.json
107
+ typescriptResolver?: import('eslint-import-resolver-typescript').TypeScriptResolverOptions
100
108
  }
101
109
  ```
110
+
111
+ ### TypeScript Import Resolver
112
+
113
+ When using a monorepo, you may need to customize the TypeScript import resolver configuration. By default, the resolver scans for `tsconfig.json` and `jsconfig.json` files in the following locations:
114
+
115
+ - `./tsconfig.json` (root)
116
+ - `apps/**/{ts,js}config.json`
117
+ - `packages/**/{ts,js}config.json`
118
+
119
+ If your monorepo structure differs, you can provide a custom `typescriptResolver` option:
120
+
121
+ ```ts
122
+ export default defineConfig({
123
+ typescriptResolver: {
124
+ alwaysTryTypes: true,
125
+ bun: true,
126
+ project: ['packages/foo/tsconfig.json'],
127
+ },
128
+ })
129
+ ```
130
+
131
+ Refer to the [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) documentation for all available options.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { Selectors } from "eslint-plugin-better-tailwindcss/types";
1
+ import { TypeScriptResolverOptions } from "eslint-import-resolver-typescript";
2
2
  import { Linter } from "eslint";
3
+ import { Selectors } from "eslint-plugin-better-tailwindcss/types";
3
4
 
4
5
  //#region src/types/jsx-a11y.d.ts
5
6
  type JsxA11yConfigOptions = {
@@ -61,6 +62,10 @@ type TailwindCSSOptions = {
61
62
  * See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#tsconfig) for more details.
62
63
  */
63
64
  tsconfig?: string;
65
+ /**
66
+ * See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#cwd) for more details.
67
+ */
68
+ cwd?: string;
64
69
  /**
65
70
  * See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#detectcomponentclasses) for more details.
66
71
  * @default false
@@ -208,6 +213,13 @@ type ConfigOptions = {
208
213
  * A list of file paths or glob patterns that ESLint should ignore.
209
214
  */
210
215
  ignores?: string[];
216
+ /**
217
+ * TypeScript import resolver configuration options.
218
+ *
219
+ * Providing this object allows customizing how TypeScript resolves imports,
220
+ * useful for monorepos or custom project structures.
221
+ */
222
+ typescriptResolver?: TypeScriptResolverOptions;
211
223
  };
212
224
  type FlatConfig = Linter.Config;
213
225
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/jsx-a11y.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,oBAAA;EACV,IAAA,GAAO,cAAA;AAAA;AAAA,KAGG,cAAA;EAJA;;;EAQV,UAAA,GAAa,MAAA;EAPQ;AAGvB;;EAQE,UAAA;IACE,GAAA;EAAA;EALW;;;EAUb,mBAAA;EAIA;;;EAAA,oB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
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/jsx-a11y.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,oBAAA;EACV,IAAA,GAAO,cAAA;AAAA;AAAA,KAGG,cAAA;;AAJZ;;EAQE,UAAA,GAAa,MAAA;EAPb;;AAGF;EAQE,UAAA;IACE,GAAA;EAAA;EALF;;;EAUA,mBAAA;EAAA;;;EAIA,oBAAA;AAAA;;;;;;KCnBU,iBAAA;;ADHZ;;ECOE,KAAA,EAAO,KAAA;EDNP;;AAGF;;ECQE,mBAAA;EDJmB;;;;ECSnB,sBAAA;AAAA;;;KCfU,kBAAA;;;;EAIV,UAAA;EFN8B;;;EEU9B,cAAA;EFNU;;;EEUV,QAAA;EFNA;;;EEUA,GAAA;EFAA;;;;EEKA,sBAAA;;;ADpBF;;ECyBE,YAAA;EDrBY;;;;;EC2BZ,YAAA;EDjBsB;;;ECqBtB,SAAA,GAAY,SAAA;EApCF;;;EAwCV,SAAA;IApCA;;;;IAyCE,QAAA;IAnBF;;;;IAwBE,OAAA;EAAA;EAAA;;;EAKF,UAAA;IAeE;;;;IAVA,KAAA;IA0B4B;;;;IArB5B,cAAA;IAmCA;;;;IA9BA,iBAAA;;ACrEJ;;;ID0EI,YAAA;ICtEU;;;;ID2EV,eAAA;EAAA;;;;;EAMF,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EEtEjE;;;;EF2EA,MAAA;EE3DA;;;EF+DA,UAAA;IEnDA;;;;IFwDE,cAAA;EAAA;AAAA;;;;;;KCnGQ,aAAA;;AHHZ;;EGOE,KAAA,EAAO,KAAA;AAAA;;;;;;KCGG,aAAA;EJNA;;;EIUV,KAAA;EJNA;;;EIUA,MAAA;EJAA;;;;;EIMA,WAAA,GAAc,kBAAA;;AHrBhB;;EGyBE,OAAA,GAAU,oBAAA;EHrBE;;;;;EG2BZ,MAAA,GAAS,aAAA;EHjBa;;;;ACfxB;EEsCE,UAAA,GAAa,iBAAA;;;;;;EAMb,QAAA;EFvBA;;;EE2BA,OAAA;EFZY;;;;;;EEmBZ,kBAAA,GAAqB,yBAAA;AAAA;AAAA,KAGX,UAAA,GAAa,MAAA,CAAO,MAAA;;;cCzBnB,YAAA,GAAgB,OAAA,GAAS,aAAA,KAAuB,WAAA,EAAa,UAAA,OAAe,UAAA;;;cCnC5E,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
package/dist/index.mjs CHANGED
@@ -23,11 +23,10 @@ import sonarjsPlugin from "eslint-plugin-sonarjs";
23
23
  import unicornPlugin from "eslint-plugin-unicorn";
24
24
  import unusedImportsPlugin from "eslint-plugin-unused-imports";
25
25
  import gitignoreConfig from "eslint-config-flat-gitignore";
26
+ import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
26
27
  import eslint from "@eslint/js";
27
28
  import globals from "globals";
28
29
  import { rules } from "eslint-config-prettier";
29
- import { getDefaultSelectors } from "eslint-plugin-better-tailwindcss/defaults";
30
- import { MatcherType, SelectorKind } from "eslint-plugin-better-tailwindcss/types";
31
30
  import * as parserBase from "@typescript-eslint/parser";
32
31
  //#region src/configs/command.ts
33
32
  const command = () => [{
@@ -86,10 +85,22 @@ const importSort = () => [{
86
85
  }];
87
86
  //#endregion
88
87
  //#region src/configs/import-x.ts
89
- const importX = () => [{
88
+ const importX = (options = {}) => [{
90
89
  name: "nelsonlaidev/import-x/setup",
91
90
  plugins: { "import-x": importXPlugin },
92
- settings: { ...importXPlugin.configs.typescript.settings }
91
+ settings: {
92
+ ...importXPlugin.configs.typescript.settings,
93
+ "import-x/resolver-next": [createTypeScriptImportResolver({
94
+ alwaysTryTypes: true,
95
+ project: [
96
+ "./tsconfig.json",
97
+ "apps/**/{ts,js}config.json",
98
+ "packages/**/{ts,js}config.json"
99
+ ],
100
+ noWarnOnMultipleProjects: true,
101
+ ...options
102
+ })]
103
+ }
93
104
  }, {
94
105
  name: "nelsonlaidev/import-x/rules",
95
106
  rules: {
@@ -324,6 +335,7 @@ const react = () => [
324
335
  ...reactHooksPlugin.configs["recommended-latest"].rules,
325
336
  ...reactPlugin.configs.all.rules,
326
337
  ...reactPlugin.configs["disable-conflict-eslint-plugin-react-hooks"].rules,
338
+ "@eslint-react/static-components": "off",
327
339
  "@eslint-react/immutability": "error",
328
340
  "@eslint-react/refs": "error"
329
341
  }
@@ -359,6 +371,7 @@ const sonarjs = () => [{
359
371
  "sonarjs/prefer-read-only-props": "off",
360
372
  "sonarjs/argument-type": "off",
361
373
  "sonarjs/cognitive-complexity": "off",
374
+ "sonarjs/assertions-in-tests": "off",
362
375
  "sonarjs/jsx-no-leaked-render": "off"
363
376
  }
364
377
  }];
@@ -371,11 +384,6 @@ const stylistic = () => [{
371
384
  }];
372
385
  //#endregion
373
386
  //#region src/configs/tailwindcss.ts
374
- const createSelectors = (names, kind) => names.map((name) => ({
375
- name,
376
- kind,
377
- match: [{ type: MatcherType.String }, { type: MatcherType.ObjectValue }]
378
- }));
379
387
  const tailwindcss = (options) => {
380
388
  const disableShorthand = options.canonical?.logical ?? true;
381
389
  return [{
@@ -385,15 +393,11 @@ const tailwindcss = (options) => {
385
393
  entryPoint: options.entryPoint,
386
394
  tailwindConfig: options.tailwindConfig,
387
395
  tsconfig: options.tsconfig,
396
+ cwd: options.cwd,
388
397
  detectComponentClasses: options.detectComponentClasses ?? false,
389
398
  rootFontSize: options.rootFontSize ?? 16,
390
399
  messageStyle: options.messageStyle,
391
- selectors: [
392
- ...getDefaultSelectors(),
393
- ...createSelectors(["classNames", ".+ClassNames"], SelectorKind.Attribute),
394
- ...createSelectors([".+ClassName", ".+ClassNames"], SelectorKind.Variable),
395
- ...options.selectors ?? []
396
- ]
400
+ ...options.selectors !== void 0 && { selectors: options.selectors }
397
401
  } }
398
402
  }, {
399
403
  name: "nelsonlaidev/tailwindcss/rules",
@@ -403,6 +407,7 @@ const tailwindcss = (options) => {
403
407
  collapse: options.canonical?.collapse ?? true,
404
408
  logical: options.canonical?.logical ?? true
405
409
  }],
410
+ "better-tailwindcss/enforce-consistent-variant-order": "error",
406
411
  "better-tailwindcss/enforce-consistent-important-position": "off",
407
412
  "better-tailwindcss/enforce-consistent-variable-syntax": "off",
408
413
  "better-tailwindcss/enforce-shorthand-classes": disableShorthand ? "off" : "error",
@@ -501,7 +506,9 @@ const unicorn = () => [{
501
506
  "unicorn/prevent-abbreviations": "off",
502
507
  "unicorn/no-null": "off",
503
508
  "unicorn/no-document-cookie": "off",
504
- "unicorn/prefer-string-raw": "off"
509
+ "unicorn/prefer-string-raw": "off",
510
+ "unicorn/prefer-number-coercion": "off",
511
+ "unicorn/max-nested-calls": "off"
505
512
  }
506
513
  }];
507
514
  //#endregion
@@ -547,25 +554,6 @@ const zod = () => [{
547
554
  rules: { "import-zod/prefer-zod-namespace": "error" }
548
555
  }];
549
556
  //#endregion
550
- //#region src/utils.ts
551
- function normalizeRuleValue(value) {
552
- if (Array.isArray(value)) {
553
- const [level, ...rest] = value;
554
- return level === "warn" || level === 1 ? ["error", ...rest] : value;
555
- }
556
- return value === "warn" || value === 1 ? "error" : value;
557
- }
558
- function makeAllErrors(configs) {
559
- return configs.map((config) => {
560
- if (!config.rules) return config;
561
- const rules = Object.fromEntries(Object.entries(config.rules).map(([rule, rawValue]) => [rule, normalizeRuleValue(rawValue)]));
562
- return {
563
- ...config,
564
- rules
565
- };
566
- });
567
- }
568
- //#endregion
569
557
  //#region src/base.ts
570
558
  const isReactInstalled = isPackageExists("react");
571
559
  const isNextjsInstalled = isPackageExists("next");
@@ -581,7 +569,7 @@ const defineConfig = (options = {}, ...userConfigs) => {
581
569
  ...deMorgan(),
582
570
  ...comments(),
583
571
  ...node(),
584
- ...importX(),
572
+ ...importX(options.typescriptResolver),
585
573
  ...command(),
586
574
  ...unicorn(),
587
575
  ...jsxA11y(options.jsxA11y),
@@ -603,7 +591,7 @@ const defineConfig = (options = {}, ...userConfigs) => {
603
591
  if (options.tailwindcss) configs.push(...tailwindcss(options.tailwindcss));
604
592
  configs.push(...userConfigs);
605
593
  if (isPrettierEnabled) configs.push(...prettier());
606
- return makeAllErrors(configs);
594
+ return configs;
607
595
  };
608
596
  //#endregion
609
597
  export { GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, defineConfig };
@@ -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/import-x.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/globs.ts","../src/configs/jsx-a11y.ts","../src/configs/nelsonlaidev.ts","../src/configs/nextjs.ts","../src/configs/node.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/unused-imports.ts","../src/configs/vitest.ts","../src/configs/zod.ts","../src/utils.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 },\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 gitignoreConfig from 'eslint-config-flat-gitignore'\n\nexport const gitignore = (): FlatConfig[] => [gitignoreConfig({ name: 'nelsonlaidev/gitignore' })]\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 ['^\\\\u0000'],\n\n ['^node:.*\\\\u0000$', '^@?\\\\w.*\\\\u0000$', '^(@/|~/|[^.]).*\\\\u0000$', '^\\\\.\\\\..*\\\\u0000$', '^\\\\..*\\\\u0000$'],\n\n ['^node:'],\n\n ['^@?\\\\w'],\n\n ['^@/', '^~/', '^[^.]'],\n\n ['^\\\\.\\\\.', '^\\\\.'],\n ],\n },\n ],\n 'import-sort/exports': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importXPlugin } from '../plugins'\n\nexport const importX = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-x/setup',\n plugins: {\n 'import-x': importXPlugin,\n },\n settings: {\n ...importXPlugin.configs.typescript.settings,\n },\n },\n {\n name: 'nelsonlaidev/import-x/rules',\n rules: {\n ...importXPlugin.configs.recommended.rules,\n ...importXPlugin.configs.typescript.rules,\n\n 'import-x/consistent-type-specifier-style': 'error',\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-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-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 'import-x/no-duplicates': 'error',\n\n 'import-x/no-named-as-default': 'off',\n 'import-x/no-named-as-default-member': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport eslint from '@eslint/js'\nimport globals from 'globals'\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 },\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 rules: {\n ...eslint.configs.recommended.rules,\n\n // Enable more rules\n 'array-callback-return': 'error',\n eqeqeq: 'error',\n 'no-alert': 'error',\n 'no-await-in-loop': 'error',\n 'no-eval': 'error',\n 'no-extra-bind': 'error',\n 'no-label-var': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-param-reassign': 'error',\n 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],\n 'no-promise-executor-return': '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-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-var': 'error',\n 'no-void': ['error', { allowAsStatement: true }],\n 'prefer-object-has-own': 'error',\n 'prefer-object-spread': 'error',\n 'prefer-template': 'error',\n 'preserve-caught-error': 'error',\n 'symbol-description': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { jsdocPlugin } from '../plugins'\n\nexport const jsdoc = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsdoc/rules',\n plugins: {\n jsdoc: jsdocPlugin,\n },\n rules: {\n 'jsdoc/check-tag-names': 'error',\n 'jsdoc/empty-tags': 'error',\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, JsxA11yConfigOptions, JsxA11yOptions } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsxA11y = (options: JsxA11yConfigOptions = {}): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsx-a11y/setup',\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n 'jsx-a11y': jsxA11yPlugin,\n },\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\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 name: 'nelsonlaidev/jsx-a11y/rules',\n files: [GLOB_JSX, GLOB_TSX],\n rules: {\n ...jsxA11yPlugin.configs.recommended.rules,\n\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/no-aria-hidden-on-focusable': 'error',\n 'jsx-a11y/anchor-is-valid': [\n 'error',\n {\n components: ['Link'],\n specialLink: ['to'],\n aspects: ['noHref', 'invalidHref', 'preferButton'],\n },\n ],\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nelsonlaidevPlugin } from '../plugins'\n\nexport const nelsonlaidev = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/nelsonlaidev/rules',\n plugins: {\n '@nelsonlaidev': nelsonlaidevPlugin,\n },\n rules: {\n '@nelsonlaidev/lucide-icon-suffix': 'error',\n '@nelsonlaidev/lucide-restrict-import': 'error',\n '@nelsonlaidev/shadcn-cn-wrap-variants': 'error',\n '@nelsonlaidev/shadcn-cva-variants-suffix': 'error',\n '@nelsonlaidev/shadcn-prefer-spinner': 'error',\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/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-path-concat': 'error',\n 'n/prefer-node-protocol': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/prefer-promises/dns': 'error',\n },\n },\n]\n","import type { FlatConfig, PlaywrightOptions } from '../types'\n\nimport globals from 'globals'\n\nimport { playwrightPlugin } from '../plugins'\n\nexport const playwright = (options: PlaywrightOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/playwright/setup',\n files: options.files,\n plugins: {\n playwright: playwrightPlugin,\n },\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n },\n {\n name: 'nelsonlaidev/playwright/rules',\n files: options.files,\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n\n 'playwright/expect-expect': [\n 'error',\n {\n assertFunctionNames: options.assertFunctionNames ?? [],\n assertFunctionPatterns: options.assertFunctionPatterns ?? [],\n },\n ],\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 ...promisePlugin.configs.recommended.rules,\n\n 'promise/no-multiple-resolved': '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 },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { GLOB_SRC, GLOB_TS, GLOB_TSX } from '../globs'\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\n\nexport const react = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/react/setup',\n files: [GLOB_SRC],\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n settings: {\n ...reactPlugin.configs.all.settings,\n },\n },\n {\n name: 'nelsonlaidev/react/rules',\n files: [GLOB_SRC],\n rules: {\n ...reactHooksPlugin.configs['recommended-latest'].rules,\n\n ...reactPlugin.configs.all.rules,\n ...reactPlugin.configs['disable-conflict-eslint-plugin-react-hooks'].rules,\n\n '@eslint-react/immutability': 'error',\n '@eslint-react/refs': 'error',\n },\n },\n {\n name: 'nelsonlaidev/react/typescript-rules',\n files: [GLOB_TS, GLOB_TSX],\n rules: {\n // Rules that require type information.\n '@eslint-react/no-leaked-conditional-rendering': 'error',\n '@eslint-react/no-unused-props': 'error',\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 'sonarjs/argument-type': 'off',\n 'sonarjs/cognitive-complexity': 'off',\n\n // Replaced by React rules\n 'sonarjs/jsx-no-leaked-render': '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 { getDefaultSelectors } from 'eslint-plugin-better-tailwindcss/defaults'\nimport { MatcherType, SelectorKind } from 'eslint-plugin-better-tailwindcss/types'\n\nimport { GLOB_SRC } from '../globs'\nimport { tailwindcssPlugin } from '../plugins'\n\nconst createSelectors = (names: string[], kind: SelectorKind) =>\n names.map((name) => ({\n name,\n kind,\n match: [{ type: MatcherType.String }, { type: MatcherType.ObjectValue }],\n }))\n\nexport const tailwindcss = (options: TailwindCSSOptions): FlatConfig[] => {\n const disableShorthand = options.canonical?.logical ?? true\n\n return [\n {\n name: 'nelsonlaidev/tailwindcss/setup',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n settings: {\n 'better-tailwindcss': {\n entryPoint: options.entryPoint,\n tailwindConfig: options.tailwindConfig,\n tsconfig: options.tsconfig,\n detectComponentClasses: options.detectComponentClasses ?? false,\n rootFontSize: options.rootFontSize ?? 16,\n messageStyle: options.messageStyle,\n selectors: [\n ...getDefaultSelectors(),\n ...createSelectors(['classNames', '.+ClassNames'], SelectorKind.Attribute),\n ...createSelectors(['.+ClassName', '.+ClassNames'], SelectorKind.Variable),\n ...(options.selectors ?? []),\n ],\n } satisfies TailwindCSSOptions,\n },\n },\n {\n name: 'nelsonlaidev/tailwindcss/rules',\n files: [GLOB_SRC],\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': [\n 'error',\n {\n collapse: options.canonical?.collapse ?? true,\n logical: options.canonical?.logical ?? true,\n },\n ],\n\n // 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': disableShorthand ? 'off' : 'error',\n\n 'better-tailwindcss/enforce-consistent-class-order': [\n 'error',\n {\n order: options.classOrder?.order ?? 'official',\n componentClassOrder: options.classOrder?.componentOrder ?? 'preserve',\n componentClassPosition: options.classOrder?.componentPosition ?? 'start',\n unknownClassOrder: options.classOrder?.unknownOrder ?? 'preserve',\n unknownClassPosition: options.classOrder?.unknownPosition ?? 'start',\n },\n ],\n\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n\n 'better-tailwindcss/no-restricted-classes': ['error', { restrict: options.restrict ?? [] }],\n 'better-tailwindcss/no-unknown-classes': ['error', { ignore: options.ignore ?? [] }],\n\n 'better-tailwindcss/no-unnecessary-whitespace': [\n 'error',\n {\n allowMultiline: options.whitespace?.allowMultiline ?? true,\n },\n ],\n },\n },\n ]\n}\n","import type { FlatConfig } from '../types'\n\nimport * as parserBase 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 files: [GLOB_TS, GLOB_TSX],\n // Based on https://github.com/typescript-eslint/typescript-eslint/blob/1e4ba78abd6fa23f723cb874790e156edc0ec6d4/packages/eslint-plugin/src/configs/flat/base.ts\n languageOptions: {\n parser: {\n meta: parserBase.meta,\n parseForESLint: parserBase.parseForESLint,\n },\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 // https://github.com/typescript-eslint/typescript-eslint/blob/1e4ba78abd6fa23f723cb874790e156edc0ec6d4/packages/eslint-plugin/src/configs/eslintrc/strict-type-checked.ts\n // base.ts (rules only)\n ...typescriptPlugin.configs['eslint-recommended'].overrides[0].rules,\n // strict-type-checked.ts (rules only)\n ...typescriptPlugin.configs['strict-type-checked'].rules,\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/1e4ba78abd6fa23f723cb874790e156edc0ec6d4/packages/eslint-plugin/src/configs/eslintrc/stylistic-type-checked.ts\n // stylistic-type-checked.ts (rules only)\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 },\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 'unicorn/text-encoding-identifier-case': ['error', { withDash: true }],\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 } from '../types'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const unusedImports = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/unused-imports/rules',\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\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","import type { FlatConfig, VitestOptions } from '../types'\n\nimport { vitestPlugin } from '../plugins'\n\nexport const vitest = (options: VitestOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/vitest/setup',\n files: options.files,\n plugins: {\n vitest: vitestPlugin,\n },\n settings: {\n vitest: {\n typecheck: true,\n },\n },\n languageOptions: {\n globals: {\n ...vitestPlugin.environments.env.globals,\n },\n },\n },\n {\n name: 'nelsonlaidev/vitest/rules',\n files: options.files,\n rules: {\n ...vitestPlugin.configs.recommended.rules,\n\n 'vitest/consistent-test-it': ['error', { fn: 'test' }],\n 'vitest/prefer-mock-return-shorthand': 'error',\n 'vitest/warn-todo': 'error',\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 { RuleConfig } from '@eslint/core'\nimport type { FlatConfig } from './types'\n\nfunction normalizeRuleValue(value: RuleConfig): RuleConfig {\n if (Array.isArray(value)) {\n const [level, ...rest] = value\n return level === 'warn' || level === 1 ? ['error', ...rest] : value\n }\n\n return value === 'warn' || value === 1 ? 'error' : value\n}\n\nexport function makeAllErrors(configs: FlatConfig[]): FlatConfig[] {\n return configs.map((config) => {\n if (!config.rules) return config\n\n const rules = Object.fromEntries(\n Object.entries(config.rules).map(([rule, rawValue]) => [rule, normalizeRuleValue(rawValue as RuleConfig)]),\n )\n\n return {\n ...config,\n rules,\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 { jsdoc } from './configs/jsdoc'\nimport { jsxA11y } from './configs/jsx-a11y'\nimport { nelsonlaidev } from './configs/nelsonlaidev'\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 { unusedImports } from './configs/unused-imports'\nimport { vitest } from './configs/vitest'\nimport { zod } from './configs/zod'\nimport { makeAllErrors } from './utils'\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 ...jsdoc(),\n ...sonarjs(),\n ...importSort(),\n ...deMorgan(),\n ...comments(),\n ...node(),\n ...importX(),\n ...command(),\n ...unicorn(),\n ...jsxA11y(options.jsxA11y),\n ...typescript(),\n ...unusedImports(),\n ...regexp(),\n ...stylistic(),\n ...zod(),\n ...promise(),\n ...nelsonlaidev(),\n ]\n\n const isNextjsEnabled = options.nextjs ?? isNextjsInstalled\n const isReactEnabled = options.react ?? isReactInstalled\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 makeAllErrors(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,OACvC;CACF,CACF;;;ACVD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,aAAa,gBACd;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF,CACF;;;ACVD,MAAa,kBAAgC,CAAC,gBAAgB,EAAE,MAAM,0BAA0B,CAAC,CAAC;;;ACFlG,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,eAAe,kBAChB;CACD,OAAO;EACL,uBAAuB,CACrB,SACA,EACE,QAAQ;GACN,CAAC,WAAW;GAEZ;IAAC;IAAoB;IAAoB;IAA2B;IAAqB;IAAiB;GAE1G,CAAC,SAAS;GAEV,CAAC,SAAS;GAEV;IAAC;IAAO;IAAO;IAAQ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AO;EACV,GAAG,SAAS;EACZ,GAAG,YAAY;EACf,GAAG,UAAU;EACb,GAAG,UAAU;EACb,GAAG,MAAM;EACT,GAAG,SAAS;EACZ,GAAG,SAAS;EACZ,GAAG,SAAS;EACZ,GAAG,QAAQ,QAAQ,QAAQ;EAC3B,GAAG,YAAY;EACf,GAAG,eAAe;EAClB,GAAG,QAAQ;EACX,GAAG,WAAW;EACd,GAAG,KAAK;EACR,GAAG,SAAS;EACZ,GAAG,cAAc;EAClB;CAED,MAAM,kBAAkB,QAAQ,UAAU;CAC1C,MAAM,iBAAiB,QAAQ,SAAS;CACxC,MAAM,oBAAoB,QAAQ,YAAY;AAE9C,KAAI,QAAQ,OACV,SAAQ,KAAK,GAAG,OAAO,QAAQ,OAAO,CAAC;AAGzC,KAAI,QAAQ,WACV,SAAQ,KAAK,GAAG,WAAW,QAAQ,WAAW,CAAC;AAGjD,KAAI,eACF,SAAQ,KAAK,GAAG,OAAO,CAAC;AAG1B,KAAI,gBACF,SAAQ,KAAK,GAAG,QAAQ,CAAC;AAG3B,KAAI,QAAQ,YACV,SAAQ,KAAK,GAAG,YAAY,QAAQ,YAAY,CAAC;AAGnD,SAAQ,KAAK,GAAG,YAAY;AAE5B,KAAI,kBAGF,SAAQ,KAAK,GAAG,UAAU,CAAC;AAG7B,QAAO,cAAc,QAAQ"}
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/configs/jsdoc.ts","../src/globs.ts","../src/configs/jsx-a11y.ts","../src/configs/nelsonlaidev.ts","../src/configs/nextjs.ts","../src/configs/node.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/unused-imports.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 },\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 gitignoreConfig from 'eslint-config-flat-gitignore'\n\nexport const gitignore = (): FlatConfig[] => [gitignoreConfig({ name: 'nelsonlaidev/gitignore' })]\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 ['^\\\\u0000'],\n\n ['^node:.*\\\\u0000$', '^@?\\\\w.*\\\\u0000$', '^(@/|~/|[^.]).*\\\\u0000$', '^\\\\.\\\\..*\\\\u0000$', '^\\\\..*\\\\u0000$'],\n\n ['^node:'],\n\n ['^@?\\\\w'],\n\n ['^@/', '^~/', '^[^.]'],\n\n ['^\\\\.\\\\.', '^\\\\.'],\n ],\n },\n ],\n 'import-sort/exports': 'error',\n },\n },\n]\n","import type { TypeScriptResolverOptions } from 'eslint-import-resolver-typescript'\nimport type { FlatConfig } from '../types'\n\nimport { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'\n\nimport { importXPlugin } from '../plugins'\n\nexport const importX = (options: TypeScriptResolverOptions = {}): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-x/setup',\n plugins: {\n 'import-x': importXPlugin,\n },\n settings: {\n ...importXPlugin.configs.typescript.settings,\n 'import-x/resolver-next': [\n createTypeScriptImportResolver({\n alwaysTryTypes: true,\n project: ['./tsconfig.json', 'apps/**/{ts,js}config.json', 'packages/**/{ts,js}config.json'],\n noWarnOnMultipleProjects: true,\n ...options,\n }),\n ],\n },\n },\n {\n name: 'nelsonlaidev/import-x/rules',\n rules: {\n ...importXPlugin.configs.recommended.rules,\n ...importXPlugin.configs.typescript.rules,\n\n 'import-x/consistent-type-specifier-style': 'error',\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-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-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 'import-x/no-duplicates': 'error',\n\n 'import-x/no-named-as-default': 'off',\n 'import-x/no-named-as-default-member': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport eslint from '@eslint/js'\nimport globals from 'globals'\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 },\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 rules: {\n ...eslint.configs.recommended.rules,\n\n // Enable more rules\n 'array-callback-return': 'error',\n eqeqeq: 'error',\n 'no-alert': 'error',\n 'no-await-in-loop': 'error',\n 'no-eval': 'error',\n 'no-extra-bind': 'error',\n 'no-label-var': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-param-reassign': 'error',\n 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],\n 'no-promise-executor-return': '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-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-var': 'error',\n 'no-void': ['error', { allowAsStatement: true }],\n 'prefer-object-has-own': 'error',\n 'prefer-object-spread': 'error',\n 'prefer-template': 'error',\n 'preserve-caught-error': 'error',\n 'symbol-description': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { jsdocPlugin } from '../plugins'\n\nexport const jsdoc = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsdoc/rules',\n plugins: {\n jsdoc: jsdocPlugin,\n },\n rules: {\n 'jsdoc/check-tag-names': 'error',\n 'jsdoc/empty-tags': 'error',\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, JsxA11yConfigOptions, JsxA11yOptions } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsxA11y = (options: JsxA11yConfigOptions = {}): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsx-a11y/setup',\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n 'jsx-a11y': jsxA11yPlugin,\n },\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\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 name: 'nelsonlaidev/jsx-a11y/rules',\n files: [GLOB_JSX, GLOB_TSX],\n rules: {\n ...jsxA11yPlugin.configs.recommended.rules,\n\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/no-aria-hidden-on-focusable': 'error',\n 'jsx-a11y/anchor-is-valid': [\n 'error',\n {\n components: ['Link'],\n specialLink: ['to'],\n aspects: ['noHref', 'invalidHref', 'preferButton'],\n },\n ],\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nelsonlaidevPlugin } from '../plugins'\n\nexport const nelsonlaidev = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/nelsonlaidev/rules',\n plugins: {\n '@nelsonlaidev': nelsonlaidevPlugin,\n },\n rules: {\n '@nelsonlaidev/lucide-icon-suffix': 'error',\n '@nelsonlaidev/lucide-restrict-import': 'error',\n '@nelsonlaidev/shadcn-cn-wrap-variants': 'error',\n '@nelsonlaidev/shadcn-cva-variants-suffix': 'error',\n '@nelsonlaidev/shadcn-prefer-spinner': 'error',\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/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-path-concat': 'error',\n 'n/prefer-node-protocol': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/prefer-promises/dns': 'error',\n },\n },\n]\n","import type { FlatConfig, PlaywrightOptions } from '../types'\n\nimport globals from 'globals'\n\nimport { playwrightPlugin } from '../plugins'\n\nexport const playwright = (options: PlaywrightOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/playwright/setup',\n files: options.files,\n plugins: {\n playwright: playwrightPlugin,\n },\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n },\n {\n name: 'nelsonlaidev/playwright/rules',\n files: options.files,\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n\n 'playwright/expect-expect': [\n 'error',\n {\n assertFunctionNames: options.assertFunctionNames ?? [],\n assertFunctionPatterns: options.assertFunctionPatterns ?? [],\n },\n ],\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 ...promisePlugin.configs.recommended.rules,\n\n 'promise/no-multiple-resolved': '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 },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { GLOB_SRC, GLOB_TS, GLOB_TSX } from '../globs'\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\n\nexport const react = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/react/setup',\n files: [GLOB_SRC],\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n settings: {\n ...reactPlugin.configs.all.settings,\n },\n },\n {\n name: 'nelsonlaidev/react/rules',\n files: [GLOB_SRC],\n rules: {\n ...reactHooksPlugin.configs['recommended-latest'].rules,\n\n ...reactPlugin.configs.all.rules,\n ...reactPlugin.configs['disable-conflict-eslint-plugin-react-hooks'].rules,\n\n // Not production ready\n '@eslint-react/static-components': 'off',\n\n '@eslint-react/immutability': 'error',\n '@eslint-react/refs': 'error',\n },\n },\n {\n name: 'nelsonlaidev/react/typescript-rules',\n files: [GLOB_TS, GLOB_TSX],\n rules: {\n // Rules that require type information.\n '@eslint-react/no-leaked-conditional-rendering': 'error',\n '@eslint-react/no-unused-props': 'error',\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 'sonarjs/argument-type': 'off',\n 'sonarjs/cognitive-complexity': 'off',\n 'sonarjs/assertions-in-tests': 'off',\n\n // Replaced by React rules\n 'sonarjs/jsx-no-leaked-render': '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 { GLOB_SRC } from '../globs'\nimport { tailwindcssPlugin } from '../plugins'\n\nexport const tailwindcss = (options: TailwindCSSOptions): FlatConfig[] => {\n const disableShorthand = options.canonical?.logical ?? true\n\n return [\n {\n name: 'nelsonlaidev/tailwindcss/setup',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n settings: {\n 'better-tailwindcss': {\n entryPoint: options.entryPoint,\n tailwindConfig: options.tailwindConfig,\n tsconfig: options.tsconfig,\n cwd: options.cwd,\n detectComponentClasses: options.detectComponentClasses ?? false,\n rootFontSize: options.rootFontSize ?? 16,\n messageStyle: options.messageStyle,\n ...(options.selectors !== undefined && { selectors: options.selectors }),\n } satisfies TailwindCSSOptions,\n },\n },\n {\n name: 'nelsonlaidev/tailwindcss/rules',\n files: [GLOB_SRC],\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': [\n 'error',\n {\n collapse: options.canonical?.collapse ?? true,\n logical: options.canonical?.logical ?? true,\n },\n ],\n 'better-tailwindcss/enforce-consistent-variant-order': 'error',\n\n // 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': disableShorthand ? 'off' : 'error',\n\n 'better-tailwindcss/enforce-consistent-class-order': [\n 'error',\n {\n order: options.classOrder?.order ?? 'official',\n componentClassOrder: options.classOrder?.componentOrder ?? 'preserve',\n componentClassPosition: options.classOrder?.componentPosition ?? 'start',\n unknownClassOrder: options.classOrder?.unknownOrder ?? 'preserve',\n unknownClassPosition: options.classOrder?.unknownPosition ?? 'start',\n },\n ],\n\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n\n 'better-tailwindcss/no-restricted-classes': ['error', { restrict: options.restrict ?? [] }],\n 'better-tailwindcss/no-unknown-classes': ['error', { ignore: options.ignore ?? [] }],\n\n 'better-tailwindcss/no-unnecessary-whitespace': [\n 'error',\n {\n allowMultiline: options.whitespace?.allowMultiline ?? true,\n },\n ],\n },\n },\n ]\n}\n","import type { FlatConfig } from '../types'\n\nimport * as parserBase 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 files: [GLOB_TS, GLOB_TSX],\n // Based on https://github.com/typescript-eslint/typescript-eslint/blob/1e4ba78abd6fa23f723cb874790e156edc0ec6d4/packages/eslint-plugin/src/configs/flat/base.ts\n languageOptions: {\n parser: {\n meta: parserBase.meta,\n parseForESLint: parserBase.parseForESLint,\n },\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 // https://github.com/typescript-eslint/typescript-eslint/blob/1e4ba78abd6fa23f723cb874790e156edc0ec6d4/packages/eslint-plugin/src/configs/eslintrc/strict-type-checked.ts\n // base.ts (rules only)\n ...typescriptPlugin.configs['eslint-recommended'].overrides[0].rules,\n // strict-type-checked.ts (rules only)\n ...typescriptPlugin.configs['strict-type-checked'].rules,\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/1e4ba78abd6fa23f723cb874790e156edc0ec6d4/packages/eslint-plugin/src/configs/eslintrc/stylistic-type-checked.ts\n // stylistic-type-checked.ts (rules only)\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 },\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 'unicorn/text-encoding-identifier-case': ['error', { withDash: true }],\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 'unicorn/prefer-number-coercion': 'off',\n 'unicorn/max-nested-calls': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const unusedImports = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/unused-imports/rules',\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\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","import type { FlatConfig, VitestOptions } from '../types'\n\nimport { vitestPlugin } from '../plugins'\n\nexport const vitest = (options: VitestOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/vitest/setup',\n files: options.files,\n plugins: {\n vitest: vitestPlugin,\n },\n settings: {\n vitest: {\n typecheck: true,\n },\n },\n languageOptions: {\n globals: {\n ...vitestPlugin.environments.env.globals,\n },\n },\n },\n {\n name: 'nelsonlaidev/vitest/rules',\n files: options.files,\n rules: {\n ...vitestPlugin.configs.recommended.rules,\n\n 'vitest/consistent-test-it': ['error', { fn: 'test' }],\n 'vitest/prefer-mock-return-shorthand': 'error',\n 'vitest/warn-todo': 'error',\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 { jsdoc } from './configs/jsdoc'\nimport { jsxA11y } from './configs/jsx-a11y'\nimport { nelsonlaidev } from './configs/nelsonlaidev'\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 { unusedImports } from './configs/unused-imports'\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 ...jsdoc(),\n ...sonarjs(),\n ...importSort(),\n ...deMorgan(),\n ...comments(),\n ...node(),\n ...importX(options.typescriptResolver),\n ...command(),\n ...unicorn(),\n ...jsxA11y(options.jsxA11y),\n ...typescript(),\n ...unusedImports(),\n ...regexp(),\n ...stylistic(),\n ...zod(),\n ...promise(),\n ...nelsonlaidev(),\n ]\n\n const isNextjsEnabled = options.nextjs ?? isNextjsInstalled\n const isReactEnabled = options.react ?? isReactInstalled\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,OACvC;CACF,CACF;;;ACVD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,aAAa,gBACd;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF,CACF;;;ACVD,MAAa,kBAAgC,CAAC,gBAAgB,EAAE,MAAM,0BAA0B,CAAC,CAAC;;;ACFlG,MAAa,WAAW,cAAwB,EAAE,KAAmB,CACnE;CACE,MAAM;CACN,SAAS,CAAC,uBAAuB,GAAG,YAAY;CACjD,CACF;;;ACHD,MAAa,mBAAiC,CAC5C;CACE,M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GAAG,cAAc;EAClB;CAED,MAAM,kBAAkB,QAAQ,UAAU;CAC1C,MAAM,iBAAiB,QAAQ,SAAS;CACxC,MAAM,oBAAoB,QAAQ,YAAY;AAE9C,KAAI,QAAQ,OACV,SAAQ,KAAK,GAAG,OAAO,QAAQ,OAAO,CAAC;AAGzC,KAAI,QAAQ,WACV,SAAQ,KAAK,GAAG,WAAW,QAAQ,WAAW,CAAC;AAGjD,KAAI,eACF,SAAQ,KAAK,GAAG,OAAO,CAAC;AAG1B,KAAI,gBACF,SAAQ,KAAK,GAAG,QAAQ,CAAC;AAG3B,KAAI,QAAQ,YACV,SAAQ,KAAK,GAAG,YAAY,QAAQ,YAAY,CAAC;AAGnD,SAAQ,KAAK,GAAG,YAAY;AAE5B,KAAI,kBAGF,SAAQ,KAAK,GAAG,UAAU,CAAC;AAG7B,QAAO"}
package/package.json CHANGED
@@ -1,70 +1,76 @@
1
1
  {
2
2
  "name": "@nelsonlaidev/eslint-config",
3
- "version": "4.0.0",
4
- "homepage": "https://github.com/nelsonlaidev/config/blob/main/packages/eslint-config/README.md",
3
+ "version": "4.2.0",
4
+ "description": "Nelson Lai's ESLint config preset",
5
+ "homepage": "https://github.com/nelsonlaidev/config/tree/main/packages/eslint-config",
5
6
  "bugs": {
6
7
  "url": "https://github.com/nelsonlaidev/config/issues"
7
8
  },
9
+ "license": "MIT",
10
+ "author": "Nelson Lai <me@nelsonlai.dev> (https://github.com/nelsonlaidev/)",
8
11
  "repository": {
9
12
  "type": "git",
10
13
  "url": "git+https://github.com/nelsonlaidev/config.git",
11
14
  "directory": "packages/eslint-config"
12
15
  },
13
- "license": "MIT",
14
- "author": "Nelson Lai <me@nelsonlai.dev> (https://github.com/nelsonlaidev/)",
15
- "type": "module",
16
- "exports": {
17
- "types": "./dist/index.d.mts",
18
- "import": "./dist/index.mjs"
19
- },
20
16
  "files": [
21
17
  "dist"
22
18
  ],
19
+ "type": "module",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.mts",
23
+ "import": "./dist/index.mjs"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
23
30
  "dependencies": {
24
- "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
25
- "@eslint-react/eslint-plugin": "4.0.2-beta.6",
26
- "@eslint/core": "^1.1.1",
31
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
32
+ "@eslint-react/eslint-plugin": "^5.10.2",
27
33
  "@eslint/js": "^10.0.1",
28
- "@next/eslint-plugin-next": "^16.2.1",
34
+ "@next/eslint-plugin-next": "^16.2.10",
29
35
  "@stylistic/eslint-plugin": "^5.10.0",
30
- "@typescript-eslint/eslint-plugin": "^8.57.2",
31
- "@typescript-eslint/parser": "^8.57.2",
32
- "@vitest/eslint-plugin": "^1.6.13",
36
+ "@typescript-eslint/eslint-plugin": "^8.62.1",
37
+ "@typescript-eslint/parser": "^8.62.1",
38
+ "@vitest/eslint-plugin": "^1.6.20",
33
39
  "eslint-config-flat-gitignore": "^2.3.0",
34
40
  "eslint-config-prettier": "^10.1.8",
35
- "eslint-import-resolver-typescript": "^4.4.4",
36
- "eslint-plugin-better-tailwindcss": "^4.3.2",
41
+ "eslint-import-resolver-typescript": "^4.4.5",
42
+ "eslint-plugin-better-tailwindcss": "^4.6.0",
37
43
  "eslint-plugin-command": "^3.5.2",
38
- "eslint-plugin-de-morgan": "^2.1.1",
39
- "eslint-plugin-import-x": "^4.16.2",
44
+ "eslint-plugin-de-morgan": "^2.1.2",
45
+ "eslint-plugin-import-x": "^4.17.1",
40
46
  "eslint-plugin-import-zod": "^1.2.1",
41
- "eslint-plugin-jsdoc": "^62.8.1",
47
+ "eslint-plugin-jsdoc": "^63.0.10",
42
48
  "eslint-plugin-jsx-a11y": "^6.10.2",
43
- "eslint-plugin-n": "^17.24.0",
44
- "eslint-plugin-playwright": "^2.10.1",
45
- "eslint-plugin-promise": "^7.2.1",
46
- "eslint-plugin-react-hooks": "^7.0.1",
47
- "eslint-plugin-regexp": "^3.1.0",
48
- "eslint-plugin-simple-import-sort": "^12.1.1",
49
- "eslint-plugin-sonarjs": "^4.0.2",
50
- "eslint-plugin-unicorn": "^64.0.0",
49
+ "eslint-plugin-n": "^18.2.1",
50
+ "eslint-plugin-playwright": "^2.10.4",
51
+ "eslint-plugin-promise": "^7.3.0",
52
+ "eslint-plugin-react-hooks": "^7.1.1",
53
+ "eslint-plugin-regexp": "^3.1.1",
54
+ "eslint-plugin-simple-import-sort": "^13.0.0",
55
+ "eslint-plugin-sonarjs": "^4.1.0",
56
+ "eslint-plugin-unicorn": "^70.0.0",
51
57
  "eslint-plugin-unused-imports": "^4.4.1",
52
- "globals": "^17.4.0",
53
- "local-pkg": "^1.1.2",
54
- "@nelsonlaidev/eslint-plugin": "0.2.4"
58
+ "globals": "^17.7.0",
59
+ "local-pkg": "^1.2.1",
60
+ "@nelsonlaidev/eslint-plugin": "0.2.5"
55
61
  },
56
62
  "devDependencies": {
57
- "@eslint/config-inspector": "^1.5.0",
63
+ "@eslint/config-inspector": "^3.0.4",
58
64
  "@types/node": "^24.11.0",
59
65
  "eslint": "^10.1.0",
60
66
  "tsdown": "^0.21.6",
61
- "@nelsonlaidev/typescript-config": "1.2.1"
67
+ "@nelsonlaidev/typescript-config": "1.2.2"
62
68
  },
63
69
  "peerDependencies": {
64
70
  "eslint": "^9.0.0 || ^10.0.0"
65
71
  },
66
- "publishConfig": {
67
- "access": "public"
72
+ "engines": {
73
+ "node": ">=22"
68
74
  },
69
75
  "scripts": {
70
76
  "build": "tsdown",