@nelsonlaidev/eslint-config 5.1.0 → 5.2.1

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
@@ -40,7 +40,16 @@ export default defineConfig({
40
40
  Framework and tool integrations are explicit. Import the presets you need and pass them in the order they should be applied:
41
41
 
42
42
  ```ts
43
- import { defineConfig, nextjs, playwright, prettier, react, tailwindcss, vitest } from '@nelsonlaidev/eslint-config'
43
+ import {
44
+ defineConfig,
45
+ nextjs,
46
+ playwright,
47
+ prettier,
48
+ react,
49
+ stylex,
50
+ tailwindcss,
51
+ vitest,
52
+ } from '@nelsonlaidev/eslint-config'
44
53
 
45
54
  export default defineConfig(
46
55
  vitest({
@@ -51,6 +60,7 @@ export default defineConfig(
51
60
  }),
52
61
  react(),
53
62
  nextjs(),
63
+ stylex(),
54
64
  tailwindcss({
55
65
  settings: {
56
66
  'better-tailwindcss': {
@@ -63,7 +73,7 @@ export default defineConfig(
63
73
  )
64
74
  ```
65
75
 
66
- Available optional presets are `react()`, `nextjs()`, `tailwindcss()`, `vitest()`, `playwright()`, and `prettier()`.
76
+ Available optional presets are `react()`, `nextjs()`, `stylex()`, `tailwindcss()`, `vitest()`, `playwright()`, and `prettier()`.
67
77
 
68
78
  Each preset accepts an ESLint flat configuration override. Arrays are replaced, nested objects are merged, and plugin maps are combined:
69
79
 
package/dist/index.d.mts CHANGED
@@ -37,6 +37,9 @@ declare const prettier: (options?: FlatConfig) => FlatConfig;
37
37
  //#region src/configs/react.d.ts
38
38
  declare const react: (options?: FlatConfig) => FlatConfig;
39
39
  //#endregion
40
+ //#region src/configs/stylex.d.ts
41
+ declare const stylex: (options?: FlatConfig) => FlatConfig;
42
+ //#endregion
40
43
  //#region src/configs/tailwindcss.d.ts
41
44
  declare const tailwindcss: (options?: FlatConfig) => FlatConfig;
42
45
  //#endregion
@@ -51,5 +54,5 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
51
54
  declare const GLOB_TS = "**/*.?([cm])ts";
52
55
  declare const GLOB_TSX = "**/*.?([cm])tsx";
53
56
  //#endregion
54
- export { ConfigOptions, FlatConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, defineConfig, nextjs, playwright, prettier, react, tailwindcss, vitest };
57
+ export { ConfigOptions, FlatConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, defineConfig, nextjs, playwright, prettier, react, stylex, tailwindcss, vitest };
55
58
  //# sourceMappingURL=index.d.mts.map
@@ -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/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,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;;;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"}
package/dist/index.mjs CHANGED
@@ -2,6 +2,7 @@ import commentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
2
2
  import reactPlugin from "@eslint-react/eslint-plugin";
3
3
  import nelsonlaidevPlugin from "@nelsonlaidev/eslint-plugin";
4
4
  import nextPlugin from "@next/eslint-plugin-next";
5
+ import * as stylexPlugin from "@stylexjs/eslint-plugin";
5
6
  import stylisticPlugin from "@stylistic/eslint-plugin";
6
7
  import typescriptPlugin from "@typescript-eslint/eslint-plugin";
7
8
  import vitestPlugin from "@vitest/eslint-plugin";
@@ -503,6 +504,25 @@ const react = (options = {}) => {
503
504
  }, options);
504
505
  };
505
506
  //#endregion
507
+ //#region src/configs/stylex.ts
508
+ const stylex = (options = {}) => {
509
+ return mergeConfig({
510
+ name: "nelsonlaidev/stylex",
511
+ plugins: { "@stylexjs": stylexPlugin },
512
+ rules: {
513
+ "@stylexjs/enforce-extension": "error",
514
+ "@stylexjs/no-conflicting-props": "error",
515
+ "@stylexjs/no-legacy-contextual-styles": "error",
516
+ "@stylexjs/no-lookahead-selectors": "off",
517
+ "@stylexjs/no-nonstandard-styles": "error",
518
+ "@stylexjs/no-unused": "error",
519
+ "@stylexjs/sort-keys": "error",
520
+ "@stylexjs/valid-shorthands": "error",
521
+ "@stylexjs/valid-styles": "error"
522
+ }
523
+ }, options);
524
+ };
525
+ //#endregion
506
526
  //#region src/configs/tailwindcss.ts
507
527
  const tailwindcss = (options = {}) => {
508
528
  return mergeConfig({
@@ -543,6 +563,6 @@ const vitest = (options = {}) => {
543
563
  }, options);
544
564
  };
545
565
  //#endregion
546
- export { GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, defineConfig, nextjs, playwright, prettier, react, tailwindcss, vitest };
566
+ export { GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, defineConfig, nextjs, playwright, prettier, react, stylex, tailwindcss, vitest };
547
567
 
548
568
  //# sourceMappingURL=index.mjs.map
@@ -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/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 { 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,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;EACxB;CACF;;;ACvBD,MAAa,WAAW,UAAqC,EAAE,KAAiB;AAC9E,QAAO;EACL,MAAM;EACN,S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PnC,MAAa,SAAS,UAAsB,EAAE,KAAiB;AA4B7D,QAAO,YAAY;EA1BjB,MAAM;EACN,SAAS;GACP,GAAG,YAAY,QAAQ,IAAI;GAC3B,eAAe;GAChB;EACD,UAAU,EACR,GAAG,YAAY,QAAQ,IAAI,UAC5B;EACD,OAAO;GACL,GAAG,iBAAiB,QAAQ,sBAAsB;GAElD,GAAG,YAAY,QAAQ,IAAI;GAC3B,GAAG,YAAY,QAAQ,8CAA8C;GAGrE,mCAAmC;GAEnC,8BAA8B;GAC9B,sBAAsB;GAGtB,iDAAiD;GACjD,iCAAiC;GAClC;EAGoB,EAAE,QAAQ;;;;AC5BnC,MAAa,eAAe,UAAsB,EAAE,KAAiB;AA0BnE,QAAO,YAAY;EAxBjB,MAAM;EACN,SAAS,EACP,sBAAsB,mBACvB;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;;;;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 { 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': '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 { 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,O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;GACpC,mCAAmC;GACnC,uBAAuB;GACvB,uBAAuB;GACvB,8BAA8B;GAC9B,0BAA0B;GAC3B;EAGoB,EAAE,QAAQ;;;;ACnBnC,MAAa,eAAe,UAAsB,EAAE,KAAiB;AA0BnE,QAAO,YAAY;EAxBjB,MAAM;EACN,SAAS,EACP,sBAAsB,mBACvB;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;;;;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nelsonlaidev/eslint-config",
3
- "version": "5.1.0",
3
+ "version": "5.2.1",
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": {
@@ -33,6 +33,7 @@
33
33
  "@eslint/js": "^10.0.1",
34
34
  "@nelsonlaidev/eslint-plugin": "0.2.5",
35
35
  "@next/eslint-plugin-next": "^16.3.4",
36
+ "@stylexjs/eslint-plugin": "^0.19.1",
36
37
  "@stylistic/eslint-plugin": "^5.10.0",
37
38
  "@typescript-eslint/eslint-plugin": "^8.69.0",
38
39
  "@typescript-eslint/parser": "^8.69.0",