@nelsonlaidev/eslint-config 5.2.0 → 6.0.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
@@ -37,7 +37,27 @@ export default defineConfig({
37
37
 
38
38
  ### Optional presets
39
39
 
40
- Framework and tool integrations are explicit. Import the presets you need and pass them in the order they should be applied:
40
+ Framework and tool integrations are explicit. Their dependencies are optional peers and are not installed automatically. Install only the dependencies for the presets you enable:
41
+
42
+ | Preset | Dependencies |
43
+ | --------------- | ---------------------------------------------------------- |
44
+ | `react()` | `@eslint-react/eslint-plugin`, `eslint-plugin-react-hooks` |
45
+ | `nextjs()` | `@next/eslint-plugin-next` |
46
+ | `stylex()` | `@stylexjs/eslint-plugin` |
47
+ | `tailwindcss()` | `eslint-plugin-better-tailwindcss` |
48
+ | `vitest()` | `@vitest/eslint-plugin` |
49
+ | `playwright()` | `eslint-plugin-playwright` |
50
+ | `prettier()` | `eslint-config-prettier` |
51
+
52
+ For example, to enable React and StyleX:
53
+
54
+ ```bash
55
+ npm i -D @eslint-react/eslint-plugin eslint-plugin-react-hooks @stylexjs/eslint-plugin
56
+ ```
57
+
58
+ Each optional preset returns a promise and loads its dependencies when called. Await each preset before passing it to `defineConfig()` or `defineConfig.withOptions()`. A missing dependency produces an error with its installation command.
59
+
60
+ Import the presets you need and pass them in the order they should be applied. This example enables every optional preset and requires all dependencies listed above:
41
61
 
42
62
  ```ts
43
63
  import {
@@ -52,16 +72,16 @@ import {
52
72
  } from '@nelsonlaidev/eslint-config'
53
73
 
54
74
  export default defineConfig(
55
- vitest({
75
+ await vitest({
56
76
  files: ['**/*.test.{js,jsx,ts,tsx}'],
57
77
  }),
58
- playwright({
78
+ await playwright({
59
79
  files: ['**/e2e/**/*.test.{js,jsx,ts,tsx}'],
60
80
  }),
61
- react(),
62
- nextjs(),
63
- stylex(),
64
- tailwindcss({
81
+ await react(),
82
+ await nextjs(),
83
+ await stylex(),
84
+ await tailwindcss({
65
85
  settings: {
66
86
  'better-tailwindcss': {
67
87
  entryPoint: './src/globals.css',
@@ -69,7 +89,7 @@ export default defineConfig(
69
89
  },
70
90
  }),
71
91
  // Keep Prettier last so it can disable conflicting rules.
72
- prettier(),
92
+ await prettier(),
73
93
  )
74
94
  ```
75
95
 
@@ -79,7 +99,7 @@ Each preset accepts an ESLint flat configuration override. Arrays are replaced,
79
99
 
80
100
  ```ts
81
101
  export default defineConfig(
82
- react({
102
+ await react({
83
103
  rules: {
84
104
  '@eslint-react/immutability': 'warn',
85
105
  },
@@ -105,7 +125,7 @@ export default defineConfig.withOptions(
105
125
  project: ['packages/foo/tsconfig.json'],
106
126
  },
107
127
  },
108
- react(),
128
+ await react(),
109
129
  )
110
130
  ```
111
131
 
package/dist/index.d.mts CHANGED
@@ -26,25 +26,25 @@ declare const defineConfig: ((...userConfigs: FlatConfig[]) => FlatConfig[]) & {
26
26
  };
27
27
  //#endregion
28
28
  //#region src/configs/nextjs.d.ts
29
- declare const nextjs: (options?: FlatConfig) => FlatConfig;
29
+ declare const nextjs: (options?: FlatConfig) => Promise<FlatConfig>;
30
30
  //#endregion
31
31
  //#region src/configs/playwright.d.ts
32
- declare const playwright: (options?: FlatConfig) => FlatConfig;
32
+ declare const playwright: (options?: FlatConfig) => Promise<FlatConfig>;
33
33
  //#endregion
34
34
  //#region src/configs/prettier.d.ts
35
- declare const prettier: (options?: FlatConfig) => FlatConfig;
35
+ declare const prettier: (options?: FlatConfig) => Promise<FlatConfig>;
36
36
  //#endregion
37
37
  //#region src/configs/react.d.ts
38
- declare const react: (options?: FlatConfig) => FlatConfig;
38
+ declare const react: (options?: FlatConfig) => Promise<FlatConfig>;
39
39
  //#endregion
40
40
  //#region src/configs/stylex.d.ts
41
- declare const stylex: (options?: FlatConfig) => FlatConfig;
41
+ declare const stylex: (options?: FlatConfig) => Promise<FlatConfig>;
42
42
  //#endregion
43
43
  //#region src/configs/tailwindcss.d.ts
44
- declare const tailwindcss: (options?: FlatConfig) => FlatConfig;
44
+ declare const tailwindcss: (options?: FlatConfig) => Promise<FlatConfig>;
45
45
  //#endregion
46
46
  //#region src/configs/vitest.d.ts
47
- declare const vitest: (options?: FlatConfig) => FlatConfig;
47
+ declare const vitest: (options?: FlatConfig) => Promise<FlatConfig>;
48
48
  //#endregion
49
49
  //#region src/globs.d.ts
50
50
  declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/config.ts","../src/base.ts","../src/configs/nextjs.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/stylex.ts","../src/configs/tailwindcss.ts","../src/configs/vitest.ts","../src/globs.ts"],"mappings":";;;;;;AAMA;KAAY,aAAA;;;;EAIV,OAAA;EAOqB;;;AAGvB;;;EAHE,kBAAA,GAAqB,yBAAA;AAAA;AAAA,KAGX,UAAA,GAAa,MAAA,CAAO,MAAA;;;cCkCnB,YAAA,OAAY,WAAA,EACN,UAAA,OAAe,UAAA;yBAJJ,aAAA,KAAa,WAAA,EAAkB,UAAA,OAAe,UAAA;AAAA;;;cC9C/D,MAAA,GAAU,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCErC,UAAA,GAAc,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCDzC,QAAA,GAAY,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCDvC,KAAA,GAAS,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCApC,MAAA,GAAU,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCArC,WAAA,GAAe,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCA1C,MAAA,GAAU,OAAA,GAAS,UAAA,KAAkB,UAAA;;;cCLrC,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/config.ts","../src/base.ts","../src/configs/nextjs.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/stylex.ts","../src/configs/tailwindcss.ts","../src/configs/vitest.ts","../src/globs.ts"],"mappings":";;;;;;AAMA;KAAY,aAAA;;;;EAIV,OAAA;EAOqB;;;AAGvB;;;EAHE,kBAAA,GAAqB,yBAAA;AAAA;AAAA,KAGX,UAAA,GAAa,MAAA,CAAO,MAAA;;;cCkCnB,YAAA,OAAY,WAAA,EACN,UAAA,OAAe,UAAA;yBAJJ,aAAA,KAAa,WAAA,EAAkB,UAAA,OAAe,UAAA;AAAA;;;cC/C/D,MAAA,GAAgB,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCEnD,UAAA,GAAoB,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCFvD,QAAA,GAAkB,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCArD,KAAA,GAAe,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCAlD,MAAA,GAAgB,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCAnD,WAAA,GAAqB,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCAxD,MAAA,GAAgB,OAAA,GAAS,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;cCJnD,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
package/dist/index.mjs CHANGED
@@ -1,12 +1,7 @@
1
1
  import commentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
2
- import reactPlugin from "@eslint-react/eslint-plugin";
3
2
  import nelsonlaidevPlugin from "@nelsonlaidev/eslint-plugin";
4
- import nextPlugin from "@next/eslint-plugin-next";
5
- import * as stylexPlugin from "@stylexjs/eslint-plugin";
6
3
  import stylisticPlugin from "@stylistic/eslint-plugin";
7
4
  import typescriptPlugin from "@typescript-eslint/eslint-plugin";
8
- import vitestPlugin from "@vitest/eslint-plugin";
9
- import tailwindcssPlugin from "eslint-plugin-better-tailwindcss";
10
5
  import commandPlugin from "eslint-plugin-command/config";
11
6
  import deMorganPlugin from "eslint-plugin-de-morgan";
12
7
  import { importX as importXPlugin } from "eslint-plugin-import-x";
@@ -14,9 +9,7 @@ import importZodPlugin from "eslint-plugin-import-zod";
14
9
  import jsdocPlugin from "eslint-plugin-jsdoc";
15
10
  import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
16
11
  import nodePlugin from "eslint-plugin-n";
17
- import playwrightPlugin from "eslint-plugin-playwright";
18
12
  import promisePlugin from "eslint-plugin-promise";
19
- import reactHooksPlugin from "eslint-plugin-react-hooks";
20
13
  import regexpPlugin from "eslint-plugin-regexp";
21
14
  import importSortPlugin from "eslint-plugin-simple-import-sort";
22
15
  import sonarjsPlugin from "eslint-plugin-sonarjs";
@@ -28,7 +21,6 @@ import eslint from "@eslint/js";
28
21
  import globals from "globals";
29
22
  import * as parserBase from "@typescript-eslint/parser";
30
23
  import { merge } from "ts-deepmerge";
31
- import { rules } from "eslint-config-prettier";
32
24
  //#region src/configs/command.ts
33
25
  const command = () => ({
34
26
  ...commandPlugin(),
@@ -443,6 +435,17 @@ const withOptions = (options, ...userConfigs) => createConfig(options, userConfi
443
435
  const defineConfig = Object.assign((...userConfigs) => createConfig({}, userConfigs), { withOptions });
444
436
  //#endregion
445
437
  //#region src/utils.ts
438
+ async function loadOptionalDependency(specifier) {
439
+ let resolved;
440
+ try {
441
+ resolved = import.meta.resolve(specifier);
442
+ } catch (error) {
443
+ if (error.code === "ERR_MODULE_NOT_FOUND") throw new Error(`Install "${specifier}" to use this preset: npm i -D ${specifier}`, { cause: error });
444
+ throw error;
445
+ }
446
+ const dependency = await import(resolved);
447
+ return dependency.default ?? dependency;
448
+ }
446
449
  function mergeConfig(base, override) {
447
450
  const { plugins: basePlugins, ...baseConfig } = base;
448
451
  const { plugins: overridePlugins, ...overrideConfig } = override;
@@ -456,7 +459,8 @@ function mergeConfig(base, override) {
456
459
  }
457
460
  //#endregion
458
461
  //#region src/configs/nextjs.ts
459
- const nextjs = (options = {}) => {
462
+ const nextjs = async (options = {}) => {
463
+ const nextPlugin = await loadOptionalDependency("@next/eslint-plugin-next");
460
464
  return mergeConfig({
461
465
  name: "nelsonlaidev/nextjs",
462
466
  plugins: { "@next/next": nextPlugin },
@@ -465,7 +469,8 @@ const nextjs = (options = {}) => {
465
469
  };
466
470
  //#endregion
467
471
  //#region src/configs/playwright.ts
468
- const playwright = (options = {}) => {
472
+ const playwright = async (options = {}) => {
473
+ const playwrightPlugin = await loadOptionalDependency("eslint-plugin-playwright");
469
474
  return mergeConfig({
470
475
  name: "nelsonlaidev/playwright",
471
476
  plugins: { playwright: playwrightPlugin },
@@ -475,15 +480,17 @@ const playwright = (options = {}) => {
475
480
  };
476
481
  //#endregion
477
482
  //#region src/configs/prettier.ts
478
- const prettier = (options = {}) => {
483
+ const prettier = async (options = {}) => {
479
484
  return mergeConfig({
480
485
  name: "nelsonlaidev/prettier",
481
- rules
486
+ rules: (await loadOptionalDependency("eslint-config-prettier")).rules
482
487
  }, options);
483
488
  };
484
489
  //#endregion
485
490
  //#region src/configs/react.ts
486
- const react = (options = {}) => {
491
+ const react = async (options = {}) => {
492
+ const reactPlugin = await loadOptionalDependency("@eslint-react/eslint-plugin");
493
+ const reactHooksPlugin = await loadOptionalDependency("eslint-plugin-react-hooks");
487
494
  return mergeConfig({
488
495
  name: "nelsonlaidev/react",
489
496
  plugins: {
@@ -505,15 +512,15 @@ const react = (options = {}) => {
505
512
  };
506
513
  //#endregion
507
514
  //#region src/configs/stylex.ts
508
- const stylex = (options = {}) => {
515
+ const stylex = async (options = {}) => {
509
516
  return mergeConfig({
510
517
  name: "nelsonlaidev/stylex",
511
- plugins: { "@stylexjs": stylexPlugin },
518
+ plugins: { "@stylexjs": await loadOptionalDependency("@stylexjs/eslint-plugin") },
512
519
  rules: {
513
520
  "@stylexjs/enforce-extension": "error",
514
521
  "@stylexjs/no-conflicting-props": "error",
515
522
  "@stylexjs/no-legacy-contextual-styles": "error",
516
- "@stylexjs/no-lookahead-selectors": "error",
523
+ "@stylexjs/no-lookahead-selectors": "off",
517
524
  "@stylexjs/no-nonstandard-styles": "error",
518
525
  "@stylexjs/no-unused": "error",
519
526
  "@stylexjs/sort-keys": "error",
@@ -524,10 +531,10 @@ const stylex = (options = {}) => {
524
531
  };
525
532
  //#endregion
526
533
  //#region src/configs/tailwindcss.ts
527
- const tailwindcss = (options = {}) => {
534
+ const tailwindcss = async (options = {}) => {
528
535
  return mergeConfig({
529
536
  name: "nelsonlaidev/tailwindcss",
530
- plugins: { "better-tailwindcss": tailwindcssPlugin },
537
+ plugins: { "better-tailwindcss": await loadOptionalDependency("eslint-plugin-better-tailwindcss") },
531
538
  settings: { "better-tailwindcss": {
532
539
  detectComponentClasses: false,
533
540
  rootFontSize: 16
@@ -548,7 +555,8 @@ const tailwindcss = (options = {}) => {
548
555
  };
549
556
  //#endregion
550
557
  //#region src/configs/vitest.ts
551
- const vitest = (options = {}) => {
558
+ const vitest = async (options = {}) => {
559
+ const vitestPlugin = await loadOptionalDependency("@vitest/eslint-plugin");
552
560
  return mergeConfig({
553
561
  name: "nelsonlaidev/vitest",
554
562
  plugins: { vitest: vitestPlugin },
@@ -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/node.ts","../src/configs/promise.ts","../src/configs/regexp.ts","../src/configs/sonarjs.ts","../src/configs/stylistic.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/unused-imports.ts","../src/configs/zod.ts","../src/base.ts","../src/utils.ts","../src/configs/nextjs.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/stylex.ts","../src/configs/tailwindcss.ts","../src/configs/vitest.ts"],"sourcesContent":["import type { FlatConfig } from '../types'\n\nimport { commandPlugin } from '../plugins'\n\nexport const command = (): FlatConfig => ({\n ...commandPlugin(),\n name: 'nelsonlaidev/command',\n})\n","import type { FlatConfig } from '../types'\n\nimport { commentsPlugin } from '../plugins'\n\nexport const comments = (): FlatConfig => ({\n name: 'nelsonlaidev/eslint-comments',\n plugins: {\n '@eslint-community/eslint-comments': commentsPlugin,\n },\n rules: {\n ...commentsPlugin.configs.recommended.rules,\n },\n})\n","import type { FlatConfig } from '../types'\n\nimport { deMorganPlugin } from '../plugins'\n\nexport const deMorgan = (): FlatConfig => ({\n name: 'nelsonlaidev/de-morgan',\n plugins: {\n 'de-morgan': deMorganPlugin,\n },\n rules: {\n ...deMorganPlugin.configs.recommended.rules,\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 name: 'nelsonlaidev/ignores',\n ignores: ['**/routeTree.gen.ts', ...userIgnores],\n})\n","import type { FlatConfig } from '../types'\n\nimport { importSortPlugin } from '../plugins'\n\nexport const importSort = (): FlatConfig => ({\n name: 'nelsonlaidev/import-sort',\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","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 return {\n name: 'nelsonlaidev/import-x',\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: ['{ts,js}config.json', 'apps/**/{ts,js}config.json', 'packages/**/{ts,js}config.json'],\n noWarnOnMultipleProjects: true,\n ...options,\n }),\n ],\n },\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 name: 'nelsonlaidev/javascript',\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 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","import type { FlatConfig } from '../types'\n\nimport { jsdocPlugin } from '../plugins'\n\nexport const jsdoc = (): FlatConfig => ({\n name: 'nelsonlaidev/jsdoc',\n plugins: {\n jsdoc: jsdocPlugin,\n },\n rules: {\n 'jsdoc/check-tag-names': 'error',\n 'jsdoc/empty-tags': 'error',\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 } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsxA11y = (): FlatConfig => ({\n name: 'nelsonlaidev/jsx-a11y',\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 components: {\n Button: 'button',\n Image: 'img',\n Input: 'input',\n Textarea: 'textarea',\n Link: 'a',\n },\n },\n },\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","import type { FlatConfig } from '../types'\n\nimport { nelsonlaidevPlugin } from '../plugins'\n\nexport const nelsonlaidev = (): FlatConfig => ({\n name: 'nelsonlaidev/nelsonlaidev',\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","import type { FlatConfig } from '../types'\n\nimport { nodePlugin } from '../plugins'\n\nexport const node = (): FlatConfig => ({\n name: 'nelsonlaidev/node',\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","import type { FlatConfig } from '../types'\n\nimport { promisePlugin } from '../plugins'\n\nexport const promise = (): FlatConfig => ({\n name: 'nelsonlaidev/promise',\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","import type { FlatConfig } from '../types'\n\nimport { regexpPlugin } from '../plugins'\n\nexport const regexp = (): FlatConfig => ({\n name: 'nelsonlaidev/regexp',\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs.recommended.rules,\n },\n})\n","import type { FlatConfig } from '../types'\n\nimport { sonarjsPlugin } from '../plugins'\n\nexport const sonarjs = (): FlatConfig => ({\n name: 'nelsonlaidev/sonarjs',\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","import type { FlatConfig } from '../types'\n\nimport { stylisticPlugin } from '../plugins'\n\nexport const stylistic = (): FlatConfig => ({\n name: 'nelsonlaidev/stylistic',\n plugins: {\n '@stylistic': stylisticPlugin,\n },\n rules: {\n '@stylistic/multiline-comment-style': ['error', 'separate-lines'],\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 name: 'nelsonlaidev/typescript',\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 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\nexport const typescriptDeclarations = (): FlatConfig => ({\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","import type { FlatConfig } from '../types'\n\nimport { unicornPlugin } from '../plugins'\n\nexport const unicorn = (): FlatConfig => ({\n name: 'nelsonlaidev/unicorn',\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","import type { FlatConfig } from '../types'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const unusedImports = (): FlatConfig => ({\n name: 'nelsonlaidev/unused-imports',\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","import type { FlatConfig } from '../types'\n\nimport { importZodPlugin } from '../plugins'\n\nexport const zod = (): FlatConfig => ({\n name: 'nelsonlaidev/zod',\n plugins: {\n 'import-zod': importZodPlugin,\n },\n rules: {\n 'import-zod/prefer-zod-namespace': 'error',\n },\n})\n","import type { ConfigOptions, FlatConfig } from './types'\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 { node } from './configs/node'\nimport { promise } from './configs/promise'\nimport { regexp } from './configs/regexp'\nimport { sonarjs } from './configs/sonarjs'\nimport { stylistic } from './configs/stylistic'\nimport { typescript, typescriptDeclarations } from './configs/typescript'\nimport { unicorn } from './configs/unicorn'\nimport { unusedImports } from './configs/unused-imports'\nimport { zod } from './configs/zod'\n\nconst createConfig = (options: ConfigOptions, userConfigs: FlatConfig[]): FlatConfig[] => {\n const configs: FlatConfig[] = [\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(),\n typescript(),\n typescriptDeclarations(),\n unusedImports(),\n regexp(),\n stylistic(),\n zod(),\n promise(),\n nelsonlaidev(),\n ]\n\n return [...configs, ...userConfigs]\n}\n\nconst withOptions = (options: ConfigOptions, ...userConfigs: FlatConfig[]): FlatConfig[] =>\n createConfig(options, userConfigs)\n\nexport const defineConfig = Object.assign(\n (...userConfigs: FlatConfig[]): FlatConfig[] => createConfig({}, userConfigs),\n { withOptions },\n)\n","import type { FlatConfig } from './types'\n\nimport { merge } from 'ts-deepmerge'\n\nexport function mergeConfig(base: FlatConfig, override: FlatConfig): FlatConfig {\n const { plugins: basePlugins, ...baseConfig } = base\n const { plugins: overridePlugins, ...overrideConfig } = override\n\n return {\n ...merge.withOptions({ mergeArrays: false }, baseConfig, overrideConfig),\n plugins: { ...basePlugins, ...overridePlugins },\n }\n}\n","import type { FlatConfig } from '../types'\n\nimport { nextPlugin } from '../plugins'\nimport { mergeConfig } from '../utils'\n\nexport const nextjs = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/nextjs',\n plugins: {\n '@next/next': nextPlugin,\n },\n rules: {\n ...nextPlugin.configs['core-web-vitals'].rules,\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport globals from 'globals'\n\nimport { playwrightPlugin } from '../plugins'\nimport { mergeConfig } from '../utils'\n\nexport const playwright = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/playwright',\n plugins: {\n playwright: playwrightPlugin,\n },\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { rules } from 'eslint-config-prettier'\n\nimport { mergeConfig } from '../utils'\n\nexport const prettier = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/prettier',\n rules,\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\nimport { mergeConfig } from '../utils'\n\nexport const react = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/react',\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n settings: {\n ...reactPlugin.configs.all.settings,\n },\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 // Rules that require type information.\n '@eslint-react/no-leaked-conditional-rendering': 'error',\n '@eslint-react/no-unused-props': 'error',\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { stylexPlugin } from '../plugins'\nimport { mergeConfig } from '../utils'\n\nexport const stylex = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/stylex',\n plugins: {\n '@stylexjs': stylexPlugin,\n },\n rules: {\n '@stylexjs/enforce-extension': 'error',\n '@stylexjs/no-conflicting-props': 'error',\n '@stylexjs/no-legacy-contextual-styles': 'error',\n '@stylexjs/no-lookahead-selectors': 'error',\n '@stylexjs/no-nonstandard-styles': 'error',\n '@stylexjs/no-unused': 'error',\n '@stylexjs/sort-keys': 'error',\n '@stylexjs/valid-shorthands': 'error',\n '@stylexjs/valid-styles': 'error',\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { tailwindcssPlugin } from '../plugins'\nimport { mergeConfig } from '../utils'\n\nexport const tailwindcss = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/tailwindcss',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n settings: {\n 'better-tailwindcss': {\n detectComponentClasses: false,\n rootFontSize: 16,\n },\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': 'error',\n 'better-tailwindcss/enforce-consistent-variant-order': 'error',\n 'better-tailwindcss/enforce-consistent-class-order': 'error',\n 'better-tailwindcss/no-concatenated-classes': 'error',\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': 'error',\n 'better-tailwindcss/no-unknown-classes': 'error',\n 'better-tailwindcss/no-unnecessary-whitespace': 'error',\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { vitestPlugin } from '../plugins'\nimport { mergeConfig } from '../utils'\n\nexport const vitest = (options: FlatConfig = {}): FlatConfig => {\n const base: FlatConfig = {\n name: 'nelsonlaidev/vitest',\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 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 return mergeConfig(base, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAa,iBAA6B;CACxC,GAAG,eAAe;CAClB,MAAM;CACP;;;ACHD,MAAa,kBAA8B;CACzC,MAAM;CACN,SAAS,EACP,qCAAqC,gBACtC;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF;;;ACRD,MAAa,kBAA8B;CACzC,MAAM;CACN,SAAS,EACP,aAAa,gBACd;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF;;;ACRD,MAAa,kBAA8B,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;;;ACF9F,MAAa,WAAW,cAAwB,EAAE,MAAkB;CAClE,MAAM;CACN,SAAS,CAAC,uBAAuB,GA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GACf,EACF;EACD,OAAO;GACL,gDAAgD;GAChD,uDAAuD;GACvD,qDAAqD;GACrD,8CAA8C;GAC9C,6CAA6C;GAC7C,4CAA4C;GAC5C,2CAA2C;GAC3C,4CAA4C;GAC5C,yCAAyC;GACzC,gDAAgD;GACjD;EAGoB,EAAE,QAAQ;;;;AC1BnC,MAAa,UAAU,UAAsB,EAAE,KAAiB;AAyB9D,QAAO,YAAY;EAvBjB,MAAM;EACN,SAAS,EACP,QAAQ,cACT;EACD,UAAU,EACR,QAAQ,EACN,WAAW,MACZ,EACF;EACD,iBAAiB,EACf,SAAS,EACP,GAAG,aAAa,aAAa,IAAI,SAClC,EACF;EACD,OAAO;GACL,GAAG,aAAa,QAAQ,YAAY;GAEpC,6BAA6B,CAAC,SAAS,EAAE,IAAI,QAAQ,CAAC;GACtD,uCAAuC;GACvC,oBAAoB;GACrB;EAGoB,EAAE,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/node.ts","../src/configs/promise.ts","../src/configs/regexp.ts","../src/configs/sonarjs.ts","../src/configs/stylistic.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/unused-imports.ts","../src/configs/zod.ts","../src/base.ts","../src/utils.ts","../src/configs/nextjs.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/stylex.ts","../src/configs/tailwindcss.ts","../src/configs/vitest.ts"],"sourcesContent":["import type { FlatConfig } from '../types'\n\nimport { commandPlugin } from '../plugins'\n\nexport const command = (): FlatConfig => ({\n ...commandPlugin(),\n name: 'nelsonlaidev/command',\n})\n","import type { FlatConfig } from '../types'\n\nimport { commentsPlugin } from '../plugins'\n\nexport const comments = (): FlatConfig => ({\n name: 'nelsonlaidev/eslint-comments',\n plugins: {\n '@eslint-community/eslint-comments': commentsPlugin,\n },\n rules: {\n ...commentsPlugin.configs.recommended.rules,\n },\n})\n","import type { FlatConfig } from '../types'\n\nimport { deMorganPlugin } from '../plugins'\n\nexport const deMorgan = (): FlatConfig => ({\n name: 'nelsonlaidev/de-morgan',\n plugins: {\n 'de-morgan': deMorganPlugin,\n },\n rules: {\n ...deMorganPlugin.configs.recommended.rules,\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 name: 'nelsonlaidev/ignores',\n ignores: ['**/routeTree.gen.ts', ...userIgnores],\n})\n","import type { FlatConfig } from '../types'\n\nimport { importSortPlugin } from '../plugins'\n\nexport const importSort = (): FlatConfig => ({\n name: 'nelsonlaidev/import-sort',\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","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 return {\n name: 'nelsonlaidev/import-x',\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: ['{ts,js}config.json', 'apps/**/{ts,js}config.json', 'packages/**/{ts,js}config.json'],\n noWarnOnMultipleProjects: true,\n ...options,\n }),\n ],\n },\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 name: 'nelsonlaidev/javascript',\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 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","import type { FlatConfig } from '../types'\n\nimport { jsdocPlugin } from '../plugins'\n\nexport const jsdoc = (): FlatConfig => ({\n name: 'nelsonlaidev/jsdoc',\n plugins: {\n jsdoc: jsdocPlugin,\n },\n rules: {\n 'jsdoc/check-tag-names': 'error',\n 'jsdoc/empty-tags': 'error',\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 } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsxA11y = (): FlatConfig => ({\n name: 'nelsonlaidev/jsx-a11y',\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 components: {\n Button: 'button',\n Image: 'img',\n Input: 'input',\n Textarea: 'textarea',\n Link: 'a',\n },\n },\n },\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","import type { FlatConfig } from '../types'\n\nimport { nelsonlaidevPlugin } from '../plugins'\n\nexport const nelsonlaidev = (): FlatConfig => ({\n name: 'nelsonlaidev/nelsonlaidev',\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","import type { FlatConfig } from '../types'\n\nimport { nodePlugin } from '../plugins'\n\nexport const node = (): FlatConfig => ({\n name: 'nelsonlaidev/node',\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","import type { FlatConfig } from '../types'\n\nimport { promisePlugin } from '../plugins'\n\nexport const promise = (): FlatConfig => ({\n name: 'nelsonlaidev/promise',\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","import type { FlatConfig } from '../types'\n\nimport { regexpPlugin } from '../plugins'\n\nexport const regexp = (): FlatConfig => ({\n name: 'nelsonlaidev/regexp',\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs.recommended.rules,\n },\n})\n","import type { FlatConfig } from '../types'\n\nimport { sonarjsPlugin } from '../plugins'\n\nexport const sonarjs = (): FlatConfig => ({\n name: 'nelsonlaidev/sonarjs',\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","import type { FlatConfig } from '../types'\n\nimport { stylisticPlugin } from '../plugins'\n\nexport const stylistic = (): FlatConfig => ({\n name: 'nelsonlaidev/stylistic',\n plugins: {\n '@stylistic': stylisticPlugin,\n },\n rules: {\n '@stylistic/multiline-comment-style': ['error', 'separate-lines'],\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 name: 'nelsonlaidev/typescript',\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 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\nexport const typescriptDeclarations = (): FlatConfig => ({\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","import type { FlatConfig } from '../types'\n\nimport { unicornPlugin } from '../plugins'\n\nexport const unicorn = (): FlatConfig => ({\n name: 'nelsonlaidev/unicorn',\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","import type { FlatConfig } from '../types'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const unusedImports = (): FlatConfig => ({\n name: 'nelsonlaidev/unused-imports',\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","import type { FlatConfig } from '../types'\n\nimport { importZodPlugin } from '../plugins'\n\nexport const zod = (): FlatConfig => ({\n name: 'nelsonlaidev/zod',\n plugins: {\n 'import-zod': importZodPlugin,\n },\n rules: {\n 'import-zod/prefer-zod-namespace': 'error',\n },\n})\n","import type { ConfigOptions, FlatConfig } from './types'\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 { node } from './configs/node'\nimport { promise } from './configs/promise'\nimport { regexp } from './configs/regexp'\nimport { sonarjs } from './configs/sonarjs'\nimport { stylistic } from './configs/stylistic'\nimport { typescript, typescriptDeclarations } from './configs/typescript'\nimport { unicorn } from './configs/unicorn'\nimport { unusedImports } from './configs/unused-imports'\nimport { zod } from './configs/zod'\n\nconst createConfig = (options: ConfigOptions, userConfigs: FlatConfig[]): FlatConfig[] => {\n const configs: FlatConfig[] = [\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(),\n typescript(),\n typescriptDeclarations(),\n unusedImports(),\n regexp(),\n stylistic(),\n zod(),\n promise(),\n nelsonlaidev(),\n ]\n\n return [...configs, ...userConfigs]\n}\n\nconst withOptions = (options: ConfigOptions, ...userConfigs: FlatConfig[]): FlatConfig[] =>\n createConfig(options, userConfigs)\n\nexport const defineConfig = Object.assign(\n (...userConfigs: FlatConfig[]): FlatConfig[] => createConfig({}, userConfigs),\n { withOptions },\n)\n","import type ReactPlugin from '@eslint-react/eslint-plugin'\nimport type NextPlugin from '@next/eslint-plugin-next'\nimport type * as StylexPlugin from '@stylexjs/eslint-plugin'\nimport type VitestPlugin from '@vitest/eslint-plugin'\nimport type * as PrettierConfig from 'eslint-config-prettier'\nimport type TailwindcssPlugin from 'eslint-plugin-better-tailwindcss'\nimport type PlaywrightPlugin from 'eslint-plugin-playwright'\nimport type ReactHooksPlugin from 'eslint-plugin-react-hooks'\nimport type { FlatConfig } from './types'\n\nimport { merge } from 'ts-deepmerge'\n\ntype OptionalDependencies = {\n '@eslint-react/eslint-plugin': typeof ReactPlugin\n '@next/eslint-plugin-next': typeof NextPlugin\n '@stylexjs/eslint-plugin': typeof StylexPlugin\n '@vitest/eslint-plugin': typeof VitestPlugin\n 'eslint-config-prettier': typeof PrettierConfig\n 'eslint-plugin-better-tailwindcss': typeof TailwindcssPlugin\n 'eslint-plugin-playwright': typeof PlaywrightPlugin\n 'eslint-plugin-react-hooks': typeof ReactHooksPlugin\n}\n\nexport async function loadOptionalDependency<K extends keyof OptionalDependencies>(\n specifier: K,\n): Promise<OptionalDependencies[K]> {\n let resolved: string\n\n try {\n resolved = import.meta.resolve(specifier)\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ERR_MODULE_NOT_FOUND') {\n throw new Error(`Install \"${specifier}\" to use this preset: npm i -D ${specifier}`, { cause: error })\n }\n throw error\n }\n\n const dependency = (await import(resolved)) as { default?: unknown }\n return (dependency.default ?? dependency) as OptionalDependencies[K]\n}\n\nexport function mergeConfig(base: FlatConfig, override: FlatConfig): FlatConfig {\n const { plugins: basePlugins, ...baseConfig } = base\n const { plugins: overridePlugins, ...overrideConfig } = override\n\n return {\n ...merge.withOptions({ mergeArrays: false }, baseConfig, overrideConfig),\n plugins: { ...basePlugins, ...overridePlugins },\n }\n}\n","import type { FlatConfig } from '../types'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const nextjs = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const nextPlugin = await loadOptionalDependency('@next/eslint-plugin-next')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/nextjs',\n plugins: {\n '@next/next': nextPlugin,\n },\n rules: {\n ...nextPlugin.configs['core-web-vitals'].rules,\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport globals from 'globals'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const playwright = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const playwrightPlugin = await loadOptionalDependency('eslint-plugin-playwright')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/playwright',\n plugins: {\n playwright: playwrightPlugin,\n },\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const prettier = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const prettierConfig = await loadOptionalDependency('eslint-config-prettier')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/prettier',\n rules: prettierConfig.rules,\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const react = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const reactPlugin = await loadOptionalDependency('@eslint-react/eslint-plugin')\n const reactHooksPlugin = await loadOptionalDependency('eslint-plugin-react-hooks')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/react',\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n settings: {\n ...reactPlugin.configs.all.settings,\n },\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 // Rules that require type information.\n '@eslint-react/no-leaked-conditional-rendering': 'error',\n '@eslint-react/no-unused-props': 'error',\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const stylex = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const stylexPlugin = await loadOptionalDependency('@stylexjs/eslint-plugin')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/stylex',\n plugins: {\n '@stylexjs': stylexPlugin,\n },\n rules: {\n '@stylexjs/enforce-extension': 'error',\n '@stylexjs/no-conflicting-props': 'error',\n '@stylexjs/no-legacy-contextual-styles': 'error',\n '@stylexjs/no-lookahead-selectors': 'off',\n '@stylexjs/no-nonstandard-styles': 'error',\n '@stylexjs/no-unused': 'error',\n '@stylexjs/sort-keys': 'error',\n '@stylexjs/valid-shorthands': 'error',\n '@stylexjs/valid-styles': 'error',\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const tailwindcss = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const tailwindcssPlugin = await loadOptionalDependency('eslint-plugin-better-tailwindcss')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/tailwindcss',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n settings: {\n 'better-tailwindcss': {\n detectComponentClasses: false,\n rootFontSize: 16,\n },\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': 'error',\n 'better-tailwindcss/enforce-consistent-variant-order': 'error',\n 'better-tailwindcss/enforce-consistent-class-order': 'error',\n 'better-tailwindcss/no-concatenated-classes': 'error',\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': 'error',\n 'better-tailwindcss/no-unknown-classes': 'error',\n 'better-tailwindcss/no-unnecessary-whitespace': 'error',\n },\n }\n\n return mergeConfig(base, options)\n}\n","import type { FlatConfig } from '../types'\n\nimport { loadOptionalDependency, mergeConfig } from '../utils'\n\nexport const vitest = async (options: FlatConfig = {}): Promise<FlatConfig> => {\n const vitestPlugin = await loadOptionalDependency('@vitest/eslint-plugin')\n\n const base: FlatConfig = {\n name: 'nelsonlaidev/vitest',\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 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 return mergeConfig(base, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAa,iBAA6B;CACxC,GAAG,eAAe;CAClB,MAAM;CACP;;;ACHD,MAAa,kBAA8B;CACzC,MAAM;CACN,SAAS,EACP,qCAAqC,gBACtC;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF;;;ACRD,MAAa,kBAA8B;CACzC,MAAM;CACN,SAAS,EACP,aAAa,gBACd;CACD,OAAO,EACL,GAAG,eAAe,QAAQ,YAAY,OACvC;CACF;;;ACRD,MAAa,kBAA8B,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;;;ACF9F,MAAa,WAAW,cAAwB,EAAE,MAAkB;CAClE,MAAM;CACN,SAAS,CAAC,uBAAuB,GAAG,YAAY;CACjD;;;ACDD,MAAa,oBAAgC;CAC3C,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;EAC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GACvB,8BAA8B;GAC9B,0BAA0B;GAC3B;EAGoB,EAAE,QAAQ;;;;ACrBnC,MAAa,cAAc,OAAO,UAAsB,EAAE,KAA0B;AA4BlF,QAAO,YAAY;EAxBjB,MAAM;EACN,SAAS,EACP,sBAAsB,MALM,uBAAuB,mCAAmC,EAMvF;EACD,UAAU,EACR,sBAAsB;GACpB,wBAAwB;GACxB,cAAc;GACf,EACF;EACD,OAAO;GACL,gDAAgD;GAChD,uDAAuD;GACvD,qDAAqD;GACrD,8CAA8C;GAC9C,6CAA6C;GAC7C,4CAA4C;GAC5C,2CAA2C;GAC3C,4CAA4C;GAC5C,yCAAyC;GACzC,gDAAgD;GACjD;EAGoB,EAAE,QAAQ;;;;AC5BnC,MAAa,SAAS,OAAO,UAAsB,EAAE,KAA0B;CAC7E,MAAM,eAAe,MAAM,uBAAuB,wBAAwB;AA0B1E,QAAO,YAAY;EAvBjB,MAAM;EACN,SAAS,EACP,QAAQ,cACT;EACD,UAAU,EACR,QAAQ,EACN,WAAW,MACZ,EACF;EACD,iBAAiB,EACf,SAAS,EACP,GAAG,aAAa,aAAa,IAAI,SAClC,EACF;EACD,OAAO;GACL,GAAG,aAAa,QAAQ,YAAY;GAEpC,6BAA6B,CAAC,SAAS,EAAE,IAAI,QAAQ,CAAC;GACtD,uCAAuC;GACvC,oBAAoB;GACrB;EAGoB,EAAE,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nelsonlaidev/eslint-config",
3
- "version": "5.2.0",
3
+ "version": "6.0.0",
4
4
  "description": "Nelson Lai's ESLint config preset",
5
5
  "homepage": "https://github.com/nelsonlaidev/config/tree/main/packages/eslint-config",
6
6
  "bugs": {
@@ -29,19 +29,13 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
32
- "@eslint-react/eslint-plugin": "^5.18.10",
33
32
  "@eslint/js": "^10.0.1",
34
33
  "@nelsonlaidev/eslint-plugin": "0.2.5",
35
- "@next/eslint-plugin-next": "^16.3.4",
36
- "@stylexjs/eslint-plugin": "^0.19.1",
37
34
  "@stylistic/eslint-plugin": "^5.10.0",
38
35
  "@typescript-eslint/eslint-plugin": "^8.69.0",
39
36
  "@typescript-eslint/parser": "^8.69.0",
40
- "@vitest/eslint-plugin": "^1.6.27",
41
37
  "eslint-config-flat-gitignore": "^2.4.0",
42
- "eslint-config-prettier": "^10.1.8",
43
38
  "eslint-import-resolver-typescript": "^4.4.5",
44
- "eslint-plugin-better-tailwindcss": "^4.7.0",
45
39
  "eslint-plugin-command": "^4.0.0",
46
40
  "eslint-plugin-de-morgan": "^2.1.3",
47
41
  "eslint-plugin-import-x": "^4.17.1",
@@ -49,9 +43,7 @@
49
43
  "eslint-plugin-jsdoc": "^64.3.6",
50
44
  "eslint-plugin-jsx-a11y": "^6.10.2",
51
45
  "eslint-plugin-n": "^18.3.0",
52
- "eslint-plugin-playwright": "^2.11.0",
53
46
  "eslint-plugin-promise": "^7.3.0",
54
- "eslint-plugin-react-hooks": "^7.1.1",
55
47
  "eslint-plugin-regexp": "^3.3.0",
56
48
  "eslint-plugin-simple-import-sort": "^14.0.0",
57
49
  "eslint-plugin-sonarjs": "^4.2.0",
@@ -61,14 +53,58 @@
61
53
  "ts-deepmerge": "^8.0.0"
62
54
  },
63
55
  "devDependencies": {
56
+ "@eslint-react/eslint-plugin": "^5.18.10",
64
57
  "@eslint/config-inspector": "^3.4.0",
65
58
  "@nelsonlaidev/typescript-config": "1.2.3",
59
+ "@next/eslint-plugin-next": "^16.3.4",
60
+ "@stylexjs/eslint-plugin": "^0.19.1",
66
61
  "@types/node": "^24.11.0",
62
+ "@vitest/eslint-plugin": "^1.6.27",
67
63
  "eslint": "^10.1.0",
68
- "tsdown": "^0.21.6"
64
+ "eslint-config-prettier": "^10.1.8",
65
+ "eslint-plugin-better-tailwindcss": "^4.7.0",
66
+ "eslint-plugin-playwright": "^2.11.0",
67
+ "eslint-plugin-react-hooks": "^7.1.1",
68
+ "tsdown": "^0.21.6",
69
+ "tsx": "^4.23.13",
70
+ "vitest": "^4.1.2"
69
71
  },
70
72
  "peerDependencies": {
71
- "eslint": "^9.0.0 || ^10.0.0"
73
+ "@eslint-react/eslint-plugin": "^5.18.10",
74
+ "@next/eslint-plugin-next": "^16.3.4",
75
+ "@stylexjs/eslint-plugin": "^0.19.1",
76
+ "@vitest/eslint-plugin": "^1.6.27",
77
+ "eslint": "^9.0.0 || ^10.0.0",
78
+ "eslint-config-prettier": "^10.1.8",
79
+ "eslint-plugin-better-tailwindcss": "^4.7.0",
80
+ "eslint-plugin-playwright": "^2.11.0",
81
+ "eslint-plugin-react-hooks": "^7.1.1"
82
+ },
83
+ "peerDependenciesMeta": {
84
+ "@eslint-react/eslint-plugin": {
85
+ "optional": true
86
+ },
87
+ "@next/eslint-plugin-next": {
88
+ "optional": true
89
+ },
90
+ "@stylexjs/eslint-plugin": {
91
+ "optional": true
92
+ },
93
+ "@vitest/eslint-plugin": {
94
+ "optional": true
95
+ },
96
+ "eslint-config-prettier": {
97
+ "optional": true
98
+ },
99
+ "eslint-plugin-better-tailwindcss": {
100
+ "optional": true
101
+ },
102
+ "eslint-plugin-playwright": {
103
+ "optional": true
104
+ },
105
+ "eslint-plugin-react-hooks": {
106
+ "optional": true
107
+ }
72
108
  },
73
109
  "engines": {
74
110
  "node": ">=22"
@@ -79,6 +115,7 @@
79
115
  "clean": "rm -rf .turbo dist .eslint-config-inspector",
80
116
  "dev": "tsdown --watch",
81
117
  "dev:inspector": "eslint-config-inspector --config eslint-inspector.config.ts",
118
+ "test": "vitest run",
82
119
  "typecheck": "tsc --noEmit"
83
120
  }
84
121
  }