@2digits/eslint-config 2.12.3 → 2.13.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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs/antfu.ts","../src/constants.ts","../src/configs/comments.ts","../src/utils.ts","../src/configs/drizzle.ts","../src/configs/graphql.ts","../src/globs.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/next.ts","../src/configs/node.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonar.ts","../src/configs/storybook.ts","../src/configs/tailwind.ts","../src/configs/tanstack.ts","../src/configs/turbo.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/factory.ts"],"names":["antfu","pluginAntfu","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","interopDefault","m","resolved","drizzle","options","overrides","drizzleObjectName","fixupPluginRules","graphql","files","gql","gqlSchema","loadConfig","g","flatRecommended","rules","rule","ruleName","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"knBAIO,SAASA,CAAAA,EAA+B,CAC7C,OAAO,CACL,CACE,IAAA,CAAM,gBACN,OAAS,CAAA,CACP,KAAOC,CAAAA,CACT,EACA,KAAO,CAAA,CACL,kBAAoB,CAAA,OAAA,CACpB,0BAA4B,CAAA,OAC9B,CACF,CACF,CACF,CCjBO,IAAM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,CAAAA,CAAAA,CAAQ,QAAQ,CAAC,CAAC,CAG3D0D,CAAAA,CAAAA,CAAAA,CAAQ1D,CAAQ,CAAA,OAAA,CAASgE,eAAgB,CAAA,aAAa,CAAKA,EAAAA,eAAAA,CAAgB,aAAa,CAAC,CAAA,GAC3F3C,CAAWA,CAAAA,CAAAA,CAAS,OAAOtB,CAAQiD,CAAAA,CAAAA,CAAOhD,CAAQ,CAAA,OAAO,CAAC,CAAC,CAAA,CAAA,CAGzD0D,CAAQ1D,CAAAA,CAAAA,CAAQ,OAASgE,CAAAA,eAAAA,CAAgB,SAAS,CAAC,IACrD3C,CAAWA,CAAAA,CAAAA,CAAS,MAAOjB,CAAAA,CAAAA,CAAQ4C,EAAOhD,CAAQ,CAAA,OAAO,CAAC,CAAC,GAG7DqB,CAAWA,CAAAA,CAAAA,CAAS,MAAO,CAAA,GAAGyC,CAAU,CAEpCE,CAAAA,eAAAA,CAAgB,UAAU,CAAA,GAC5B3C,EAAWA,CAAS,CAAA,MAAA,CAAOU,CAAS,EAAC,GAGhCV,CAAS,CAAA,aAAA,CAAc/B,CAAa,CAAA,CAAE,WAC/C","file":"index.js","sourcesContent":["import pluginAntfu from 'eslint-plugin-antfu';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:antfu',\n plugins: {\n antfu: pluginAntfu,\n },\n rules: {\n 'antfu/if-newline': 'error',\n 'antfu/top-level-function': 'error',\n },\n },\n ];\n}\n","export const PluginNameMap = {\n '@next/next': 'next',\n '@eslint-react/naming-convention': 'react-naming-convention',\n '@eslint-react/hooks-extra': 'react-hooks-extra',\n '@eslint-react/dom': 'react-dom',\n '@eslint-react/web-api': 'react-web-api',\n '@eslint-react': 'react-extra',\n 'react-hooks': 'react-hooks',\n 'react-compiler': 'react-compiler',\n react: 'react',\n '@typescript-eslint': 'ts',\n node: 'node',\n '@eslint-community/eslint-comments': 'comments',\n storybook: 'storybook',\n turbo: 'turbo',\n jsdoc: 'jsdoc',\n unicorn: 'unicorn',\n tailwindcss: 'tailwindcss',\n '@tanstack/query': 'tanstack',\n '@2digits': '@2digits',\n '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n drizzle: 'drizzle',\n} as const;\n","import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';\nimport configs from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:comments',\n plugins: {\n comments: pluginComments,\n },\n rules: {\n ...recommended,\n\n 'comments/no-unused-disable': 'error',\n 'comments/disable-enable-pair': ['error', { allowWholeFile: true }],\n },\n },\n ];\n}\n","import type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(\n m: Awaitable<T>,\n): Promise<T extends { default: infer U } ? U : T> {\n const resolved = await m;\n\n return ((resolved as Record<string, unknown>).default || resolved) as never;\n}\n","import { fixupPluginRules } from '@eslint/compat';\n\nimport type { OptionsWithDrizzle, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function drizzle(options: OptionsWithDrizzle = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, drizzleObjectName = ['drizzle', 'db'] } = options;\n\n const drizzle = await interopDefault(import('eslint-plugin-drizzle'));\n\n return [\n {\n name: '2digits:drizzle',\n plugins: {\n drizzle: fixupPluginRules(drizzle as never),\n },\n rules: {\n 'drizzle/enforce-update-with-where': ['error', { drizzleObjectName }],\n 'drizzle/enforce-delete-with-where': ['error', { drizzleObjectName }],\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\nimport { loadConfig } from 'graphql-config';\n\nimport { PluginNameMap } from '../constants';\nimport type { OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function graphql(options: OptionsWithFiles = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, files = ['**/*.graphql', '**/*.gql'] } = options;\n\n const [gql, gqlSchema] = await Promise.all([\n interopDefault(import('@graphql-eslint/eslint-plugin')),\n loadConfig({ throwOnEmpty: false, throwOnMissing: false }).then((g) => g?.getDefault().schema),\n ]);\n\n const flatRecommended = gql.configs['flat/operations-recommended'].rules;\n\n let rules = {} as typeof flatRecommended;\n\n if (gqlSchema) {\n rules = flatRecommended;\n } else {\n for (const rule of Object.keys(flatRecommended) as Array<keyof typeof rules>) {\n const ruleName = rule.replace('@graphql-eslint/', '') as keyof typeof gql.rules;\n if (\n ruleName in gql.rules &&\n (gql.rules[ruleName].meta.docs?.requiresSchema ||\n gql.rules[ruleName].meta.docs?.requiresSiblings)\n ) {\n continue;\n }\n rules[rule] = flatRecommended[rule] as never;\n }\n }\n\n const recommended = renamePluginsInRules(rules, PluginNameMap);\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql,\n },\n languageOptions: {\n parser: gql.parser,\n },\n files,\n rules: {\n ...recommended,\n\n 'gql/naming-convention': ['error', { allowLeadingUnderscore: true } as never],\n\n ...overrides,\n },\n },\n ];\n}\n","export const GLOB_SRC = '**/*.?([cm])[jt]s?(x)';\n\nexport const GLOB_TS = '**/*.?([cm])ts';\nexport const GLOB_TSX = '**/*.?([cm])tsx';\n\nexport const GLOB_STORIES = '**/*.stories.tsx';\n\nexport const GLOB_EXCLUDE = [\n '**/node_modules',\n '**/dist',\n '**/package-lock.json',\n '**/yarn.lock',\n '**/pnpm-lock.yaml',\n '**/bun.lockb',\n\n '**/output',\n '**/coverage',\n '**/temp',\n '**/.temp',\n '**/tmp',\n '**/.tmp',\n '**/.history',\n '**/.vitepress/cache',\n '**/.nuxt',\n '**/.next',\n '**/.vercel',\n '**/.changeset',\n '**/.idea',\n '**/.cache',\n '**/.output',\n '**/.vite-inspect',\n '**/.yarn',\n\n '**/CHANGELOG*.md',\n '**/*.min.*',\n '**/LICENSE*',\n '**/__snapshots__',\n '**/auto-import?(s).d.ts',\n '**/components.d.ts',\n] as const;\n","import { composer } from 'eslint-flat-config-utils';\n\nimport { GLOB_EXCLUDE } from '../globs';\nimport type { OptionsWithIgnores, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function ignores(options: OptionsWithIgnores = {}): Promise<TypedFlatConfigItem[]> {\n const { gitIgnore, ignores = [] } = options;\n\n return composer(\n {\n ignores: [GLOB_EXCLUDE, ignores].flat(),\n name: '2digits:ignores',\n },\n interopDefault(import('eslint-config-flat-gitignore')).then((m) =>\n m({ strict: false, ...gitIgnore, name: '2digits:gitignore' }),\n ),\n );\n}\n","import eslint from '@eslint/js';\nimport globals from 'globals';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n name: '2digits:javascript',\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: true,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n 'accessor-pairs': ['error', { enforceForClassMembers: true, setWithoutGet: true }],\n 'array-callback-return': 'error',\n 'block-scoped-var': 'error',\n 'constructor-super': 'error',\n 'default-case-last': 'error',\n 'dot-notation': ['error', { allowKeywords: true }],\n eqeqeq: ['error', 'smart'],\n 'new-cap': ['error', { capIsNew: false, newIsCap: true, properties: true }],\n 'no-alert': 'error',\n 'no-array-constructor': 'error',\n 'no-async-promise-executor': 'error',\n 'no-caller': 'error',\n 'no-case-declarations': 'error',\n 'no-class-assign': 'error',\n 'no-compare-neg-zero': 'error',\n 'no-cond-assign': ['error', 'always'],\n 'no-const-assign': 'error',\n 'no-control-regex': 'error',\n 'no-debugger': 'error',\n 'no-delete-var': 'error',\n 'no-dupe-args': 'error',\n 'no-dupe-class-members': 'error',\n 'no-dupe-keys': 'error',\n 'no-duplicate-case': 'error',\n 'no-empty': ['error', { allowEmptyCatch: true }],\n 'no-empty-character-class': 'error',\n 'no-empty-pattern': 'error',\n 'no-eval': 'error',\n 'no-ex-assign': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-boolean-cast': 'error',\n 'no-fallthrough': 'error',\n 'no-func-assign': 'error',\n 'no-global-assign': 'error',\n 'no-implied-eval': 'error',\n 'no-import-assign': 'error',\n 'no-invalid-regexp': 'error',\n 'no-irregular-whitespace': 'error',\n 'no-iterator': 'error',\n 'no-labels': ['error', { allowLoop: false, allowSwitch: false }],\n 'no-lone-blocks': 'error',\n 'no-loss-of-precision': 'error',\n 'no-misleading-character-class': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-native-nonconstructor': 'error',\n 'no-new-wrappers': 'error',\n 'no-obj-calls': 'error',\n 'no-octal': 'error',\n 'no-octal-escape': 'error',\n 'no-proto': 'error',\n 'no-prototype-builtins': 'error',\n 'no-redeclare': ['error', { builtinGlobals: false }],\n 'no-regex-spaces': 'error',\n 'no-restricted-globals': [\n 'error',\n { message: 'Use `globalThis` instead.', name: 'global' },\n { message: 'Use `globalThis` instead.', name: 'self' },\n ],\n 'no-restricted-properties': [\n 'error',\n {\n message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.',\n property: '__proto__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineGetter__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineSetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupGetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupSetter__',\n },\n ],\n 'no-restricted-syntax': [\n 'error',\n 'DebuggerStatement',\n 'LabeledStatement',\n 'WithStatement',\n 'TSEnumDeclaration',\n 'TSExportAssignment',\n ],\n 'no-self-assign': ['error', { props: true }],\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-shadow-restricted-names': 'error',\n 'no-sparse-arrays': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-this-before-super': 'error',\n 'no-throw-literal': 'error',\n 'no-undef': 'error',\n 'no-undef-init': 'error',\n 'no-unexpected-multiline': 'error',\n 'no-unmodified-loop-condition': 'error',\n 'no-unneeded-ternary': ['error', { defaultAssignment: false }],\n 'no-unreachable': 'error',\n 'no-unreachable-loop': 'error',\n 'no-unsafe-finally': 'error',\n 'no-unsafe-negation': 'error',\n 'no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n 'no-unused-vars': [\n 'error',\n {\n args: 'none',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all',\n },\n ],\n 'no-useless-backreference': 'error',\n 'no-useless-call': 'error',\n 'no-useless-catch': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-constructor': 'error',\n 'no-useless-rename': 'error',\n 'no-var': 'error',\n 'no-with': 'error',\n 'object-shorthand': [\n 'error',\n 'always',\n {\n avoidQuotes: true,\n ignoreConstructors: false,\n },\n ],\n 'one-var': ['error', { initialized: 'never' }],\n 'prefer-arrow-callback': [\n 'error',\n {\n allowNamedFunctions: true,\n allowUnboundThis: true,\n },\n ],\n 'prefer-const': [\n 'error',\n {\n destructuring: 'all',\n ignoreReadBeforeAssign: true,\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-promise-reject-errors': 'error',\n 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],\n 'prefer-rest-params': 'error',\n 'prefer-spread': 'error',\n 'prefer-template': 'error',\n 'symbol-description': 'error',\n 'unicode-bom': ['error', 'never'],\n 'use-isnan': ['error', { enforceForIndexOf: true, enforceForSwitchCase: true }],\n 'valid-typeof': ['error', { requireStringLiterals: true }],\n 'vars-on-top': 'error',\n yoda: ['error', 'never'],\n\n ...overrides,\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: '2digits:jsdoc',\n plugins: {\n jsdoc: await interopDefault(import('eslint-plugin-jsdoc')),\n },\n rules: {\n 'jsdoc/check-access': 'error',\n 'jsdoc/check-param-names': 'error',\n 'jsdoc/check-property-names': 'error',\n 'jsdoc/check-types': 'error',\n 'jsdoc/empty-tags': 'error',\n 'jsdoc/implements-on-classes': 'error',\n 'jsdoc/no-defaults': 'error',\n 'jsdoc/no-multi-asterisks': 'error',\n 'jsdoc/require-param-name': 'error',\n 'jsdoc/require-property': 'error',\n 'jsdoc/require-property-description': 'error',\n 'jsdoc/require-property-name': 'error',\n 'jsdoc/require-returns-check': 'error',\n 'jsdoc/require-returns-description': 'error',\n 'jsdoc/require-yields-check': 'error',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function next(\n options: OptionsWithFiles & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_TS, GLOB_TSX], overrides = {}, parserOptions } = options;\n\n const [next, parser] = await Promise.all([\n interopDefault(import('@next/eslint-plugin-next')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const recommended = renamePluginsInRules(\n {\n ...next.configs.recommended.rules,\n ...next.configs['core-web-vitals'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:next/setup',\n plugins: {\n next: fixupPluginRules(next as never),\n },\n },\n {\n name: '2digits:next/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n 'next/no-html-link-for-pages': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 22.0.0',\n },\n },\n plugins: {\n node: pluginNode,\n },\n rules: {\n 'node/handle-callback-err': ['error', '^(err|error)$'],\n 'node/no-deprecated-api': 'error',\n 'node/no-exports-assign': 'error',\n 'node/no-new-require': 'error',\n 'node/no-path-concat': 'error',\n 'node/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }],\n 'node/prefer-global/buffer': 'error',\n 'node/prefer-global/process': 'error',\n 'node/prefer-global/text-encoder': 'error',\n 'node/prefer-global/url': 'error',\n 'node/prefer-global/console': 'error',\n 'node/prefer-global/url-search-params': 'error',\n 'node/prefer-global/text-decoder': 'error',\n 'node/process-exit-as-throw': 'error',\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function prettier(): Promise<TypedFlatConfigItem[]> {\n const [prettier, react] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('eslint-plugin-react')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n react,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n parserOptions,\n tsconfigRootDir,\n reactCompiler = true,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('eslint-plugin-react')),\n interopDefault(import('@typescript-eslint/parser')),\n reactCompiler ? interopDefault(import('eslint-plugin-react-compiler')) : undefined,\n ]);\n\n const plugins = pluginReact.configs.all.plugins;\n\n const recommended = renamePluginsInRules(\n {\n ...react.configs.recommended.rules,\n ...react.configs['jsx-runtime'].rules,\n ...pluginReactHooks.configs.recommended.rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n react,\n 'react-dom': plugins['@eslint-react/dom'],\n 'react-web-api': plugins['@eslint-react/web-api'],\n 'react-extra': plugins['@eslint-react'],\n 'react-hooks': fixupPluginRules(pluginReactHooks as never),\n 'react-hooks-extra': plugins['@eslint-react/hooks-extra'],\n 'react-naming-convention': plugins['@eslint-react/naming-convention'],\n ...(reactCompiler ? { 'react-compiler': pluginReactCompiler } : {}),\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n },\n {\n name: '2digits:react/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n tsconfigRootDir,\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\n\n 'react-hooks-extra/no-unnecessary-use-callback': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/no-redundant-custom-hook': 'error',\n 'react-hooks-extra/no-unnecessary-use-memo': 'error',\n 'react-extra/prefer-read-only-props': 'off',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n 'react/prop-types': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst rules = renamePluginsInRules(pluginSonar.configs.recommended.rules as never, PluginNameMap);\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n ...rules,\n\n 'sonar/no-redundant-jump': 'off',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';\n\nimport { GLOB_STORIES } from '../globs';\nimport type {\n OptionsTypeScriptWithTypes,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_STORIES],\n overrides = {},\n parserOptions,\n storybookDirectory = '.storybook',\n } = options;\n\n const [storybook, parser] = await Promise.all([\n interopDefault(import('eslint-plugin-storybook')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const languageOptions = {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n } satisfies FlatConfig.LanguageOptions;\n\n return [\n {\n name: '2digits:storybook/setup',\n plugins: {\n storybook: fixupPluginRules(storybook as never),\n },\n },\n {\n name: '2digits:storybook/rules',\n files,\n languageOptions,\n rules: {\n 'storybook/await-interactions': 'error',\n 'storybook/context-in-play-function': 'error',\n 'storybook/csf-component': 'error',\n 'storybook/default-exports': 'error',\n 'storybook/hierarchy-separator': 'error',\n 'storybook/meta-inline-properties': 'error',\n 'storybook/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': 'error',\n 'storybook/no-uninstalled-addons': 'error',\n 'storybook/prefer-pascal-case': 'error',\n 'storybook/story-exports': 'error',\n 'storybook/use-storybook-expect': 'error',\n 'storybook/use-storybook-testing-library': 'error',\n\n ...overrides,\n },\n },\n {\n name: '2digits:storybook/disables',\n files,\n rules: {\n 'react-hooks/rules-of-hooks': 'off',\n 'react/display-name': 'off',\n 'sonar/no-duplicate-string': 'off',\n },\n },\n {\n name: '2digits:storybook/config',\n files: [`${storybookDirectory}/main.@(js|cjs|mjs|ts)`],\n languageOptions,\n rules: {\n 'storybook/no-uninstalled-addons': 'error',\n },\n },\n ];\n}\n","import { findUp } from 'find-up';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tailwind(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const [tailwindcss, { tailwindFunctions }, config] = await Promise.all([\n interopDefault(import('eslint-plugin-tailwindcss')),\n interopDefault(import('@2digits/constants')),\n findUp(['tailwind.config.ts', 'tailwind.config.js']),\n ]);\n\n return [\n {\n name: '2digits:tailwind',\n plugins: {\n tailwindcss,\n },\n settings: {\n tailwindcss: {\n callees: tailwindFunctions,\n config,\n },\n },\n rules: {\n ...tailwindcss.configs.recommended.rules,\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tanstack(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const tanstack = await interopDefault(import('@tanstack/eslint-plugin-query'));\n\n const recommended = renamePluginsInRules(\n tanstack.configs['flat/recommended'].at(0)?.rules ?? {},\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:tanstack',\n plugins: { tanstack },\n rules: {\n ...recommended,\n\n ...overrides,\n },\n },\n ];\n}\n","import type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function turbo(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const turbo = await interopDefault(import('eslint-plugin-turbo'));\n\n return [\n {\n name: '2digits:turbo',\n plugins: {\n turbo,\n },\n rules: {\n 'turbo/no-undeclared-env-vars': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInConfigs } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsTypeScriptWithTypes, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function typescript(\n options: OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, parserOptions = {} } = options;\n\n const [{ plugin, configs, parser }, twoDigits] = await Promise.all([\n interopDefault(import('typescript-eslint')),\n interopDefault(import('@2digits/eslint-plugin')),\n ]);\n\n const strictConfig = renamePluginsInConfigs(configs.strictTypeChecked as never, PluginNameMap);\n\n const rules = Object.fromEntries(\n strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})),\n );\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n },\n\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\n rules: {\n ...rules,\n 'ts/restrict-template-expressions': ['error', { allowNumber: true }],\n 'ts/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],\n 'ts/consistent-type-exports': ['error'],\n 'ts/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n },\n ],\n 'ts/no-empty-interface': ['error', { allowSingleExtends: true }],\n 'ts/no-explicit-any': ['error'],\n 'ts/no-import-type-side-effects': ['error'],\n 'ts/no-misused-promises': 'off',\n 'ts/no-confusing-void-expression': 'off',\n 'ts/no-unused-vars': [\n 'error',\n {\n ignoreRestSiblings: true,\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\n ],\n 'ts/unbound-method': 'off',\n\n ...(twoDigits.configs.recommended.rules as object),\n\n ...overrides,\n },\n },\n {\n files: ['**/*.d.ts'],\n name: '2digits:typescript/disables/dts',\n rules: {\n 'unicorn/no-abusive-eslint-disable': 'off',\n 'no-duplicate-imports': 'off',\n 'no-restricted-syntax': 'off',\n 'ts/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{test,spec}.ts?(x)'],\n name: '2digits:typescript/disables/test',\n rules: {\n 'no-unused-expressions': 'off',\n },\n },\n {\n files: ['**/*.js', '**/*.cjs', '**/*.cts'],\n name: '2digits:typescript/disables/cjs',\n rules: {\n 'ts/no-require-imports': 'off',\n 'ts/no-var-requires': 'off',\n },\n },\n ];\n}\n","import { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs['flat/recommended'].rules,\n\n 'unicorn/filename-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n 'unicorn/prefer-ternary': ['error', 'only-single-line'],\n 'unicorn/no-useless-undefined': [\n 'error',\n {\n checkArguments: false,\n checkArrowFunctionBody: false,\n },\n ],\n 'unicorn/prefer-top-level-await': ['off'],\n },\n },\n ];\n}\n","import { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n antfu,\n comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\n regexp,\n sonar,\n storybook,\n tailwind,\n tanstack,\n turbo,\n typescript,\n unicorn,\n} from './configs';\nimport { drizzle } from './configs/drizzle';\nimport { PluginNameMap } from './constants';\nimport type {\n ConfigNames,\n OptionsOverrides,\n OptionsTypeScriptWithTypes,\n OptionsWithDrizzle,\n OptionsWithFiles,\n OptionsWithIgnores,\n OptionsWithReact,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from './types';\n\ntype SharedOptions<T = unknown> = T & {\n enable?: boolean;\n};\n\ninterface ESLint2DigitsOptions {\n ignores?: OptionsWithIgnores;\n turbo?: SharedOptions<OptionsOverrides> | boolean;\n js?: OptionsOverrides;\n ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;\n graphql?: SharedOptions<OptionsWithFiles> | boolean;\n react?: SharedOptions<OptionsWithReact> | boolean;\n next?: SharedOptions<OptionsWithFiles> | boolean;\n tailwind?: SharedOptions<OptionsOverrides> | boolean;\n storybook?: SharedOptions<OptionsWithStorybook> | boolean;\n tanstack?: SharedOptions<OptionsOverrides> | boolean;\n drizzle?: SharedOptions<OptionsWithDrizzle> | boolean;\n}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean,\n): options is T {\n if (typeof options === 'boolean') {\n return options;\n }\n\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) {\n return {} as T;\n }\n\n const { enable, ...rest } = options;\n return rest as T;\n}\n\nexport function twoDigits(\n options: ESLint2DigitsOptions = {},\n ...userConfig: TypedFlatConfigItem[]\n): Promise<TypedFlatConfigItem[]> {\n let composer = new FlatConfigComposer<TypedFlatConfigItem, ConfigNames>(\n ignores(options.ignores),\n javascript(options.js),\n node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\n );\n\n if (enabled(options.turbo, isPackageExists('turbo'))) {\n composer = composer.append(turbo(config(options.turbo)));\n }\n\n const { overrides, ...typescriptOptions } = config(options.ts);\n\n if (enabled(options.ts, isPackageExists('typescript'))) {\n composer = composer.append(typescript(config(options.ts)));\n }\n\n if (enabled(options.react, isPackageExists('react'))) {\n composer = composer.append(\n react({\n ...config(options.react),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.next, isPackageExists('next'))) {\n composer = composer.append(\n next({\n ...config(options.next),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.storybook, isPackageExists('storybook'))) {\n composer = composer.append(\n storybook({\n ...config(options.storybook),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.tailwind, isPackageExists('tailwindcss'))) {\n composer = composer.append(tailwind(config(options.tailwind)));\n }\n\n if (\n enabled(\n options.tanstack,\n isPackageExists('react-query') ||\n isPackageExists('@tanstack/react-query') ||\n isPackageExists('@tanstack/react-query-devtools'),\n )\n ) {\n composer = composer.append(tanstack(config(options.tanstack)));\n }\n\n if (enabled(options.drizzle, isPackageExists('drizzle-kit') || isPackageExists('drizzle-orm'))) {\n composer = composer.append(drizzle(config(options.drizzle)));\n }\n\n if (enabled(options.graphql, isPackageExists('graphql'))) {\n composer = composer.append(graphql(config(options.graphql)));\n }\n\n composer = composer.append(...userConfig);\n\n if (isPackageExists('prettier')) {\n composer = composer.append(prettier());\n }\n\n return composer.renamePlugins(PluginNameMap).toConfigs();\n}\n"]}
1
+ {"version":3,"sources":["../src/configs/antfu.ts","../src/constants.ts","../src/configs/comments.ts","../src/utils.ts","../src/configs/drizzle.ts","../src/configs/graphql.ts","../src/globs.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/next.ts","../src/configs/node.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonar.ts","../src/configs/storybook.ts","../src/configs/tailwind.ts","../src/configs/tanstack.ts","../src/configs/turbo.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/factory.ts"],"names":["antfu","pluginAntfu","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","interopDefault","m","resolved","drizzle","options","overrides","drizzleObjectName","fixupPluginRules","graphql","files","gql","gqlSchema","loadConfig","g","flatRecommended","rules","rule","ruleName","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_JSON","GLOB_JSON5","GLOB_JSONC","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","jsonc","config","SHARED_OPTIONS","collectRules","parser","plugin","next","parserOptions","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","findUp","tanstack","turbo","typescript","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"ssBAIO,SAASA,GAA+B,CAC7C,OAAO,CACL,CACE,IAAA,CAAM,eACN,CAAA,OAAA,CAAS,CACP,KAAOC,CAAAA,EACT,EACA,KAAO,CAAA,CACL,mBAAoB,OACpB,CAAA,0BAAA,CAA4B,OAC9B,CACF,CACF,CACF,CCjBO,IAAMC,EAAgB,CAC3B,YAAA,CAAc,OACd,iCAAmC,CAAA,yBAAA,CACnC,2BAA6B,CAAA,mBAAA,CAC7B,oBAAqB,WACrB,CAAA,uBAAA,CAAyB,gBACzB,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CACA,SACA,OACA,CAAA,eAAA,CACA,MACA,OACA,CAAA,SAAA,CACA,OACA,OACA,CAAA,UAAA,CACA,aACA,CAAA,kBAAA,CACA,cACA,SACA,CAAA,UAAA,CACA,SACA,SACA,CAAA,YAAA,CACA,eACA,iBACA,CAAA,kBAAA,CACA,sBACA,CAAA,sBAAA,CACA,iBACA,SACA,CAAA,MAAA,CACA,YACA,aACA,CAAA,OAAA,CACA,mBACA,aACA,CAAA,cAAA,CACA,UACF,CAAA,CACA,YAAa,IACf,CAAA,CACA,CACE,KAAO,CAAA,CAAE,KAAM,KAAM,CAAA,CACrB,WAAa,CAAA,wDACf,EACA,CACE,KAAA,CAAO,CAAC,OAAS,CAAA,QAAA,CAAU,SAAU,SAAW,CAAA,SAAS,CACzD,CAAA,WAAA,CAAa,aACf,CACF,CACF,CACF,CAEA,CAAA,CACE,KAAM,6BACN,CAAA,GAAGA,CACH,CAAA,KAAA,CAAO,CACL,kBACA,CAAA,oBAAA,CACA,qBACA,kBACA,CAAA,oBAAA,CACA,oBACF,CACA,CAAA,KAAA,CAAO,CACL,iBAAA,CAAmB,CACjB,OACA,CAAA,CACE,MAAO,CACL,SAAA,CACA,UACA,iBACA,CAAA,YAAA,CACA,OACA,CAAA,SAAA,CACA,SACF,CACA,CAAA,WAAA,CAAa,IACf,CACA,CAAA,CACE,MAAO,CAEL,aAAA,CACA,WACA,CAAA,iBAAA,CACA,0CACA,0BACA,CAAA,8BAAA,CAEA,SACA,KACA,CAAA,KAAA,CACA,yBACA,uBACA,CAAA,YAAA,CACA,oBACA,CAAA,iBAAA,CACA,iBACA,OACA,CAAA,yBAAA,CACA,kBAEA,QACA,CAAA,SAAA,CACA,mBACA,SACA,CAAA,OAAA,CACA,UACA,CAAA,WAAA,CACA,QACA,sBACA,CAAA,gBAAA,CACA,6BACA,2BACA,CAAA,2BAAA,CACA,mBACA,mBACA,CAAA,0BAAA,CACA,WAEA,CAAA,SAAA,CACA,UACA,sBAEA,CAAA,aAAA,CACA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AAA,CAAAA,CAAWA,EAAS,MAAOzB,CAAAA,CAAAA,CAAQ+B,CAAO9B,CAAAA,CAAAA,CAAQ,OAAO,CAAC,CAAC,GAGzDgE,CAAQhE,CAAAA,CAAAA,CAAQ,QAASsE,eAAgB,CAAA,SAAS,CAAC,CAAA,GACrD9C,EAAWA,CAAS,CAAA,MAAA,CAAOpB,EAAQ0B,CAAO9B,CAAAA,CAAAA,CAAQ,OAAO,CAAC,CAAC,CAG7DwB,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAG4C,CAAU,CAEpCE,CAAAA,eAAAA,CAAgB,UAAU,CAC5B9C,GAAAA,CAAAA,CAAWA,EAAS,MAAOe,CAAAA,CAAAA,EAAU,CAGhCf,CAAAA,CAAAA,CAAAA,CAAS,cAAclC,CAAa,CAAA,CAAE,WAC/C","file":"index.js","sourcesContent":["import pluginAntfu from 'eslint-plugin-antfu';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:antfu',\n plugins: {\n antfu: pluginAntfu,\n },\n rules: {\n 'antfu/if-newline': 'error',\n 'antfu/top-level-function': 'error',\n },\n },\n ];\n}\n","export const PluginNameMap = {\n '@next/next': 'next',\n '@eslint-react/naming-convention': 'react-naming-convention',\n '@eslint-react/hooks-extra': 'react-hooks-extra',\n '@eslint-react/dom': 'react-dom',\n '@eslint-react/web-api': 'react-web-api',\n '@eslint-react': 'react-extra',\n 'react-hooks': 'react-hooks',\n 'react-compiler': 'react-compiler',\n react: 'react',\n '@typescript-eslint': 'ts',\n node: 'node',\n '@eslint-community/eslint-comments': 'comments',\n storybook: 'storybook',\n turbo: 'turbo',\n jsdoc: 'jsdoc',\n unicorn: 'unicorn',\n tailwindcss: 'tailwindcss',\n '@tanstack/query': 'tanstack',\n '@2digits': '@2digits',\n '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n drizzle: 'drizzle',\n} as const;\n","import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';\nimport configs from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:comments',\n plugins: {\n comments: pluginComments,\n },\n rules: {\n ...recommended,\n\n 'comments/no-unused-disable': 'error',\n 'comments/disable-enable-pair': ['error', { allowWholeFile: true }],\n },\n },\n ];\n}\n","import type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(\n m: Awaitable<T>,\n): Promise<T extends { default: infer U } ? U : T> {\n const resolved = await m;\n\n return ((resolved as Record<string, unknown>).default || resolved) as never;\n}\n","import { fixupPluginRules } from '@eslint/compat';\n\nimport type { OptionsWithDrizzle, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function drizzle(options: OptionsWithDrizzle = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, drizzleObjectName = ['drizzle', 'db'] } = options;\n\n const drizzle = await interopDefault(import('eslint-plugin-drizzle'));\n\n return [\n {\n name: '2digits:drizzle',\n plugins: {\n drizzle: fixupPluginRules(drizzle as never),\n },\n rules: {\n 'drizzle/enforce-update-with-where': ['error', { drizzleObjectName }],\n 'drizzle/enforce-delete-with-where': ['error', { drizzleObjectName }],\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\nimport { loadConfig } from 'graphql-config';\n\nimport { PluginNameMap } from '../constants';\nimport type { OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function graphql(options: OptionsWithFiles = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, files = ['**/*.graphql', '**/*.gql'] } = options;\n\n const [gql, gqlSchema] = await Promise.all([\n interopDefault(import('@graphql-eslint/eslint-plugin')),\n loadConfig({ throwOnEmpty: false, throwOnMissing: false }).then((g) => g?.getDefault().schema),\n ]);\n\n const flatRecommended = gql.configs['flat/operations-recommended'].rules;\n\n let rules = {} as typeof flatRecommended;\n\n if (gqlSchema) {\n rules = flatRecommended;\n } else {\n for (const rule of Object.keys(flatRecommended) as Array<keyof typeof rules>) {\n const ruleName = rule.replace('@graphql-eslint/', '') as keyof typeof gql.rules;\n if (\n ruleName in gql.rules &&\n (gql.rules[ruleName].meta.docs?.requiresSchema ||\n gql.rules[ruleName].meta.docs?.requiresSiblings)\n ) {\n continue;\n }\n rules[rule] = flatRecommended[rule] as never;\n }\n }\n\n const recommended = renamePluginsInRules(rules, PluginNameMap);\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql,\n },\n languageOptions: {\n parser: gql.parser,\n },\n files,\n rules: {\n ...recommended,\n\n 'gql/naming-convention': ['error', { allowLeadingUnderscore: true } as never],\n\n ...overrides,\n },\n },\n ];\n}\n","export const GLOB_SRC = '**/*.?([cm])[jt]s?(x)';\n\nexport const GLOB_TS = '**/*.?([cm])ts';\nexport const GLOB_TSX = '**/*.?([cm])tsx';\n\nexport const GLOB_STORIES = '**/*.stories.tsx';\n\nexport const GLOB_JSON = '**/*.json';\nexport const GLOB_JSON5 = '**/*.json5';\nexport const GLOB_JSONC = '**/*.jsonc';\n\nexport const GLOB_EXCLUDE = [\n '**/node_modules',\n '**/dist',\n '**/package-lock.json',\n '**/yarn.lock',\n '**/pnpm-lock.yaml',\n '**/bun.lockb',\n\n '**/output',\n '**/coverage',\n '**/temp',\n '**/.temp',\n '**/tmp',\n '**/.tmp',\n '**/.history',\n '**/.vitepress/cache',\n '**/.nuxt',\n '**/.next',\n '**/.vercel',\n '**/.changeset',\n '**/.idea',\n '**/.cache',\n '**/.output',\n '**/.vite-inspect',\n '**/.yarn',\n\n '**/CHANGELOG*.md',\n '**/*.min.*',\n '**/LICENSE*',\n '**/__snapshots__',\n '**/auto-import?(s).d.ts',\n '**/components.d.ts',\n] as const;\n","import { composer } from 'eslint-flat-config-utils';\n\nimport { GLOB_EXCLUDE } from '../globs';\nimport type { OptionsWithIgnores, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function ignores(options: OptionsWithIgnores = {}): Promise<TypedFlatConfigItem[]> {\n const { gitIgnore, ignores = [] } = options;\n\n return composer(\n {\n ignores: [GLOB_EXCLUDE, ignores].flat(),\n name: '2digits:ignores',\n },\n interopDefault(import('eslint-config-flat-gitignore')).then((m) =>\n m({ strict: false, ...gitIgnore, name: '2digits:gitignore' }),\n ),\n );\n}\n","import eslint from '@eslint/js';\nimport globals from 'globals';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n name: '2digits:javascript',\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: true,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n 'accessor-pairs': ['error', { enforceForClassMembers: true, setWithoutGet: true }],\n 'array-callback-return': 'error',\n 'block-scoped-var': 'error',\n 'constructor-super': 'error',\n 'default-case-last': 'error',\n 'dot-notation': ['error', { allowKeywords: true }],\n eqeqeq: ['error', 'smart'],\n 'new-cap': ['error', { capIsNew: false, newIsCap: true, properties: true }],\n 'no-alert': 'error',\n 'no-array-constructor': 'error',\n 'no-async-promise-executor': 'error',\n 'no-caller': 'error',\n 'no-case-declarations': 'error',\n 'no-class-assign': 'error',\n 'no-compare-neg-zero': 'error',\n 'no-cond-assign': ['error', 'always'],\n 'no-const-assign': 'error',\n 'no-control-regex': 'error',\n 'no-debugger': 'error',\n 'no-delete-var': 'error',\n 'no-dupe-args': 'error',\n 'no-dupe-class-members': 'error',\n 'no-dupe-keys': 'error',\n 'no-duplicate-case': 'error',\n 'no-empty': ['error', { allowEmptyCatch: true }],\n 'no-empty-character-class': 'error',\n 'no-empty-pattern': 'error',\n 'no-eval': 'error',\n 'no-ex-assign': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-boolean-cast': 'error',\n 'no-fallthrough': 'error',\n 'no-func-assign': 'error',\n 'no-global-assign': 'error',\n 'no-implied-eval': 'error',\n 'no-import-assign': 'error',\n 'no-invalid-regexp': 'error',\n 'no-irregular-whitespace': 'error',\n 'no-iterator': 'error',\n 'no-labels': ['error', { allowLoop: false, allowSwitch: false }],\n 'no-lone-blocks': 'error',\n 'no-loss-of-precision': 'error',\n 'no-misleading-character-class': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-native-nonconstructor': 'error',\n 'no-new-wrappers': 'error',\n 'no-obj-calls': 'error',\n 'no-octal': 'error',\n 'no-octal-escape': 'error',\n 'no-proto': 'error',\n 'no-prototype-builtins': 'error',\n 'no-redeclare': ['error', { builtinGlobals: false }],\n 'no-regex-spaces': 'error',\n 'no-restricted-globals': [\n 'error',\n { message: 'Use `globalThis` instead.', name: 'global' },\n { message: 'Use `globalThis` instead.', name: 'self' },\n ],\n 'no-restricted-properties': [\n 'error',\n {\n message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.',\n property: '__proto__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineGetter__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineSetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupGetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupSetter__',\n },\n ],\n 'no-restricted-syntax': [\n 'error',\n 'DebuggerStatement',\n 'LabeledStatement',\n 'WithStatement',\n 'TSEnumDeclaration',\n 'TSExportAssignment',\n ],\n 'no-self-assign': ['error', { props: true }],\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-shadow-restricted-names': 'error',\n 'no-sparse-arrays': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-this-before-super': 'error',\n 'no-throw-literal': 'error',\n 'no-undef': 'error',\n 'no-undef-init': 'error',\n 'no-unexpected-multiline': 'error',\n 'no-unmodified-loop-condition': 'error',\n 'no-unneeded-ternary': ['error', { defaultAssignment: false }],\n 'no-unreachable': 'error',\n 'no-unreachable-loop': 'error',\n 'no-unsafe-finally': 'error',\n 'no-unsafe-negation': 'error',\n 'no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n 'no-unused-vars': [\n 'error',\n {\n args: 'none',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all',\n },\n ],\n 'no-useless-backreference': 'error',\n 'no-useless-call': 'error',\n 'no-useless-catch': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-constructor': 'error',\n 'no-useless-rename': 'error',\n 'no-var': 'error',\n 'no-with': 'error',\n 'object-shorthand': [\n 'error',\n 'always',\n {\n avoidQuotes: true,\n ignoreConstructors: false,\n },\n ],\n 'one-var': ['error', { initialized: 'never' }],\n 'prefer-arrow-callback': [\n 'error',\n {\n allowNamedFunctions: true,\n allowUnboundThis: true,\n },\n ],\n 'prefer-const': [\n 'error',\n {\n destructuring: 'all',\n ignoreReadBeforeAssign: true,\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-promise-reject-errors': 'error',\n 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],\n 'prefer-rest-params': 'error',\n 'prefer-spread': 'error',\n 'prefer-template': 'error',\n 'symbol-description': 'error',\n 'unicode-bom': ['error', 'never'],\n 'use-isnan': ['error', { enforceForIndexOf: true, enforceForSwitchCase: true }],\n 'valid-typeof': ['error', { requireStringLiterals: true }],\n 'vars-on-top': 'error',\n yoda: ['error', 'never'],\n\n ...overrides,\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: '2digits:jsdoc',\n plugins: {\n jsdoc: await interopDefault(import('eslint-plugin-jsdoc')),\n },\n rules: {\n 'jsdoc/check-access': 'error',\n 'jsdoc/check-param-names': 'error',\n 'jsdoc/check-property-names': 'error',\n 'jsdoc/check-types': 'error',\n 'jsdoc/empty-tags': 'error',\n 'jsdoc/implements-on-classes': 'error',\n 'jsdoc/no-defaults': 'error',\n 'jsdoc/no-multi-asterisks': 'error',\n 'jsdoc/require-param-name': 'error',\n 'jsdoc/require-property': 'error',\n 'jsdoc/require-property-description': 'error',\n 'jsdoc/require-property-name': 'error',\n 'jsdoc/require-returns-check': 'error',\n 'jsdoc/require-returns-description': 'error',\n 'jsdoc/require-yields-check': 'error',\n },\n },\n ];\n}\n","import plugin, { configs } from 'eslint-plugin-jsonc';\nimport parser from 'jsonc-eslint-parser';\n\nimport { GLOB_JSON, GLOB_JSON5, GLOB_JSONC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function jsonc(): TypedFlatConfigItem[] {\n return [\n ...configs['flat/base'].map((config) => ({ ...config, name: '2digits:jsonc/base' })),\n\n {\n name: '2digits:jsonc/json',\n files: [GLOB_JSON],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-json']),\n },\n },\n {\n name: '2digits:jsonc/jsonc',\n files: [GLOB_JSONC],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-jsonc']),\n },\n },\n {\n name: '2digits:jsonc/json5',\n files: [GLOB_JSON5],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-json5']),\n },\n },\n\n {\n name: '2digits:jsonc/package.json',\n ...SHARED_OPTIONS,\n files: ['**/package.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: { type: 'asc' },\n pathPattern: '^files$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n {\n order: [\n '$schema',\n 'publisher',\n 'name',\n 'displayName',\n 'version',\n 'private',\n 'description',\n 'funding',\n 'homepage',\n 'repository',\n 'bugs',\n 'categories',\n 'type',\n 'main',\n 'module',\n 'types',\n 'typesVersions',\n 'bin',\n 'files',\n 'exports',\n 'icon',\n 'unpkg',\n 'jsdelivr',\n 'sideEffects',\n 'activationEvents',\n 'contributes',\n 'scripts',\n 'keywords',\n 'author',\n 'license',\n 'workspaces',\n 'dependencies',\n 'devDependencies',\n 'peerDependencies',\n 'peerDependenciesMeta',\n 'optionalDependencies',\n 'packageManager',\n 'engines',\n 'pnpm',\n 'overrides',\n 'resolutions',\n 'husky',\n 'simple-git-hooks',\n 'lint-staged',\n 'eslintConfig',\n 'prettier',\n ],\n pathPattern: '^$',\n },\n {\n order: { type: 'asc' },\n pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$',\n },\n {\n order: ['types', 'import', 'module', 'require', 'default'],\n pathPattern: '^exports.*$',\n },\n ],\n },\n },\n\n {\n name: '2digits:jsonc/tsconfig.json',\n ...SHARED_OPTIONS,\n files: [\n '**/tsconfig.json',\n '**/tsconfig.*.json',\n '**/tsconfig-*.json',\n '**/jsconfig.json',\n '**/jsconfig.*.json',\n '**/jsconfig-*.json',\n ],\n rules: {\n 'jsonc/sort-keys': [\n 'error',\n {\n order: [\n '$schema',\n 'extends',\n 'compilerOptions',\n 'references',\n 'files',\n 'include',\n 'exclude',\n ],\n pathPattern: '^$',\n },\n {\n order: [\n /* Projects */\n 'incremental',\n 'composite',\n 'tsBuildInfoFile',\n 'disableSourceOfProjectReferenceRedirect',\n 'disableSolutionSearching',\n 'disableReferencedProjectLoad',\n /* Language and Environment */\n 'target',\n 'lib',\n 'jsx',\n 'experimentalDecorators',\n 'emitDecoratorMetadata',\n 'jsxFactory',\n 'jsxFragmentFactory',\n 'jsxImportSource',\n 'reactNamespace',\n 'noLib',\n 'useDefineForClassFields',\n 'moduleDetection',\n /* Modules */\n 'module',\n 'rootDir',\n 'moduleResolution',\n 'baseUrl',\n 'paths',\n 'rootDirs',\n 'typeRoots',\n 'types',\n 'allowUmdGlobalAccess',\n 'moduleSuffixes',\n 'allowImportingTsExtensions',\n 'resolvePackageJsonExports',\n 'resolvePackageJsonImports',\n 'customConditions',\n 'resolveJsonModule',\n 'allowArbitraryExtensions',\n 'noResolve',\n /* JavaScript Support */\n 'allowJs',\n 'checkJs',\n 'maxNodeModuleJsDepth',\n /* Emit */\n 'declaration',\n 'declarationMap',\n 'emitDeclarationOnly',\n 'sourceMap',\n 'inlineSourceMap',\n 'outFile',\n 'outDir',\n 'removeComments',\n 'noEmit',\n 'importHelpers',\n 'importsNotUsedAsValues',\n 'downlevelIteration',\n 'sourceRoot',\n 'mapRoot',\n 'inlineSources',\n 'emitBOM',\n 'newLine',\n 'stripInternal',\n 'noEmitHelpers',\n 'noEmitOnError',\n 'preserveConstEnums',\n 'declarationDir',\n 'preserveValueImports',\n /* Interop Constraints */\n 'isolatedModules',\n 'verbatimModuleSyntax',\n 'allowSyntheticDefaultImports',\n 'esModuleInterop',\n 'preserveSymlinks',\n 'forceConsistentCasingInFileNames',\n /* Type Checking */\n 'strict',\n 'strictBindCallApply',\n 'strictFunctionTypes',\n 'strictNullChecks',\n 'strictPropertyInitialization',\n 'allowUnreachableCode',\n 'allowUnusedLabels',\n 'alwaysStrict',\n 'exactOptionalPropertyTypes',\n 'noFallthroughCasesInSwitch',\n 'noImplicitAny',\n 'noImplicitOverride',\n 'noImplicitReturns',\n 'noImplicitThis',\n 'noPropertyAccessFromIndexSignature',\n 'noUncheckedIndexedAccess',\n 'noUnusedLocals',\n 'noUnusedParameters',\n 'useUnknownInCatchVariables',\n /* Completeness */\n 'skipDefaultLibCheck',\n 'skipLibCheck',\n ],\n pathPattern: '^compilerOptions$',\n },\n ],\n },\n },\n\n ...configs['flat/prettier'].map((config) => ({ ...config, name: '2digits:jsonc/prettier' })),\n ];\n}\n\nconst SHARED_OPTIONS = {\n languageOptions: {\n parser,\n },\n plugins: {\n jsonc: plugin,\n },\n} satisfies Pick<TypedFlatConfigItem, 'plugins' | 'languageOptions'>;\n\ntype FlatConfigName = Extract<keyof typeof configs, `flat/${string}`>;\n\nfunction collectRules(config: (typeof configs)[FlatConfigName]) {\n return Object.fromEntries(config.flatMap(({ rules }) => Object.entries(rules ?? {})));\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function next(\n options: OptionsWithFiles & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_TS, GLOB_TSX], overrides = {}, parserOptions } = options;\n\n const [next, parser] = await Promise.all([\n interopDefault(import('@next/eslint-plugin-next')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const recommended = renamePluginsInRules(\n {\n ...next.configs.recommended.rules,\n ...next.configs['core-web-vitals'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:next/setup',\n plugins: {\n next: fixupPluginRules(next as never),\n },\n },\n {\n name: '2digits:next/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n 'next/no-html-link-for-pages': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 22.0.0',\n },\n },\n plugins: {\n node: pluginNode,\n },\n rules: {\n 'node/handle-callback-err': ['error', '^(err|error)$'],\n 'node/no-deprecated-api': 'error',\n 'node/no-exports-assign': 'error',\n 'node/no-new-require': 'error',\n 'node/no-path-concat': 'error',\n 'node/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }],\n 'node/prefer-global/buffer': 'error',\n 'node/prefer-global/process': 'error',\n 'node/prefer-global/text-encoder': 'error',\n 'node/prefer-global/url': 'error',\n 'node/prefer-global/console': 'error',\n 'node/prefer-global/url-search-params': 'error',\n 'node/prefer-global/text-decoder': 'error',\n 'node/process-exit-as-throw': 'error',\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function prettier(): Promise<TypedFlatConfigItem[]> {\n const [prettier, react] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('eslint-plugin-react')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n react,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n parserOptions,\n tsconfigRootDir,\n reactCompiler = true,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('eslint-plugin-react')),\n interopDefault(import('@typescript-eslint/parser')),\n reactCompiler ? interopDefault(import('eslint-plugin-react-compiler')) : undefined,\n ]);\n\n const plugins = pluginReact.configs.all.plugins;\n\n const recommended = renamePluginsInRules(\n {\n ...react.configs.recommended.rules,\n ...react.configs['jsx-runtime'].rules,\n ...pluginReactHooks.configs.recommended.rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n react,\n 'react-dom': plugins['@eslint-react/dom'],\n 'react-web-api': plugins['@eslint-react/web-api'],\n 'react-extra': plugins['@eslint-react'],\n 'react-hooks': fixupPluginRules(pluginReactHooks as never),\n 'react-hooks-extra': plugins['@eslint-react/hooks-extra'],\n 'react-naming-convention': plugins['@eslint-react/naming-convention'],\n ...(reactCompiler ? { 'react-compiler': pluginReactCompiler } : {}),\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n },\n {\n name: '2digits:react/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n tsconfigRootDir,\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\n\n 'react-hooks-extra/no-unnecessary-use-callback': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/no-redundant-custom-hook': 'error',\n 'react-hooks-extra/no-unnecessary-use-memo': 'error',\n 'react-extra/prefer-read-only-props': 'off',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n 'react/prop-types': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst rules = renamePluginsInRules(pluginSonar.configs.recommended.rules as never, PluginNameMap);\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n ...rules,\n\n 'sonar/no-redundant-jump': 'off',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';\n\nimport { GLOB_STORIES } from '../globs';\nimport type {\n OptionsTypeScriptWithTypes,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_STORIES],\n overrides = {},\n parserOptions,\n storybookDirectory = '.storybook',\n } = options;\n\n const [storybook, parser] = await Promise.all([\n interopDefault(import('eslint-plugin-storybook')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const languageOptions = {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n } satisfies FlatConfig.LanguageOptions;\n\n return [\n {\n name: '2digits:storybook/setup',\n plugins: {\n storybook: fixupPluginRules(storybook as never),\n },\n },\n {\n name: '2digits:storybook/rules',\n files,\n languageOptions,\n rules: {\n 'storybook/await-interactions': 'error',\n 'storybook/context-in-play-function': 'error',\n 'storybook/csf-component': 'error',\n 'storybook/default-exports': 'error',\n 'storybook/hierarchy-separator': 'error',\n 'storybook/meta-inline-properties': 'error',\n 'storybook/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': 'error',\n 'storybook/no-uninstalled-addons': 'error',\n 'storybook/prefer-pascal-case': 'error',\n 'storybook/story-exports': 'error',\n 'storybook/use-storybook-expect': 'error',\n 'storybook/use-storybook-testing-library': 'error',\n\n ...overrides,\n },\n },\n {\n name: '2digits:storybook/disables',\n files,\n rules: {\n 'react-hooks/rules-of-hooks': 'off',\n 'react/display-name': 'off',\n 'sonar/no-duplicate-string': 'off',\n },\n },\n {\n name: '2digits:storybook/config',\n files: [`${storybookDirectory}/main.@(js|cjs|mjs|ts)`],\n languageOptions,\n rules: {\n 'storybook/no-uninstalled-addons': 'error',\n },\n },\n ];\n}\n","import { findUp } from 'find-up';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tailwind(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const [tailwindcss, { tailwindFunctions }, config] = await Promise.all([\n interopDefault(import('eslint-plugin-tailwindcss')),\n interopDefault(import('@2digits/constants')),\n findUp(['tailwind.config.ts', 'tailwind.config.js']),\n ]);\n\n return [\n {\n name: '2digits:tailwind',\n plugins: {\n tailwindcss,\n },\n settings: {\n tailwindcss: {\n callees: tailwindFunctions,\n config,\n },\n },\n rules: {\n ...tailwindcss.configs.recommended.rules,\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tanstack(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const tanstack = await interopDefault(import('@tanstack/eslint-plugin-query'));\n\n const recommended = renamePluginsInRules(\n tanstack.configs['flat/recommended'].at(0)?.rules ?? {},\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:tanstack',\n plugins: { tanstack },\n rules: {\n ...recommended,\n\n ...overrides,\n },\n },\n ];\n}\n","import type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function turbo(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const turbo = await interopDefault(import('eslint-plugin-turbo'));\n\n return [\n {\n name: '2digits:turbo',\n plugins: {\n turbo,\n },\n rules: {\n 'turbo/no-undeclared-env-vars': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInConfigs } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsTypeScriptWithTypes, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function typescript(\n options: OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, parserOptions = {} } = options;\n\n const [{ plugin, configs, parser }, twoDigits] = await Promise.all([\n interopDefault(import('typescript-eslint')),\n interopDefault(import('@2digits/eslint-plugin')),\n ]);\n\n const strictConfig = renamePluginsInConfigs(configs.strictTypeChecked as never, PluginNameMap);\n\n const rules = Object.fromEntries(\n strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})),\n );\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n },\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...rules,\n 'ts/restrict-template-expressions': ['error', { allowNumber: true }],\n 'ts/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],\n 'ts/consistent-type-exports': ['error'],\n 'ts/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n },\n ],\n 'ts/no-empty-object-type': [\n 'error',\n { allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' },\n ],\n 'ts/no-explicit-any': ['error'],\n 'ts/no-import-type-side-effects': ['error'],\n 'ts/no-misused-promises': 'off',\n 'ts/no-confusing-void-expression': 'off',\n 'ts/no-unused-vars': [\n 'error',\n {\n ignoreRestSiblings: true,\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\n ],\n 'ts/unbound-method': 'off',\n\n ...(twoDigits.configs.recommended.rules as object),\n\n ...overrides,\n },\n },\n {\n files: ['**/*.d.ts'],\n name: '2digits:typescript/disables/dts',\n rules: {\n 'unicorn/no-abusive-eslint-disable': 'off',\n 'no-duplicate-imports': 'off',\n 'no-restricted-syntax': 'off',\n 'ts/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{test,spec}.ts?(x)'],\n name: '2digits:typescript/disables/test',\n rules: {\n 'no-unused-expressions': 'off',\n },\n },\n {\n files: ['**/*.js', '**/*.cjs', '**/*.cts'],\n name: '2digits:typescript/disables/cjs',\n rules: {\n 'ts/no-require-imports': 'off',\n 'ts/no-var-requires': 'off',\n },\n },\n ];\n}\n","import { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs['flat/recommended'].rules,\n\n 'unicorn/filename-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n 'unicorn/prefer-ternary': ['error', 'only-single-line'],\n 'unicorn/no-useless-undefined': [\n 'error',\n {\n checkArguments: false,\n checkArrowFunctionBody: false,\n },\n ],\n 'unicorn/prefer-top-level-await': ['off'],\n },\n },\n ];\n}\n","import { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n antfu,\n comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n jsonc,\n next,\n node,\n prettier,\n react,\n regexp,\n sonar,\n storybook,\n tailwind,\n tanstack,\n turbo,\n typescript,\n unicorn,\n} from './configs';\nimport { drizzle } from './configs/drizzle';\nimport { PluginNameMap } from './constants';\nimport type {\n ConfigNames,\n OptionsOverrides,\n OptionsTypeScriptWithTypes,\n OptionsWithDrizzle,\n OptionsWithFiles,\n OptionsWithIgnores,\n OptionsWithReact,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from './types';\n\ntype SharedOptions<T = unknown> = T & {\n enable?: boolean;\n};\n\ninterface ESLint2DigitsOptions {\n ignores?: OptionsWithIgnores;\n turbo?: SharedOptions<OptionsOverrides> | boolean;\n js?: OptionsOverrides;\n ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;\n graphql?: SharedOptions<OptionsWithFiles> | boolean;\n react?: SharedOptions<OptionsWithReact> | boolean;\n next?: SharedOptions<OptionsWithFiles> | boolean;\n tailwind?: SharedOptions<OptionsOverrides> | boolean;\n storybook?: SharedOptions<OptionsWithStorybook> | boolean;\n tanstack?: SharedOptions<OptionsOverrides> | boolean;\n drizzle?: SharedOptions<OptionsWithDrizzle> | boolean;\n}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean,\n): options is T {\n if (typeof options === 'boolean') {\n return options;\n }\n\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) {\n return {} as T;\n }\n\n const { enable, ...rest } = options;\n return rest as T;\n}\n\nexport function twoDigits(\n options: ESLint2DigitsOptions = {},\n ...userConfig: TypedFlatConfigItem[]\n): Promise<TypedFlatConfigItem[]> {\n let composer = new FlatConfigComposer<TypedFlatConfigItem, ConfigNames>(\n ignores(options.ignores),\n javascript(options.js),\n node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\n jsonc(),\n );\n\n if (enabled(options.turbo, isPackageExists('turbo'))) {\n composer = composer.append(turbo(config(options.turbo)));\n }\n\n const { overrides, ...typescriptOptions } = config(options.ts);\n\n if (enabled(options.ts, isPackageExists('typescript'))) {\n composer = composer.append(typescript(config(options.ts)));\n }\n\n if (enabled(options.react, isPackageExists('react'))) {\n composer = composer.append(\n react({\n ...config(options.react),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.next, isPackageExists('next'))) {\n composer = composer.append(\n next({\n ...config(options.next),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.storybook, isPackageExists('storybook'))) {\n composer = composer.append(\n storybook({\n ...config(options.storybook),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.tailwind, isPackageExists('tailwindcss'))) {\n composer = composer.append(tailwind(config(options.tailwind)));\n }\n\n if (\n enabled(\n options.tanstack,\n isPackageExists('react-query') ||\n isPackageExists('@tanstack/react-query') ||\n isPackageExists('@tanstack/react-query-devtools'),\n )\n ) {\n composer = composer.append(tanstack(config(options.tanstack)));\n }\n\n if (enabled(options.drizzle, isPackageExists('drizzle-kit') || isPackageExists('drizzle-orm'))) {\n composer = composer.append(drizzle(config(options.drizzle)));\n }\n\n if (enabled(options.graphql, isPackageExists('graphql'))) {\n composer = composer.append(graphql(config(options.graphql)));\n }\n\n composer = composer.append(...userConfig);\n\n if (isPackageExists('prettier')) {\n composer = composer.append(prettier());\n }\n\n return composer.renamePlugins(PluginNameMap).toConfigs();\n}\n"]}
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
+ "version": "2.13.1",
3
4
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
4
- "version": "2.12.3",
5
+ "homepage": "https://2d-configs.vercel.app/",
5
6
  "type": "module",
6
- "license": "MIT",
7
- "public": true,
8
- "sideEffects": false,
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
9
12
  "exports": {
10
13
  "./package.json": "./package.json",
11
14
  ".": {
@@ -19,29 +22,28 @@
19
22
  }
20
23
  }
21
24
  },
22
- "main": "./dist/index.js",
23
- "types": "./dist/index.d.ts",
25
+ "sideEffects": false,
24
26
  "keywords": [
25
27
  "eslint-config"
26
28
  ],
27
- "files": [
28
- "dist"
29
- ],
29
+ "license": "MIT",
30
+ "public": true,
30
31
  "dependencies": {
31
32
  "@eslint-community/eslint-plugin-eslint-comments": "4.4.1",
32
- "@eslint-react/eslint-plugin": "1.23.1",
33
+ "@eslint-react/eslint-plugin": "1.23.2",
33
34
  "@eslint/compat": "1.2.4",
34
35
  "@eslint/js": "9.17.0",
35
36
  "@graphql-eslint/eslint-plugin": "4.3.0",
36
- "@next/eslint-plugin-next": "15.1.3",
37
- "@tanstack/eslint-plugin-query": "5.62.15",
38
- "@typescript-eslint/parser": "8.19.0",
39
- "eslint-config-flat-gitignore": "0.3.0",
37
+ "@next/eslint-plugin-next": "15.1.4",
38
+ "@tanstack/eslint-plugin-query": "5.62.16",
39
+ "@typescript-eslint/parser": "8.19.1",
40
+ "eslint-config-flat-gitignore": "1.0.0",
40
41
  "eslint-config-prettier": "9.1.0",
41
- "eslint-flat-config-utils": "0.4.0",
42
+ "eslint-flat-config-utils": "1.0.0",
42
43
  "eslint-plugin-antfu": "2.7.0",
43
44
  "eslint-plugin-drizzle": "0.2.3",
44
45
  "eslint-plugin-jsdoc": "50.6.1",
46
+ "eslint-plugin-jsonc": "2.18.2",
45
47
  "eslint-plugin-n": "17.15.1",
46
48
  "eslint-plugin-react": "7.37.3",
47
49
  "eslint-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
@@ -55,25 +57,29 @@
55
57
  "find-up": "7.0.0",
56
58
  "globals": "15.14.0",
57
59
  "graphql-config": "5.1.3",
58
- "local-pkg": "0.5.1",
59
- "typescript-eslint": "8.19.0",
60
- "@2digits/constants": "0.3.4",
61
- "@2digits/eslint-plugin": "2.3.20"
60
+ "jsonc-eslint-parser": "2.4.0",
61
+ "local-pkg": "1.0.0",
62
+ "typescript-eslint": "8.19.1",
63
+ "@2digits/constants": "0.3.5",
64
+ "@2digits/eslint-plugin": "2.3.22"
62
65
  },
63
66
  "devDependencies": {
67
+ "@eslint/config-inspector": "0.7.1",
64
68
  "@types/eslint__js": "8.42.3",
65
69
  "@types/node": "22.10.5",
66
- "@typescript-eslint/utils": "8.19.0",
70
+ "@typescript-eslint/utils": "8.19.1",
67
71
  "eslint": "9.17.0",
68
- "eslint-typegen": "0.3.2",
72
+ "eslint-typegen": "1.0.0",
69
73
  "tsup": "8.3.5",
70
- "typescript": "5.7.2",
71
- "@2digits/tsconfig": "0.6.2"
74
+ "typescript": "5.7.3",
75
+ "@2digits/tsconfig": "0.6.3"
72
76
  },
73
77
  "scripts": {
74
78
  "build": "tsup",
75
79
  "dev": "tsup --watch",
76
80
  "lint": "eslint .",
77
- "types": "tsc --noEmit"
81
+ "types": "tsc --noEmit",
82
+ "docs": "config-inspector build",
83
+ "docs:dev": "config-inspector"
78
84
  }
79
85
  }