From aa1a7be7e3cb4e9a12cb70ed5ff2388a0d3d00af Mon Sep 17 00:00:00 2001 From: Aleksey Kovalevsky Date: Mon, 26 Jan 2026 15:44:00 +0200 Subject: [PATCH 1/2] slint-config-seekingalpha-base ver. 11.34.0 --- .../CHANGELOG.md | 4 + .../eslint-config-seekingalpha-base/oxc.js | 179 ---------- .../oxlint-config.json | 326 ++++++++++++++++++ .../package.json | 2 +- package.json | 2 +- 5 files changed, 332 insertions(+), 181 deletions(-) delete mode 100644 eslint-configs/eslint-config-seekingalpha-base/oxc.js create mode 100644 eslint-configs/eslint-config-seekingalpha-base/oxlint-config.json diff --git a/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md index a631b3f7..66880287 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 11.34.0 - 2025-12-26 + +- [new] add sharable oxlint config with base eslint rules + ## 11.33.0 - 2025-12-20 - [new] expose eslint OXC config diff --git a/eslint-configs/eslint-config-seekingalpha-base/oxc.js b/eslint-configs/eslint-config-seekingalpha-base/oxc.js deleted file mode 100644 index 9287b3f0..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/oxc.js +++ /dev/null @@ -1,179 +0,0 @@ -import config from './index.js'; - -const OxcRules = { - 'array-callback-return': 'off', - 'constructor-super': 'off', - 'for-direction': 'off', - 'no-async-promise-executor': 'off', - 'no-await-in-loop': 'off', - 'no-class-assign': 'off', - 'no-compare-neg-zero': 'off', - 'no-cond-assign': 'off', - 'no-const-assign': 'off', - 'no-constant-binary-expression': 'off', - 'no-constant-condition': 'off', - 'no-constructor-return': 'off', - 'no-control-regex': 'off', - 'no-debugger': 'off', - 'no-dupe-class-members': 'off', - 'no-dupe-else-if': 'off', - 'no-dupe-keys': 'off', - 'no-duplicate-case': 'off', - 'no-duplicate-imports': 'off', - 'no-empty-character-class': 'off', - 'no-empty-pattern': 'off', - 'no-ex-assign': 'off', - 'no-fallthrough': 'off', - 'no-func-assign': 'off', - 'no-import-assign': 'off', - 'no-inline-comments': 'off', - 'no-inner-declarations': 'off', - 'no-invalid-regexp': 'off', - 'no-irregular-whitespace': 'off', - 'no-loss-of-precision': 'off', - 'no-magic-numbers': 'off', - 'no-misleading-character-class': 'off', - 'no-new-native-nonconstructor': 'off', - 'no-obj-calls': 'off', - 'no-promise-executor-return': 'off', - 'no-prototype-builtins': 'off', - 'no-self-assign': 'off', - 'no-self-compare': 'off', - 'no-setter-return': 'off', - 'no-sparse-arrays': 'off', - 'no-template-curly-in-string': 'off', - 'no-ternary': 'off', - 'no-this-before-super': 'off', - 'no-unassigned-vars': 'off', - 'no-unexpected-multiline': 'off', - 'no-unsafe-finally': 'off', - 'no-unsafe-negation': 'off', - 'no-unsafe-optional-chaining': 'off', - 'no-unused-private-class-members': 'off', - 'no-unused-vars': 'off', - 'no-useless-backreference': 'off', - 'use-isnan': 'off', - 'valid-typeof': 'off', - 'accessor-pairs': 'off', - 'arrow-body-style': 'off', - 'block-scoped-var': 'off', - 'capitalized-comments': 'off', - 'class-methods-use-this': 'off', - complexity: 'off', - curly: 'off', - 'default-case': 'off', - 'default-case-last': 'off', - 'default-param-last': 'off', - eqeqeq: 'off', - 'func-names': 'off', - 'func-style': 'off', - 'getter-return': 'off', - 'grouped-accessor-pairs': 'off', - 'guard-for-in': 'off', - 'id-length': 'off', - 'init-declarations': 'off', - 'max-classes-per-file': 'off', - 'max-depth': 'off', - 'max-lines': 'off', - 'max-lines-per-function': 'off', - 'max-nested-callbacks': 'off', - 'max-params': 'off', - 'max-statements': 'off', - 'new-cap': 'off', - 'no-alert': 'off', - 'no-array-constructor': 'off', - 'no-bitwise': 'off', - 'no-caller': 'off', - 'no-case-declarations': 'off', - 'no-console': 'off', - 'no-continue': 'off', - 'no-delete-var': 'off', - 'no-div-regex': 'off', - 'no-else-return': 'off', - 'no-empty': 'off', - 'no-empty-function': 'off', - 'no-eq-null': 'off', - 'no-empty-static-block': 'off', - 'no-eval': 'off', - 'no-extend-native': 'off', - 'no-extra-bind': 'off', - 'no-extra-boolean-cast': 'off', - 'no-extra-label': 'off', - 'no-global-assign': 'off', - 'no-implicit-coercion': 'off', - 'no-iterator': 'off', - 'no-label-var': 'off', - 'no-labels': 'off', - 'no-lone-blocks': 'off', - 'no-lonely-if': 'off', - 'no-loop-func': 'off', - 'no-multi-assign': 'off', - 'no-multi-str': 'off', - 'no-negated-condition': 'off', - 'no-nested-ternary': 'off', - 'no-new': 'off', - 'no-new-func': 'off', - 'no-new-wrappers': 'off', - 'no-nonoctal-decimal-escape': 'off', - 'no-object-constructor': 'off', - 'no-param-reassign': 'off', - 'no-plusplus': 'off', - 'no-proto': 'off', - 'no-redeclare': 'off', - 'no-regex-spaces': 'off', - 'no-restricted-globals': 'off', - 'no-restricted-imports': 'off', - 'no-return-assign': 'off', - 'no-script-url': 'off', - 'no-sequences': 'off', - 'no-shadow-restricted-names': 'off', - 'no-throw-literal': 'off', - 'no-undefined': 'off', - 'no-unneeded-ternary': 'off', - 'no-unreachable': 'off', - 'no-unused-expressions': 'off', - 'no-unused-labels': 'off', - 'no-useless-call': 'off', - 'no-useless-catch': 'off', - 'no-useless-computed-key': 'off', - 'no-useless-concat': 'off', - 'no-useless-constructor': 'off', - 'no-useless-escape': 'off', - 'no-useless-rename': 'off', - 'no-useless-return': 'off', - 'no-var': 'off', - 'no-void': 'off', - 'no-warning-comments': 'off', - 'no-with': 'off', - 'operator-assignment': 'off', - 'prefer-destructuring': 'off', - 'prefer-exponentiation-operator': 'off', - 'prefer-numeric-literals': 'off', - 'prefer-object-has-own': 'off', - 'prefer-object-spread': 'off', - 'prefer-promise-reject-errors': 'off', - 'prefer-rest-params': 'off', - 'prefer-spread': 'off', - 'prefer-template': 'off', - 'preserve-caught-error': 'off', - radix: 'off', - 'require-await': 'off', - 'require-yield': 'off', - 'sort-imports': 'off', - 'sort-keys': 'off', - 'sort-vars': 'off', - 'symbol-description': 'off', - 'unicode-bom': 'off', - 'vars-on-top': 'off', - yoda: 'off', -}; - -const oxcConfig = { - ...config, - rules: { - ...config.rules, - ...OxcRules, - }, -}; - -export default oxcConfig; diff --git a/eslint-configs/eslint-config-seekingalpha-base/oxlint-config.json b/eslint-configs/eslint-config-seekingalpha-base/oxlint-config.json new file mode 100644 index 00000000..82186711 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/oxlint-config.json @@ -0,0 +1,326 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "rules": { + "array-callback-return": "error", + "constructor-super": "error", + "for-direction": "error", + "no-async-promise-executor": "error", + "no-await-in-loop": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-constructor-return": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-duplicate-imports": "off", + "no-empty-character-class": "error", + "no-empty-pattern": "error", + "no-ex-assign": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-import-assign": "error", + "no-inline-comments": "off", + "no-inner-declarations": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": "error", + "no-loss-of-precision": "error", + "no-magic-numbers": "off", + "no-misleading-character-class": "error", + "no-new-native-nonconstructor": "error", + "no-obj-calls": "error", + "no-promise-executor-return": "error", + "no-prototype-builtins": "error", + "no-self-assign": [ + "error", + { + "props": false + } + ], + "no-self-compare": "error", + "no-setter-return": "error", + "no-sparse-arrays": "error", + "no-template-curly-in-string": "error", + "no-ternary": "off", + "no-this-before-super": "error", + "no-unassigned-vars": "error", + "no-unexpected-multiline": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": [ + "error", + { + "disallowArithmeticOperators": true + } + ], + "no-unused-private-class-members": "error", + "no-unused-vars": [ + "error", + { + "args": "after-used", + "argsIgnorePattern": "[iI]gnored", + "caughtErrors": "all", + "caughtErrorsIgnorePattern": "[iI]gnored", + "ignoreRestSiblings": false, + "vars": "all", + "varsIgnorePattern": "[iI]gnored" + } + ], + "no-useless-backreference": "error", + "use-isnan": "error", + "valid-typeof": [ + "error", + { + "requireStringLiterals": true + } + ], + "accessor-pairs": [ + "error", + { + "setWithoutGet": true, + "getWithoutSet": false, + "enforceForClassMembers": true + } + ], + "arrow-body-style": ["error", "always"], + "block-scoped-var": "error", + "class-methods-use-this": "error", + "complexity": [ + "error", + { + "max": 10 + } + ], + "curly": "error", + "capitalized-comments": "off", + "default-case": [ + "error", + { + "commentPattern": "^skip\\sdefault" + } + ], + "default-case-last": "error", + "default-param-last": "error", + "eqeqeq": ["error", "always"], + "func-names": "off", + "func-style": [ + "error", + "expression", + { + "allowArrowFunctions": true + } + ], + "getter-return": [ + "error", + { + "allowImplicit": false + } + ], + "grouped-accessor-pairs": ["error", "getBeforeSet"], + "guard-for-in": "error", + "id-length": [ + "error", + { + "max": 50, + "properties": "always", + "exceptions": [] + } + ], + "init-declarations": "off", + "max-classes-per-file": ["error", 1], + "max-depth": ["error", 2], + "max-lines": "off", + "max-lines-per-function": [ + "error", + { + "max": 100, + "skipBlankLines": true, + "skipComments": true, + "IIFEs": true + } + ], + "max-nested-callbacks": ["error", 3], + "max-params": ["error", 4], + "max-statements": ["error", 20], + "new-cap": [ + "error", + { + "newIsCap": true, + "newIsCapExceptions": [], + "capIsNew": false, + "capIsNewExceptions": [], + "properties": true + } + ], + "no-alert": "error", + "no-array-constructor": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-case-declarations": "error", + "no-console": "error", + "no-continue": "error", + "no-delete-var": "error", + "no-div-regex": "error", + "no-else-return": [ + "error", + { + "allowElseIf": false + } + ], + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + "no-empty-function": "error", + "no-eq-null": "error", + "no-empty-static-block": "error", + "no-eval": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-boolean-cast": "error", + "no-extra-label": "error", + "no-global-assign": [ + "error", + { + "exceptions": [] + } + ], + "no-implicit-coercion": "error", + "no-iterator": "error", + "no-label-var": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-lonely-if": "error", + "no-loop-func": "error", + "no-multi-assign": "error", + "no-multi-str": "error", + "no-negated-condition": "error", + "no-nested-ternary": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-wrappers": "error", + "no-nonoctal-decimal-escape": "error", + "no-object-constructor": "error", + "no-param-reassign": "error", + "no-plusplus": "error", + "no-proto": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-restricted-globals": [ + "error", + { + "name": "event", + "message": "Use local parameter instead." + }, + { + "name": "fdescribe", + "message": "Do not commit fdescribe. Use describe instead." + }, + { + "name": "isFinite", + "message": "Use Number.isFinite instead." + }, + { + "name": "isNaN", + "message": "Use Number.isNaN instead" + } + ], + "no-restricted-imports": "error", + "no-return-assign": "error", + "no-script-url": "error", + "no-sequences": "error", + "no-shadow-restricted-names": "error", + "no-throw-literal": "error", + "no-undef": "error", + "no-undefined": "error", + "no-unneeded-ternary": [ + "error", + { + "defaultAssignment": false + } + ], + "no-unreachable": "error", + "no-unused-expressions": [ + "error", + { + "allowShortCircuit": false, + "allowTernary": false, + "allowTaggedTemplates": false + } + ], + "no-unused-labels": "error", + "no-useless-call": "error", + "no-useless-catch": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-escape": "error", + "no-useless-rename": [ + "error", + { + "ignoreDestructuring": false, + "ignoreImport": false, + "ignoreExport": false + } + ], + "no-useless-return": "error", + "no-var": "error", + "no-void": "error", + "no-warning-comments": "off", + "no-with": "error", + "operator-assignment": ["error", "never"], + "prefer-destructuring": [ + "error", + { + "VariableDeclarator": { + "array": false, + "object": true + }, + "AssignmentExpression": { + "array": true, + "object": true + } + }, + { + "enforceForRenamedProperties": false + } + ], + "prefer-exponentiation-operator": "error", + "prefer-numeric-literals": "error", + "prefer-object-has-own": "off", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": [ + "error", + { + "allowEmptyReject": true + } + ], + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "preserve-caught-error": [ + "error", + { + "requireCatchParameter": false + } + ], + "radix": "error", + "require-await": "error", + "require-yield": "error", + "sort-imports": "off", + "sort-keys": "off", + "sort-vars": "off", + "symbol-description": "error", + "unicode-bom": "off", + "vars-on-top": "error", + "yoda": "error" + } +} diff --git a/eslint-configs/eslint-config-seekingalpha-base/package.json b/eslint-configs/eslint-config-seekingalpha-base/package.json index 66be9a2c..ab4cf5a7 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/package.json +++ b/eslint-configs/eslint-config-seekingalpha-base/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-seekingalpha-base", - "version": "11.33.0", + "version": "11.34.0", "description": "SeekingAlpha's sharable base ESLint config", "main": "index.js", "type": "module", diff --git a/package.json b/package.json index 0f894daa..6edca26b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seekingalpha-javascript-style", - "version": "9.78.0", + "version": "9.79.0", "description": "Set of linting rules, guides and best practices for best Javascript code", "main": "index.js", "type": "module", From 090d3c3d0136c44e136b97869c380632c29d9abd Mon Sep 17 00:00:00 2001 From: Aleksey Kovalevsky Date: Mon, 26 Jan 2026 15:45:25 +0200 Subject: [PATCH 2/2] Create oxc.js --- .../eslint-config-seekingalpha-base/oxc.js | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 eslint-configs/eslint-config-seekingalpha-base/oxc.js diff --git a/eslint-configs/eslint-config-seekingalpha-base/oxc.js b/eslint-configs/eslint-config-seekingalpha-base/oxc.js new file mode 100644 index 00000000..9287b3f0 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/oxc.js @@ -0,0 +1,179 @@ +import config from './index.js'; + +const OxcRules = { + 'array-callback-return': 'off', + 'constructor-super': 'off', + 'for-direction': 'off', + 'no-async-promise-executor': 'off', + 'no-await-in-loop': 'off', + 'no-class-assign': 'off', + 'no-compare-neg-zero': 'off', + 'no-cond-assign': 'off', + 'no-const-assign': 'off', + 'no-constant-binary-expression': 'off', + 'no-constant-condition': 'off', + 'no-constructor-return': 'off', + 'no-control-regex': 'off', + 'no-debugger': 'off', + 'no-dupe-class-members': 'off', + 'no-dupe-else-if': 'off', + 'no-dupe-keys': 'off', + 'no-duplicate-case': 'off', + 'no-duplicate-imports': 'off', + 'no-empty-character-class': 'off', + 'no-empty-pattern': 'off', + 'no-ex-assign': 'off', + 'no-fallthrough': 'off', + 'no-func-assign': 'off', + 'no-import-assign': 'off', + 'no-inline-comments': 'off', + 'no-inner-declarations': 'off', + 'no-invalid-regexp': 'off', + 'no-irregular-whitespace': 'off', + 'no-loss-of-precision': 'off', + 'no-magic-numbers': 'off', + 'no-misleading-character-class': 'off', + 'no-new-native-nonconstructor': 'off', + 'no-obj-calls': 'off', + 'no-promise-executor-return': 'off', + 'no-prototype-builtins': 'off', + 'no-self-assign': 'off', + 'no-self-compare': 'off', + 'no-setter-return': 'off', + 'no-sparse-arrays': 'off', + 'no-template-curly-in-string': 'off', + 'no-ternary': 'off', + 'no-this-before-super': 'off', + 'no-unassigned-vars': 'off', + 'no-unexpected-multiline': 'off', + 'no-unsafe-finally': 'off', + 'no-unsafe-negation': 'off', + 'no-unsafe-optional-chaining': 'off', + 'no-unused-private-class-members': 'off', + 'no-unused-vars': 'off', + 'no-useless-backreference': 'off', + 'use-isnan': 'off', + 'valid-typeof': 'off', + 'accessor-pairs': 'off', + 'arrow-body-style': 'off', + 'block-scoped-var': 'off', + 'capitalized-comments': 'off', + 'class-methods-use-this': 'off', + complexity: 'off', + curly: 'off', + 'default-case': 'off', + 'default-case-last': 'off', + 'default-param-last': 'off', + eqeqeq: 'off', + 'func-names': 'off', + 'func-style': 'off', + 'getter-return': 'off', + 'grouped-accessor-pairs': 'off', + 'guard-for-in': 'off', + 'id-length': 'off', + 'init-declarations': 'off', + 'max-classes-per-file': 'off', + 'max-depth': 'off', + 'max-lines': 'off', + 'max-lines-per-function': 'off', + 'max-nested-callbacks': 'off', + 'max-params': 'off', + 'max-statements': 'off', + 'new-cap': 'off', + 'no-alert': 'off', + 'no-array-constructor': 'off', + 'no-bitwise': 'off', + 'no-caller': 'off', + 'no-case-declarations': 'off', + 'no-console': 'off', + 'no-continue': 'off', + 'no-delete-var': 'off', + 'no-div-regex': 'off', + 'no-else-return': 'off', + 'no-empty': 'off', + 'no-empty-function': 'off', + 'no-eq-null': 'off', + 'no-empty-static-block': 'off', + 'no-eval': 'off', + 'no-extend-native': 'off', + 'no-extra-bind': 'off', + 'no-extra-boolean-cast': 'off', + 'no-extra-label': 'off', + 'no-global-assign': 'off', + 'no-implicit-coercion': 'off', + 'no-iterator': 'off', + 'no-label-var': 'off', + 'no-labels': 'off', + 'no-lone-blocks': 'off', + 'no-lonely-if': 'off', + 'no-loop-func': 'off', + 'no-multi-assign': 'off', + 'no-multi-str': 'off', + 'no-negated-condition': 'off', + 'no-nested-ternary': 'off', + 'no-new': 'off', + 'no-new-func': 'off', + 'no-new-wrappers': 'off', + 'no-nonoctal-decimal-escape': 'off', + 'no-object-constructor': 'off', + 'no-param-reassign': 'off', + 'no-plusplus': 'off', + 'no-proto': 'off', + 'no-redeclare': 'off', + 'no-regex-spaces': 'off', + 'no-restricted-globals': 'off', + 'no-restricted-imports': 'off', + 'no-return-assign': 'off', + 'no-script-url': 'off', + 'no-sequences': 'off', + 'no-shadow-restricted-names': 'off', + 'no-throw-literal': 'off', + 'no-undefined': 'off', + 'no-unneeded-ternary': 'off', + 'no-unreachable': 'off', + 'no-unused-expressions': 'off', + 'no-unused-labels': 'off', + 'no-useless-call': 'off', + 'no-useless-catch': 'off', + 'no-useless-computed-key': 'off', + 'no-useless-concat': 'off', + 'no-useless-constructor': 'off', + 'no-useless-escape': 'off', + 'no-useless-rename': 'off', + 'no-useless-return': 'off', + 'no-var': 'off', + 'no-void': 'off', + 'no-warning-comments': 'off', + 'no-with': 'off', + 'operator-assignment': 'off', + 'prefer-destructuring': 'off', + 'prefer-exponentiation-operator': 'off', + 'prefer-numeric-literals': 'off', + 'prefer-object-has-own': 'off', + 'prefer-object-spread': 'off', + 'prefer-promise-reject-errors': 'off', + 'prefer-rest-params': 'off', + 'prefer-spread': 'off', + 'prefer-template': 'off', + 'preserve-caught-error': 'off', + radix: 'off', + 'require-await': 'off', + 'require-yield': 'off', + 'sort-imports': 'off', + 'sort-keys': 'off', + 'sort-vars': 'off', + 'symbol-description': 'off', + 'unicode-bom': 'off', + 'vars-on-top': 'off', + yoda: 'off', +}; + +const oxcConfig = { + ...config, + rules: { + ...config.rules, + ...OxcRules, + }, +}; + +export default oxcConfig;