diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md index 1e161e3d..233a14d6 100644 --- a/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.58.0 - 2026-01-28 + +- [new] add sharable oxlint config with base typescript-eslint rules + ## 8.57.0 - 2026-01-28 - [deps] upgrade `typescript-eslint` to version `8.54.0` diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/oxc.js b/eslint-configs/eslint-config-seekingalpha-typescript/oxc.js new file mode 100644 index 00000000..e8f34509 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/oxc.js @@ -0,0 +1,13 @@ +import { ESLintPluginTypescriptDisabled } from './rules/typescript-eslint/oxlint-disabled.js'; + +import config from './index.js'; + +const oxcConfig = { + ...config, + rules: { + ...config.rules, + ...ESLintPluginTypescriptDisabled, + }, +}; + +export default oxcConfig; diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/oxlint-config.json b/eslint-configs/eslint-config-seekingalpha-typescript/oxlint-config.json new file mode 100644 index 00000000..f8e75ec4 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/oxlint-config.json @@ -0,0 +1,4 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "extends": ["./rules/typescript-eslint/oxlint-config.json"] +} diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/package.json b/eslint-configs/eslint-config-seekingalpha-typescript/package.json index 3b293abf..11aef363 100644 --- a/eslint-configs/eslint-config-seekingalpha-typescript/package.json +++ b/eslint-configs/eslint-config-seekingalpha-typescript/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-seekingalpha-typescript", - "version": "8.57.0", + "version": "8.58.0", "description": "SeekingAlpha's sharable typescript ESLint config", "main": "index.js", "type": "module", diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-config.json b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-config.json new file mode 100644 index 00000000..08a09319 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-config.json @@ -0,0 +1,113 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["typescript"], + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/no-restricted-types": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/ban-tslint-comment": "error", + "@typescript-eslint/consistent-generic-constructors": [ + "error", + "constructor" + ], + "@typescript-eslint/consistent-indexed-object-style": ["error", "record"], + "@typescript-eslint/consistent-type-definitions": ["error", "type"], + "@typescript-eslint/consistent-type-imports": [ + "error", + { + "prefer": "type-imports", + "fixStyle": "separate-type-imports" + } + ], + "@typescript-eslint/no-confusing-non-null-assertion": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-dynamic-delete": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-empty-object-type": "error", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-extraneous-class": "error", + "@typescript-eslint/no-import-type-side-effects": "error", + "@typescript-eslint/no-inferrable-types": [ + "error", + { + "ignoreParameters": true, + "ignoreProperties": true + } + ], + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-non-null-assertion": "error", + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unsafe-function-type": "error", + "@typescript-eslint/no-useless-empty-export": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/no-wrapper-object-types": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-enum-initializers": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/array-type": [ + "error", + { + "default": "generic", + "readonly": "generic" + } + ], + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + // require type info + "@typescript-eslint/await-thenable": "off", + "@typescript-eslint/no-array-delete": "off", + "@typescript-eslint/no-base-to-string": "off", + "@typescript-eslint/no-confusing-void-expression": "off", + "@typescript-eslint/no-deprecated": "off", + "@typescript-eslint/no-duplicate-type-constituents": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-for-in-array": "off", + "@typescript-eslint/no-implied-eval": "off", + "@typescript-eslint/no-meaningless-void-operator": "off", + "@typescript-eslint/no-misused-promises": "off", + "@typescript-eslint/no-misused-spread": "off", + "@typescript-eslint/no-mixed-enums": "off", + "@typescript-eslint/no-redundant-type-constituents": "off", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off", + "@typescript-eslint/no-unnecessary-template-expression": "off", + "@typescript-eslint/no-unnecessary-type-arguments": "off", + "@typescript-eslint/no-unnecessary-type-assertion": "off", + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-enum-comparison": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-unsafe-type-assertion": "off", + "@typescript-eslint/no-unsafe-unary-minus": "off", + "@typescript-eslint/non-nullable-type-assertion-style": "off", + "@typescript-eslint/only-throw-error": "off", + "@typescript-eslint/prefer-includes": "off", + "@typescript-eslint/prefer-nullish-coalescing": "off", + "@typescript-eslint/prefer-optional-chain": "off", + "@typescript-eslint/prefer-promise-reject-errors": "off", + "@typescript-eslint/prefer-reduce-type-parameter": "off", + "@typescript-eslint/prefer-return-this-type": "off", + "@typescript-eslint/promise-function-async": "off", + "@typescript-eslint/related-getter-setter-pairs": "off", + "@typescript-eslint/require-array-sort-compare": "off", + "@typescript-eslint/require-await": "off", + "@typescript-eslint/restrict-plus-operands": "off", + "@typescript-eslint/restrict-template-expressions": "off", + "@typescript-eslint/return-await": "off", + "@typescript-eslint/strict-boolean-expressions": "off", + "@typescript-eslint/switch-exhaustiveness-check": "off", + "@typescript-eslint/unbound-method": "off", + "@typescript-eslint/use-unknown-in-catch-callback-variable": "off" +} diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-disabled.js new file mode 100644 index 00000000..6c9e00ca --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-disabled.js @@ -0,0 +1,90 @@ +export const ESLintPluginTypescriptDisabled = { + '@typescript-eslint/adjacent-overload-signatures': 'off', + '@typescript-eslint/no-restricted-types': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-tslint-comment': 'off', + '@typescript-eslint/consistent-generic-constructors': 'off', + '@typescript-eslint/consistent-indexed-object-style': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', + '@typescript-eslint/consistent-type-imports': 'off', + '@typescript-eslint/no-confusing-non-null-assertion': 'off', + '@typescript-eslint/no-duplicate-enum-values': 'off', + '@typescript-eslint/no-dynamic-delete': 'off', + '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-extra-non-null-assertion': 'off', + '@typescript-eslint/no-extraneous-class': 'off', + '@typescript-eslint/no-import-type-side-effects': 'off', + '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/no-misused-new': 'off', + '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'off', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-this-alias': 'off', + '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'off', + '@typescript-eslint/no-unnecessary-type-constraint': 'off', + '@typescript-eslint/no-unsafe-declaration-merging': 'off', + '@typescript-eslint/no-unsafe-function-type': 'off', + '@typescript-eslint/no-useless-empty-export': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/prefer-as-const': 'off', + '@typescript-eslint/prefer-enum-initializers': 'off', + '@typescript-eslint/prefer-for-of': 'off', + '@typescript-eslint/prefer-function-type': 'off', + '@typescript-eslint/prefer-literal-enum-member': 'off', + '@typescript-eslint/prefer-namespace-keyword': 'off', + '@typescript-eslint/triple-slash-reference': 'off', + '@typescript-eslint/array-type': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + // require type info + '@typescript-eslint/await-thenable': 'off', + '@typescript-eslint/no-array-delete': 'off', + '@typescript-eslint/no-base-to-string': 'off', + '@typescript-eslint/no-confusing-void-expression': 'off', + '@typescript-eslint/no-deprecated': 'off', + '@typescript-eslint/no-duplicate-type-constituents': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-for-in-array': 'off', + '@typescript-eslint/no-implied-eval': 'off', + '@typescript-eslint/no-meaningless-void-operator': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-misused-spread': 'off', + '@typescript-eslint/no-mixed-enums': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', + '@typescript-eslint/no-unnecessary-template-expression': 'off', + '@typescript-eslint/no-unnecessary-type-arguments': 'off', + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-enum-comparison': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-type-assertion': 'off', + '@typescript-eslint/no-unsafe-unary-minus': 'off', + '@typescript-eslint/non-nullable-type-assertion-style': 'off', + '@typescript-eslint/only-throw-error': 'off', + '@typescript-eslint/prefer-includes': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/prefer-optional-chain': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-reduce-type-parameter': 'off', + '@typescript-eslint/prefer-return-this-type': 'off', + '@typescript-eslint/promise-function-async': 'off', + '@typescript-eslint/related-getter-setter-pairs': 'off', + '@typescript-eslint/require-array-sort-compare': 'off', + '@typescript-eslint/require-await': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/return-await': 'off', + '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/switch-exhaustiveness-check': 'off', + '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', +}; diff --git a/package.json b/package.json index d1bc3424..a156871b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seekingalpha-javascript-style", - "version": "9.84.2", + "version": "9.85.0", "description": "Set of linting rules, guides and best practices for best Javascript code", "main": "index.js", "type": "module",