@nelsonlaidev/eslint-config 3.2.0 → 3.3.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/dist/index.mjs CHANGED
@@ -647,6 +647,7 @@ const unicorn = () => [{
647
647
  plugins: { unicorn: unicornPlugin },
648
648
  rules: {
649
649
  ...unicornPlugin.configs.recommended.rules,
650
+ "unicorn/text-encoding-identifier-case": ["error", { withDash: true }],
650
651
  "unicorn/prevent-abbreviations": "off",
651
652
  "unicorn/no-null": "off",
652
653
  "unicorn/no-document-cookie": "off",
@@ -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/globs.ts","../src/configs/jsx.ts","../src/configs/nextjs.ts","../src/configs/node.ts","../src/defaults.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/promise.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonarjs.ts","../src/configs/stylistic.ts","../src/configs/tailwindcss.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/zod.ts","../src/base.ts"],"sourcesContent":["import type { FlatConfig } from '../types'\n\nimport { commandPlugin } from '../plugins'\n\nexport const command = (): FlatConfig[] => [\n {\n ...commandPlugin(),\n name: 'nelsonlaidev/command/rules',\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { commentsPlugin } from '../plugins'\n\nexport const comments = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/eslint-comments/rules',\n plugins: {\n '@eslint-community/eslint-comments': commentsPlugin,\n },\n rules: {\n ...commentsPlugin.configs.recommended.rules,\n\n '@eslint-community/eslint-comments/no-unused-disable': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { deMorganPlugin } from '../plugins'\n\nexport const deMorgan = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/de-morgan/rules',\n plugins: {\n 'de-morgan': deMorganPlugin,\n },\n rules: {\n ...deMorganPlugin.configs.recommended.rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { gitignorePlugin } from '../plugins'\n\nexport const gitignore = (): FlatConfig[] => [\n gitignorePlugin({\n name: 'nelsonlaidev/gitignore',\n }),\n]\n","import type { FlatConfig } from '../types'\n\nexport const ignores = (userIgnores: string[] = []): FlatConfig[] => [\n {\n name: 'nelsonlaidev/ignores',\n ignores: ['**/routeTree.gen.ts', ...userIgnores],\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importSortPlugin } from '../plugins'\n\nexport const importSort = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-sort/rules',\n plugins: {\n 'import-sort': importSortPlugin,\n },\n rules: {\n 'import-sort/imports': [\n 'error',\n {\n groups: [\n // Type imports (imports ending with \\u0000 are type-only imports)\n // The \\u0000 character is used internally by the import-sort plugin to mark type imports\n [\n String.raw`^.*\\u0000$`,\n String.raw`^node:.*\\u0000$`,\n String.raw`^@?\\w.*\\u0000$`,\n String.raw`^\\.\\..*\\u0000$`,\n String.raw`^\\..*\\u0000$`,\n ],\n\n // Side effect imports (e.g., `import 'some-module'`)\n [String.raw`^\\u0000`],\n\n // Node.js builtins prefixed with `node:`\n ['^node:'],\n\n // Things that start with a letter (or digit or underscore), or `@` followed by a letter\n [String.raw`^@?\\w`],\n\n // Absolute imports (e.g., `import something from 'src/utils'`)\n ['^[^.]'],\n\n // Parent directory relative imports (e.g., `import something from '../utils'`)\n [String.raw`^\\.\\.`],\n\n // Current directory relative imports (e.g., `import something from './utils'`)\n [String.raw`^\\.`],\n ],\n },\n ],\n 'import-sort/exports': 'error',\n },\n },\n]\n","import type { FlatConfig, ImportXOptions } from '../types'\n\nimport { importXPlugin } from '../plugins'\n\nexport const importX = (options: ImportXOptions = {}): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-x/rules',\n plugins: {\n 'import-x': importXPlugin,\n },\n rules: {\n ...importXPlugin.configs.recommended.rules,\n ...importXPlugin.configs.typescript.rules,\n\n 'import-x/first': 'error',\n 'import-x/newline-after-import': ['error', { count: 1 }],\n 'import-x/no-amd': 'error',\n 'import-x/no-anonymous-default-export': 'error',\n 'import-x/no-commonjs': 'error',\n 'import-x/no-mutable-exports': 'error',\n 'import-x/no-named-default': 'error',\n 'import-x/no-namespace': ['error', { ignore: ['zod', ...(options.noNamespace?.ignore ?? [])] }],\n 'import-x/no-relative-packages': 'error',\n 'import-x/no-self-import': 'error',\n 'import-x/no-extraneous-dependencies': 'error',\n 'import-x/no-absolute-path': 'error',\n 'import-x/no-webpack-loader-syntax': 'error',\n 'import-x/no-dynamic-require': 'error',\n 'import-x/no-unassigned-import': [\n 'error',\n {\n allow: [\n '**/*.css',\n '**/*.scss',\n '**/*.less',\n 'server-only',\n 'client-only',\n '@total-typescript/ts-reset',\n '@testing-library/jest-dom/**',\n '@testing-library/jest-dom',\n 'msw/{node,browser}',\n 'dotenv/config',\n ...(options.noUnassignedImport?.allow ?? []),\n ],\n },\n ],\n 'import-x/no-useless-path-segments': 'error',\n 'import-x/no-import-module-exports': 'error',\n 'import-x/no-empty-named-blocks': 'error',\n 'import-x/no-deprecated': 'error',\n\n // This rule can trigger false positives in TypeScript projects.\n 'import-x/no-named-as-default': 'off',\n },\n settings: {\n ...importXPlugin.configs.typescript.settings,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport eslint from '@eslint/js'\nimport globals from 'globals'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const javascript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/javascript/setup',\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: 'readonly',\n navigator: 'readonly',\n window: 'readonly',\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error',\n },\n },\n {\n name: 'nelsonlaidev/javascript/rules',\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n // Enable more rules\n 'accessor-pairs': 'error',\n 'array-callback-return': 'error',\n 'arrow-body-style': 'error',\n 'block-scoped-var': 'error',\n complexity: 'error',\n 'default-case': 'error',\n 'default-case-last': 'error',\n eqeqeq: 'error',\n 'func-names': 'error',\n 'max-classes-per-file': 'error',\n 'max-depth': 'error',\n 'max-nested-callbacks': 'error',\n 'new-cap': ['error', { capIsNew: false }],\n 'no-alert': 'error',\n 'no-await-in-loop': 'error',\n 'no-bitwise': 'error',\n 'no-caller': 'error',\n 'no-console': ['error', { allow: ['warn', 'error'] }],\n 'no-constructor-return': 'error',\n 'no-else-return': 'error',\n 'no-eq-null': 'error',\n 'no-eval': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-label': 'error',\n 'no-implicit-coercion': 'error',\n 'no-label-var': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-lonely-if': 'error',\n 'no-multi-assign': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-wrappers': 'error',\n 'no-object-constructor': 'error',\n 'no-param-reassign': 'error',\n 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],\n 'no-promise-executor-return': 'error',\n 'no-restricted-globals': 'error',\n 'no-return-assign': 'error',\n 'no-script-url': 'error',\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-unassigned-vars': 'error',\n 'no-unneeded-ternary': 'error',\n 'no-useless-call': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-concat': 'error',\n 'no-useless-rename': 'error',\n 'no-useless-return': 'error',\n 'no-void': ['error', { allowAsStatement: true }],\n 'no-warning-comments': 'error',\n 'operator-assignment': 'error',\n 'prefer-destructuring': [\n 'error',\n {\n VariableDeclarator: { array: false, object: true },\n AssignmentExpression: { array: false, object: false },\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-numeric-literals': 'error',\n 'prefer-object-has-own': 'error',\n 'prefer-object-spread': 'error',\n 'prefer-template': 'error',\n 'preserve-caught-error': 'error',\n radix: 'error',\n 'symbol-description': 'error',\n 'unicode-bom': 'error',\n yoda: 'error',\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n 'no-unused-vars': 'off',\n\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n },\n },\n]\n","export const GLOB_SRC_EXT = '?([cm])[jt]s?(x)'\nexport const GLOB_SRC = '**/*.?([cm])[jt]s?(x)'\n\nexport const GLOB_JS = '**/*.?([cm])js'\nexport const GLOB_JSX = '**/*.?([cm])jsx'\n\nexport const GLOB_TS = '**/*.?([cm])ts'\nexport const GLOB_TSX = '**/*.?([cm])tsx'\n","import type { FlatConfig, JsxA11yOptions, JsxOptions } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsx = (options: JsxOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsx/setup',\n files: [GLOB_JSX, GLOB_TSX],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n },\n {\n name: 'nelsonlaidev/jsx/rules',\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n 'jsx-a11y': jsxA11yPlugin,\n },\n rules: {\n ...jsxA11yPlugin.flatConfigs.recommended.rules,\n\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/no-aria-hidden-on-focusable': 'error',\n },\n settings: {\n 'jsx-a11y': {\n ...options.a11y,\n components: {\n Button: 'button',\n Image: 'img',\n Input: 'input',\n Textarea: 'textarea',\n Link: 'a',\n ...options.a11y?.components,\n },\n } satisfies JsxA11yOptions,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nextPlugin } from '../plugins'\n\nexport const nextjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/nextjs/rules',\n plugins: {\n '@next/next': nextPlugin,\n },\n rules: {\n ...nextPlugin.configs['core-web-vitals'].rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nodePlugin } from '../plugins'\n\nexport const node = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/node/rules',\n plugins: {\n n: nodePlugin,\n },\n rules: {\n 'n/handle-callback-err': ['error', '^(err|error)$'],\n 'n/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-new-require': 'error',\n 'n/no-path-concat': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/process-exit-as-throw': 'error',\n },\n },\n]\n","import type {\n CanonicalClassesOptions,\n ConsistentClassOrderOptions,\n ExpectExpectOptions,\n MaxNestedDescribeOptions,\n MissingPlaywrightAwaitOptions,\n NoRestrictedClassesOptions,\n NoSkippedTestOptions,\n NoUnknownClassesOptions,\n NoUnnecessaryWhitespaceOptions,\n ValidExpectOptions,\n ValidTestTagsOptions,\n ValidTitleOptions,\n} from './types'\n\nexport const DEFAULT_ROOT_FONT_SIZE = 16\n\nexport const CANONICAL_CLASSES_DEFAULT_OPTIONS: CanonicalClassesOptions = {\n rootFontSize: DEFAULT_ROOT_FONT_SIZE,\n collapse: true,\n logical: true,\n}\n\nexport const CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS: ConsistentClassOrderOptions = {\n order: 'official',\n detectComponentClasses: false,\n componentClassOrder: 'preserve',\n componentClassPosition: 'start',\n unknownClassOrder: 'preserve',\n unknownClassPosition: 'start',\n}\n\nexport const NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS: NoRestrictedClassesOptions = {\n restrict: [],\n}\n\nexport const NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS: NoUnknownClassesOptions = {\n ignore: [],\n detectComponentClasses: false,\n}\n\nexport const NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS: NoUnnecessaryWhitespaceOptions = {\n allowMultiline: true,\n}\n\nexport const EXPECT_EXPECT_DEFAULT_OPTIONS: ExpectExpectOptions = {\n assertFunctionNames: [],\n assertFunctionPatterns: [],\n}\n\nexport const MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS: MaxNestedDescribeOptions = {\n max: 5,\n}\n\nexport const MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS: MissingPlaywrightAwaitOptions = {\n customMatchers: [],\n}\n\nexport const NO_SKIPPED_TEST_DEFAULT_OPTIONS: NoSkippedTestOptions = {\n allowConditional: false,\n}\n\nexport const VALID_EXPECT_DEFAULT_OPTIONS: ValidExpectOptions = {\n minArgs: 1,\n maxArgs: 2,\n}\n\nexport const VALID_TITLE_DEFAULT_OPTIONS: ValidTitleOptions = {\n ignoreSpaces: false,\n ignoreTypeOfStepName: true,\n ignoreTypeOfTestName: false,\n ignoreTypeOfDescribeName: false,\n disallowedWords: [],\n mustNotMatch: {},\n mustMatch: {},\n}\n\nexport const VALID_TEST_TAGS_DEFAULT_OPTIONS: ValidTestTagsOptions = {\n allowedTags: [],\n disallowedTags: [],\n}\n","import type { FlatConfig, PlaywrightOptions } from '../types'\n\nimport globals from 'globals'\n\nimport {\n EXPECT_EXPECT_DEFAULT_OPTIONS,\n MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n VALID_EXPECT_DEFAULT_OPTIONS,\n VALID_TEST_TAGS_DEFAULT_OPTIONS,\n VALID_TITLE_DEFAULT_OPTIONS,\n} from '../defaults'\nimport { playwrightPlugin } from '../plugins'\n\nexport const playwright = (options: PlaywrightOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/playwright/setup',\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n },\n {\n name: 'nelsonlaidev/playwright/rules',\n files: options.files,\n plugins: {\n playwright: playwrightPlugin,\n },\n settings: {\n playwright: {\n globalAliases: options.globalAliases,\n messages: options.messages,\n },\n },\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n 'playwright/expect-expect': [\n 'error',\n {\n ...EXPECT_EXPECT_DEFAULT_OPTIONS,\n ...options.expectExpect,\n assertFunctionNames: [...(options.expectExpect?.assertFunctionNames ?? [])],\n assertFunctionPatterns: [...(options.expectExpect?.assertFunctionPatterns ?? [])],\n },\n ],\n 'playwright/max-nested-describe': [\n 'error',\n {\n ...MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n ...options.maxNestedDescribe,\n },\n ],\n 'playwright/missing-playwright-await': [\n 'error',\n {\n ...MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n ...options.missingPlaywrightAwait,\n customMatchers: [...(options.missingPlaywrightAwait?.customMatchers ?? [])],\n },\n ],\n 'playwright/no-skipped-test': [\n 'error',\n {\n ...NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n ...options.noSkippedTest,\n },\n ],\n 'playwright/valid-expect': [\n 'error',\n {\n ...VALID_EXPECT_DEFAULT_OPTIONS,\n ...options.validExpect,\n },\n ],\n 'playwright/valid-title': [\n 'error',\n {\n ...VALID_TITLE_DEFAULT_OPTIONS,\n ...options.validTitle,\n disallowedWords: [...(options.validTitle?.disallowedWords ?? [])],\n },\n ],\n 'playwright/valid-test-tags': [\n 'error',\n {\n ...VALID_TEST_TAGS_DEFAULT_OPTIONS,\n ...options.validTestTags,\n allowedTags: [...(options.validTestTags?.allowedTags ?? [])],\n disallowedTags: [...(options.validTestTags?.disallowedTags ?? [])],\n },\n ],\n\n 'playwright/no-commented-out-tests': 'error',\n 'playwright/no-duplicate-hooks': 'error',\n 'playwright/no-get-by-title': 'error',\n 'playwright/no-nth-methods': 'error',\n 'playwright/no-raw-locators': 'error',\n 'playwright/no-restricted-locators': 'error',\n 'playwright/no-restricted-matchers': 'error',\n 'playwright/no-slowed-test': 'error',\n 'playwright/prefer-comparison-matcher': 'error',\n 'playwright/prefer-equality-matcher': 'error',\n 'playwright/prefer-hooks-in-order': 'error',\n 'playwright/prefer-hooks-on-top': 'error',\n 'playwright/prefer-locator': 'error',\n 'playwright/prefer-lowercase-title': 'error',\n 'playwright/prefer-native-locators': 'error',\n 'playwright/prefer-strict-equal': 'error',\n 'playwright/prefer-to-be': 'error',\n 'playwright/prefer-to-contain': 'error',\n 'playwright/prefer-to-have-count': 'error',\n 'playwright/prefer-to-have-length': 'error',\n 'playwright/require-hook': 'error',\n 'playwright/require-to-throw-message': 'error',\n 'playwright/require-top-level-describe': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { rules } from 'eslint-config-prettier'\n\nexport const prettier = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/prettier/rules',\n rules,\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { promisePlugin } from '../plugins'\n\nexport const promise = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/promise/rules',\n plugins: {\n promise: promisePlugin,\n },\n rules: {\n 'promise/always-return': 'error',\n 'promise/avoid-new': 'error',\n 'promise/catch-or-return': 'error',\n 'promise/no-callback-in-promise': 'error',\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-nesting': 'error',\n 'promise/no-new-statics': 'error',\n 'promise/no-promise-in-callback': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'promise/param-names': 'error',\n 'promise/prefer-await-to-callbacks': 'error',\n 'promise/prefer-await-to-then': 'error',\n 'promise/prefer-catch': 'error',\n 'promise/spec-only': 'error',\n 'promise/valid-params': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { GLOB_SRC } from '../globs'\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\n\nexport const react = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/react/rules',\n files: [GLOB_SRC],\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n rules: {\n ...reactPlugin.configs.all.rules,\n ...reactHooksPlugin.configs['recommended-latest'].rules,\n\n '@eslint-react/jsx-dollar': 'error',\n '@eslint-react/naming-convention/filename': [\n 'error',\n {\n rule: 'kebab-case',\n excepts: ['index', String.raw`/^_/`, String.raw`/^\\$/`, String.raw`/^[0-9]+$/`, String.raw`/^\\[[^\\]]+\\]$/`],\n },\n ],\n\n // Unnecessary\n '@eslint-react/no-array-index-key': 'off',\n '@eslint-react/naming-convention/use-state': 'off',\n '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',\n 'react-hooks/set-state-in-effect': 'off',\n 'react-hooks/static-components': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { regexpPlugin } from '../plugins'\n\nexport const regexp = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/regexp/rules',\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs.recommended.rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { sonarjsPlugin } from '../plugins'\n\nexport const sonarjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/sonarjs/rules',\n plugins: {\n sonarjs: sonarjsPlugin,\n },\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n\n // Disable due to poor performance\n // https://community.sonarsource.com/t/eslint-plugin-sonarjs-performance-issues-on-large-codebase/138392\n 'sonarjs/no-commented-code': 'off',\n 'sonarjs/deprecation': 'off',\n 'sonarjs/arguments-order': 'off',\n\n // Unnecessary\n 'sonarjs/pseudo-random': 'off',\n 'sonarjs/function-return-type': 'off',\n 'sonarjs/prefer-read-only-props': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { stylisticPlugin } from '../plugins'\n\nexport const stylistic = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/stylistic/rules',\n plugins: {\n '@stylistic': stylisticPlugin,\n },\n rules: {\n '@stylistic/multiline-comment-style': ['error', 'separate-lines'],\n },\n },\n]\n","import type { FlatConfig, TailwindCSSOptions } from '../types'\n\nimport {\n getDefaultAttributes,\n getDefaultCallees,\n getDefaultTags,\n getDefaultVariables,\n} from 'eslint-plugin-better-tailwindcss/api/defaults'\n\nimport {\n CANONICAL_CLASSES_DEFAULT_OPTIONS,\n CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n DEFAULT_ROOT_FONT_SIZE,\n NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n} from '../defaults'\nimport { tailwindcssPlugin } from '../plugins'\n\nexport const tailwindcss = (options: TailwindCSSOptions): FlatConfig[] => {\n const shouldEnableShorthandRule = !options.canonicalClasses || options.canonicalClasses.logical === false\n\n return [\n {\n name: 'nelsonlaidev/tailwindcss/rules',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': [\n 'error',\n {\n ...CANONICAL_CLASSES_DEFAULT_OPTIONS,\n ...options.canonicalClasses,\n },\n ],\n // The below rules are recommended to be disabled to avoid duplicate reports\n // when the canonical classes rule is enabled\n 'better-tailwindcss/enforce-consistent-important-position': 'off',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'off',\n 'better-tailwindcss/enforce-shorthand-classes': shouldEnableShorthandRule ? 'error' : 'off',\n\n 'better-tailwindcss/enforce-consistent-class-order': [\n 'error',\n {\n ...CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n ...options.consistentClassOrder,\n },\n ],\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': [\n 'error',\n {\n ...NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n ...options.noRestrictedClasses,\n restrict: [...(options.noRestrictedClasses?.restrict ?? [])],\n },\n ],\n 'better-tailwindcss/no-unknown-classes': [\n 'error',\n {\n ...NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n ...options.noUnknownClasses,\n ignore: [...(options.noUnknownClasses?.ignore ?? [])],\n },\n ],\n 'better-tailwindcss/no-unnecessary-whitespace': [\n 'error',\n {\n ...NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n ...options.noUnnecessaryWhitespace,\n },\n ],\n },\n settings: {\n 'better-tailwindcss': {\n ...options,\n rootFontSize: options.rootFontSize ?? DEFAULT_ROOT_FONT_SIZE,\n attributes: [...getDefaultAttributes(), ...(options.attributes ?? [])],\n callees: [...getDefaultCallees(), ...(options.callees ?? [])],\n variables: [...getDefaultVariables(), ...(options.variables ?? [])],\n tags: [...getDefaultTags(), ...(options.tags ?? [])],\n } satisfies TailwindCSSOptions,\n },\n },\n ]\n}\n","import type { FlatConfig } from '../types'\n\nimport parser from '@typescript-eslint/parser'\n\nimport { GLOB_TS, GLOB_TSX } from '../globs'\nimport { typescriptPlugin } from '../plugins'\n\nexport const typescript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/typescript/setup',\n languageOptions: {\n parser,\n parserOptions: {\n projectService: true,\n tsconfigRootDir: process.cwd(),\n },\n sourceType: 'module',\n },\n plugins: {\n '@typescript-eslint': typescriptPlugin,\n },\n },\n {\n name: 'nelsonlaidev/typescript/rules',\n files: [GLOB_TS, GLOB_TSX],\n rules: {\n ...typescriptPlugin.configs['eslint-recommended'].overrides[0].rules,\n ...typescriptPlugin.configs['strict-type-checked'].rules,\n ...typescriptPlugin.configs['stylistic-type-checked'].rules,\n\n '@typescript-eslint/no-restricted-types': 'error',\n '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',\n '@typescript-eslint/no-useless-empty-export': 'error',\n '@typescript-eslint/prefer-enum-initializers': 'error',\n '@typescript-eslint/promise-function-async': 'error',\n '@typescript-eslint/require-array-sort-compare': 'error',\n '@typescript-eslint/switch-exhaustiveness-check': 'error',\n '@typescript-eslint/class-methods-use-this': 'error',\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/no-loop-func': 'error',\n '@typescript-eslint/no-invalid-this': 'error',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-import-type-side-effects': 'error',\n '@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n { prefer: 'type-imports', fixStyle: 'separate-type-imports' },\n ],\n '@typescript-eslint/consistent-type-exports': ['error', { fixMixedExportsWithInlineTypeSpecifier: false }],\n '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],\n '@typescript-eslint/only-throw-error': [\n 'error',\n { allow: [{ from: 'package', package: '@tanstack/router-core', name: 'Redirect' }] },\n ],\n '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n name: 'nelsonlaidev/typescript/declarations',\n files: ['**/*.d.ts'],\n rules: {\n // We sometimes need to use `interface` in declaration files,\n // especially when we want to extend from a type from another package,\n // and that type is an interface.\n '@typescript-eslint/consistent-type-definitions': 'off',\n // Similar to the above rule, interfaces support index signatures only when\n // we define object types with them.\n '@typescript-eslint/consistent-indexed-object-style': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { unicornPlugin } from '../plugins'\n\nexport const unicorn = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/unicorn/rules',\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n ...unicornPlugin.configs.recommended.rules,\n\n // Too opinionated\n 'unicorn/prevent-abbreviations': 'off',\n 'unicorn/no-null': 'off',\n\n // Unnecessary\n 'unicorn/no-document-cookie': 'off',\n 'unicorn/prefer-string-raw': 'off',\n },\n },\n]\n","import type { FlatConfig, VitestOptions } from '../types'\n\nimport { vitestPlugin } from '../plugins'\n\nexport const vitest = (options: VitestOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/vitest/rules',\n files: options.files,\n plugins: {\n vitest: vitestPlugin,\n },\n rules: {\n ...vitestPlugin.configs.all.rules,\n\n // Too restrictive\n 'vitest/max-expects': 'off',\n\n 'vitest/consistent-test-it': ['error', { fn: 'test' }],\n 'vitest/prefer-mock-return-shorthand': 'error',\n 'vitest/warn-todo': 'error',\n },\n settings: {\n vitest: {\n typecheck: true,\n },\n },\n languageOptions: {\n globals: {\n ...vitestPlugin.environments.env.globals,\n },\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importZodPlugin } from '../plugins'\n\nexport const zod = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/zod/rules',\n plugins: {\n 'import-zod': importZodPlugin,\n },\n rules: {\n 'import-zod/prefer-zod-namespace': 'error',\n },\n },\n]\n","import type { ConfigOptions, FlatConfig } from './types'\n\nimport { isPackageExists } from 'local-pkg'\n\nimport { command } from './configs/command'\nimport { comments } from './configs/comments'\nimport { deMorgan } from './configs/de-morgan'\nimport { gitignore } from './configs/gitignore'\nimport { ignores } from './configs/ignores'\nimport { importSort } from './configs/import-sort'\nimport { importX } from './configs/import-x'\nimport { javascript } from './configs/javascript'\nimport { jsx } from './configs/jsx'\nimport { nextjs } from './configs/nextjs'\nimport { node } from './configs/node'\nimport { playwright } from './configs/playwright'\nimport { prettier } from './configs/prettier'\nimport { promise } from './configs/promise'\nimport { react } from './configs/react'\nimport { regexp } from './configs/regexp'\nimport { sonarjs } from './configs/sonarjs'\nimport { stylistic } from './configs/stylistic'\nimport { tailwindcss } from './configs/tailwindcss'\nimport { typescript } from './configs/typescript'\nimport { unicorn } from './configs/unicorn'\nimport { vitest } from './configs/vitest'\nimport { zod } from './configs/zod'\n\nconst isReactInstalled = isPackageExists('react')\nconst isNextjsInstalled = isPackageExists('next')\nconst isPrettierInstalled = isPackageExists('prettier')\n\nexport const defineConfig = (options: ConfigOptions = {}, ...userConfigs: FlatConfig[]): FlatConfig[] => {\n const configs = [\n ...gitignore(),\n ...ignores(options.ignores),\n ...javascript(),\n ...sonarjs(),\n ...importSort(),\n ...deMorgan(),\n ...comments(),\n ...node(),\n ...importX(options.importX),\n ...command(),\n ...unicorn(),\n ...jsx(options.jsx ?? {}),\n ...typescript(),\n ...regexp(),\n ...stylistic(),\n ...zod(),\n ...promise(),\n ]\n\n const isNextjsEnabled = options.nextjs ?? isNextjsInstalled\n const isReactEnabled = (options.react ?? isReactInstalled) || isNextjsEnabled\n const isPrettierEnabled = options.prettier ?? isPrettierInstalled\n\n if (options.vitest) {\n configs.push(...vitest(options.vitest))\n }\n\n if (options.playwright) {\n configs.push(...playwright(options.playwright))\n }\n\n if (isReactEnabled) {\n configs.push(...react())\n }\n\n if (isNextjsEnabled) {\n configs.push(...nextjs())\n }\n\n if (options.tailwindcss) {\n configs.push(...tailwindcss(options.tailwindcss))\n }\n\n configs.push(...userConfigs)\n\n if (isPrettierEnabled) {\n // Must be added as the last item\n // https://github.com/prettier/eslint-config-prettier#installation\n configs.push(...prettier())\n }\n\n return configs\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAa,gBAA8B,CACzC;CACE,GAAG,eAAe;CAClB,MAAM;CACP,CACF;;;;ACLD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,qCAAqC,gBACtC;CACD,OAAO;EACL,GAAG,eAAe,QAAQ,YAAY;EAEtC,uDAAuD;EACxD;CACF,CACF;;;;ACZD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,aAAa,gBACd;CACD,OAAO,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AAK,GAAG,OAAO,QAAQ,OAAO,CAAC;AAGzC,KAAI,QAAQ,WACV,SAAQ,KAAK,GAAG,WAAW,QAAQ,WAAW,CAAC;AAGjD,KAAI,eACF,SAAQ,KAAK,GAAG,OAAO,CAAC;AAG1B,KAAI,gBACF,SAAQ,KAAK,GAAG,QAAQ,CAAC;AAG3B,KAAI,QAAQ,YACV,SAAQ,KAAK,GAAG,YAAY,QAAQ,YAAY,CAAC;AAGnD,SAAQ,KAAK,GAAG,YAAY;AAE5B,KAAI,kBAGF,SAAQ,KAAK,GAAG,UAAU,CAAC;AAG7B,QAAO"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/configs/command.ts","../src/configs/comments.ts","../src/configs/de-morgan.ts","../src/configs/gitignore.ts","../src/configs/ignores.ts","../src/configs/import-sort.ts","../src/configs/import-x.ts","../src/configs/javascript.ts","../src/globs.ts","../src/configs/jsx.ts","../src/configs/nextjs.ts","../src/configs/node.ts","../src/defaults.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/promise.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonarjs.ts","../src/configs/stylistic.ts","../src/configs/tailwindcss.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/zod.ts","../src/base.ts"],"sourcesContent":["import type { FlatConfig } from '../types'\n\nimport { commandPlugin } from '../plugins'\n\nexport const command = (): FlatConfig[] => [\n {\n ...commandPlugin(),\n name: 'nelsonlaidev/command/rules',\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { commentsPlugin } from '../plugins'\n\nexport const comments = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/eslint-comments/rules',\n plugins: {\n '@eslint-community/eslint-comments': commentsPlugin,\n },\n rules: {\n ...commentsPlugin.configs.recommended.rules,\n\n '@eslint-community/eslint-comments/no-unused-disable': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { deMorganPlugin } from '../plugins'\n\nexport const deMorgan = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/de-morgan/rules',\n plugins: {\n 'de-morgan': deMorganPlugin,\n },\n rules: {\n ...deMorganPlugin.configs.recommended.rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { gitignorePlugin } from '../plugins'\n\nexport const gitignore = (): FlatConfig[] => [\n gitignorePlugin({\n name: 'nelsonlaidev/gitignore',\n }),\n]\n","import type { FlatConfig } from '../types'\n\nexport const ignores = (userIgnores: string[] = []): FlatConfig[] => [\n {\n name: 'nelsonlaidev/ignores',\n ignores: ['**/routeTree.gen.ts', ...userIgnores],\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importSortPlugin } from '../plugins'\n\nexport const importSort = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-sort/rules',\n plugins: {\n 'import-sort': importSortPlugin,\n },\n rules: {\n 'import-sort/imports': [\n 'error',\n {\n groups: [\n // Type imports (imports ending with \\u0000 are type-only imports)\n // The \\u0000 character is used internally by the import-sort plugin to mark type imports\n [\n String.raw`^.*\\u0000$`,\n String.raw`^node:.*\\u0000$`,\n String.raw`^@?\\w.*\\u0000$`,\n String.raw`^\\.\\..*\\u0000$`,\n String.raw`^\\..*\\u0000$`,\n ],\n\n // Side effect imports (e.g., `import 'some-module'`)\n [String.raw`^\\u0000`],\n\n // Node.js builtins prefixed with `node:`\n ['^node:'],\n\n // Things that start with a letter (or digit or underscore), or `@` followed by a letter\n [String.raw`^@?\\w`],\n\n // Absolute imports (e.g., `import something from 'src/utils'`)\n ['^[^.]'],\n\n // Parent directory relative imports (e.g., `import something from '../utils'`)\n [String.raw`^\\.\\.`],\n\n // Current directory relative imports (e.g., `import something from './utils'`)\n [String.raw`^\\.`],\n ],\n },\n ],\n 'import-sort/exports': 'error',\n },\n },\n]\n","import type { FlatConfig, ImportXOptions } from '../types'\n\nimport { importXPlugin } from '../plugins'\n\nexport const importX = (options: ImportXOptions = {}): FlatConfig[] => [\n {\n name: 'nelsonlaidev/import-x/rules',\n plugins: {\n 'import-x': importXPlugin,\n },\n rules: {\n ...importXPlugin.configs.recommended.rules,\n ...importXPlugin.configs.typescript.rules,\n\n 'import-x/first': 'error',\n 'import-x/newline-after-import': ['error', { count: 1 }],\n 'import-x/no-amd': 'error',\n 'import-x/no-anonymous-default-export': 'error',\n 'import-x/no-commonjs': 'error',\n 'import-x/no-mutable-exports': 'error',\n 'import-x/no-named-default': 'error',\n 'import-x/no-namespace': ['error', { ignore: ['zod', ...(options.noNamespace?.ignore ?? [])] }],\n 'import-x/no-relative-packages': 'error',\n 'import-x/no-self-import': 'error',\n 'import-x/no-extraneous-dependencies': 'error',\n 'import-x/no-absolute-path': 'error',\n 'import-x/no-webpack-loader-syntax': 'error',\n 'import-x/no-dynamic-require': 'error',\n 'import-x/no-unassigned-import': [\n 'error',\n {\n allow: [\n '**/*.css',\n '**/*.scss',\n '**/*.less',\n 'server-only',\n 'client-only',\n '@total-typescript/ts-reset',\n '@testing-library/jest-dom/**',\n '@testing-library/jest-dom',\n 'msw/{node,browser}',\n 'dotenv/config',\n ...(options.noUnassignedImport?.allow ?? []),\n ],\n },\n ],\n 'import-x/no-useless-path-segments': 'error',\n 'import-x/no-import-module-exports': 'error',\n 'import-x/no-empty-named-blocks': 'error',\n 'import-x/no-deprecated': 'error',\n\n // This rule can trigger false positives in TypeScript projects.\n 'import-x/no-named-as-default': 'off',\n },\n settings: {\n ...importXPlugin.configs.typescript.settings,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport eslint from '@eslint/js'\nimport globals from 'globals'\n\nimport { unusedImportsPlugin } from '../plugins'\n\nexport const javascript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/javascript/setup',\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: 'readonly',\n navigator: 'readonly',\n window: 'readonly',\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error',\n },\n },\n {\n name: 'nelsonlaidev/javascript/rules',\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n // Enable more rules\n 'accessor-pairs': 'error',\n 'array-callback-return': 'error',\n 'arrow-body-style': 'error',\n 'block-scoped-var': 'error',\n complexity: 'error',\n 'default-case': 'error',\n 'default-case-last': 'error',\n eqeqeq: 'error',\n 'func-names': 'error',\n 'max-classes-per-file': 'error',\n 'max-depth': 'error',\n 'max-nested-callbacks': 'error',\n 'new-cap': ['error', { capIsNew: false }],\n 'no-alert': 'error',\n 'no-await-in-loop': 'error',\n 'no-bitwise': 'error',\n 'no-caller': 'error',\n 'no-console': ['error', { allow: ['warn', 'error'] }],\n 'no-constructor-return': 'error',\n 'no-else-return': 'error',\n 'no-eq-null': 'error',\n 'no-eval': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-label': 'error',\n 'no-implicit-coercion': 'error',\n 'no-label-var': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-lonely-if': 'error',\n 'no-multi-assign': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-wrappers': 'error',\n 'no-object-constructor': 'error',\n 'no-param-reassign': 'error',\n 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],\n 'no-promise-executor-return': 'error',\n 'no-restricted-globals': 'error',\n 'no-return-assign': 'error',\n 'no-script-url': 'error',\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-unassigned-vars': 'error',\n 'no-unneeded-ternary': 'error',\n 'no-useless-call': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-concat': 'error',\n 'no-useless-rename': 'error',\n 'no-useless-return': 'error',\n 'no-void': ['error', { allowAsStatement: true }],\n 'no-warning-comments': 'error',\n 'operator-assignment': 'error',\n 'prefer-destructuring': [\n 'error',\n {\n VariableDeclarator: { array: false, object: true },\n AssignmentExpression: { array: false, object: false },\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-numeric-literals': 'error',\n 'prefer-object-has-own': 'error',\n 'prefer-object-spread': 'error',\n 'prefer-template': 'error',\n 'preserve-caught-error': 'error',\n radix: 'error',\n 'symbol-description': 'error',\n 'unicode-bom': 'error',\n yoda: 'error',\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n 'no-unused-vars': 'off',\n\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n },\n },\n]\n","export const GLOB_SRC_EXT = '?([cm])[jt]s?(x)'\nexport const GLOB_SRC = '**/*.?([cm])[jt]s?(x)'\n\nexport const GLOB_JS = '**/*.?([cm])js'\nexport const GLOB_JSX = '**/*.?([cm])jsx'\n\nexport const GLOB_TS = '**/*.?([cm])ts'\nexport const GLOB_TSX = '**/*.?([cm])tsx'\n","import type { FlatConfig, JsxA11yOptions, JsxOptions } from '../types'\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs'\nimport { jsxA11yPlugin } from '../plugins'\n\nexport const jsx = (options: JsxOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/jsx/setup',\n files: [GLOB_JSX, GLOB_TSX],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n },\n {\n name: 'nelsonlaidev/jsx/rules',\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n 'jsx-a11y': jsxA11yPlugin,\n },\n rules: {\n ...jsxA11yPlugin.flatConfigs.recommended.rules,\n\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/no-aria-hidden-on-focusable': 'error',\n },\n settings: {\n 'jsx-a11y': {\n ...options.a11y,\n components: {\n Button: 'button',\n Image: 'img',\n Input: 'input',\n Textarea: 'textarea',\n Link: 'a',\n ...options.a11y?.components,\n },\n } satisfies JsxA11yOptions,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nextPlugin } from '../plugins'\n\nexport const nextjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/nextjs/rules',\n plugins: {\n '@next/next': nextPlugin,\n },\n rules: {\n ...nextPlugin.configs['core-web-vitals'].rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { nodePlugin } from '../plugins'\n\nexport const node = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/node/rules',\n plugins: {\n n: nodePlugin,\n },\n rules: {\n 'n/handle-callback-err': ['error', '^(err|error)$'],\n 'n/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-new-require': 'error',\n 'n/no-path-concat': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/process-exit-as-throw': 'error',\n },\n },\n]\n","import type {\n CanonicalClassesOptions,\n ConsistentClassOrderOptions,\n ExpectExpectOptions,\n MaxNestedDescribeOptions,\n MissingPlaywrightAwaitOptions,\n NoRestrictedClassesOptions,\n NoSkippedTestOptions,\n NoUnknownClassesOptions,\n NoUnnecessaryWhitespaceOptions,\n ValidExpectOptions,\n ValidTestTagsOptions,\n ValidTitleOptions,\n} from './types'\n\nexport const DEFAULT_ROOT_FONT_SIZE = 16\n\nexport const CANONICAL_CLASSES_DEFAULT_OPTIONS: CanonicalClassesOptions = {\n rootFontSize: DEFAULT_ROOT_FONT_SIZE,\n collapse: true,\n logical: true,\n}\n\nexport const CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS: ConsistentClassOrderOptions = {\n order: 'official',\n detectComponentClasses: false,\n componentClassOrder: 'preserve',\n componentClassPosition: 'start',\n unknownClassOrder: 'preserve',\n unknownClassPosition: 'start',\n}\n\nexport const NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS: NoRestrictedClassesOptions = {\n restrict: [],\n}\n\nexport const NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS: NoUnknownClassesOptions = {\n ignore: [],\n detectComponentClasses: false,\n}\n\nexport const NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS: NoUnnecessaryWhitespaceOptions = {\n allowMultiline: true,\n}\n\nexport const EXPECT_EXPECT_DEFAULT_OPTIONS: ExpectExpectOptions = {\n assertFunctionNames: [],\n assertFunctionPatterns: [],\n}\n\nexport const MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS: MaxNestedDescribeOptions = {\n max: 5,\n}\n\nexport const MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS: MissingPlaywrightAwaitOptions = {\n customMatchers: [],\n}\n\nexport const NO_SKIPPED_TEST_DEFAULT_OPTIONS: NoSkippedTestOptions = {\n allowConditional: false,\n}\n\nexport const VALID_EXPECT_DEFAULT_OPTIONS: ValidExpectOptions = {\n minArgs: 1,\n maxArgs: 2,\n}\n\nexport const VALID_TITLE_DEFAULT_OPTIONS: ValidTitleOptions = {\n ignoreSpaces: false,\n ignoreTypeOfStepName: true,\n ignoreTypeOfTestName: false,\n ignoreTypeOfDescribeName: false,\n disallowedWords: [],\n mustNotMatch: {},\n mustMatch: {},\n}\n\nexport const VALID_TEST_TAGS_DEFAULT_OPTIONS: ValidTestTagsOptions = {\n allowedTags: [],\n disallowedTags: [],\n}\n","import type { FlatConfig, PlaywrightOptions } from '../types'\n\nimport globals from 'globals'\n\nimport {\n EXPECT_EXPECT_DEFAULT_OPTIONS,\n MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n VALID_EXPECT_DEFAULT_OPTIONS,\n VALID_TEST_TAGS_DEFAULT_OPTIONS,\n VALID_TITLE_DEFAULT_OPTIONS,\n} from '../defaults'\nimport { playwrightPlugin } from '../plugins'\n\nexport const playwright = (options: PlaywrightOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/playwright/setup',\n languageOptions: {\n globals: globals['shared-node-browser'],\n },\n },\n {\n name: 'nelsonlaidev/playwright/rules',\n files: options.files,\n plugins: {\n playwright: playwrightPlugin,\n },\n settings: {\n playwright: {\n globalAliases: options.globalAliases,\n messages: options.messages,\n },\n },\n rules: {\n ...playwrightPlugin.configs.recommended.rules,\n 'playwright/expect-expect': [\n 'error',\n {\n ...EXPECT_EXPECT_DEFAULT_OPTIONS,\n ...options.expectExpect,\n assertFunctionNames: [...(options.expectExpect?.assertFunctionNames ?? [])],\n assertFunctionPatterns: [...(options.expectExpect?.assertFunctionPatterns ?? [])],\n },\n ],\n 'playwright/max-nested-describe': [\n 'error',\n {\n ...MAX_NESTED_DESCRIBE_DEFAULT_OPTIONS,\n ...options.maxNestedDescribe,\n },\n ],\n 'playwright/missing-playwright-await': [\n 'error',\n {\n ...MISSING_PLAYWRIGHT_AWAIT_DEFAULT_OPTIONS,\n ...options.missingPlaywrightAwait,\n customMatchers: [...(options.missingPlaywrightAwait?.customMatchers ?? [])],\n },\n ],\n 'playwright/no-skipped-test': [\n 'error',\n {\n ...NO_SKIPPED_TEST_DEFAULT_OPTIONS,\n ...options.noSkippedTest,\n },\n ],\n 'playwright/valid-expect': [\n 'error',\n {\n ...VALID_EXPECT_DEFAULT_OPTIONS,\n ...options.validExpect,\n },\n ],\n 'playwright/valid-title': [\n 'error',\n {\n ...VALID_TITLE_DEFAULT_OPTIONS,\n ...options.validTitle,\n disallowedWords: [...(options.validTitle?.disallowedWords ?? [])],\n },\n ],\n 'playwright/valid-test-tags': [\n 'error',\n {\n ...VALID_TEST_TAGS_DEFAULT_OPTIONS,\n ...options.validTestTags,\n allowedTags: [...(options.validTestTags?.allowedTags ?? [])],\n disallowedTags: [...(options.validTestTags?.disallowedTags ?? [])],\n },\n ],\n\n 'playwright/no-commented-out-tests': 'error',\n 'playwright/no-duplicate-hooks': 'error',\n 'playwright/no-get-by-title': 'error',\n 'playwright/no-nth-methods': 'error',\n 'playwright/no-raw-locators': 'error',\n 'playwright/no-restricted-locators': 'error',\n 'playwright/no-restricted-matchers': 'error',\n 'playwright/no-slowed-test': 'error',\n 'playwright/prefer-comparison-matcher': 'error',\n 'playwright/prefer-equality-matcher': 'error',\n 'playwright/prefer-hooks-in-order': 'error',\n 'playwright/prefer-hooks-on-top': 'error',\n 'playwright/prefer-locator': 'error',\n 'playwright/prefer-lowercase-title': 'error',\n 'playwright/prefer-native-locators': 'error',\n 'playwright/prefer-strict-equal': 'error',\n 'playwright/prefer-to-be': 'error',\n 'playwright/prefer-to-contain': 'error',\n 'playwright/prefer-to-have-count': 'error',\n 'playwright/prefer-to-have-length': 'error',\n 'playwright/require-hook': 'error',\n 'playwright/require-to-throw-message': 'error',\n 'playwright/require-top-level-describe': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { rules } from 'eslint-config-prettier'\n\nexport const prettier = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/prettier/rules',\n rules,\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { promisePlugin } from '../plugins'\n\nexport const promise = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/promise/rules',\n plugins: {\n promise: promisePlugin,\n },\n rules: {\n 'promise/always-return': 'error',\n 'promise/avoid-new': 'error',\n 'promise/catch-or-return': 'error',\n 'promise/no-callback-in-promise': 'error',\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-nesting': 'error',\n 'promise/no-new-statics': 'error',\n 'promise/no-promise-in-callback': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'promise/param-names': 'error',\n 'promise/prefer-await-to-callbacks': 'error',\n 'promise/prefer-await-to-then': 'error',\n 'promise/prefer-catch': 'error',\n 'promise/spec-only': 'error',\n 'promise/valid-params': 'error',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { GLOB_SRC } from '../globs'\nimport { reactHooksPlugin, reactPlugin } from '../plugins'\n\nexport const react = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/react/rules',\n files: [GLOB_SRC],\n plugins: {\n ...reactPlugin.configs.all.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n rules: {\n ...reactPlugin.configs.all.rules,\n ...reactHooksPlugin.configs['recommended-latest'].rules,\n\n '@eslint-react/jsx-dollar': 'error',\n '@eslint-react/naming-convention/filename': [\n 'error',\n {\n rule: 'kebab-case',\n excepts: ['index', String.raw`/^_/`, String.raw`/^\\$/`, String.raw`/^[0-9]+$/`, String.raw`/^\\[[^\\]]+\\]$/`],\n },\n ],\n\n // Unnecessary\n '@eslint-react/no-array-index-key': 'off',\n '@eslint-react/naming-convention/use-state': 'off',\n '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',\n 'react-hooks/set-state-in-effect': 'off',\n 'react-hooks/static-components': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { regexpPlugin } from '../plugins'\n\nexport const regexp = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/regexp/rules',\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs.recommended.rules,\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { sonarjsPlugin } from '../plugins'\n\nexport const sonarjs = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/sonarjs/rules',\n plugins: {\n sonarjs: sonarjsPlugin,\n },\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n\n // Disable due to poor performance\n // https://community.sonarsource.com/t/eslint-plugin-sonarjs-performance-issues-on-large-codebase/138392\n 'sonarjs/no-commented-code': 'off',\n 'sonarjs/deprecation': 'off',\n 'sonarjs/arguments-order': 'off',\n\n // Unnecessary\n 'sonarjs/pseudo-random': 'off',\n 'sonarjs/function-return-type': 'off',\n 'sonarjs/prefer-read-only-props': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { stylisticPlugin } from '../plugins'\n\nexport const stylistic = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/stylistic/rules',\n plugins: {\n '@stylistic': stylisticPlugin,\n },\n rules: {\n '@stylistic/multiline-comment-style': ['error', 'separate-lines'],\n },\n },\n]\n","import type { FlatConfig, TailwindCSSOptions } from '../types'\n\nimport {\n getDefaultAttributes,\n getDefaultCallees,\n getDefaultTags,\n getDefaultVariables,\n} from 'eslint-plugin-better-tailwindcss/api/defaults'\n\nimport {\n CANONICAL_CLASSES_DEFAULT_OPTIONS,\n CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n DEFAULT_ROOT_FONT_SIZE,\n NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n} from '../defaults'\nimport { tailwindcssPlugin } from '../plugins'\n\nexport const tailwindcss = (options: TailwindCSSOptions): FlatConfig[] => {\n const shouldEnableShorthandRule = !options.canonicalClasses || options.canonicalClasses.logical === false\n\n return [\n {\n name: 'nelsonlaidev/tailwindcss/rules',\n plugins: {\n 'better-tailwindcss': tailwindcssPlugin,\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': [\n 'error',\n {\n ...CANONICAL_CLASSES_DEFAULT_OPTIONS,\n ...options.canonicalClasses,\n },\n ],\n // The below rules are recommended to be disabled to avoid duplicate reports\n // when the canonical classes rule is enabled\n 'better-tailwindcss/enforce-consistent-important-position': 'off',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'off',\n 'better-tailwindcss/enforce-shorthand-classes': shouldEnableShorthandRule ? 'error' : 'off',\n\n 'better-tailwindcss/enforce-consistent-class-order': [\n 'error',\n {\n ...CONSISTENT_CLASS_ORDER_DEFAULT_OPTIONS,\n ...options.consistentClassOrder,\n },\n ],\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': [\n 'error',\n {\n ...NO_RESTRICTED_CLASSES_DEFAULT_OPTIONS,\n ...options.noRestrictedClasses,\n restrict: [...(options.noRestrictedClasses?.restrict ?? [])],\n },\n ],\n 'better-tailwindcss/no-unknown-classes': [\n 'error',\n {\n ...NO_UNKNOWN_CLASSES_DEFAULT_OPTIONS,\n ...options.noUnknownClasses,\n ignore: [...(options.noUnknownClasses?.ignore ?? [])],\n },\n ],\n 'better-tailwindcss/no-unnecessary-whitespace': [\n 'error',\n {\n ...NO_UNNECESSARY_WHITESPACE_DEFAULT_OPTIONS,\n ...options.noUnnecessaryWhitespace,\n },\n ],\n },\n settings: {\n 'better-tailwindcss': {\n ...options,\n rootFontSize: options.rootFontSize ?? DEFAULT_ROOT_FONT_SIZE,\n attributes: [...getDefaultAttributes(), ...(options.attributes ?? [])],\n callees: [...getDefaultCallees(), ...(options.callees ?? [])],\n variables: [...getDefaultVariables(), ...(options.variables ?? [])],\n tags: [...getDefaultTags(), ...(options.tags ?? [])],\n } satisfies TailwindCSSOptions,\n },\n },\n ]\n}\n","import type { FlatConfig } from '../types'\n\nimport parser from '@typescript-eslint/parser'\n\nimport { GLOB_TS, GLOB_TSX } from '../globs'\nimport { typescriptPlugin } from '../plugins'\n\nexport const typescript = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/typescript/setup',\n languageOptions: {\n parser,\n parserOptions: {\n projectService: true,\n tsconfigRootDir: process.cwd(),\n },\n sourceType: 'module',\n },\n plugins: {\n '@typescript-eslint': typescriptPlugin,\n },\n },\n {\n name: 'nelsonlaidev/typescript/rules',\n files: [GLOB_TS, GLOB_TSX],\n rules: {\n ...typescriptPlugin.configs['eslint-recommended'].overrides[0].rules,\n ...typescriptPlugin.configs['strict-type-checked'].rules,\n ...typescriptPlugin.configs['stylistic-type-checked'].rules,\n\n '@typescript-eslint/no-restricted-types': 'error',\n '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',\n '@typescript-eslint/no-useless-empty-export': 'error',\n '@typescript-eslint/prefer-enum-initializers': 'error',\n '@typescript-eslint/promise-function-async': 'error',\n '@typescript-eslint/require-array-sort-compare': 'error',\n '@typescript-eslint/switch-exhaustiveness-check': 'error',\n '@typescript-eslint/class-methods-use-this': 'error',\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/no-loop-func': 'error',\n '@typescript-eslint/no-invalid-this': 'error',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-import-type-side-effects': 'error',\n '@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n { prefer: 'type-imports', fixStyle: 'separate-type-imports' },\n ],\n '@typescript-eslint/consistent-type-exports': ['error', { fixMixedExportsWithInlineTypeSpecifier: false }],\n '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],\n '@typescript-eslint/only-throw-error': [\n 'error',\n { allow: [{ from: 'package', package: '@tanstack/router-core', name: 'Redirect' }] },\n ],\n '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],\n\n // Recommended to disable\n // https://github.com/sweepline/eslint-plugin-unused-imports?tab=readme-ov-file#usage\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n name: 'nelsonlaidev/typescript/declarations',\n files: ['**/*.d.ts'],\n rules: {\n // We sometimes need to use `interface` in declaration files,\n // especially when we want to extend from a type from another package,\n // and that type is an interface.\n '@typescript-eslint/consistent-type-definitions': 'off',\n // Similar to the above rule, interfaces support index signatures only when\n // we define object types with them.\n '@typescript-eslint/consistent-indexed-object-style': 'off',\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { unicornPlugin } from '../plugins'\n\nexport const unicorn = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/unicorn/rules',\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n ...unicornPlugin.configs.recommended.rules,\n\n 'unicorn/text-encoding-identifier-case': ['error', { withDash: true }],\n\n // Too opinionated\n 'unicorn/prevent-abbreviations': 'off',\n 'unicorn/no-null': 'off',\n\n // Unnecessary\n 'unicorn/no-document-cookie': 'off',\n 'unicorn/prefer-string-raw': 'off',\n },\n },\n]\n","import type { FlatConfig, VitestOptions } from '../types'\n\nimport { vitestPlugin } from '../plugins'\n\nexport const vitest = (options: VitestOptions): FlatConfig[] => [\n {\n name: 'nelsonlaidev/vitest/rules',\n files: options.files,\n plugins: {\n vitest: vitestPlugin,\n },\n rules: {\n ...vitestPlugin.configs.all.rules,\n\n // Too restrictive\n 'vitest/max-expects': 'off',\n\n 'vitest/consistent-test-it': ['error', { fn: 'test' }],\n 'vitest/prefer-mock-return-shorthand': 'error',\n 'vitest/warn-todo': 'error',\n },\n settings: {\n vitest: {\n typecheck: true,\n },\n },\n languageOptions: {\n globals: {\n ...vitestPlugin.environments.env.globals,\n },\n },\n },\n]\n","import type { FlatConfig } from '../types'\n\nimport { importZodPlugin } from '../plugins'\n\nexport const zod = (): FlatConfig[] => [\n {\n name: 'nelsonlaidev/zod/rules',\n plugins: {\n 'import-zod': importZodPlugin,\n },\n rules: {\n 'import-zod/prefer-zod-namespace': 'error',\n },\n },\n]\n","import type { ConfigOptions, FlatConfig } from './types'\n\nimport { isPackageExists } from 'local-pkg'\n\nimport { command } from './configs/command'\nimport { comments } from './configs/comments'\nimport { deMorgan } from './configs/de-morgan'\nimport { gitignore } from './configs/gitignore'\nimport { ignores } from './configs/ignores'\nimport { importSort } from './configs/import-sort'\nimport { importX } from './configs/import-x'\nimport { javascript } from './configs/javascript'\nimport { jsx } from './configs/jsx'\nimport { nextjs } from './configs/nextjs'\nimport { node } from './configs/node'\nimport { playwright } from './configs/playwright'\nimport { prettier } from './configs/prettier'\nimport { promise } from './configs/promise'\nimport { react } from './configs/react'\nimport { regexp } from './configs/regexp'\nimport { sonarjs } from './configs/sonarjs'\nimport { stylistic } from './configs/stylistic'\nimport { tailwindcss } from './configs/tailwindcss'\nimport { typescript } from './configs/typescript'\nimport { unicorn } from './configs/unicorn'\nimport { vitest } from './configs/vitest'\nimport { zod } from './configs/zod'\n\nconst isReactInstalled = isPackageExists('react')\nconst isNextjsInstalled = isPackageExists('next')\nconst isPrettierInstalled = isPackageExists('prettier')\n\nexport const defineConfig = (options: ConfigOptions = {}, ...userConfigs: FlatConfig[]): FlatConfig[] => {\n const configs = [\n ...gitignore(),\n ...ignores(options.ignores),\n ...javascript(),\n ...sonarjs(),\n ...importSort(),\n ...deMorgan(),\n ...comments(),\n ...node(),\n ...importX(options.importX),\n ...command(),\n ...unicorn(),\n ...jsx(options.jsx ?? {}),\n ...typescript(),\n ...regexp(),\n ...stylistic(),\n ...zod(),\n ...promise(),\n ]\n\n const isNextjsEnabled = options.nextjs ?? isNextjsInstalled\n const isReactEnabled = (options.react ?? isReactInstalled) || isNextjsEnabled\n const isPrettierEnabled = options.prettier ?? isPrettierInstalled\n\n if (options.vitest) {\n configs.push(...vitest(options.vitest))\n }\n\n if (options.playwright) {\n configs.push(...playwright(options.playwright))\n }\n\n if (isReactEnabled) {\n configs.push(...react())\n }\n\n if (isNextjsEnabled) {\n configs.push(...nextjs())\n }\n\n if (options.tailwindcss) {\n configs.push(...tailwindcss(options.tailwindcss))\n }\n\n configs.push(...userConfigs)\n\n if (isPrettierEnabled) {\n // Must be added as the last item\n // https://github.com/prettier/eslint-config-prettier#installation\n configs.push(...prettier())\n }\n\n return configs\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAa,gBAA8B,CACzC;CACE,GAAG,eAAe;CAClB,MAAM;CACP,CACF;;;;ACLD,MAAa,iBAA+B,CAC1C;CACE,MAAM;CACN,SAAS,EACP,qCAAqC,gBACtC;CACD,OAAO;EACL,GAAG,eAAe,QAAQ,YAAY;EAEtC,uDAAuD;EACxD;CACF,CACF;;;;ACZD,MAAa,iBAA+B,CAC1C;CACE,MAAM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,QAAQ,SAAS,qBAAqB;CAC9D,MAAM,oBAAoB,QAAQ,YAAY;AAE9C,KAAI,QAAQ,OACV,SAAQ,KAAK,GAAG,OAAO,QAAQ,OAAO,CAAC;AAGzC,KAAI,QAAQ,WACV,SAAQ,KAAK,GAAG,WAAW,QAAQ,WAAW,CAAC;AAGjD,KAAI,eACF,SAAQ,KAAK,GAAG,OAAO,CAAC;AAG1B,KAAI,gBACF,SAAQ,KAAK,GAAG,QAAQ,CAAC;AAG3B,KAAI,QAAQ,YACV,SAAQ,KAAK,GAAG,YAAY,QAAQ,YAAY,CAAC;AAGnD,SAAQ,KAAK,GAAG,YAAY;AAE5B,KAAI,kBAGF,SAAQ,KAAK,GAAG,UAAU,CAAC;AAG7B,QAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nelsonlaidev/eslint-config",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "homepage": "https://github.com/nelsonlaidev/config/blob/main/packages/eslint-config/README.md",
5
5
  "bugs": {
6
6
  "url": "https://github.com/nelsonlaidev/config/issues"