@2digits/eslint-config 2.3.2 → 2.3.4
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.cjs.map +1 -1
- package/dist/index.d.cts +136 -81
- package/dist/index.d.ts +136 -81
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugins.ts","../src/configs/comments.ts","../src/configs/graphql.ts","../src/constants.ts","../src/utils.ts","../src/configs/ignores.ts","../src/globs.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/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":["default","comments","fixupPluginRules","renamePluginsInRules","PluginNameMap","interopDefault","m","resolved","graphql","options","overrides","files","gql","recommended","composer","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","eslint","globals","javascript","jsdoc","next","tsconfigPath","parserOptions","parser","node","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","rules","sonar","storybook","storybookDirectory","languageOptions","findUp","tailwind","tailwindcss","tailwindFunctions","config","tanstack","turbo","renamePluginsInConfigs","typescript","plugin","configs","twoDigits","strictConfig","unicorn","FlatConfigComposer","isPackageExists","enabled","defaults","_","rest","userConfig","typescriptOptions"],"mappings":"AAAA,OAAoB,WAAXA,MAAgC,wBACzC,OAAoB,WAAXA,MAAiC,gCAC1C,OAAoB,WAAXA,MAA6B,kBACtC,OAAoB,WAAXA,MAA8B,wBCAhC,SAASC,GAAkC,CAChD,MAAO,CACL,CACE,KAAM,mBACN,QAAS,CACP,kBAAmBD,CACrB,EAC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,EAAQnD,EAAQ,SAAUkD,EAAgB,aAAa,CAAC,IAC1D7C,EAAWA,EAAS,OAAO+B,EAASG,EAAOvC,EAAQ,QAAQ,CAAC,CAAC,GAI7DmD,EACEnD,EAAQ,SACRkD,EAAgB,aAAa,GAC3BA,EAAgB,uBAAuB,GACvCA,EAAgB,gCAAgC,CACpD,IAEA7C,EAAWA,EAAS,OAAOmC,EAASD,EAAOvC,EAAQ,QAAQ,CAAC,CAAC,GAG3DkD,EAAgB,SAAS,IAC3B7C,EAAWA,EAAS,OAAON,EAAQwC,EAAOvC,EAAQ,OAAO,CAAC,CAAC,GAG7DK,EAAWA,EAAS,OAAO,GAAGkD,CAAU,EAEpCL,EAAgB,UAAU,IAC5B7C,EAAWA,EAAS,OAAOiB,EAAS,CAAC,GAGhCjB,EAAS,cAAcV,CAAa,EAAE,UAAU,CACzD","sourcesContent":["export { default as pluginUnicorn } from 'eslint-plugin-unicorn';\nexport { default as pluginComments } from 'eslint-plugin-eslint-comments';\nexport { default as pluginNode } from 'eslint-plugin-n';\nexport { default as pluginSonar } from 'eslint-plugin-sonarjs';\n","import { pluginComments } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:comments',\n plugins: {\n 'eslint-comments': pluginComments,\n },\n rules: {\n 'eslint-comments/no-aggregating-enable': 'error',\n 'eslint-comments/no-duplicate-disable': 'error',\n 'eslint-comments/no-unlimited-disable': 'error',\n 'eslint-comments/no-unused-enable': 'error',\n 'eslint-comments/no-unused-disable': 'error',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\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 = await interopDefault(import('@graphql-eslint/eslint-plugin'));\n\n const recommended = renamePluginsInRules(\n gql.flatConfigs['operations-recommended'].rules,\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql: fixupPluginRules(gql as never),\n },\n languageOptions: {\n parser: { ...gql, meta: { name: 'graphql' } },\n },\n files,\n rules: {\n ...recommended,\n\n ...overrides,\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': 'react-extra',\n 'react-hooks': 'react-hooks',\n 'react-compiler': 'react-compiler',\n react: 'react',\n '@typescript-eslint': 'ts',\n node: 'node',\n 'eslint-comments': 'eslint-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} as const;\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 { 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(gitIgnore),\n name: '2digits:gitignore',\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 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 { message: 'Use `Object.defineProperty` instead.', property: '__defineGetter__' },\n { message: 'Use `Object.defineProperty` instead.', property: '__defineSetter__' },\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 = {}, tsconfigPath, 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 project: tsconfigPath,\n ...(parserOptions as object),\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: '>= 20.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 tsconfigPath,\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-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 project: tsconfigPath,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\n\n 'react-hooks-extra/ensure-use-memo-has-non-empty-deps': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/ensure-custom-hooks-using-other-hooks': 'error',\n 'react-hooks-extra/ensure-use-callback-has-non-empty-deps': 'error',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n\n ...overrides,\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';\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 tsconfigPath,\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 project: tsconfigPath,\n ...(parserOptions as object),\n },\n sourceType: 'module' as const,\n };\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/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': '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 },\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 { fixupPluginRules } from '@eslint/compat';\n\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 return [\n {\n name: '2digits:tanstack',\n plugins: {\n tanstack: fixupPluginRules(tanstack as never),\n },\n rules: {\n 'tanstack/exhaustive-deps': 'error',\n 'tanstack/stable-query-client': 'error',\n 'tanstack/no-rest-destructuring': 'error',\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 = {}, tsconfigPath = true } = 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 sourceType: 'module',\n tsconfigRootDir: process.cwd(),\n project: tsconfigPath,\n ...parserOptions,\n },\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 { ignoreRestSiblings: true, argsIgnorePattern: '^_', varsIgnorePattern: '^_' },\n ],\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.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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\n sonar,\n storybook,\n tailwind,\n tanstack,\n turbo,\n typescript,\n unicorn,\n} from './configs';\nimport { PluginNameMap } from './constants';\nimport type {\n ConfigNames,\n OptionsOverrides,\n OptionsTypeScriptWithTypes,\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}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean | undefined,\n): options is T {\n if (typeof options === 'boolean') return options;\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) return {} as T;\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 );\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 (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/plugins.ts","../src/configs/comments.ts","../src/configs/graphql.ts","../src/constants.ts","../src/utils.ts","../src/configs/ignores.ts","../src/globs.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/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":["default","comments","fixupPluginRules","renamePluginsInRules","PluginNameMap","interopDefault","m","resolved","graphql","options","overrides","files","gql","recommended","composer","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","eslint","globals","javascript","jsdoc","next","tsconfigPath","parserOptions","parser","node","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","rules","sonar","storybook","storybookDirectory","languageOptions","findUp","tailwind","tailwindcss","tailwindFunctions","config","tanstack","turbo","renamePluginsInConfigs","typescript","plugin","configs","twoDigits","strictConfig","unicorn","FlatConfigComposer","isPackageExists","enabled","defaults","_","rest","userConfig","typescriptOptions"],"mappings":"AAAA,OAAoB,WAAXA,MAAgC,wBACzC,OAAoB,WAAXA,MAAiC,gCAC1C,OAAoB,WAAXA,MAA6B,kBACtC,OAAoB,WAAXA,MAA8B,wBCAhC,SAASC,GAAkC,CAChD,MAAO,CACL,CACE,KAAM,mBACN,QAAS,CACP,kBAAmBD,CACrB,EACA,MAAO,CACL,wCAAyC,QACzC,uCAAwC,QACxC,uCAAwC,QACxC,mCAAoC,QACpC,oCAAqC,OACvC,CACF,CACF,CACF,CCnBA,OAAS,oBAAAE,MAAwB,iBACjC,OAAS,wBAAAC,MAA4B,2BCD9B,IAAMC,EAAgB,CAC3B,aAAc,OACd,kCAAmC,0BACnC,4BAA6B,oBAC7B,oBAAqB,YACrB,gBAAiB,cACjB,cAAe,cACf,iBAAkB,iBAClB,MAAO,QACP,qBAAsB,KACtB,KAAM,OACN,kBAAmB,kBACnB,UAAW,YACX,MAAO,QACP,MAAO,QACP,QAAS,UACT,YAAa,cACb,kBAAmB,WACnB,WAAY,WACZ,kBAAmB,MACnB,QAAS,OACX,ECnBA,eAAsBC,EACpBC,EACiD,CACjD,IAAMC,EAAW,MAAMD,EAEvB,OAASC,EAAqC,SAAWA,CAC3D,CFDA,eAAsBC,EAAQC,EAA4B,CAAC,EAAmC,CAC5F,GAAM,CAAE,UAAAC,EAAY,CAAC,EAAG,MAAAC,EAAQ,CAAC,eAAgB,UAAU,CAAE,EAAIF,EAE3DG,EAAM,MAAMP,EAAe,OAAO,+BAA+B,CAAC,EAElEQ,EAAcV,EAClBS,EAAI,YAAY,wBAAwB,EAAE,MAC1CR,CACF,EAEA,MAAO,CACL,CACE,KAAM,kBACN,QAAS,CACP,IAAKF,EAAiBU,CAAY,CACpC,EACA,gBAAiB,CACf,OAAQ,CAAE,GAAGA,EAAK,KAAM,CAAE,KAAM,SAAU,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nD,EAAQ,KAAMkD,EAAgB,MAAM,CAAC,IAC/C7C,EAAWA,EAAS,OAClBY,EAAK,CACH,GAAGsB,EAAOvC,EAAQ,IAAI,EACtB,GAAGwD,CACL,CAAC,CACH,GAGEL,EAAQnD,EAAQ,UAAWkD,EAAgB,WAAW,CAAC,IACzD7C,EAAWA,EAAS,OAClB2B,EAAU,CACR,GAAGO,EAAOvC,EAAQ,SAAS,EAC3B,GAAGwD,CACL,CAAC,CACH,GAGEL,EAAQnD,EAAQ,SAAUkD,EAAgB,aAAa,CAAC,IAC1D7C,EAAWA,EAAS,OAAO+B,EAASG,EAAOvC,EAAQ,QAAQ,CAAC,CAAC,GAI7DmD,EACEnD,EAAQ,SACRkD,EAAgB,aAAa,GAC3BA,EAAgB,uBAAuB,GACvCA,EAAgB,gCAAgC,CACpD,IAEA7C,EAAWA,EAAS,OAAOmC,EAASD,EAAOvC,EAAQ,QAAQ,CAAC,CAAC,GAG3DkD,EAAgB,SAAS,IAC3B7C,EAAWA,EAAS,OAAON,EAAQwC,EAAOvC,EAAQ,OAAO,CAAC,CAAC,GAG7DK,EAAWA,EAAS,OAAO,GAAGkD,CAAU,EAEpCL,EAAgB,UAAU,IAC5B7C,EAAWA,EAAS,OAAOiB,EAAS,CAAC,GAGhCjB,EAAS,cAAcV,CAAa,EAAE,UAAU,CACzD","sourcesContent":["export { default as pluginUnicorn } from 'eslint-plugin-unicorn';\nexport { default as pluginComments } from 'eslint-plugin-eslint-comments';\nexport { default as pluginNode } from 'eslint-plugin-n';\nexport { default as pluginSonar } from 'eslint-plugin-sonarjs';\n","import { pluginComments } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:comments',\n plugins: {\n 'eslint-comments': pluginComments,\n },\n rules: {\n 'eslint-comments/no-aggregating-enable': 'error',\n 'eslint-comments/no-duplicate-disable': 'error',\n 'eslint-comments/no-unlimited-disable': 'error',\n 'eslint-comments/no-unused-enable': 'error',\n 'eslint-comments/no-unused-disable': 'error',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\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 = await interopDefault(import('@graphql-eslint/eslint-plugin'));\n\n const recommended = renamePluginsInRules(\n gql.flatConfigs['operations-recommended'].rules,\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql: fixupPluginRules(gql as never),\n },\n languageOptions: {\n parser: { ...gql, meta: { name: 'graphql' } },\n },\n files,\n rules: {\n ...recommended,\n\n ...overrides,\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': 'react-extra',\n 'react-hooks': 'react-hooks',\n 'react-compiler': 'react-compiler',\n react: 'react',\n '@typescript-eslint': 'ts',\n node: 'node',\n 'eslint-comments': 'eslint-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} as const;\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 { 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(gitIgnore),\n name: '2digits:gitignore',\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 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 = {}, tsconfigPath, 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 project: tsconfigPath,\n ...(parserOptions as object),\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: '>= 20.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 tsconfigPath,\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-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 project: tsconfigPath,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\n\n 'react-hooks-extra/ensure-use-memo-has-non-empty-deps': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/ensure-custom-hooks-using-other-hooks': 'error',\n 'react-hooks-extra/ensure-use-callback-has-non-empty-deps': 'error',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n\n ...overrides,\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';\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 tsconfigPath,\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 project: tsconfigPath,\n ...(parserOptions as object),\n },\n sourceType: 'module' as const,\n };\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/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': '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 },\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 { fixupPluginRules } from '@eslint/compat';\n\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 return [\n {\n name: '2digits:tanstack',\n plugins: {\n tanstack: fixupPluginRules(tanstack as never),\n },\n rules: {\n 'tanstack/exhaustive-deps': 'error',\n 'tanstack/stable-query-client': 'error',\n 'tanstack/no-rest-destructuring': 'error',\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 = {}, tsconfigPath = true } = 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 sourceType: 'module',\n tsconfigRootDir: process.cwd(),\n project: tsconfigPath,\n ...parserOptions,\n },\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\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.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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\n sonar,\n storybook,\n tailwind,\n tanstack,\n turbo,\n typescript,\n unicorn,\n} from './configs';\nimport { PluginNameMap } from './constants';\nimport type {\n ConfigNames,\n OptionsOverrides,\n OptionsTypeScriptWithTypes,\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}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean | undefined,\n): options is T {\n if (typeof options === 'boolean') return options;\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) return {} as T;\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 );\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 (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"]}
|