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/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",