@d3lm/lint-preset 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/delm/dev/eslint-plugin/dist/chunk-QDQNT3NA.cjs","../src/configs/unicorn.ts","../src/configs/abbreviations.ts","../src/configs/javascript.ts","../src/configs/react.ts","../src/configs/typescript.ts"],"names":[],"mappings":"AAAA;ACqBO,IAAM,mBAAA,EAAyC;AAAA;AAAA,EAEpD,qCAAA,EAAuC,OAAA;AAAA,EACvC,uBAAA,EAAyB,MAAA;AAAA,EACzB,kCAAA,EAAoC,OAAA;AAAA,EACpC,0CAAA,EAA4C,OAAA;AAAA,EAC5C,sBAAA,EAAwB,OAAA;AAAA,EACxB,8CAAA,EAAgD,OAAA;AAAA,EAChD,qBAAA,EAAuB,OAAA;AAAA,EACvB,8BAAA,EAAgC,OAAA;AAAA,EAChC,uCAAA,EAAyC,OAAA;AAAA,EACzC,iCAAA,EAAmC,OAAA;AAAA,EACnC,2BAAA,EAA6B,OAAA;AAAA,EAC7B,yBAAA,EAA2B,OAAA;AAAA,EAC3B,wCAAA,EAA0C,OAAA;AAAA;AAAA,EAG1C,2BAAA,EAA6B,OAAA;AAAA,EAC7B,+BAAA,EAAiC,OAAA;AAAA,EACjC,wBAAA,EAA0B,OAAA;AAAA;AAAA,EAG1B,mCAAA,EAAqC,OAAA;AAAA,EACrC,qCAAA,EAAuC,OAAA;AAAA,EACvC,2BAAA,EAA6B,OAAA;AAAA,EAC7B,yBAAA,EAA2B,OAAA;AAAA,EAC3B,4BAAA,EAA8B,OAAA;AAAA,EAC9B,mCAAA,EAAqC,OAAA;AAAA,EACrC,yBAAA,EAA2B,OAAA;AAAA,EAC3B,8CAAA,EAAgD,OAAA;AAAA,EAChD,iCAAA,EAAmC,OAAA;AAAA,EACnC,uBAAA,EAAyB,OAAA;AAAA,EACzB,8BAAA,EAAgC,OAAA;AAAA,EAChC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7D,KAAA,EAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF,CAAA;AAAA,MACA;AAAA,QACE,QAAA,EAAU,YAAA;AAAA,QACV,SAAA,EAAW,CAAC,SAAS,CAAA;AAAA,QACrB,MAAA,EAAQ,WAAA,CAAY,CAAC,WAAA,EAAa,YAAY,CAAA,kBAAG,UAAA,+BAAY,YAAU,CAAA;AAAA,QACvE,iBAAA,EAAmB,SAAA;AAAA,QACnB,mBAAI,UAAA,+BAAY,UAAA,+BAAY,UAAA,+BAAY,SAAA,GAAU;AAAA,UAChD,MAAA,EAAQ;AAAA,YACN,KAAA,EAAO,mBAAA,CAAoB,CAAC,CAAA,EAAG,UAAA,CAAW,UAAA,CAAW,UAAU,CAAA;AAAA,YAC/D,KAAA,EAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAA;AACF;AAEA,SAAS,WAAA,CAAY,QAAA,EAAoB,UAAA,EAA4C;AACnF,EAAA,OAAO,CAAC,mBAAG,IAAI,GAAA,CAAI,CAAC,oCAAK,UAAA,+BAAY,eAAA,UAAiB,OAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,EAAI,oCAAI,UAAA,+BAAY,QAAA,UAAU,CAAC,GAAE,CAAC,CAAC,CAAA;AAC/G;AAEA,SAAS,mBAAA,CAAoB,QAAA,EAAoB,WAAA,EAAuB,CAAC,CAAA,EAAG;AAC1E,EAAA,OAAO,CAAA,EAAA,EAAK,CAAC,GAAG,QAAA,EAAU,GAAG,UAAU,CAAA,CAAE,IAAA,CAAK,GAAG,CAAC,CAAA,EAAA,CAAA;AACpD;ALwYA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,icAAC","file":"/Users/delm/dev/eslint-plugin/dist/chunk-QDQNT3NA.cjs","sourcesContent":[null,"import type { Linter } from 'eslint';\n\n/*\n * Mirror of `eslint-plugin-unicorn`'s recommended config, split by runtime.\n *\n * Oxlint natively implements most unicorn rules, so we enable those under the\n * canonical `unicorn/` prefix (fast, Rust). Rules oxlint hasn't ported run\n * through the original JS plugin, aliased as `unicornx` in `jsPlugins` (see\n * `src/oxlint.ts`), because oxlint's built-in plugin owns the `unicorn/`\n * namespace.\n *\n * `unicorn/prevent-abbreviations` is also not ported; it lives in\n * `javascript.ts` because it takes user-configurable options.\n */\n\n/**\n * Unicorn recommended rules natively implemented by Oxlint, grouped by the\n * oxlint category they belong to. Only the correctness group is enabled by\n * oxlint's defaults (as `warn`); everything is set explicitly to `error` to\n * match the recommended config.\n */\nexport const unicornRulesOxlint: Linter.RulesRecord = {\n // correctness\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-empty-file': 'warn',\n 'unicorn/no-invalid-fetch-options': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-thenable': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-useless-fallback-in-spread': 'error',\n 'unicorn/no-useless-length-check': 'error',\n 'unicorn/no-useless-spread': 'error',\n 'unicorn/prefer-set-size': 'error',\n 'unicorn/prefer-string-starts-ends-with': 'error',\n\n // perf\n 'unicorn/prefer-array-find': 'error',\n 'unicorn/prefer-array-flat-map': 'error',\n 'unicorn/prefer-set-has': 'error',\n\n // restriction\n 'unicorn/no-abusive-eslint-disable': 'error',\n 'unicorn/no-anonymous-default-export': 'error',\n 'unicorn/no-array-for-each': 'error',\n 'unicorn/no-array-reduce': 'error',\n 'unicorn/no-document-cookie': 'error',\n 'unicorn/no-magic-array-flat-depth': 'error',\n 'unicorn/no-process-exit': 'error',\n 'unicorn/no-useless-error-capture-stack-trace': 'error',\n 'unicorn/prefer-modern-math-apis': 'error',\n 'unicorn/prefer-module': 'error',\n 'unicorn/prefer-node-protocol': 'error',\n 'unicorn/prefer-number-properties': 'error',\n\n // suspicious\n 'unicorn/consistent-function-scoping': 'error',\n 'unicorn/no-accessor-recursion': 'error',\n 'unicorn/no-array-reverse': 'error',\n 'unicorn/no-array-sort': 'error',\n 'unicorn/no-instanceof-builtins': 'error',\n 'unicorn/prefer-add-event-listener': 'error',\n 'unicorn/require-module-specifiers': 'error',\n\n // pedantic\n 'unicorn/consistent-assert': 'error',\n 'unicorn/consistent-empty-array-spread': 'error',\n 'unicorn/escape-case': 'error',\n 'unicorn/explicit-length-check': 'error',\n 'unicorn/new-for-builtins': 'error',\n 'unicorn/no-array-callback-reference': 'error',\n 'unicorn/no-hex-escape': 'error',\n 'unicorn/no-immediate-mutation': 'error',\n 'unicorn/no-lonely-if': 'error',\n 'unicorn/no-negation-in-equality-check': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-object-as-default-parameter': 'error',\n 'unicorn/no-static-only-class': 'error',\n 'unicorn/no-this-assignment': 'error',\n 'unicorn/no-typeof-undefined': 'error',\n 'unicorn/no-unnecessary-array-flat-depth': 'error',\n 'unicorn/no-unnecessary-array-splice-count': 'error',\n 'unicorn/no-unnecessary-slice-end': 'error',\n 'unicorn/no-unreadable-iife': 'error',\n 'unicorn/no-useless-promise-resolve-reject': 'error',\n 'unicorn/no-useless-switch-case': 'error',\n 'unicorn/prefer-array-flat': 'error',\n 'unicorn/prefer-array-some': 'error',\n 'unicorn/prefer-at': 'error',\n 'unicorn/prefer-blob-reading-methods': 'error',\n 'unicorn/prefer-code-point': 'error',\n 'unicorn/prefer-date-now': 'error',\n 'unicorn/prefer-dom-node-append': 'error',\n 'unicorn/prefer-dom-node-dataset': 'error',\n 'unicorn/prefer-dom-node-remove': 'error',\n 'unicorn/prefer-event-target': 'error',\n 'unicorn/prefer-math-min-max': 'error',\n 'unicorn/prefer-math-trunc': 'error',\n 'unicorn/prefer-native-coercion-functions': 'error',\n 'unicorn/prefer-prototype-methods': 'error',\n 'unicorn/prefer-query-selector': 'error',\n 'unicorn/prefer-regexp-test': 'error',\n 'unicorn/prefer-string-replace-all': 'error',\n 'unicorn/prefer-string-slice': 'error',\n 'unicorn/prefer-top-level-await': 'error',\n 'unicorn/prefer-type-error': 'error',\n 'unicorn/require-number-to-fixed-digits-argument': 'error',\n\n // style\n 'unicorn/catch-error-name': ['error', { name: 'error' }],\n 'unicorn/consistent-date-clone': 'error',\n 'unicorn/consistent-existence-index-check': 'error',\n 'unicorn/consistent-template-literal-escape': 'error',\n 'unicorn/empty-brace-spaces': 'error',\n 'unicorn/error-message': 'error',\n 'unicorn/no-array-method-this-argument': 'error',\n 'unicorn/no-await-expression-member': 'error',\n 'unicorn/no-console-spaces': 'error',\n 'unicorn/no-unreadable-array-destructuring': 'error',\n 'unicorn/no-useless-collection-argument': 'error',\n 'unicorn/no-zero-fractions': 'error',\n 'unicorn/numeric-separators-style': 'error',\n 'unicorn/prefer-array-index-of': 'error',\n 'unicorn/prefer-bigint-literals': 'error',\n 'unicorn/prefer-class-fields': 'error',\n 'unicorn/prefer-classlist-toggle': 'error',\n 'unicorn/prefer-default-parameters': 'error',\n 'unicorn/prefer-dom-node-text-content': 'error',\n 'unicorn/prefer-global-this': 'error',\n 'unicorn/prefer-includes': 'error',\n 'unicorn/prefer-keyboard-event-key': 'error',\n 'unicorn/prefer-logical-operator-over-ternary': 'error',\n 'unicorn/prefer-modern-dom-apis': 'error',\n 'unicorn/prefer-negative-index': 'error',\n 'unicorn/prefer-object-from-entries': 'error',\n 'unicorn/prefer-optional-catch-binding': 'error',\n 'unicorn/prefer-reflect-apply': 'error',\n 'unicorn/prefer-response-static-json': 'error',\n 'unicorn/prefer-spread': 'error',\n 'unicorn/prefer-string-raw': 'error',\n 'unicorn/prefer-string-trim-start-end': 'error',\n 'unicorn/prefer-structured-clone': 'error',\n 'unicorn/relative-url-style': 'error',\n 'unicorn/require-array-join-separator': 'error',\n 'unicorn/require-module-attributes': 'error',\n 'unicorn/switch-case-braces': 'error',\n 'unicorn/switch-case-break-position': 'error',\n 'unicorn/text-encoding-identifier-case': 'error',\n 'unicorn/throw-new-error': 'error',\n};\n\n/**\n * Unicorn recommended rules that Oxlint hasn't ported. They run inside Oxlint\n * through the original JS plugin under the `unicornx` alias.\n */\nexport const unicornRulesJsPlugin: Linter.RulesRecord = {\n 'unicornx/isolated-functions': 'error',\n 'unicornx/no-for-loop': 'error',\n 'unicornx/no-named-default': 'error',\n 'unicornx/no-unnecessary-polyfills': 'error',\n 'unicornx/prefer-export-from': 'error',\n 'unicornx/prefer-simple-condition-first': 'error',\n 'unicornx/prefer-single-call': 'error',\n 'unicornx/prefer-switch': 'error',\n 'unicornx/template-indent': 'error',\n\n /*\n * Native port exists but only in oxlint's nursery category, which can't be\n * enabled from config, so we run the JS original instead.\n */\n 'unicornx/no-useless-iterator-to-array': 'error',\n\n /*\n * Oxlint's port hardcodes uppercase hexadecimal digits, which fights\n * Prettier's lowercase formatting, so we run the JS original with the\n * lowercase option instead.\n */\n 'unicornx/number-literal-case': ['error', { hexadecimalValue: 'lowercase' }],\n};\n\n/**\n * Unicorn recommended rules that can't run inside Oxlint's JS-plugin host yet\n * because the compat layer is missing ESLint APIs (e.g.\n * `sourceCode.getDisableDirectives`). ESLint picks them up after Oxlint runs.\n */\nexport const unicornRulesEslint: Linter.RulesRecord = {\n 'unicorn/expiring-todo-comments': 'error',\n};\n","export const DEFAULT_ABBREVIATION_ALLOW_LIST = [\n 'fn',\n 'cb',\n 'err',\n 'prev',\n 'props',\n 'refs',\n 'ref',\n 'dev',\n 'i',\n 'env',\n 'arg',\n 'args',\n];\n\nexport const ABBREVIATION_REPLACEMENTS: Record<string, Record<string, boolean> | false> = {\n ref: false,\n refs: false,\n dev: false,\n dir: false,\n ev: { event: true },\n val: { value: true },\n msg: { message: true },\n el: { element: true },\n elem: { element: true },\n btn: { button: true },\n cb: { callback: true },\n fn: { function: true },\n err: { error: true },\n opts: { options: true },\n cfg: { config: true },\n obj: { object: true },\n arr: { array: true },\n str: { string: true },\n num: { number: true },\n curr: { current: true },\n len: { length: true },\n e: { event: true, error: true },\n};\n","import type { Linter } from 'eslint';\nimport { ABBREVIATION_REPLACEMENTS, DEFAULT_ABBREVIATION_ALLOW_LIST } from './abbreviations.js';\nimport { unicornRulesJsPlugin, unicornRulesOxlint } from './unicorn.js';\n\nexport const jsFileExtensions = ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'];\n\nexport const paddingLineEntries = [\n {\n blankLine: 'always',\n prev: '*',\n next: ['block', 'block-like', 'class', 'const', 'let'],\n },\n {\n blankLine: 'always',\n prev: 'block',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: ['const'],\n next: '*',\n },\n {\n blankLine: 'always',\n prev: ['let'],\n next: '*',\n },\n {\n blankLine: 'any',\n prev: ['const'],\n next: ['const'],\n },\n {\n blankLine: 'any',\n prev: ['let'],\n next: ['let'],\n },\n {\n blankLine: 'always',\n prev: ['let'],\n next: ['const'],\n },\n {\n blankLine: 'always',\n prev: ['const'],\n next: ['let'],\n },\n {\n blankLine: 'always',\n prev: ['singleline-const'],\n next: ['multiline-const'],\n },\n {\n blankLine: 'always',\n prev: ['multiline-const'],\n next: ['singleline-const'],\n },\n {\n blankLine: 'always',\n prev: ['singleline-let'],\n next: ['multiline-let'],\n },\n {\n blankLine: 'always',\n prev: ['multiline-let'],\n next: ['singleline-let'],\n },\n {\n blankLine: 'any',\n prev: ['case', 'block', 'block-like'],\n next: ['case', 'default'],\n },\n {\n blankLine: 'any',\n prev: '*',\n next: 'break',\n },\n {\n blankLine: 'always',\n prev: 'if',\n next: '*',\n },\n /*\n * Imports form a block: padded from anything that isn't an import, but\n * consecutive imports can sit together. The same-type rule comes last so it\n * wins over the surrounding `*` rules.\n */\n {\n blankLine: 'always',\n prev: 'import',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: '*',\n next: 'import',\n },\n {\n blankLine: 'any',\n prev: 'import',\n next: 'import',\n },\n /*\n * Exports form a block: padded from anything that isn't an export, but\n * consecutive exports can sit together. The same-type rule comes last so it\n * wins over the surrounding `*` rules.\n */\n {\n blankLine: 'always',\n prev: 'export',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: '*',\n next: 'export',\n },\n {\n blankLine: 'any',\n prev: 'export',\n next: 'export',\n },\n];\n\nexport const jsdocTagLineOptions = ['always', { count: 1, startLines: 1, applyToEndTag: false }];\n\nexport interface JavaScriptRuleOptions {\n preventAbbreviations?: {\n allowList?: string[];\n inheritAllowList?: boolean;\n replacements?: Record<string, Record<string, boolean> | false>;\n inheritReplacements?: boolean;\n };\n}\n\n/**\n * Non type-aware rules that run under Oxlint.\n */\nexport function jsRulesOxlint(options: JavaScriptRuleOptions = {}): Linter.RulesRecord {\n const { preventAbbreviations: preventAbbreviationsOptions } = options;\n\n const {\n inheritAllowList = true,\n inheritReplacements = true,\n allowList = [],\n replacements = {},\n } = preventAbbreviationsOptions ?? {};\n\n return {\n 'consistent-return': 'error',\n curly: ['error', 'all'],\n 'arrow-body-style': 'off',\n 'dot-notation': 'error',\n 'no-debugger': 'warn',\n 'no-unused-vars': 'off',\n 'no-async-promise-executor': 'error',\n 'no-case-declarations': 'error',\n 'default-case-last': 'error',\n 'no-cond-assign': 'error',\n 'no-dynamic-delete': 'off',\n 'no-unneeded-ternary': 'error',\n 'object-shorthand': 'error',\n 'no-constant-condition': ['error', { checkLoops: false }],\n\n '@stylistic/padding-line-between-statements': ['error', ...paddingLineEntries],\n '@stylistic/no-trailing-spaces': 'error',\n\n /*\n * Indentation is owned by Prettier. Oxlint's @stylistic/indent port\n * diverges from eslint-stylistic on edge cases (e.g., multiline object\n * args inside ternaries), so we leave the rule off.\n */\n '@stylistic/indent': 'off',\n '@stylistic/no-multiple-empty-lines': ['error', { max: 1 }],\n '@stylistic/multiline-comment-style': ['error', 'starred-block'],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: { balanced: true },\n },\n ],\n '@stylistic/brace-style': ['error', '1tbs'],\n '@stylistic/lines-around-comment': [\n 'error',\n {\n beforeBlockComment: true,\n beforeLineComment: true,\n allowBlockStart: true,\n allowBlockEnd: false,\n allowObjectStart: true,\n allowObjectEnd: false,\n allowArrayStart: true,\n allowArrayEnd: true,\n allowClassStart: true,\n allowInterfaceStart: true,\n allowInterfaceEnd: true,\n allowEnumStart: true,\n allowEnumEnd: true,\n allowTypeStart: true,\n allowTypeEnd: false,\n },\n ],\n\n // unicorn recommended, split between native oxlint ports and JS originals\n ...unicornRulesOxlint,\n ...unicornRulesJsPlugin,\n\n /*\n * Oxlint's built-in `unicorn` / `jsdoc` plugins don't implement these,\n * so we wire the original JS plugins under aliased names (see jsPlugins\n * in `src/oxlint.ts`). Rule IDs use the alias, not the canonical prefix.\n */\n 'unicornx/prevent-abbreviations': [\n 'error',\n {\n replacements: inheritReplacements ? { ...ABBREVIATION_REPLACEMENTS, ...replacements } : replacements,\n allowList: Object.fromEntries(\n (inheritAllowList ? [...DEFAULT_ABBREVIATION_ALLOW_LIST, ...allowList] : allowList).map((name) => [\n name,\n true,\n ]),\n ),\n },\n ],\n\n 'jsdocx/tag-lines': ['error', ...jsdocTagLineOptions],\n };\n}\n\n/**\n * Rules that can't run under Oxlint. ESLint-core rules that Oxlint hasn't\n * implemented yet and aren't exposed by any plugin we can alias into oxlint's\n * `jsPlugins` (the `@eslint/js` package only ships configs, not a raw `rules`\n * object). ESLint picks them up after Oxlint runs.\n *\n * Type-aware rules are served separately.\n */\nexport function jsRulesEslint(_options: JavaScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n 'prefer-arrow-callback': 'error',\n 'no-useless-assignment': 'error',\n };\n}\n","import type { Linter } from 'eslint';\n\nexport interface ReactRuleOptions {\n fastRefresh?: boolean;\n performance?: boolean;\n}\n\nexport type ReactConfigOptions = boolean | ReactRuleOptions;\n\ninterface ResolvedReactRuleOptions {\n fastRefresh: boolean;\n performance: boolean;\n}\n\nexport const reactFileExtensions = ['**/*.jsx', '**/*.tsx'];\n\nexport function resolveReactRuleOptions(options: ReactConfigOptions = false): ResolvedReactRuleOptions {\n if (options === false) {\n return {\n fastRefresh: false,\n performance: false,\n };\n }\n\n if (options === true) {\n return {\n fastRefresh: true,\n performance: true,\n };\n }\n\n return {\n fastRefresh: options.fastRefresh ?? true,\n performance: options.performance ?? true,\n };\n}\n\nexport function reactRulesOxlint(options: ReactConfigOptions = false): Linter.RulesRecord {\n const resolvedOptions = resolveReactRuleOptions(options);\n\n return {\n 'react/jsx-key': 'error',\n 'react/jsx-no-duplicate-props': 'error',\n 'react/no-children-prop': 'error',\n 'react/no-danger-with-children': 'error',\n 'react/void-dom-elements-no-children': 'error',\n 'react/no-unknown-property': 'error',\n 'react/style-prop-object': 'error',\n 'react/button-has-type': 'error',\n 'react/checked-requires-onchange-or-readonly': 'error',\n 'react/forward-ref-uses-ref': 'error',\n 'react/jsx-props-no-spread-multi': 'error',\n 'react/jsx-no-script-url': 'error',\n 'react/jsx-no-target-blank': 'error',\n 'react/jsx-no-constructed-context-values': 'error',\n 'react/no-unstable-nested-components': 'error',\n 'react/no-array-index-key': 'warn',\n 'react/no-object-type-as-default-prop': 'warn',\n 'react/iframe-missing-sandbox': 'error',\n 'react/no-danger': 'warn',\n\n ...(resolvedOptions.fastRefresh && {\n 'react/only-export-components': ['warn', { allowConstantExport: true }],\n }),\n\n ...(resolvedOptions.performance && {\n 'react-perf/jsx-no-new-object-as-prop': 'warn',\n 'react-perf/jsx-no-new-array-as-prop': 'warn',\n 'react-perf/jsx-no-new-function-as-prop': 'warn',\n 'react-perf/jsx-no-jsx-as-prop': 'warn',\n }),\n };\n}\n","import type { Linter } from 'eslint';\n\nimport { jsRulesOxlint, type JavaScriptRuleOptions } from './javascript.js';\n\nexport const tsFileExtensions = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'];\n\nconst tsIgnoreDescriptionFormat = String.raw`^: TS\\d+ because .+$`;\n\nexport interface TypeScriptRuleOptions extends JavaScriptRuleOptions {\n namingConvention?: {\n variable?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n parameter?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n typeLike?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n memberLike?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n function?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n };\n}\n\ninterface NamingConventionFormatOptions {\n inheritFormat?: boolean;\n format?: string[];\n}\n\n/**\n * Non type-aware TypeScript rules that run under Oxlint.\n */\nexport function tsRulesOxlint(options: TypeScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n ...jsRulesOxlint(options),\n\n /**\n * Oxlint exposes typescript-eslint rules under its own `typescript/`\n * namespace, so rule ids are prefixed `typescript/` rather than\n * `@typescript-eslint/`.\n */\n 'typescript/no-unused-vars': [\n 'error',\n {\n argsIgnorePattern: '^_',\n ignoreRestSiblings: true,\n },\n ],\n 'typescript/no-unnecessary-condition': 'error',\n 'typescript/no-floating-promises': 'error',\n 'typescript/no-non-null-assertion': 'error',\n 'typescript/no-empty-function': 'off',\n 'typescript/no-explicit-any': 'off',\n 'typescript/no-base-to-string': 'off',\n 'typescript/no-dynamic-delete': 'off',\n 'typescript/no-extra-non-null-assertion': 'error',\n 'typescript/no-non-null-asserted-optional-chain': 'error',\n 'typescript/explicit-module-boundary-types': 'off',\n 'typescript/ban-ts-comment': [\n 'error',\n {\n 'ts-expect-error': { descriptionFormat: tsIgnoreDescriptionFormat },\n 'ts-ignore': { descriptionFormat: tsIgnoreDescriptionFormat },\n 'ts-nocheck': true,\n 'ts-check': false,\n },\n ],\n\n '@stylistic/type-annotation-spacing': 'error',\n\n // comment handling conflicts with the padding-line heuristics\n '@stylistic/lines-around-comment': 'off',\n };\n}\n\n/**\n * TypeScript rules served by ESLint.\n *\n * These are not type-aware in the strict sense, but Oxlint's native\n * `typescript` plugin doesn't implement them today, so we run them under\n * ESLint.\n */\nexport function tsRulesEslint(options: TypeScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n ...getESLintNamingConventionRule(options.namingConvention),\n '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/array-type': 'off',\n '@typescript-eslint/require-await': 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'error',\n {\n ignorePrimitives: true,\n },\n ],\n '@typescript-eslint/no-unused-vars': [\n 'error',\n {\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n caughtErrorsIgnorePattern: '^_',\n destructuredArrayIgnorePattern: '^_',\n ignoreRestSiblings: true,\n },\n ],\n };\n}\n\n/**\n * ESLint-namespaced variant of the naming-convention rule. Keeps the same\n * filter / selector shape as {@link getNamingConventionRule}, only swapping\n * the rule id so it lines up with `@typescript-eslint/eslint-plugin`.\n */\nexport function getESLintNamingConventionRule(\n extensions?: TypeScriptRuleOptions['namingConvention'],\n): Linter.RulesRecord {\n const oxlintRules = getNamingConventionRule(extensions);\n\n return {\n '@typescript-eslint/naming-convention': oxlintRules['typescript/naming-convention'],\n };\n}\n\nexport function getNamingConventionRule(extensions?: TypeScriptRuleOptions['namingConvention']): Linter.RulesRecord {\n return {\n 'typescript/naming-convention': [\n 'error',\n {\n selector: ['variable'],\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.variable),\n leadingUnderscore: 'allowSingleOrDouble',\n trailingUnderscore: 'forbid',\n filter: {\n regex: generateFilterRegex(['__dirname'], extensions?.variable?.exceptions),\n match: false,\n },\n },\n {\n selector: ['function'],\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.function),\n leadingUnderscore: 'allowSingleOrDouble',\n trailingUnderscore: 'forbid',\n filter: {\n regex: generateFilterRegex(['__dirname'], extensions?.function?.exceptions),\n match: false,\n },\n },\n {\n selector: 'parameter',\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.parameter),\n leadingUnderscore: 'allow',\n ...(extensions?.parameter?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.parameter.exceptions),\n match: false,\n },\n }),\n },\n {\n selector: 'typeLike',\n format: mergeFormat(['PascalCase'], extensions?.typeLike),\n ...(extensions?.typeLike?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.typeLike.exceptions),\n match: false,\n },\n }),\n },\n {\n selector: 'memberLike',\n modifiers: ['private'],\n format: mergeFormat(['camelCase', 'PascalCase'], extensions?.memberLike),\n leadingUnderscore: 'require',\n ...(extensions?.memberLike?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.memberLike.exceptions),\n match: false,\n },\n }),\n },\n ],\n };\n}\n\nfunction mergeFormat(defaults: string[], extensions?: NamingConventionFormatOptions) {\n return [...new Set([...((extensions?.inheritFormat ?? true) ? defaults : []), ...(extensions?.format ?? [])])];\n}\n\nfunction generateFilterRegex(defaults: string[], extensions: string[] = []) {\n return `^(${[...defaults, ...extensions].join('|')})$`;\n}\n"]}
@@ -0,0 +1,102 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+
5
+
6
+
7
+
8
+ var _chunkQDQNT3NAcjs = require('./chunk-QDQNT3NA.cjs');
9
+
10
+ // src/eslint.ts
11
+ var _eslintpluginoxlint = require('eslint-plugin-oxlint'); var _eslintpluginoxlint2 = _interopRequireDefault(_eslintpluginoxlint);
12
+ var _eslintpluginunicorn = require('eslint-plugin-unicorn'); var _eslintpluginunicorn2 = _interopRequireDefault(_eslintpluginunicorn);
13
+ var _module = require('module');
14
+ var _typescripteslint = require('typescript-eslint'); var _typescripteslint2 = _interopRequireDefault(_typescripteslint);
15
+ var allFileExtensions = [..._chunkQDQNT3NAcjs.jsFileExtensions, ..._chunkQDQNT3NAcjs.tsFileExtensions];
16
+ var require2 = _module.createRequire.call(void 0, import.meta.url);
17
+ function eslintConfig(options = {}) {
18
+ const {
19
+ oxlintConfig,
20
+ oxlintConfigPath,
21
+ react,
22
+ tsconfigRootDir,
23
+ extraConfigs = [],
24
+ allowDefaultProject = ["*.config.ts", "*.config.mts", "*.config.cts", "*.config.js"],
25
+ ignores = [],
26
+ extendDefaultIgnores = true,
27
+ ...ruleOptions
28
+ } = options;
29
+ const typeAwareConfigs = [
30
+ ..._typescripteslint2.default.configs.strictTypeChecked,
31
+ ..._typescripteslint2.default.configs.stylisticTypeChecked
32
+ ].map((config) => {
33
+ return {
34
+ ...config,
35
+ files: config.files && config.files.length > 0 ? config.files : _chunkQDQNT3NAcjs.tsFileExtensions
36
+ };
37
+ });
38
+ const oxlintDisables = oxlintConfig ? _eslintpluginoxlint2.default.buildFromOxlintConfig(oxlintConfig, {
39
+ typeAware: true
40
+ }) : _eslintpluginoxlint2.default.buildFromOxlintConfigFile(_nullishCoalesce(oxlintConfigPath, () => ( ".oxlintrc.json")), { typeAware: true });
41
+ return [
42
+ {
43
+ name: "@d3lm/ignores",
44
+ ignores: extendDefaultIgnores ? [...ignores, "dist/**", "node_modules/**", "coverage/**"] : ignores
45
+ },
46
+ ...typeAwareConfigs,
47
+ {
48
+ name: "@d3lm/project-service",
49
+ files: _chunkQDQNT3NAcjs.tsFileExtensions,
50
+ languageOptions: {
51
+ parserOptions: {
52
+ projectService: {
53
+ allowDefaultProject
54
+ },
55
+ ...tsconfigRootDir ? { tsconfigRootDir } : {}
56
+ }
57
+ }
58
+ },
59
+ ...react ? reactHooksConfigs() : [],
60
+ {
61
+ name: "@d3lm/eslint-only-rules",
62
+ files: allFileExtensions,
63
+ plugins: {
64
+ unicorn: _eslintpluginunicorn2.default
65
+ },
66
+ rules: {
67
+ ..._chunkQDQNT3NAcjs.jsRulesEslint.call(void 0, ruleOptions),
68
+ ..._chunkQDQNT3NAcjs.unicornRulesEslint
69
+ }
70
+ },
71
+ {
72
+ name: "@d3lm/eslint-only-rules-ts",
73
+ files: _chunkQDQNT3NAcjs.tsFileExtensions,
74
+ rules: {
75
+ ..._chunkQDQNT3NAcjs.tsRulesEslint.call(void 0, ruleOptions)
76
+ }
77
+ },
78
+ ...extraConfigs,
79
+ // MUST be last to turn off every rule oxlint already owns
80
+ ...oxlintDisables
81
+ ];
82
+ }
83
+ function reactHooksConfigs() {
84
+ const typedReactHooksPlugin = require2("eslint-plugin-react-hooks");
85
+ const recommendedConfig = _nullishCoalesce(_optionalChain([typedReactHooksPlugin, 'access', _ => _.configs, 'optionalAccess', _2 => _2.flat, 'optionalAccess', _3 => _3.recommended]), () => ( _optionalChain([typedReactHooksPlugin, 'access', _4 => _4.configs, 'optionalAccess', _5 => _5.recommended])));
86
+ if (!recommendedConfig) {
87
+ throw new Error("eslint-plugin-react-hooks does not expose a recommended config.");
88
+ }
89
+ return normalizeConfigs(recommendedConfig).map((config) => {
90
+ return {
91
+ ...config,
92
+ files: config.files && config.files.length > 0 ? config.files : _chunkQDQNT3NAcjs.reactFileExtensions
93
+ };
94
+ });
95
+ }
96
+ function normalizeConfigs(configs) {
97
+ return Array.isArray(configs) ? configs : [configs];
98
+ }
99
+
100
+
101
+ exports.eslintConfig = eslintConfig;
102
+ //# sourceMappingURL=eslint.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/delm/dev/eslint-plugin/dist/eslint.cjs","../src/eslint.ts"],"names":["require"],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACRA,kIAAyB;AACzB,sIAA0B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AmB;AACtB,IAAA,MAAM,IAAI,KAAA,CAAM,iEAAiE,CAAA;AAAA,EACnF;AAEA,EAAA,OAAO,gBAAA,CAAiB,iBAAiB,CAAA,CAAE,GAAA,CAAI,CAAC,MAAA,EAAA,GAAW;AACzD,IAAA,OAAO;AAAA,MACL,GAAG,MAAA;AAAA,MACH,KAAA,EAAO,MAAA,CAAO,MAAA,GAAS,MAAA,CAAO,KAAA,CAAM,OAAA,EAAS,EAAA,EAAI,MAAA,CAAO,MAAA,EAAQ;AAAA,IAClE,CAAA;AAAA,EACF,CAAC,CAAA;AACH;AAEA,SAAS,gBAAA,CAAiB,OAAA,EAA2D;AACnF,EAAA,OAAO,KAAA,CAAM,OAAA,CAAQ,OAAO,EAAA,EAAI,QAAA,EAAU,CAAC,OAAO,CAAA;AACpD;ADpCA;AACE;AACF,oCAAC","file":"/Users/delm/dev/eslint-plugin/dist/eslint.cjs","sourcesContent":[null,"import type { ESLint, Linter } from 'eslint';\nimport oxlintPlugin from 'eslint-plugin-oxlint';\nimport unicornPlugin from 'eslint-plugin-unicorn';\nimport { createRequire } from 'node:module';\nimport type { OxlintConfig } from 'oxlint';\nimport tsLint from 'typescript-eslint';\nimport { jsFileExtensions, jsRulesEslint } from './configs/javascript.js';\nimport { type ReactConfigOptions, reactFileExtensions } from './configs/react.js';\nimport { tsFileExtensions, tsRulesEslint, type TypeScriptRuleOptions } from './configs/typescript.js';\nimport { unicornRulesEslint } from './configs/unicorn.js';\n\nexport interface ESlintPresetOptions extends TypeScriptRuleOptions {\n oxlintConfig?: OxlintConfig;\n oxlintConfigPath?: string;\n react?: ReactConfigOptions;\n tsconfigRootDir?: string;\n allowDefaultProject?: string[];\n extraConfigs?: Linter.Config[];\n ignores?: string[];\n extendDefaultIgnores?: boolean;\n}\n\nconst allFileExtensions = [...jsFileExtensions, ...tsFileExtensions];\n\nconst require = createRequire(import.meta.url);\n\nexport function eslintConfig(options: ESlintPresetOptions = {}): Linter.Config[] {\n const {\n oxlintConfig,\n oxlintConfigPath,\n react,\n tsconfigRootDir,\n extraConfigs = [],\n allowDefaultProject = ['*.config.ts', '*.config.mts', '*.config.cts', '*.config.js'],\n ignores = [],\n extendDefaultIgnores = true,\n ...ruleOptions\n } = options;\n\n const typeAwareConfigs: Linter.Config[] = [\n ...(tsLint.configs.strictTypeChecked as Linter.Config[]),\n ...(tsLint.configs.stylisticTypeChecked as Linter.Config[]),\n ].map((config) => {\n return {\n ...config,\n files: config.files && config.files.length > 0 ? config.files : tsFileExtensions,\n };\n });\n\n const oxlintDisables = oxlintConfig\n ? oxlintPlugin.buildFromOxlintConfig(oxlintConfig as Parameters<typeof oxlintPlugin.buildFromOxlintConfig>[0], {\n typeAware: true,\n })\n : oxlintPlugin.buildFromOxlintConfigFile(oxlintConfigPath ?? '.oxlintrc.json', { typeAware: true });\n\n return [\n {\n name: '@d3lm/ignores',\n ignores: extendDefaultIgnores ? [...ignores, 'dist/**', 'node_modules/**', 'coverage/**'] : ignores,\n },\n\n ...typeAwareConfigs,\n\n {\n name: '@d3lm/project-service',\n files: tsFileExtensions,\n languageOptions: {\n parserOptions: {\n projectService: {\n allowDefaultProject,\n },\n ...(tsconfigRootDir ? { tsconfigRootDir } : {}),\n },\n },\n },\n\n ...(react ? reactHooksConfigs() : []),\n\n {\n name: '@d3lm/eslint-only-rules',\n files: allFileExtensions,\n plugins: {\n unicorn: unicornPlugin as ESLint.Plugin,\n },\n rules: {\n ...jsRulesEslint(ruleOptions),\n ...unicornRulesEslint,\n },\n },\n\n {\n name: '@d3lm/eslint-only-rules-ts',\n files: tsFileExtensions,\n rules: {\n ...tsRulesEslint(ruleOptions),\n },\n },\n\n ...extraConfigs,\n\n // MUST be last to turn off every rule oxlint already owns\n ...oxlintDisables,\n ];\n}\n\ninterface ReactHooksPlugin {\n configs?: {\n flat?: {\n recommended?: Linter.Config | Linter.Config[];\n };\n recommended?: Linter.Config | Linter.Config[];\n };\n}\n\nfunction reactHooksConfigs(): Linter.Config[] {\n const typedReactHooksPlugin = require('eslint-plugin-react-hooks') as ReactHooksPlugin;\n\n const recommendedConfig =\n typedReactHooksPlugin.configs?.flat?.recommended ?? typedReactHooksPlugin.configs?.recommended;\n\n if (!recommendedConfig) {\n throw new Error('eslint-plugin-react-hooks does not expose a recommended config.');\n }\n\n return normalizeConfigs(recommendedConfig).map((config) => {\n return {\n ...config,\n files: config.files && config.files.length > 0 ? config.files : reactFileExtensions,\n };\n });\n}\n\nfunction normalizeConfigs(configs: Linter.Config | Linter.Config[]): Linter.Config[] {\n return Array.isArray(configs) ? configs : [configs];\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { Linter } from 'eslint';
2
+ import { OxlintConfig } from 'oxlint';
3
+ import { T as TypeScriptRuleOptions, R as ReactConfigOptions } from './typescript-pI6S6Z22.cjs';
4
+
5
+ interface ESlintPresetOptions extends TypeScriptRuleOptions {
6
+ oxlintConfig?: OxlintConfig;
7
+ oxlintConfigPath?: string;
8
+ react?: ReactConfigOptions;
9
+ tsconfigRootDir?: string;
10
+ allowDefaultProject?: string[];
11
+ extraConfigs?: Linter.Config[];
12
+ ignores?: string[];
13
+ extendDefaultIgnores?: boolean;
14
+ }
15
+ declare function eslintConfig(options?: ESlintPresetOptions): Linter.Config[];
16
+
17
+ export { type ESlintPresetOptions, eslintConfig };
@@ -0,0 +1,17 @@
1
+ import { Linter } from 'eslint';
2
+ import { OxlintConfig } from 'oxlint';
3
+ import { T as TypeScriptRuleOptions, R as ReactConfigOptions } from './typescript-pI6S6Z22.js';
4
+
5
+ interface ESlintPresetOptions extends TypeScriptRuleOptions {
6
+ oxlintConfig?: OxlintConfig;
7
+ oxlintConfigPath?: string;
8
+ react?: ReactConfigOptions;
9
+ tsconfigRootDir?: string;
10
+ allowDefaultProject?: string[];
11
+ extraConfigs?: Linter.Config[];
12
+ ignores?: string[];
13
+ extendDefaultIgnores?: boolean;
14
+ }
15
+ declare function eslintConfig(options?: ESlintPresetOptions): Linter.Config[];
16
+
17
+ export { type ESlintPresetOptions, eslintConfig };
package/dist/eslint.js ADDED
@@ -0,0 +1,102 @@
1
+ import {
2
+ jsFileExtensions,
3
+ jsRulesEslint,
4
+ reactFileExtensions,
5
+ tsFileExtensions,
6
+ tsRulesEslint,
7
+ unicornRulesEslint
8
+ } from "./chunk-JM2XMNKF.js";
9
+
10
+ // src/eslint.ts
11
+ import oxlintPlugin from "eslint-plugin-oxlint";
12
+ import unicornPlugin from "eslint-plugin-unicorn";
13
+ import { createRequire } from "module";
14
+ import tsLint from "typescript-eslint";
15
+ var allFileExtensions = [...jsFileExtensions, ...tsFileExtensions];
16
+ var require2 = createRequire(import.meta.url);
17
+ function eslintConfig(options = {}) {
18
+ const {
19
+ oxlintConfig,
20
+ oxlintConfigPath,
21
+ react,
22
+ tsconfigRootDir,
23
+ extraConfigs = [],
24
+ allowDefaultProject = ["*.config.ts", "*.config.mts", "*.config.cts", "*.config.js"],
25
+ ignores = [],
26
+ extendDefaultIgnores = true,
27
+ ...ruleOptions
28
+ } = options;
29
+ const typeAwareConfigs = [
30
+ ...tsLint.configs.strictTypeChecked,
31
+ ...tsLint.configs.stylisticTypeChecked
32
+ ].map((config) => {
33
+ return {
34
+ ...config,
35
+ files: config.files && config.files.length > 0 ? config.files : tsFileExtensions
36
+ };
37
+ });
38
+ const oxlintDisables = oxlintConfig ? oxlintPlugin.buildFromOxlintConfig(oxlintConfig, {
39
+ typeAware: true
40
+ }) : oxlintPlugin.buildFromOxlintConfigFile(oxlintConfigPath ?? ".oxlintrc.json", { typeAware: true });
41
+ return [
42
+ {
43
+ name: "@d3lm/ignores",
44
+ ignores: extendDefaultIgnores ? [...ignores, "dist/**", "node_modules/**", "coverage/**"] : ignores
45
+ },
46
+ ...typeAwareConfigs,
47
+ {
48
+ name: "@d3lm/project-service",
49
+ files: tsFileExtensions,
50
+ languageOptions: {
51
+ parserOptions: {
52
+ projectService: {
53
+ allowDefaultProject
54
+ },
55
+ ...tsconfigRootDir ? { tsconfigRootDir } : {}
56
+ }
57
+ }
58
+ },
59
+ ...react ? reactHooksConfigs() : [],
60
+ {
61
+ name: "@d3lm/eslint-only-rules",
62
+ files: allFileExtensions,
63
+ plugins: {
64
+ unicorn: unicornPlugin
65
+ },
66
+ rules: {
67
+ ...jsRulesEslint(ruleOptions),
68
+ ...unicornRulesEslint
69
+ }
70
+ },
71
+ {
72
+ name: "@d3lm/eslint-only-rules-ts",
73
+ files: tsFileExtensions,
74
+ rules: {
75
+ ...tsRulesEslint(ruleOptions)
76
+ }
77
+ },
78
+ ...extraConfigs,
79
+ // MUST be last to turn off every rule oxlint already owns
80
+ ...oxlintDisables
81
+ ];
82
+ }
83
+ function reactHooksConfigs() {
84
+ const typedReactHooksPlugin = require2("eslint-plugin-react-hooks");
85
+ const recommendedConfig = typedReactHooksPlugin.configs?.flat?.recommended ?? typedReactHooksPlugin.configs?.recommended;
86
+ if (!recommendedConfig) {
87
+ throw new Error("eslint-plugin-react-hooks does not expose a recommended config.");
88
+ }
89
+ return normalizeConfigs(recommendedConfig).map((config) => {
90
+ return {
91
+ ...config,
92
+ files: config.files && config.files.length > 0 ? config.files : reactFileExtensions
93
+ };
94
+ });
95
+ }
96
+ function normalizeConfigs(configs) {
97
+ return Array.isArray(configs) ? configs : [configs];
98
+ }
99
+ export {
100
+ eslintConfig
101
+ };
102
+ //# sourceMappingURL=eslint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/eslint.ts"],"sourcesContent":["import type { ESLint, Linter } from 'eslint';\nimport oxlintPlugin from 'eslint-plugin-oxlint';\nimport unicornPlugin from 'eslint-plugin-unicorn';\nimport { createRequire } from 'node:module';\nimport type { OxlintConfig } from 'oxlint';\nimport tsLint from 'typescript-eslint';\nimport { jsFileExtensions, jsRulesEslint } from './configs/javascript.js';\nimport { type ReactConfigOptions, reactFileExtensions } from './configs/react.js';\nimport { tsFileExtensions, tsRulesEslint, type TypeScriptRuleOptions } from './configs/typescript.js';\nimport { unicornRulesEslint } from './configs/unicorn.js';\n\nexport interface ESlintPresetOptions extends TypeScriptRuleOptions {\n oxlintConfig?: OxlintConfig;\n oxlintConfigPath?: string;\n react?: ReactConfigOptions;\n tsconfigRootDir?: string;\n allowDefaultProject?: string[];\n extraConfigs?: Linter.Config[];\n ignores?: string[];\n extendDefaultIgnores?: boolean;\n}\n\nconst allFileExtensions = [...jsFileExtensions, ...tsFileExtensions];\n\nconst require = createRequire(import.meta.url);\n\nexport function eslintConfig(options: ESlintPresetOptions = {}): Linter.Config[] {\n const {\n oxlintConfig,\n oxlintConfigPath,\n react,\n tsconfigRootDir,\n extraConfigs = [],\n allowDefaultProject = ['*.config.ts', '*.config.mts', '*.config.cts', '*.config.js'],\n ignores = [],\n extendDefaultIgnores = true,\n ...ruleOptions\n } = options;\n\n const typeAwareConfigs: Linter.Config[] = [\n ...(tsLint.configs.strictTypeChecked as Linter.Config[]),\n ...(tsLint.configs.stylisticTypeChecked as Linter.Config[]),\n ].map((config) => {\n return {\n ...config,\n files: config.files && config.files.length > 0 ? config.files : tsFileExtensions,\n };\n });\n\n const oxlintDisables = oxlintConfig\n ? oxlintPlugin.buildFromOxlintConfig(oxlintConfig as Parameters<typeof oxlintPlugin.buildFromOxlintConfig>[0], {\n typeAware: true,\n })\n : oxlintPlugin.buildFromOxlintConfigFile(oxlintConfigPath ?? '.oxlintrc.json', { typeAware: true });\n\n return [\n {\n name: '@d3lm/ignores',\n ignores: extendDefaultIgnores ? [...ignores, 'dist/**', 'node_modules/**', 'coverage/**'] : ignores,\n },\n\n ...typeAwareConfigs,\n\n {\n name: '@d3lm/project-service',\n files: tsFileExtensions,\n languageOptions: {\n parserOptions: {\n projectService: {\n allowDefaultProject,\n },\n ...(tsconfigRootDir ? { tsconfigRootDir } : {}),\n },\n },\n },\n\n ...(react ? reactHooksConfigs() : []),\n\n {\n name: '@d3lm/eslint-only-rules',\n files: allFileExtensions,\n plugins: {\n unicorn: unicornPlugin as ESLint.Plugin,\n },\n rules: {\n ...jsRulesEslint(ruleOptions),\n ...unicornRulesEslint,\n },\n },\n\n {\n name: '@d3lm/eslint-only-rules-ts',\n files: tsFileExtensions,\n rules: {\n ...tsRulesEslint(ruleOptions),\n },\n },\n\n ...extraConfigs,\n\n // MUST be last to turn off every rule oxlint already owns\n ...oxlintDisables,\n ];\n}\n\ninterface ReactHooksPlugin {\n configs?: {\n flat?: {\n recommended?: Linter.Config | Linter.Config[];\n };\n recommended?: Linter.Config | Linter.Config[];\n };\n}\n\nfunction reactHooksConfigs(): Linter.Config[] {\n const typedReactHooksPlugin = require('eslint-plugin-react-hooks') as ReactHooksPlugin;\n\n const recommendedConfig =\n typedReactHooksPlugin.configs?.flat?.recommended ?? typedReactHooksPlugin.configs?.recommended;\n\n if (!recommendedConfig) {\n throw new Error('eslint-plugin-react-hooks does not expose a recommended config.');\n }\n\n return normalizeConfigs(recommendedConfig).map((config) => {\n return {\n ...config,\n files: config.files && config.files.length > 0 ? config.files : reactFileExtensions,\n };\n });\n}\n\nfunction normalizeConfigs(configs: Linter.Config | Linter.Config[]): Linter.Config[] {\n return Array.isArray(configs) ? configs : [configs];\n}\n"],"mappings":";;;;;;;;;;AACA,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1B,SAAS,qBAAqB;AAE9B,OAAO,YAAY;AAiBnB,IAAM,oBAAoB,CAAC,GAAG,kBAAkB,GAAG,gBAAgB;AAEnE,IAAMA,WAAU,cAAc,YAAY,GAAG;AAEtC,SAAS,aAAa,UAA+B,CAAC,GAAoB;AAC/E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,CAAC;AAAA,IAChB,sBAAsB,CAAC,eAAe,gBAAgB,gBAAgB,aAAa;AAAA,IACnF,UAAU,CAAC;AAAA,IACX,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,mBAAoC;AAAA,IACxC,GAAI,OAAO,QAAQ;AAAA,IACnB,GAAI,OAAO,QAAQ;AAAA,EACrB,EAAE,IAAI,CAAC,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,iBAAiB,EAAE,IAAI,CAAC,WAAW;AACzD,WAAO;AAAA,MACL,GAAG;AAAA,MACH,OAAO,OAAO,SAAS,OAAO,MAAM,SAAS,IAAI,OAAO,QAAQ;AAAA,IAClE;AAAA,EACF,CAAC;AACH;AAEA,SAAS,iBAAiB,SAA2D;AACnF,SAAO,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO;AACpD;","names":["require"]}
@@ -0,0 +1,59 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+
5
+
6
+ var _chunkQDQNT3NAcjs = require('./chunk-QDQNT3NA.cjs');
7
+
8
+ // src/oxlint.ts
9
+ var _oxlint = require('oxlint');
10
+ var createOxlintConfig = (options) => {
11
+ const reactOptions = _chunkQDQNT3NAcjs.resolveReactRuleOptions.call(void 0, _optionalChain([options, 'optionalAccess', _ => _.react]));
12
+ const reactPlugins = [
13
+ "eslint",
14
+ "typescript",
15
+ "unicorn",
16
+ "oxc",
17
+ "react",
18
+ ...reactOptions.performance ? ["react-perf"] : []
19
+ ];
20
+ return _oxlint.defineConfig.call(void 0, {
21
+ ..._optionalChain([options, 'optionalAccess', _2 => _2.react]) && {
22
+ plugins: reactPlugins
23
+ },
24
+ jsPlugins: [
25
+ { name: "@d3lm", specifier: "@d3lm/lint-preset/rules" },
26
+ { name: "@stylistic", specifier: "@stylistic/eslint-plugin" },
27
+ { name: "prettier", specifier: "eslint-plugin-prettier" },
28
+ { name: "unicornx", specifier: "eslint-plugin-unicorn" },
29
+ { name: "jsdocx", specifier: "eslint-plugin-jsdoc" }
30
+ ],
31
+ options: { typeAware: true },
32
+ ignorePatterns: ["dist", "node_modules", "coverage"],
33
+ rules: {
34
+ ..._chunkQDQNT3NAcjs.jsRulesOxlint.call(void 0, _optionalChain([options, 'optionalAccess', _3 => _3.jsRulesOxlint])),
35
+ "@d3lm/newline-around-multiline": "error",
36
+ "@d3lm/block-scoped-case": "error",
37
+ "@d3lm/comment-syntax": "error",
38
+ "@d3lm/comment-preceding-blank-line": [
39
+ "error",
40
+ { allowInObjects: true, allowInArrays: true, allowInInterfaces: true }
41
+ ],
42
+ "@d3lm/no-implicit-object-return": "error",
43
+ "prettier/prettier": ["error", {}],
44
+ ..._optionalChain([options, 'optionalAccess', _4 => _4.react]) && _chunkQDQNT3NAcjs.reactRulesOxlint.call(void 0, options.react)
45
+ },
46
+ overrides: [
47
+ {
48
+ files: ["**/*.{ts,tsx,mts,cts}"],
49
+ rules: _chunkQDQNT3NAcjs.tsRulesOxlint.call(void 0, _optionalChain([options, 'optionalAccess', _5 => _5.tsRulesOxlint]))
50
+ }
51
+ ]
52
+ });
53
+ };
54
+ var oxlintConfig = createOxlintConfig();
55
+
56
+
57
+
58
+ exports.createOxlintConfig = createOxlintConfig; exports.oxlintConfig = oxlintConfig;
59
+ //# sourceMappingURL=oxlint.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/delm/dev/eslint-plugin/dist/oxlint.cjs","../src/oxlint.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACPA,gCAAgD;AAWzC,IAAM,mBAAA,EAAqB,CAAC,OAAA,EAAA,GAAgD;AACjF,EAAA,MAAM,aAAA,EAAe,uDAAA,gBAAwB,OAAA,2BAAS,OAAK,CAAA;AAE3D,EAAA,MAAM,aAAA,EAAe;AAAA,IACnB,QAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,IACA,GAAI,Y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;AAAA,QACE,KAAA,EAAO,CAAC,uBAAuB,CAAA;AAAA,QAC/B,KAAA,EAAO,6CAAA,gBAAc,OAAA,6BAAS,eAAa;AAAA,MAC7C;AAAA,IACF;AAAA,EACF,CAAC,CAAA;AACH,CAAA;AAEO,IAAM,aAAA,EAAe,kBAAA,CAAmB,CAAA;ADP/C;AACE;AACA;AACF,qFAAC","file":"/Users/delm/dev/eslint-plugin/dist/oxlint.cjs","sourcesContent":[null,"import { defineConfig, type OxlintConfig } from 'oxlint';\nimport { jsRulesOxlint, type JavaScriptRuleOptions } from './configs/javascript.js';\nimport { reactRulesOxlint, resolveReactRuleOptions, type ReactConfigOptions } from './configs/react.js';\nimport { tsRulesOxlint, type TypeScriptRuleOptions } from './configs/typescript.js';\n\ninterface CreateConfigOptions {\n jsRulesOxlint?: JavaScriptRuleOptions;\n react?: ReactConfigOptions;\n tsRulesOxlint?: TypeScriptRuleOptions;\n}\n\nexport const createOxlintConfig = (options?: CreateConfigOptions): OxlintConfig => {\n const reactOptions = resolveReactRuleOptions(options?.react);\n\n const reactPlugins = [\n 'eslint',\n 'typescript',\n 'unicorn',\n 'oxc',\n 'react',\n ...(reactOptions.performance ? ['react-perf'] : []),\n ] as NonNullable<OxlintConfig['plugins']>;\n\n return defineConfig({\n ...(options?.react && {\n plugins: reactPlugins,\n }),\n jsPlugins: [\n { name: '@d3lm', specifier: '@d3lm/lint-preset/rules' },\n { name: '@stylistic', specifier: '@stylistic/eslint-plugin' },\n { name: 'prettier', specifier: 'eslint-plugin-prettier' },\n { name: 'unicornx', specifier: 'eslint-plugin-unicorn' },\n { name: 'jsdocx', specifier: 'eslint-plugin-jsdoc' },\n ],\n options: { typeAware: true },\n ignorePatterns: ['dist', 'node_modules', 'coverage'],\n rules: {\n ...jsRulesOxlint(options?.jsRulesOxlint),\n\n '@d3lm/newline-around-multiline': 'error',\n '@d3lm/block-scoped-case': 'error',\n '@d3lm/comment-syntax': 'error',\n '@d3lm/comment-preceding-blank-line': [\n 'error',\n { allowInObjects: true, allowInArrays: true, allowInInterfaces: true },\n ],\n '@d3lm/no-implicit-object-return': 'error',\n\n 'prettier/prettier': ['error', {}],\n\n ...(options?.react && reactRulesOxlint(options.react)),\n },\n overrides: [\n {\n files: ['**/*.{ts,tsx,mts,cts}'],\n rules: tsRulesOxlint(options?.tsRulesOxlint),\n },\n ],\n });\n};\n\nexport const oxlintConfig = createOxlintConfig();\n"]}
@@ -0,0 +1,12 @@
1
+ import { OxlintConfig } from 'oxlint';
2
+ import { J as JavaScriptRuleOptions, R as ReactConfigOptions, T as TypeScriptRuleOptions } from './typescript-pI6S6Z22.cjs';
3
+
4
+ interface CreateConfigOptions {
5
+ jsRulesOxlint?: JavaScriptRuleOptions;
6
+ react?: ReactConfigOptions;
7
+ tsRulesOxlint?: TypeScriptRuleOptions;
8
+ }
9
+ declare const createOxlintConfig: (options?: CreateConfigOptions) => OxlintConfig;
10
+ declare const oxlintConfig: OxlintConfig;
11
+
12
+ export { createOxlintConfig, oxlintConfig };
@@ -0,0 +1,12 @@
1
+ import { OxlintConfig } from 'oxlint';
2
+ import { J as JavaScriptRuleOptions, R as ReactConfigOptions, T as TypeScriptRuleOptions } from './typescript-pI6S6Z22.js';
3
+
4
+ interface CreateConfigOptions {
5
+ jsRulesOxlint?: JavaScriptRuleOptions;
6
+ react?: ReactConfigOptions;
7
+ tsRulesOxlint?: TypeScriptRuleOptions;
8
+ }
9
+ declare const createOxlintConfig: (options?: CreateConfigOptions) => OxlintConfig;
10
+ declare const oxlintConfig: OxlintConfig;
11
+
12
+ export { createOxlintConfig, oxlintConfig };
package/dist/oxlint.js ADDED
@@ -0,0 +1,59 @@
1
+ import {
2
+ jsRulesOxlint,
3
+ reactRulesOxlint,
4
+ resolveReactRuleOptions,
5
+ tsRulesOxlint
6
+ } from "./chunk-JM2XMNKF.js";
7
+
8
+ // src/oxlint.ts
9
+ import { defineConfig } from "oxlint";
10
+ var createOxlintConfig = (options) => {
11
+ const reactOptions = resolveReactRuleOptions(options?.react);
12
+ const reactPlugins = [
13
+ "eslint",
14
+ "typescript",
15
+ "unicorn",
16
+ "oxc",
17
+ "react",
18
+ ...reactOptions.performance ? ["react-perf"] : []
19
+ ];
20
+ return defineConfig({
21
+ ...options?.react && {
22
+ plugins: reactPlugins
23
+ },
24
+ jsPlugins: [
25
+ { name: "@d3lm", specifier: "@d3lm/lint-preset/rules" },
26
+ { name: "@stylistic", specifier: "@stylistic/eslint-plugin" },
27
+ { name: "prettier", specifier: "eslint-plugin-prettier" },
28
+ { name: "unicornx", specifier: "eslint-plugin-unicorn" },
29
+ { name: "jsdocx", specifier: "eslint-plugin-jsdoc" }
30
+ ],
31
+ options: { typeAware: true },
32
+ ignorePatterns: ["dist", "node_modules", "coverage"],
33
+ rules: {
34
+ ...jsRulesOxlint(options?.jsRulesOxlint),
35
+ "@d3lm/newline-around-multiline": "error",
36
+ "@d3lm/block-scoped-case": "error",
37
+ "@d3lm/comment-syntax": "error",
38
+ "@d3lm/comment-preceding-blank-line": [
39
+ "error",
40
+ { allowInObjects: true, allowInArrays: true, allowInInterfaces: true }
41
+ ],
42
+ "@d3lm/no-implicit-object-return": "error",
43
+ "prettier/prettier": ["error", {}],
44
+ ...options?.react && reactRulesOxlint(options.react)
45
+ },
46
+ overrides: [
47
+ {
48
+ files: ["**/*.{ts,tsx,mts,cts}"],
49
+ rules: tsRulesOxlint(options?.tsRulesOxlint)
50
+ }
51
+ ]
52
+ });
53
+ };
54
+ var oxlintConfig = createOxlintConfig();
55
+ export {
56
+ createOxlintConfig,
57
+ oxlintConfig
58
+ };
59
+ //# sourceMappingURL=oxlint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/oxlint.ts"],"sourcesContent":["import { defineConfig, type OxlintConfig } from 'oxlint';\nimport { jsRulesOxlint, type JavaScriptRuleOptions } from './configs/javascript.js';\nimport { reactRulesOxlint, resolveReactRuleOptions, type ReactConfigOptions } from './configs/react.js';\nimport { tsRulesOxlint, type TypeScriptRuleOptions } from './configs/typescript.js';\n\ninterface CreateConfigOptions {\n jsRulesOxlint?: JavaScriptRuleOptions;\n react?: ReactConfigOptions;\n tsRulesOxlint?: TypeScriptRuleOptions;\n}\n\nexport const createOxlintConfig = (options?: CreateConfigOptions): OxlintConfig => {\n const reactOptions = resolveReactRuleOptions(options?.react);\n\n const reactPlugins = [\n 'eslint',\n 'typescript',\n 'unicorn',\n 'oxc',\n 'react',\n ...(reactOptions.performance ? ['react-perf'] : []),\n ] as NonNullable<OxlintConfig['plugins']>;\n\n return defineConfig({\n ...(options?.react && {\n plugins: reactPlugins,\n }),\n jsPlugins: [\n { name: '@d3lm', specifier: '@d3lm/lint-preset/rules' },\n { name: '@stylistic', specifier: '@stylistic/eslint-plugin' },\n { name: 'prettier', specifier: 'eslint-plugin-prettier' },\n { name: 'unicornx', specifier: 'eslint-plugin-unicorn' },\n { name: 'jsdocx', specifier: 'eslint-plugin-jsdoc' },\n ],\n options: { typeAware: true },\n ignorePatterns: ['dist', 'node_modules', 'coverage'],\n rules: {\n ...jsRulesOxlint(options?.jsRulesOxlint),\n\n '@d3lm/newline-around-multiline': 'error',\n '@d3lm/block-scoped-case': 'error',\n '@d3lm/comment-syntax': 'error',\n '@d3lm/comment-preceding-blank-line': [\n 'error',\n { allowInObjects: true, allowInArrays: true, allowInInterfaces: true },\n ],\n '@d3lm/no-implicit-object-return': 'error',\n\n 'prettier/prettier': ['error', {}],\n\n ...(options?.react && reactRulesOxlint(options.react)),\n },\n overrides: [\n {\n files: ['**/*.{ts,tsx,mts,cts}'],\n rules: tsRulesOxlint(options?.tsRulesOxlint),\n },\n ],\n });\n};\n\nexport const oxlintConfig = createOxlintConfig();\n"],"mappings":";;;;;;;;AAAA,SAAS,oBAAuC;AAWzC,IAAM,qBAAqB,CAAC,YAAgD;AACjF,QAAM,eAAe,wBAAwB,SAAS,KAAK;AAE3D,QAAM,eAAe;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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