@standard-config/eslint 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -172,6 +172,10 @@ const config$1 = {
172
172
  groupName: "overrides",
173
173
  elementNamePattern: "^overrides$"
174
174
  },
175
+ {
176
+ groupName: "parser",
177
+ elementNamePattern: "^parser$"
178
+ },
175
179
  {
176
180
  groupName: "plugins",
177
181
  elementNamePattern: "^plugins$"
@@ -187,6 +191,7 @@ const config$1 = {
187
191
  "extends",
188
192
  "ignores",
189
193
  "plugins",
194
+ "parser",
190
195
  "unknown",
191
196
  "rules",
192
197
  "overrides"
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["config","config","config","_includeIgnoreFile","eslintDefineConfig","configIgnores","configBase","configConfigFiles","configReact"],"sources":["../src/config-base/index.ts","../src/config-config-files/index.ts","../src/config-react/index.ts","../src/config-ignores/index.ts","../src/define-config/index.ts"],"sourcesContent":["import type { LinterConfigEntry } from '../types/index.d.ts';\nimport pluginPerfectionist from 'eslint-plugin-perfectionist';\nimport tseslint from 'typescript-eslint';\n\n/**\n * This config is intentionally limited to rules not supported by Oxlint\n * and formatting options not supported by Prettier.\n */\nconst config: LinterConfigEntry = {\n\tname: 'Base Config',\n\tplugins: {\n\t\t'@typescript-eslint': tseslint.plugin,\n\t\t'perfectionist': pluginPerfectionist,\n\t},\n\tlanguageOptions: {\n\t\tparser: tseslint.parser,\n\t\tparserOptions: {\n\t\t\tprojectService: true,\n\t\t},\n\t},\n\tlinterOptions: {\n\t\treportUnusedDisableDirectives: 'error',\n\t\treportUnusedInlineConfigs: 'error',\n\t},\n\trules: {\n\t\t/* oxlint-disable-next-line unicorn/no-useless-spread */\n\t\t...{\n\t\t\t'camelcase': ['error', { properties: 'always' }],\n\t\t\t'dot-notation': 'error',\n\t\t\t'func-name-matching': [\n\t\t\t\t'error',\n\t\t\t\t'never',\n\t\t\t\t{ considerPropertyDescriptor: true },\n\t\t\t],\n\t\t},\n\t\t'@typescript-eslint/consistent-type-assertions': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tassertionStyle: 'as',\n\t\t\t\tobjectLiteralTypeAssertions: 'allow-as-parameter',\n\t\t\t},\n\t\t],\n\t\t'@typescript-eslint/consistent-type-exports': [\n\t\t\t'error',\n\t\t\t{ fixMixedExportsWithInlineTypeSpecifier: true },\n\t\t],\n\t\t'@typescript-eslint/no-unnecessary-qualifier': 'error',\n\t\t'@typescript-eslint/no-useless-default-assignment': 'error',\n\t\t'@typescript-eslint/parameter-properties': [\n\t\t\t'error',\n\t\t\t{ prefer: 'parameter-property' },\n\t\t],\n\t\t'@typescript-eslint/prefer-readonly': 'error',\n\t\t'perfectionist/sort-array-includes': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-classes': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tgroups: ['property', 'constructor'],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-exports': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-imports': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'mock-side-effect',\n\t\t\t\t\t\telementNamePattern: '^.*/_*(mocks)_*/.*$',\n\t\t\t\t\t\tselector: 'side-effect',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'mock',\n\t\t\t\t\t\telementNamePattern: '^.*/_*(mocks)_*/.*$',\n\t\t\t\t\t\tselector: 'import',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'mock-side-effect',\n\t\t\t\t\t'mock',\n\t\t\t\t\t['type-builtin', 'type-external'],\n\t\t\t\t\t'type-internal',\n\t\t\t\t\t['type-parent', 'type-sibling', 'type-index'],\n\t\t\t\t\t['value-builtin', 'value-external'],\n\t\t\t\t\t'value-internal',\n\t\t\t\t\t['value-parent', 'value-sibling', 'value-index'],\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'style',\n\t\t\t\t\t'side-effect',\n\t\t\t\t\t'side-effect-style',\n\t\t\t\t],\n\t\t\t\tinternalPattern: ['^(#|@/).*'],\n\t\t\t\tnewlinesBetween: 0,\n\t\t\t\tsortSideEffects: true,\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-interfaces': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tgroups: ['index-signature', 'unknown', 'method'],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-intersection-types': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-named-exports': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-named-imports': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-object-types': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tgroups: ['index-signature', 'unknown', 'method'],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-objects': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\ttype: 'natural',\n\t\t\t\tuseConfigurationIf: {\n\t\t\t\t\tobjectType: 'destructured',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'unsorted',\n\t\t\t\tuseConfigurationIf: {\n\t\t\t\t\tobjectType: 'non-destructured',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-union-types': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'false',\n\t\t\t\t\t\telementNamePattern: '^false$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'never',\n\t\t\t\t\t\telementNamePattern: '^never$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'react',\n\t\t\t\t\t\telementNamePattern: '^react.+',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'react',\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'tuple',\n\t\t\t\t\t'false',\n\t\t\t\t\t'nullish',\n\t\t\t\t\t'never',\n\t\t\t\t],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t},\n};\n\nexport default config;\n","import type { LinterConfigEntry } from '../types/index.d.ts';\nimport pluginPerfectionist from 'eslint-plugin-perfectionist';\n\nconst config: LinterConfigEntry = {\n\tname: 'Config Files',\n\tplugins: {\n\t\tperfectionist: pluginPerfectionist,\n\t},\n\trules: {\n\t\t'perfectionist/sort-objects': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'extends',\n\t\t\t\t\t\telementNamePattern: '^extends$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'files',\n\t\t\t\t\t\telementNamePattern: '^files$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'ignores',\n\t\t\t\t\t\telementNamePattern: '^(ignores|ignorePatterns)$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'name',\n\t\t\t\t\t\telementNamePattern: '^(name|groupName)$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'overrides',\n\t\t\t\t\t\telementNamePattern: '^overrides$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'plugins',\n\t\t\t\t\t\telementNamePattern: '^plugins$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'rules',\n\t\t\t\t\t\telementNamePattern: '^rules$',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'name',\n\t\t\t\t\t'files',\n\t\t\t\t\t'extends',\n\t\t\t\t\t'ignores',\n\t\t\t\t\t'plugins',\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'rules',\n\t\t\t\t\t'overrides',\n\t\t\t\t],\n\t\t\t\tnewlinesBetween: 0,\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t},\n};\n\nexport default config;\n","import type { ESLint } from 'eslint';\nimport type { LinterConfigEntry } from '../types/index.d.ts';\nimport pluginPerfectionist from 'eslint-plugin-perfectionist';\nimport pluginReact from 'eslint-plugin-react';\nimport pluginReactHooks from 'eslint-plugin-react-hooks';\n\n/**\n * This config is intentionally limited to rules not supported by Oxlint\n * and formatting options not supported by Prettier.\n */\nconst config: LinterConfigEntry = {\n\tname: 'React',\n\tplugins: {\n\t\t'perfectionist': pluginPerfectionist,\n\t\t'react': pluginReact,\n\t\t'react-hooks': pluginReactHooks as ESLint.Plugin,\n\t},\n\trules: {\n\t\t'perfectionist/sort-jsx-props': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'as',\n\t\t\t\t\t\telementNamePattern: '^as$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'callback',\n\t\t\t\t\t\telementNamePattern: '^on.+',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'children',\n\t\t\t\t\t\telementNamePattern: '^children$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'key',\n\t\t\t\t\t\telementNamePattern: '^key$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'ref',\n\t\t\t\t\t\telementNamePattern: '^ref$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'unsafe',\n\t\t\t\t\t\telementNamePattern: '^dangerously.+',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'key',\n\t\t\t\t\t'ref',\n\t\t\t\t\t'as',\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'shorthand-prop',\n\t\t\t\t\t'callback',\n\t\t\t\t\t'children',\n\t\t\t\t\t'unsafe',\n\t\t\t\t],\n\t\t\t\ttype: 'unsorted',\n\t\t\t},\n\t\t],\n\t\t'react/destructuring-assignment': ['error', 'always'],\n\t\t'react/function-component-definition': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tnamedComponents: ['arrow-function', 'function-declaration'],\n\t\t\t\tunnamedComponents: 'arrow-function',\n\t\t\t},\n\t\t],\n\t\t'react/hook-use-state': 'error',\n\t\t'react/jsx-no-constructed-context-values': 'error',\n\t\t'react/no-adjacent-inline-elements': 'error',\n\t\t'react/no-unstable-nested-components': 'error',\n\n\t\t// Enforce all `react-hooks` rules as errors\n\t\t...Object.fromEntries(\n\t\t\tObject.keys(\n\t\t\t\tpluginReactHooks.configs.flat['recommended-latest'].rules\n\t\t\t).map((rule) => [rule, 'error'])\n\t\t),\n\t},\n};\n\nexport default config;\n","import type { LinterConfigEntry } from '../types/index.d.ts';\nimport { includeIgnoreFile as _includeIgnoreFile } from '@eslint/compat';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst configPath = path.resolve('.gitignore');\nconst configExists = fs.existsSync(configPath);\n\nconst config: LinterConfigEntry = configExists\n\t? _includeIgnoreFile(configPath, '.gitignore')\n\t: {};\n\nexport default config;\n","import type { Config } from 'eslint/config';\nimport pluginOxlint from 'eslint-plugin-oxlint';\nimport { defineConfig as eslintDefineConfig } from 'eslint/config';\nimport configBase from '../config-base/index.ts';\nimport configConfigFiles from '../config-config-files/index.ts';\nimport configIgnores from '../config-ignores/index.ts';\nimport configReact from '../config-react/index.ts';\n\n/**\n * Combine Standard Config with optional additional config.\n */\nexport default function defineConfig(\n\t...configs: Parameters<typeof eslintDefineConfig>\n): Config[] {\n\tconst configExtension =\n\t\tconfigs.length > 0 ? eslintDefineConfig(...configs) : [];\n\n\treturn eslintDefineConfig({\n\t\tname: 'Standard Config',\n\t\tfiles: ['**/*.{ts,tsx,cts,mts}'],\n\t\textends: [\n\t\t\tconfigIgnores,\n\t\t\tconfigBase,\n\t\t\t{\n\t\t\t\tfiles: ['**/*.config.{ts,cts,mts}'],\n\t\t\t\t...configConfigFiles,\n\t\t\t},\n\t\t\tincludeReactConfig(configExtension),\n\t\t\tpluginOxlint.configs['flat/all'],\n\t\t],\n\t});\n}\n\nfunction includeReactConfig(configs: Config[]): Config[] {\n\tlet react: unknown;\n\n\tfor (const { settings } of configs.toReversed()) {\n\t\tif (settings?.react && typeof settings?.react === 'object') {\n\t\t\treact = settings.react;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!react) {\n\t\treturn configs;\n\t}\n\n\treturn [\n\t\t{\n\t\t\tsettings: { react },\n\t\t\t...configReact,\n\t\t},\n\t\t...configs,\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAQA,MAAM,SAA4B;CACjC,MAAM;CACN,SAAS;EACR,sBAAsB,SAAS;EAC/B,iBAAiB;EACjB;CACD,iBAAiB;EAChB,QAAQ,SAAS;EACjB,eAAe,EACd,gBAAgB,MAChB;EACD;CACD,eAAe;EACd,+BAA+B;EAC/B,2BAA2B;EAC3B;CACD,OAAO;EAGL,aAAa,CAAC,SAAS,EAAE,YAAY,UAAU,CAAC;EAChD,gBAAgB;EAChB,sBAAsB;GACrB;GACA;GACA,EAAE,4BAA4B,MAAM;GACpC;EAEF,iDAAiD,CAChD,SACA;GACC,gBAAgB;GAChB,6BAA6B;GAC7B,CACD;EACD,8CAA8C,CAC7C,SACA,EAAE,wCAAwC,MAAM,CAChD;EACD,+CAA+C;EAC/C,oDAAoD;EACpD,2CAA2C,CAC1C,SACA,EAAE,QAAQ,sBAAsB,CAChC;EACD,sCAAsC;EACtC,qCAAqC,CAAC,SAAS,EAAE,MAAM,WAAW,CAAC;EACnE,8BAA8B,CAC7B,SACA;GACC,QAAQ,CAAC,YAAY,cA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A;EACC,cAAc;GACb;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;EACD,QAAQ;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,iBAAiB;EACjB,MAAM;EACN,CACD,EACD;CACD;;;;;;;;AC/CD,MAAMC,WAA4B;CACjC,MAAM;CACN,SAAS;EACR,iBAAiB;EACjB,SAAS;EACT,eAAe;EACf;CACD,OAAO;EACN,gCAAgC,CAC/B,SACA;GACC,cAAc;IACb;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;GACD,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD,MAAM;GACN,CACD;EACD,kCAAkC,CAAC,SAAS,SAAS;EACrD,uCAAuC,CACtC,SACA;GACC,iBAAiB,CAAC,kBAAkB,uBAAuB;GAC3D,mBAAmB;GACnB,CACD;EACD,wBAAwB;EACxB,2CAA2C;EAC3C,qCAAqC;EACrC,uCAAuC;EAGvC,GAAG,OAAO,YACT,OAAO,KACN,iBAAiB,QAAQ,KAAK,sBAAsB,MACpD,CAAC,KAAK,SAAS,CAAC,MAAM,QAAQ,CAAC,CAChC;EACD;CACD;;;;AC3ED,MAAM,aAAa,KAAK,QAAQ,aAAa;AAG7C,MAAMC,WAFe,GAAG,WAAW,WAAW,GAG3CC,kBAAmB,YAAY,aAAa,GAC5C,EAAE;;;;;;;ACCL,SAAwB,aACvB,GAAG,SACQ;CACX,MAAM,kBACL,QAAQ,SAAS,IAAIC,eAAmB,GAAG,QAAQ,GAAG,EAAE;AAEzD,QAAOA,eAAmB;EACzB,MAAM;EACN,OAAO,CAAC,wBAAwB;EAChC,SAAS;GACRC;GACAC;GACA;IACC,OAAO,CAAC,2BAA2B;IACnC,GAAGC;IACH;GACD,mBAAmB,gBAAgB;GACnC,aAAa,QAAQ;GACrB;EACD,CAAC;;AAGH,SAAS,mBAAmB,SAA6B;CACxD,IAAI;AAEJ,MAAK,MAAM,EAAE,cAAc,QAAQ,YAAY,CAC9C,KAAI,UAAU,SAAS,OAAO,UAAU,UAAU,UAAU;AAC3D,UAAQ,SAAS;AACjB;;AAIF,KAAI,CAAC,MACJ,QAAO;AAGR,QAAO,CACN;EACC,UAAU,EAAE,OAAO;EACnB,GAAGC;EACH,EACD,GAAG,QACH"}
1
+ {"version":3,"file":"index.mjs","names":["config","config","config","_includeIgnoreFile","eslintDefineConfig","configIgnores","configBase","configConfigFiles","configReact"],"sources":["../src/config-base/index.ts","../src/config-config-files/index.ts","../src/config-react/index.ts","../src/config-ignores/index.ts","../src/define-config/index.ts"],"sourcesContent":["import type { LinterConfigEntry } from '../types/index.d.ts';\nimport pluginPerfectionist from 'eslint-plugin-perfectionist';\nimport tseslint from 'typescript-eslint';\n\n/**\n * This config is intentionally limited to rules not supported by Oxlint\n * and formatting options not supported by Prettier.\n */\nconst config: LinterConfigEntry = {\n\tname: 'Base Config',\n\tplugins: {\n\t\t'@typescript-eslint': tseslint.plugin,\n\t\t'perfectionist': pluginPerfectionist,\n\t},\n\tlanguageOptions: {\n\t\tparser: tseslint.parser,\n\t\tparserOptions: {\n\t\t\tprojectService: true,\n\t\t},\n\t},\n\tlinterOptions: {\n\t\treportUnusedDisableDirectives: 'error',\n\t\treportUnusedInlineConfigs: 'error',\n\t},\n\trules: {\n\t\t/* oxlint-disable-next-line unicorn/no-useless-spread */\n\t\t...{\n\t\t\t'camelcase': ['error', { properties: 'always' }],\n\t\t\t'dot-notation': 'error',\n\t\t\t'func-name-matching': [\n\t\t\t\t'error',\n\t\t\t\t'never',\n\t\t\t\t{ considerPropertyDescriptor: true },\n\t\t\t],\n\t\t},\n\t\t'@typescript-eslint/consistent-type-assertions': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tassertionStyle: 'as',\n\t\t\t\tobjectLiteralTypeAssertions: 'allow-as-parameter',\n\t\t\t},\n\t\t],\n\t\t'@typescript-eslint/consistent-type-exports': [\n\t\t\t'error',\n\t\t\t{ fixMixedExportsWithInlineTypeSpecifier: true },\n\t\t],\n\t\t'@typescript-eslint/no-unnecessary-qualifier': 'error',\n\t\t'@typescript-eslint/no-useless-default-assignment': 'error',\n\t\t'@typescript-eslint/parameter-properties': [\n\t\t\t'error',\n\t\t\t{ prefer: 'parameter-property' },\n\t\t],\n\t\t'@typescript-eslint/prefer-readonly': 'error',\n\t\t'perfectionist/sort-array-includes': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-classes': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tgroups: ['property', 'constructor'],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-exports': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-imports': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'mock-side-effect',\n\t\t\t\t\t\telementNamePattern: '^.*/_*(mocks)_*/.*$',\n\t\t\t\t\t\tselector: 'side-effect',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'mock',\n\t\t\t\t\t\telementNamePattern: '^.*/_*(mocks)_*/.*$',\n\t\t\t\t\t\tselector: 'import',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'mock-side-effect',\n\t\t\t\t\t'mock',\n\t\t\t\t\t['type-builtin', 'type-external'],\n\t\t\t\t\t'type-internal',\n\t\t\t\t\t['type-parent', 'type-sibling', 'type-index'],\n\t\t\t\t\t['value-builtin', 'value-external'],\n\t\t\t\t\t'value-internal',\n\t\t\t\t\t['value-parent', 'value-sibling', 'value-index'],\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'style',\n\t\t\t\t\t'side-effect',\n\t\t\t\t\t'side-effect-style',\n\t\t\t\t],\n\t\t\t\tinternalPattern: ['^(#|@/).*'],\n\t\t\t\tnewlinesBetween: 0,\n\t\t\t\tsortSideEffects: true,\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-interfaces': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tgroups: ['index-signature', 'unknown', 'method'],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-intersection-types': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-named-exports': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-named-imports': ['error', { type: 'natural' }],\n\t\t'perfectionist/sort-object-types': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tgroups: ['index-signature', 'unknown', 'method'],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-objects': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\ttype: 'natural',\n\t\t\t\tuseConfigurationIf: {\n\t\t\t\t\tobjectType: 'destructured',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'unsorted',\n\t\t\t\tuseConfigurationIf: {\n\t\t\t\t\tobjectType: 'non-destructured',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\t'perfectionist/sort-union-types': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'false',\n\t\t\t\t\t\telementNamePattern: '^false$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'never',\n\t\t\t\t\t\telementNamePattern: '^never$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'react',\n\t\t\t\t\t\telementNamePattern: '^react.+',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'react',\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'tuple',\n\t\t\t\t\t'false',\n\t\t\t\t\t'nullish',\n\t\t\t\t\t'never',\n\t\t\t\t],\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t},\n};\n\nexport default config;\n","import type { LinterConfigEntry } from '../types/index.d.ts';\nimport pluginPerfectionist from 'eslint-plugin-perfectionist';\n\nconst config: LinterConfigEntry = {\n\tname: 'Config Files',\n\tplugins: {\n\t\tperfectionist: pluginPerfectionist,\n\t},\n\trules: {\n\t\t'perfectionist/sort-objects': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'extends',\n\t\t\t\t\t\telementNamePattern: '^extends$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'files',\n\t\t\t\t\t\telementNamePattern: '^files$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'ignores',\n\t\t\t\t\t\telementNamePattern: '^(ignores|ignorePatterns)$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'name',\n\t\t\t\t\t\telementNamePattern: '^(name|groupName)$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'overrides',\n\t\t\t\t\t\telementNamePattern: '^overrides$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'parser',\n\t\t\t\t\t\telementNamePattern: '^parser$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'plugins',\n\t\t\t\t\t\telementNamePattern: '^plugins$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'rules',\n\t\t\t\t\t\telementNamePattern: '^rules$',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'name',\n\t\t\t\t\t'files',\n\t\t\t\t\t'extends',\n\t\t\t\t\t'ignores',\n\t\t\t\t\t'plugins',\n\t\t\t\t\t'parser',\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'rules',\n\t\t\t\t\t'overrides',\n\t\t\t\t],\n\t\t\t\tnewlinesBetween: 0,\n\t\t\t\ttype: 'natural',\n\t\t\t},\n\t\t],\n\t},\n};\n\nexport default config;\n","import type { ESLint } from 'eslint';\nimport type { LinterConfigEntry } from '../types/index.d.ts';\nimport pluginPerfectionist from 'eslint-plugin-perfectionist';\nimport pluginReact from 'eslint-plugin-react';\nimport pluginReactHooks from 'eslint-plugin-react-hooks';\n\n/**\n * This config is intentionally limited to rules not supported by Oxlint\n * and formatting options not supported by Prettier.\n */\nconst config: LinterConfigEntry = {\n\tname: 'React',\n\tplugins: {\n\t\t'perfectionist': pluginPerfectionist,\n\t\t'react': pluginReact,\n\t\t'react-hooks': pluginReactHooks as ESLint.Plugin,\n\t},\n\trules: {\n\t\t'perfectionist/sort-jsx-props': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tcustomGroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'as',\n\t\t\t\t\t\telementNamePattern: '^as$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'callback',\n\t\t\t\t\t\telementNamePattern: '^on.+',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'children',\n\t\t\t\t\t\telementNamePattern: '^children$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'key',\n\t\t\t\t\t\telementNamePattern: '^key$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'ref',\n\t\t\t\t\t\telementNamePattern: '^ref$',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tgroupName: 'unsafe',\n\t\t\t\t\t\telementNamePattern: '^dangerously.+',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tgroups: [\n\t\t\t\t\t'key',\n\t\t\t\t\t'ref',\n\t\t\t\t\t'as',\n\t\t\t\t\t'unknown',\n\t\t\t\t\t'shorthand-prop',\n\t\t\t\t\t'callback',\n\t\t\t\t\t'children',\n\t\t\t\t\t'unsafe',\n\t\t\t\t],\n\t\t\t\ttype: 'unsorted',\n\t\t\t},\n\t\t],\n\t\t'react/destructuring-assignment': ['error', 'always'],\n\t\t'react/function-component-definition': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\tnamedComponents: ['arrow-function', 'function-declaration'],\n\t\t\t\tunnamedComponents: 'arrow-function',\n\t\t\t},\n\t\t],\n\t\t'react/hook-use-state': 'error',\n\t\t'react/jsx-no-constructed-context-values': 'error',\n\t\t'react/no-adjacent-inline-elements': 'error',\n\t\t'react/no-unstable-nested-components': 'error',\n\n\t\t// Enforce all `react-hooks` rules as errors\n\t\t...Object.fromEntries(\n\t\t\tObject.keys(\n\t\t\t\tpluginReactHooks.configs.flat['recommended-latest'].rules\n\t\t\t).map((rule) => [rule, 'error'])\n\t\t),\n\t},\n};\n\nexport default config;\n","import type { LinterConfigEntry } from '../types/index.d.ts';\nimport { includeIgnoreFile as _includeIgnoreFile } from '@eslint/compat';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst configPath = path.resolve('.gitignore');\nconst configExists = fs.existsSync(configPath);\n\nconst config: LinterConfigEntry = configExists\n\t? _includeIgnoreFile(configPath, '.gitignore')\n\t: {};\n\nexport default config;\n","import type { Config } from 'eslint/config';\nimport pluginOxlint from 'eslint-plugin-oxlint';\nimport { defineConfig as eslintDefineConfig } from 'eslint/config';\nimport configBase from '../config-base/index.ts';\nimport configConfigFiles from '../config-config-files/index.ts';\nimport configIgnores from '../config-ignores/index.ts';\nimport configReact from '../config-react/index.ts';\n\n/**\n * Combine Standard Config with optional additional config.\n */\nexport default function defineConfig(\n\t...configs: Parameters<typeof eslintDefineConfig>\n): Config[] {\n\tconst configExtension =\n\t\tconfigs.length > 0 ? eslintDefineConfig(...configs) : [];\n\n\treturn eslintDefineConfig({\n\t\tname: 'Standard Config',\n\t\tfiles: ['**/*.{ts,tsx,cts,mts}'],\n\t\textends: [\n\t\t\tconfigIgnores,\n\t\t\tconfigBase,\n\t\t\t{\n\t\t\t\tfiles: ['**/*.config.{ts,cts,mts}'],\n\t\t\t\t...configConfigFiles,\n\t\t\t},\n\t\t\tincludeReactConfig(configExtension),\n\t\t\tpluginOxlint.configs['flat/all'],\n\t\t],\n\t});\n}\n\nfunction includeReactConfig(configs: Config[]): Config[] {\n\tlet react: unknown;\n\n\tfor (const { settings } of configs.toReversed()) {\n\t\tif (settings?.react && typeof settings?.react === 'object') {\n\t\t\treact = settings.react;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!react) {\n\t\treturn configs;\n\t}\n\n\treturn [\n\t\t{\n\t\t\tsettings: { react },\n\t\t\t...configReact,\n\t\t},\n\t\t...configs,\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAQA,MAAM,SAA4B;CACjC,MAAM;CACN,SAAS;EACR,sBAAsB,SAAS;EAC/B,iBAAiB;EACjB;CACD,iBAAiB;EAChB,QAAQ,SAAS;EACjB,eAAe,EACd,gBAAgB,MAChB;EACD;CACD,eAAe;EACd,+BAA+B;EAC/B,2BAA2B;EAC3B;CACD,OAAO;EAGL,aAAa,CAAC,SAAS,EAAE,YAAY,UAAU,CAAC;EAChD,gBAAgB;EAChB,sBAAsB;GACrB;GACA;GACA,EAAE,4BAA4B,MAAM;GACpC;EAEF,iDAAiD,CAChD,SACA;GACC,gBAAgB;GAChB,6BAA6B;GAC7B,CACD;EACD,8CAA8C,CAC7C,SACA,EAAE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;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;GACD,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACD,MAAM;GACN,CACD;EACD;CACD;;;;AC3JD,MAAMA,WAA4B;CACjC,MAAM;CACN,SAAS,EACR,eAAe,qBACf;CACD,OAAO,EACN,8BAA8B,CAC7B,SACA;EACC,cAAc;GACb;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;IACC,WAAW;IACX,oBAAoB;IACpB;GACD;EACD,QAAQ;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,iBAAiB;EACjB,MAAM;EACN,CACD,EACD;CACD;;;;;;;;ACpDD,MAAMC,WAA4B;CACjC,MAAM;CACN,SAAS;EACR,iBAAiB;EACjB,SAAS;EACT,eAAe;EACf;CACD,OAAO;EACN,gCAAgC,CAC/B,SACA;GACC,cAAc;IACb;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;KACC,WAAW;KACX,oBAAoB;KACpB;IACD;GACD,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD,MAAM;GACN,CACD;EACD,kCAAkC,CAAC,SAAS,SAAS;EACrD,uCAAuC,CACtC,SACA;GACC,iBAAiB,CAAC,kBAAkB,uBAAuB;GAC3D,mBAAmB;GACnB,CACD;EACD,wBAAwB;EACxB,2CAA2C;EAC3C,qCAAqC;EACrC,uCAAuC;EAGvC,GAAG,OAAO,YACT,OAAO,KACN,iBAAiB,QAAQ,KAAK,sBAAsB,MACpD,CAAC,KAAK,SAAS,CAAC,MAAM,QAAQ,CAAC,CAChC;EACD;CACD;;;;AC3ED,MAAM,aAAa,KAAK,QAAQ,aAAa;AAG7C,MAAMC,WAFe,GAAG,WAAW,WAAW,GAG3CC,kBAAmB,YAAY,aAAa,GAC5C,EAAE;;;;;;;ACCL,SAAwB,aACvB,GAAG,SACQ;CACX,MAAM,kBACL,QAAQ,SAAS,IAAIC,eAAmB,GAAG,QAAQ,GAAG,EAAE;AAEzD,QAAOA,eAAmB;EACzB,MAAM;EACN,OAAO,CAAC,wBAAwB;EAChC,SAAS;GACRC;GACAC;GACA;IACC,OAAO,CAAC,2BAA2B;IACnC,GAAGC;IACH;GACD,mBAAmB,gBAAgB;GACnC,aAAa,QAAQ;GACrB;EACD,CAAC;;AAGH,SAAS,mBAAmB,SAA6B;CACxD,IAAI;AAEJ,MAAK,MAAM,EAAE,cAAc,QAAQ,YAAY,CAC9C,KAAI,UAAU,SAAS,OAAO,UAAU,UAAU,UAAU;AAC3D,UAAQ,SAAS;AACjB;;AAIF,KAAI,CAAC,MACJ,QAAO;AAGR,QAAO,CACN;EACC,UAAU,EAAE,OAAO;EACnB,GAAGC;EACH,EACD,GAAG,QACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standard-config/eslint",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "TypeScript-first ESLint config designed to complement Oxlint",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -39,7 +39,7 @@
39
39
  "eslint-plugin-perfectionist": "^5.5.0",
40
40
  "eslint-plugin-react": "^7.37.5",
41
41
  "eslint-plugin-react-hooks": "^7.0.1",
42
- "typescript-eslint": "^8.54.0"
42
+ "typescript-eslint": "^8.55.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@standard-config/oxlint": "*",
@@ -52,8 +52,8 @@
52
52
  }
53
53
  },
54
54
  "devDependencies": {
55
- "@standard-config/oxlint": "1.0.2",
56
- "@standard-config/prettier": "1.9.0",
55
+ "@standard-config/oxlint": "1.0.3",
56
+ "@standard-config/prettier": "1.9.1",
57
57
  "@standard-config/tsconfig": "2.0.2",
58
58
  "@types/node": "22.19.9",
59
59
  "@vitest/coverage-v8": "4.0.18",
@@ -61,7 +61,7 @@
61
61
  "husky": "9.1.7",
62
62
  "jiti": "2.6.1",
63
63
  "oxlint": "1.43.0",
64
- "oxlint-tsgolint": "0.11.4",
64
+ "oxlint-tsgolint": "0.11.5",
65
65
  "prettier": "3.8.1",
66
66
  "publint": "0.3.17",
67
67
  "tsdown": "0.20.3",