@nelsonlaidev/eslint-config 4.0.0 → 4.1.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
@@ -97,5 +97,31 @@ type Options = {
97
97
  // Optional
98
98
  // Specify files to ignore
99
99
  ignores?: string[]
100
+ // Optional
101
+ // Configure TypeScript import resolver for monorepos
102
+ // Defaults to scanning root tsconfig.json and apps/**/{ts,js}config.json and packages/**/{ts,js}config.json
103
+ typescriptResolver?: import('eslint-import-resolver-typescript').TypeScriptResolverOptions
100
104
  }
101
105
  ```
106
+
107
+ ### TypeScript Import Resolver
108
+
109
+ 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:
110
+
111
+ - `./tsconfig.json` (root)
112
+ - `apps/**/{ts,js}config.json`
113
+ - `packages/**/{ts,js}config.json`
114
+
115
+ If your monorepo structure differs, you can provide a custom `typescriptResolver` option:
116
+
117
+ ```ts
118
+ export default defineConfig({
119
+ typescriptResolver: {
120
+ alwaysTryTypes: true,
121
+ bun: true,
122
+ project: ['packages/foo/tsconfig.json'],
123
+ },
124
+ })
125
+ ```
126
+
127
+ 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,3 +1,4 @@
1
+ import { TypeScriptResolverOptions } from "eslint-import-resolver-typescript";
1
2
  import { Selectors } from "eslint-plugin-better-tailwindcss/types";
2
3
  import { Linter } from "eslint";
3
4
 
@@ -208,6 +209,13 @@ type ConfigOptions = {
208
209
  * A list of file paths or glob patterns that ESLint should ignore.
209
210
  */
210
211
  ignores?: string[];
212
+ /**
213
+ * TypeScript import resolver configuration options.
214
+ *
215
+ * Providing this object allows customizing how TypeScript resolves imports,
216
+ * useful for monorepos or custom project structures.
217
+ */
218
+ typescriptResolver?: TypeScriptResolverOptions;
211
219
  };
212
220
  type FlatConfig = Linter.Config;
213
221
  //#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,oBAAA;AAAA;;;;;;KCnBU,iBAAA;EDHA;;;ECOV,KAAA,EAAO,KAAA;EDNc;AAGvB;;;ECQE,mBAAA;EDJA;;;;ECSA,sBAAA;AAAA;;;KCfU,kBAAA;;;AFFZ;EEME,UAAA;;;;EAIA,cAAA;EFNwB;;;EEUxB,QAAA;EFNa;;;;EEWb,sBAAA;EFGoB;;;;EEEpB,YAAA;EDrBU;;;;;EC2BV,YAAA;EDlBA;;;ECsBA,SAAA,GAAY,SAAA;;;;EAIZ,SAAA;IApC4B;;;;IAyC1B,QAAA;IA7BF;;;;IAkCE,OAAA;EAAA;EAVF;;;EAeA,UAAA;IAKE;;;;IAAA,KAAA;IA0BF;;;;IArBE,cAAA;IA0BF;;;;IArBE,iBAAA;;;;ACjEJ;IDsEI,YAAA;IClEK;;;;IDuEL,eAAA;EAAA;EErEQ;;;;EF2EV,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EEvEjE;;;;EF4EA,MAAA;EE9DU;;;EFkEV,UAAA;IEtDa;;;;IF2DX,cAAA;EAAA;AAAA;;;;;;KC/FQ,aAAA;EHHA;;;EGOV,KAAA,EAAO,KAAA;AAAA;;;;;;KCEG,aAAA;EJLA;;;EISV,KAAA;EJLA;;;EISA,MAAA;EJCA;;;;;EIKA,WAAA,GAAc,kBAAA;;AHpBhB;;EGwBE,OAAA,GAAU,oBAAA;EHpBE;;;;;EG0BZ,MAAA,GAAS,aAAA;EHhBa;;;;ACfxB;EEqCE,UAAA,GAAa,iBAAA;;;;;;EAMb,QAAA;EFrBA;;;EEyBA,OAAA;AAAA;AAAA,KAGU,UAAA,GAAa,MAAA,CAAO,MAAA;;;cChBnB,YAAA,GAAgB,OAAA,GAAS,aAAA,KAAuB,WAAA,EAAa,UAAA,OAAe,UAAA;;;cCpC5E,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
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;;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;;;;EEWA,sBAAA;EFGA;;;;EEEA,YAAA;;ADrBF;;;;EC2BE,YAAA;EDvBO;;;EC2BP,SAAA,GAAY,SAAA;EDjBU;;;ECqBtB,SAAA;IApCU;;;;IAyCR,QAAA;IAjCF;;;;IAsCE,OAAA;EAAA;EAdU;;;EAmBZ,UAAA;IAAA;;;;IAKE,KAAA;IAoBA;;;;IAfA,cAAA;IAqB+D;;;;IAhB/D,iBAAA;IA8Bc;;;;IAzBd,YAAA;ICtEqB;;;;ID2ErB,eAAA;EAAA;;AEpEJ;;;EF0EE,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EE3BnB;;;;EFgC9C,MAAA;EEjEc;;;EFqEd,UAAA;IE3DS;;;;IFgEP,cAAA;EAAA;AAAA;;;;;;KC/FQ,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;EFtBA;;;EE0BA,OAAA;EFZA;;;;;;EEmBA,kBAAA,GAAqB,yBAAA;AAAA;AAAA,KAGX,UAAA,GAAa,MAAA,CAAO,MAAA;;;cCxBnB,YAAA,GAAgB,OAAA,GAAS,aAAA,KAAuB,WAAA,EAAa,UAAA,OAAe,UAAA;;;cCpC5E,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
package/dist/index.mjs CHANGED
@@ -23,6 +23,7 @@ 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";
@@ -86,10 +87,22 @@ const importSort = () => [{
86
87
  }];
87
88
  //#endregion
88
89
  //#region src/configs/import-x.ts
89
- const importX = () => [{
90
+ const importX = (options = {}) => [{
90
91
  name: "nelsonlaidev/import-x/setup",
91
92
  plugins: { "import-x": importXPlugin },
92
- settings: { ...importXPlugin.configs.typescript.settings }
93
+ settings: {
94
+ ...importXPlugin.configs.typescript.settings,
95
+ "import-x/resolver-next": [createTypeScriptImportResolver({
96
+ alwaysTryTypes: true,
97
+ project: [
98
+ "./tsconfig.json",
99
+ "apps/**/{ts,js}config.json",
100
+ "packages/**/{ts,js}config.json"
101
+ ],
102
+ noWarnOnMultipleProjects: true,
103
+ ...options
104
+ })]
105
+ }
93
106
  }, {
94
107
  name: "nelsonlaidev/import-x/rules",
95
108
  rules: {
@@ -581,7 +594,7 @@ const defineConfig = (options = {}, ...userConfigs) => {
581
594
  ...deMorgan(),
582
595
  ...comments(),
583
596
  ...node(),
584
- ...importX(),
597
+ ...importX(options.typescriptResolver),
585
598
  ...command(),
586
599
  ...unicorn(),
587
600
  ...jsxA11y(options.jsxA11y),
@@ -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;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,sBAAsB,gBAAgB,WAAW;AAEvD,MAAa,gBAAgB,UAAyB,EAAE,EAAE,GAAG,gBAA4C;CACvG,MAAM,UAAU;EACd,GAAG,WAAW;EACd,GAAG,QAAQ,QAAQ,QAAQ;EAC3B,GAAG,YAAY;EACf,GAAG,OAAO;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/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 { 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 '@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(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 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;GAEvB,CAAC,WAAW,OAAO;GACpB,EACF,CACF;EACD,uBAAuB;EACxB;CACF,CACF;;;ACzBD,MAAa,WAAW,UAAqC,EAAE,KAAmB,CAChF;CACE,MAAM;CACN,SAAS,EACP,YAAY,eACb;CACD,UAAU;EACR,GAAG,cAAc,QAAQ,WAAW;EACpC,0BAA0B,CACxB,+BAA+B;GAC7B,gBAAgB;GAChB,SAAS;IAAC;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BAAmB;EACtC,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nelsonlaidev/eslint-config",
3
- "version": "4.0.0",
3
+ "version": "4.1.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"