diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 757ff1c1..00000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -!.eslintrc.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 30d69408..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - - env: { - node: true, - }, - - extends: [ - 'eslint-config-seekingalpha-base', - 'eslint-config-seekingalpha-node', - ], - -}; diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 00000000..0ac3658c --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,24 @@ +name: PR +on: [pull_request] +jobs: + pr: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version-file: '.nvmrc' + registry-url: https://npm.pkg.github.com/ + scope: '@seekingalpha' + + - name: Install dependencies + run: npm install --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.GPR_INSTALL_TOKEN }} + + - name: ESLint + run: npm run lint + + - name: Prettier + run: npm run oxfmt:check diff --git a/.husky/install.js b/.husky/install.js new file mode 100644 index 00000000..2104eafd --- /dev/null +++ b/.husky/install.js @@ -0,0 +1,9 @@ +try { + // eslint-disable-next-line import/dynamic-import-chunkname + const husky = await import('husky'); + husky.default(); +} catch (err) { + if (err.code !== 'ERR_MODULE_NOT_FOUND') { + throw err; + } +} diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..2312dc58 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/.npmrc b/.npmrc index 9cf94950..710df3a0 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ -package-lock=false \ No newline at end of file +@seekingalpha:registry=https://npm.pkg.github.com +package-lock=false diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..b832e400 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.16.0 diff --git a/LICENSE.md b/LICENSE.md index 9d1094d7..2e708102 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md index 564bdb60..9d7b4ef2 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md @@ -1,398 +1,1738 @@ # Change Log +## 11.65.1 - 2026-06-15 + +- [new] extend oxlint config + +## 11.65.0 - 2026-06-15 + +- [new] extend oxlint config + +## 11.64.0 - 2026-06-09 + +- [deps] update `eslint-plugin-unicorn` to version `65.0.1` + +## 11.63.3 - 2026-06-08 + +- [breaking] disable `unicorn/require-css-escape` rule + +## 11.63.2 - 2026-06-08 + +- [breaking] disable `unicorn/better-dom-traversing` rule + +## 11.63.1 - 2026-06-08 + +- [breaking] disable `unicorn/prefer-iterator-concat` rule +- [breaking] disable `unicorn/consistent-compound-words` rule + +## 11.63.0 - 2026-06-08 + +- [deps] update `eslint-plugin-unicorn` to version `65.0.0` +- [breaking] enable `unicorn/better-dom-traversing` rule +- [breaking] enable `unicorn/consistent-compound-words` rule +- [breaking] enable `unicorn/consistent-json-file-read` rule +- [breaking] enable `unicorn/no-array-fill-with-reference-type` rule +- [breaking] enable `unicorn/no-array-from-fill` rule +- [breaking] enable `unicorn/no-blob-to-file` rule +- [breaking] enable `unicorn/no-canvas-to-image` rule +- [breaking] enable `unicorn/no-confusing-array-splice` rule +- [breaking] enable `unicorn/no-duplicate-set-values` rule +- [breaking] enable `unicorn/no-exports-in-scripts` rule +- [breaking] enable `unicorn/no-incorrect-query-selector` rule +- [breaking] enable `unicorn/no-invalid-file-input-accept` rule +- [breaking] enable `unicorn/no-late-current-target-access` rule +- [breaking] enable `unicorn/no-manually-wrapped-comments` rule +- [breaking] enable `unicorn/no-unnecessary-nested-ternary` rule +- [breaking] enable `unicorn/no-this-outside-of-class` rule +- [breaking] enable `unicorn/no-unused-array-method-return` rule +- [breaking] enable `unicorn/prefer-array-last-methods` rule +- [breaking] enable `unicorn/prefer-get-or-insert-computed` rule +- [breaking] enable `unicorn/prefer-https` rule +- [breaking] enable `unicorn/prefer-iterator-concat` rule +- [breaking] enable `unicorn/prefer-iterator-to-array-at-end` rule +- [breaking] enable `unicorn/prefer-math-abs` rule +- [breaking] enable `unicorn/prefer-queue-microtask` rule +- [breaking] enable `unicorn/prefer-split-limit` rule +- [breaking] enable `unicorn/prefer-string-match-all` rule +- [breaking] enable `unicorn/prefer-string-pad-start-end` rule +- [breaking] enable `unicorn/prefer-string-repeat` rule +- [breaking] enable `unicorn/require-css-escape` rule +- [breaking] enable `unicorn/require-passive-events` rule + +## 11.62.0 - 2026-06-02 + +- [new] extend oxlint config + +## 11.61.0 - 2026-06-01 + +- [new] extend oxlint config + +## 11.60.0 - 2026-05-27 + +- [new] extend oxlint config + +## 11.59.0 - 2026-05-19 + +- [new] extend oxlint config + +## 11.58.0 - 2026-05-15 + +- [new] extend oxlint config + +## 11.57.0 - 2026-05-12 + +- [new] extend oxlint config + +## 11.56.0 - 2026-05-12 + +- [new] extend oxlint config + +## 11.55.0 - 2026-05-05 + +- [new] extend oxlint config + +## 11.54.0 - 2026-04-27 + +- [deps] update `eslint-plugin-promise` to version `7.3.0` + +## 11.53.0 - 2026-04-27 + +- [new] extend oxlint config + +## 11.52.0 - 2026-04-13 + +- [new] extend oxlint config + +## 11.51.0 - 2026-04-07 + +- [new] extend oxlint config + +## 11.50.0 - 2026-03-31 + +- [new] extend oxlint config + +## 11.49.0 - 2026-03-29 + +- [deps] update `eslint-plugin-unicorn` to version `64.0.0` +- [breaking] enable `unicorn/consistent-template-literal-escape` rule +- [breaking] enable `unicorn/no-useless-iterator-to-array` rule +- [breaking] enable `unicorn/prefer-simple-condition-first` rule +- [breaking] enable `unicorn/switch-case-break-position` rule + +## 11.48.0 - 2026-03-24 + +- [new] extend oxlint config + +## 11.47.0 - 2026-03-15 + +- [new] extend oxlint config + +## 11.46.0 - 2026-03-10 + +- [new] extend oxlint config + +## 11.45.2 - 2026-03-10 + +- [new] TS version of oxlint config + +## 11.45.1 - 2026-03-10 + +- [new] TS version of oxlint config + +## 11.45.0 - 2026-03-10 + +- [new] TS version of oxlint config + +## 11.44.0 - 2026-03-04 + +- [new] extend oxlint config + +## 11.43.0 - 2026-02-24 + +- [new] extend oxlint config + +## 11.42.0 - 2026-02-16 + +- [new] extend oxlint config + +## 11.41.0 - 2026-02-11 + +- [deps] update `eslint-plugin-unicorn` to version `63.0.0` + +## 11.40.1 - 2026-02-02 + +- [new] extend oxlint config + +## 11.40.0 - 2026-02-02 + +- [new] extend oxlint config + +## 11.39.1 - 2026-01-30 + +- [breaking] drop `eslint-plugin-promise` from oxlint config + +## 11.39.0 - 2026-01-30 + +- [breaking] drop `eslint-plugin-promise` from oxlint config + +## 11.38.0 - 2026-01-26 + +- [new] extend sharable oxlint config with eslint-plugin-import rules + +## 11.37.0 - 2026-01-27 + +- [breaking] drop `eslint-plugin-array-func` + +## 11.36.1 - 2026-01-26 + +- [new] extend sharable oxlint config with eslint-plugin-unicorn rules + +## 11.36.0 - 2026-01-26 + +- [new] extend sharable oxlint config with eslint-plugin-unicorn rules + +## 11.35.0 - 2026-01-26 + +- [new] extend sharable oxlint config with eslint-plugin-promise rules + +## 11.34.0 - 2026-01-26 + +- [new] add sharable oxlint config with base eslint rules + +## 11.33.0 - 2026-01-20 + +- [new] expose eslint OXC config + +## 11.32.0 - 2025-12-13 + +- [deps] update `eslint` to version `9.39.2` + +## 11.31.0 - 2025-11-04 + +- [deps] update `eslint` to version `9.39.1` + +## 11.30.0 - 2025-11-01 + +- [deps] update `eslint` to version `9.39.0` + +## 11.29.0 - 2025-10-29 + +- [deps] update `eslint-plugin-unicorn` to version `62.0.0` +- [breaking] enable `unicorn/no-immediate-mutation` rule +- [breaking] enable `unicorn/no-useless-collection-argument` rule +- [breaking] enable `unicorn/prefer-response-static-json` rule + +## 11.28.0 - 2025-10-18 + +- [deps] update `eslint` to version `9.38.0` + +## 11.27.0 - 2025-10-04 + +- [deps] update `eslint` to version `9.37.0` + +## 11.26.0 - 2025-09-28 + +- [deps] update `eslint-plugin-array-func` to version `5.1.0` + +## 11.25.0 - 2025-09-20 + +- [deps] update `eslint` to version `9.36.0` + +## 11.24.0 - 2025-09-09 + +- [deps] update `eslint-plugin-unicorn` to version `61.0.2` + +## 11.23.0 - 2025-09-06 + +- [deps] update `eslint-plugin-unicorn` to version `61.0.1` +- [breaking] enable `unicorn/no-array-sort` rule +- [breaking] enable `unicorn/prefer-bigint-literals` rule +- [breaking] enable `unicorn/prefer-classlist-toggle` rule +- [breaking] enable `unicorn/require-module-attributes` rule + +## 11.22.0 - 2025-09-05 + +- [deps] update `eslint` to version `9.35.0` +- [breaking] enable `preserve-caught-error` rule + +## 11.21.0 - 2025-08-23 + +- [deps] update `eslint` to version `9.34.0` + +## 11.20.0 - 2025-08-09 + +- [deps] update `eslint` to version `9.33.0` + +## 11.19.0 - 2025-07-26 + +- [deps] update `eslint` to version `9.32.0` + +## 11.18.0 - 2025-07-22 + +- [deps] update `eslint-plugin-unicorn` to version `60.0.0` +- [breaking] enable `unicorn/no-array-reverse` rule +- [breaking] enable `unicorn/no-useless-error-capture-stack-trace` rule +- [breaking] enable `unicorn/prefer-class-fields` rule +- [breaking] enable `unicorn/require-module-specifiers` rule + +## 11.17.0 - 2025-07-13 + +- [deps] update `eslint` to version `9.31.0` + +## 11.16.0 - 2025-07-02 + +- [deps] update `eslint` to version `9.30.1` + +## 11.15.0 - 2025-06-28 + +- [deps] update `eslint` to version `9.30.0` + +## 11.14.0 - 2025-06-21 + +- [deps] update `eslint-plugin-import` to version `2.32.0` + +## 11.13.0 - 2025-06-14 + +- [deps] update `eslint` to version `9.29.0` + +## 11.12.0 - 2025-05-31 + +- [deps] update `eslint` to version `9.28.0` + +## 11.11.0 - 2025-05-17 + +- [deps] update `eslint` to version `9.27.0` +- [breaking] enable `no-unassigned-vars` rule + +## 11.10.0 - 2025-05-09 + +- [deps] update `eslint-plugin-unicorn` to version `59.0.1` + +## 11.9.0 - 2025-05-03 + +- [deps] update `eslint` to version `9.26.0` + +## 11.8.0 - 2025-04-28 + +- [deps] update `eslint-plugin-unicorn` to version `59.0.0` +- [breaking] enable `unicorn/no-unnecessary-array-flat-depth` rule +- [breaking] enable `unicorn/no-unnecessary-array-splice-count` rule +- [breaking] enable `unicorn/prefer-import-meta-properties` rule + +## 11.7.0 - 2025-04-22 + +- [deps] update `eslint` to version `9.25.1` + +## 11.6.0 - 2025-04-21 + +- [deps] update `eslint` to version `9.25.0` + +## 11.5.0 - 2025-04-06 + +- [deps] update `eslint` to version `9.24.0` + +## 11.4.0 - 2025-03-24 + +- [deps] update `eslint-plugin-unicorn` to version `58.0.0` + +## 11.3.0 - 2025-03-22 + +- [deps] update `eslint` to version `9.23.0` + +## 11.2.0 - 2025-03-19 + +- [doc] update README.md + +## 11.1.0 - 2025-03-09 + +- [deps] update `eslint-plugin-unicorn` to version `57.0.0` +- [breaking] enable `unicorn/consistent-assert` rule +- [breaking] enable `unicorn/consistent-date-clone` rule +- [breaking] enable `unicorn/no-accessor-recursion` rule +- [breaking] enable `unicorn/no-instanceof-builtins` rule +- [breaking] enable `unicorn/no-named-default` rule + +## 11.0.0 - 2025-03-09 + +- [deps] update `eslint` to version `9.22.0` +- [breaking] enable `unicorn/prefer-math-min-max` rule +- [breaking] enable `no-useless-assignment` rule + +## 10.0.0 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 9.1.0 - 2025-03-06 + +- [deps] update `eslint-plugin-array-func` to version `5.0.2` + +## 9.0.0 - 2025-03-06 + +- [new] expose sharable flat config + +## 8.17.1 - 2025-03-06 + +- [breaking] removed separate prettier config + +## 8.17.0 - 2025-03-06 + +- [breaking] removed separate prettier config + +## 8.16.0 - 2025-01-23 + +- [deps] update `eslint` to version `8.57.1` + +## 8.15.0 - 2024-10-27 + +- [deps] update `eslint-plugin-promise` to version `7.2.1` + +## 8.14.0 - 2024-10-25 + +- [deps] update `eslint-plugin-promise` to version `7.2.0` + +## 8.13.0 - 2024-10-20 + +- [deps] update `eslint-plugin-unicorn` to version `56.0.1` + +## 8.12.0 - 2024-10-04 + +- [deps] update `eslint-plugin-import` to version `2.31.0` +- [deps] update `eslint-plugin-unicorn` to version `56.0.0` +- [breaking] enable `unicorn/consistent-existence-index-check` rule +- [breaking] enable `unicorn/prefer-math-min-max` rule + +## 8.11.0 - 2024-09-03 + +- [deps] update `eslint-plugin-import` to version `2.30.0` + +## 8.10.0 - 2024-08-08 + +- [deps] update `eslint-plugin-promise` to version `7.1.0` +- [breaking] enable `promise/spec-only` rule + +## 8.9.0 - 2024-07-25 + +- [deps] update `eslint-plugin-promise` to version `7.0.0` +- [deps] update `eslint-plugin-unicorn` to version `55.0.0` +- [breaking] enable `unicorn/no-length-as-slice-end` rule + +## 8.8.0 - 2024-07-23 + +- [deps] update `eslint-plugin-promise` to version `6.6.0` + +## 8.7.0 - 2024-07-20 + +- [deps] update `eslint-plugin-promise` to version `6.5.1` + +## 8.6.0 - 2024-07-01 + +- [deps] update `eslint-plugin-promise` to version `6.4.0` + +## 8.5.0 - 2024-06-16 + +- [deps] update `eslint-plugin-unicorn` to version `54.0.0` +- [breaking] enable `unicorn/no-negation-in-equality-check` rule + +## 8.4.0 - 2024-05-28 + +- [deps] update `eslint-plugin-promise` to version `6.2.0` + +## 8.3.1 - 2024-05-15 + +- [deps] removed `eslint-plugin-no-use-extend-native` + +## 8.3.0 - 2024-05-15 + +- [deps] removed `eslint-plugin-no-use-extend-native` + +## 8.2.0 - 2024-05-12 + +- [breaking] enable `logical-assignment-operators` rule + +## 8.1.0 - 2024-05-12 + +- [deps] update `eslint-plugin-unicorn` to version `53.0.0` +- [breaking] enable `unicorn/consistent-empty-array-spread` rule +- [breaking] enable `unicorn/no-invalid-fetch-options` rule +- [breaking] enable `unicorn/no-magic-array-flat-depth` rule +- [breaking] enable `unicorn/prefer-string-raw` rule +- [breaking] enable `unicorn/prefer-structured-clone` rule + +## 8.0.0 - 2024-04-08 + +- [breaking] removed `@stylistic/eslint-plugin-js` + +## 7.19.0 - 2024-04-03 + +- [deps] update `eslint-plugin-unicorn` to version `52.0.0` +- [breaking] enable `unicorn/no-await-in-promise-methods` rule +- [breaking] enable `unicorn/no-single-promise-in-promise-methods` rule + +## 7.18.0 - 2024-03-17 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.7.0` + +## 7.17.0 - 2024-03-03 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.6.3` + +## 7.16.0 - 2024-02-25 + +- [deps] update `eslint` to version `8.57.0` + +## 7.15.0 - 2024-02-18 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.6.2` + +## 7.14.0 - 2024-02-11 + +- [deps] update `eslint-plugin-unicorn` to version `51.0.1` +- [deps] update `@stylistic/eslint-plugin-js` to version `1.6.1` + +## 7.13.1 - 2024-02-06 + +- [deps] update `eslint-plugin-unicorn` to version `51.0.0` + +## 7.13.0 - 2024-02-06 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.5.4` +- [deps] update `eslint-plugin-unicorn` to version `51.0.0` + +## 7.12.0 - 2024-01-28 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.5.4` + +## 7.11.0 - 2024-01-04 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.5.3` + +## 7.10.0 - 2023-12-24 + +- [deps] update `eslint-plugin-unicorn` to version `50.0.1` +- [breaking] enable `unicorn/no-unnecessary-polyfills` rule + +## 7.9.0 - 2023-12-16 + +- [deps] update `eslint` to version `8.56.0` +- [deps] update `eslint-plugin-import` to version `2.29.1` + +## 7.8.0 - 2023-12-12 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.5.1` + +## 7.7.0 - 2023-12-07 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.5.0` + +## 7.6.0 - 2023-12-03 + +- [deps] update `eslint` to version `8.55.0` + +## 7.5.0 - 2023-11-26 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.4.1` + +## 7.4.0 - 2023-11-19 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.4.0` + +## 7.3.0 - 2023-11-18 + +- [deps] update `eslint` to version `8.54.0` +- [deps] update `@stylistic/eslint-plugin-js` to version `1.3.3` + +## 7.2.0 - 2023-11-14 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.2.0` + +## 7.1.0 - 2023-11-12 + +- [deps] update `@stylistic/eslint-plugin-js` to version `1.1.0` + +## 7.0.0 - 2023-11-05 + +- [deps] update `eslint` to version `8.53.0` +- [breaking] migrate to `@stylistic/eslint-plugin-js` + +## 6.28.0 - 2023-11-01 + +- [deps] update `eslint-plugin-unicorn` to version `49.0.0` + +## 6.26.0 - 2023-10-23 + +- [deps] update `eslint-plugin-import` to version `2.29.0` + +## 6.25.0 - 2023-10-22 + +- [deps] update `eslint` to version `8.52.0` + +## 6.24.0 - 2023-10-08 + +- [deps] update `eslint` to version `8.51.0` + +## 6.23.0 - 2023-09-25 + +- [deps] update `eslint` to version `8.50.0` +- [patch] remove deprecated `no-new-object` rule +- [breaking] enable `no-object-constructor` rule + +## 6.22.0 - 2023-09-13 + +- [deps] update `eslint-plugin-array-func` to version `4.0.8` + +## 6.21.0 - 2023-09-11 + +- [deps] update `eslint` to version `8.49.0` + +## 6.20.0 - 2023-08-27 + +- [deps] update `eslint` to version `8.48.0` + +## 6.19.0 - 2023-08-20 + +- [deps] update `eslint-plugin-import` to version `2.28.1` + +## 6.18.0 - 2023-08-12 + +- [deps] update `eslint` to version `8.47.0` + +## 6.17.0 - 2023-08-07 + +- [patch] enable the `operator-linebreak` rule with new config +- [patch] allow template literals in the `quotes` rule + +## 6.16.0 - 2023-08-04 + +- [patch] disable the `multiline-ternary` rule +- [patch] disable the `operator-linebreak` rule +- [patch] disable the `import/max-dependencies` rule +- [patch] change the max `complexity` to 10 +- [patch] change the `max-statements` config to 20 + +## 6.15.0 - 2023-07-28 + +- [deps] update `eslint` to version `8.46.0` + +## 6.14.0 - 2023-07-28 + +- [deps] update `eslint-plugin-import` to version `2.28.0` + +## 6.13.0 - 2023-07-26 + +- [deps] update `eslint-plugin-unicorn` to version `48.0.1` + +## 6.12.0 - 2023-07-18 + +- [breaking] disable `import/no-cycle` rule + +## 6.11.0 - 2023-07-18 + +- [deps] update `eslint` to version `8.45.0` +- [deps] update `eslint-plugin-unicorn` to version `48.0.0` + +## 6.10.0 - 2023-07-02 + +- [deps] update `eslint` to version `8.44.0` + +## 6.9.0 - 2023-06-18 + +- [deps] update `eslint` to version `8.43.0` + +## 6.8.0 - 2023-06-04 + +- [deps] update `eslint` to version `8.42.0` + +## 6.7.0 - 2023-05-21 + +- [deps] update `eslint` to version `8.41.0` + +## 6.6.3 - 2023-05-11 + +- [breaking] disable `unicorn/prefer-at` rule + +## 6.6.2 - 2023-05-10 + +- [breaking] enable `unicorn/prefer-object-from-entries` rule + +## 6.6.1 - 2023-05-10 + +- [breaking] enable `unicorn/prefer-string-replace-all` rule + +## 6.6.0 - 2023-05-10 + +- [breaking] enable `unicorn/prefer-at` rule + +## 6.5.0 - 2023-05-07 + +- [deps] update `eslint` to version `8.40.0` +- [deps] update `eslint-plugin-unicorn` to version `47.0.0` +- [breaking] enable `unicorn/prefer-blob-reading-methods` rule + +## 6.4.0 - 2023-04-23 + +- [deps] update `eslint` to version `8.39.0` + +## 6.3.0 - 2023-04-11 + +- allow `in` binary operator + +## 6.2.0 - 2023-04-09 + +- [deps] update `eslint` to version `8.38.0` + +## 6.1.0 - 2023-03-29 + +- [deps] update `eslint` to version `8.37.0` + +## 6.0.0 - 2023-03-28 + +- introduce `eslint-config-seekingalpha-base/prettier` config + +## 5.50.0 - 2023-03-12 + +- [deps] update `eslint` to version `8.36.0` + +## 5.49.0 - 2023-03-06 + +- [deps] update `eslint-plugin-unicorn` to version `46.0.0` + +## 5.48.0 - 2023-02-27 + +- [deps] update `eslint` to version `8.35.0` + +## 5.47.0 - 2023-02-12 + +- [deps] update `eslint` to version `8.34.0` + +## 5.46.0 - 2023-01-29 + +- [deps] update `eslint` to version `8.33.0` + +## 5.45.0 - 2023-01-19 + +- [breaking] enable `unicorn/prefer-node-protocol` rule + +## 5.44.0 - 2023-01-17 + +- [deps] update `eslint` to version `8.32.0` +- [deps] update `eslint-plugin-import` to version `2.27.5` +- [breaking] enable `import/no-empty-named-blocks` rule +- [breaking] enable `import/consistent-type-specifier-style` rule + +## 5.43.0 - 2023-01-08 + +- [deps] update `eslint-plugin-array-func` to version `3.1.8` + +## 5.42.0 - 2023-01-03 + +- [deps] update `eslint` to version `8.31.0` + +## 5.41.0 - 2022-12-18 + +- [deps] update `eslint` to version `8.30.0` + +## 5.40.0 - 2022-12-12 + +- [deps] update `eslint-plugin-unicorn` to version `45.0.2` + +## 5.39.0 - 2022-12-08 + +- [deps] update `eslint` to version `8.29.0` +- [deps] update `eslint-plugin-unicorn` to version `45.0.1` +- [breaking] enable `unicorn/no-typeof-undefined` rule +- [breaking] enable `unicorn/prefer-set-size` rule + +## 5.38.0 - 2022-12-06 + +- [breaking] `lines-around-comment` rule - ignore `@ts-expect-error` comments + +## 5.37.0 - 2022-12-06 + +- skipped + +## 5.36.0 - 2022-11-06 + +- [deps] update `eslint` to version `8.27.0` +- [breaking] enable `no-new-native-nonconstructor` rule +- [breaking] enable `no-empty-static-block` rule + +## 5.35.0 - 2022-10-23 + +- [deps] update `eslint` to version `8.26.0` + +## 5.34.0 - 2022-10-20 + +- [deps] update `eslint-plugin-promise` to version `6.1.1` + +## 5.33.0 - 2022-10-18 + +- [deps] update `eslint-plugin-promise` to version `6.1.0` + +## 5.32.0 - 2022-10-11 + +- [deps] update `eslint` to version `8.25.0` +- [deps] update `eslint-plugin-unicorn` to version `44.0.2` + +## 5.31.0 - 2022-10-05 + +- [deps] update `eslint-plugin-unicorn` to version `44.0.1` +- [breaking] enable `import/no-namespace` rule + +## 5.30.0 - 2022-10-03 + +- [breaking] enable `import/default` rule +- [breaking] enable `iimport/no-relative-packages` rule +- [breaking] enable `import/no-unused-modules` rule + +## 5.29.0 - 2022-10-02 + +- [breaking] enable `import/no-default-export` rule +- [breaking] enable `import/no-anonymous-default-export` rule + +## 5.28.0 - 2022-10-02 + +- [deps] update `eslint` to version `8.24.0` +- [deps] update `eslint-plugin-unicorn` to version `44.0.0` +- [breaking] enable `unicorn/no-document-cookie` rule +- [breaking] enable `unicorn/no-unnecessary-await` rule +- [breaking] enable `unicorn/switch-case-braces` rule + +## 5.27.0 - 2022-09-19 + +- [deps] update `eslint` to version `8.23.1` + +## 5.26.0 - 2022-08-27 + +- [deps] update `eslint` to version `8.23.0` + +## 5.25.0 - 2022-08-25 + +- [deps] update `eslint-plugin-promise` to version `6.0.1` + +## 5.24.0 - 2022-08-14 + +- [deps] update `eslint` to version `8.22.0` + +## 5.23.0 - 2022-08-01 + +- [deps] update `eslint` to version `8.21.0` + +## 5.22.0 - 2022-07-20 + +- [deps] update `eslint-plugin-unicorn` to version `43.0.2` + +## 5.21.0 - 2022-07-17 + +- [deps] update `eslint` to version `8.20.0` + +## 5.20.0 - 2022-07-10 + +- [deps] update `eslint-plugin-unicorn` to version `43.0.1` + +## 5.19.0 - 2022-07-03 + +- [deps] update `eslint` to version `8.19.0` +- [deps] update `eslint-plugin-unicorn` to version `43.0.0` +- [breaking] enable `unicorn/prefer-dom-node-append` rule +- [breaking] enable `unicorn/prefer-dom-node-remove` rule +- [breaking] enable `unicorn/prefer-event-target` rule +- [breaking] enable `unicorn/prefer-logical-operator-over-ternary` rule +- [breaking] enable `unicorn/prefer-modern-dom-apis` rule +- [breaking] enable `unicorn/prefer-prototype-methods` rule + +## 5.18.0 - 2022-06-19 + +- [deps] update `eslint` to version `8.18.0` + +## 5.17.0 - 2022-06-06 + +- [deps] update `eslint` to version `8.17.0` + +## 5.16.0 - 2022-05-22 + +- [deps] update `eslint` to version `8.16.0` + +## 5.15.0 - 2022-05-08 + +- [deps] update `eslint` to version `8.15.0` + +## 5.14.0 - 2022-04-26 + +- [deps] update `eslint` to version `8.14.0` +- [breaking] enable `no-constant-binary-expression` rule + +## 5.13.0 - 2022-04-10 + +- [deps] update `eslint` to version `8.13.0` + +## 5.12.0 - 2022-04-06 + +- [deps] update `eslint-plugin-import` to version `2.26.0` + +## 5.11.0 - 2022-04-03 + +- [deps] update `eslint-plugin-unicorn` to version `42.0.0` +- [breaking] enable `unicorn/no-unreadable-iife` rule +- [breaking] enable `unicorn/no-useless-switch-case` rule +- [breaking] enable `unicorn/prefer-modern-math-apis` rule +- [breaking] enable `unicorn/prefer-native-coercion-functions` rule + +## 5.10.0 - 2022-03-27 + +- [deps] update `eslint` to version `8.12.0` + +## 5.9.0 - 2022-03-20 + +- [deps] update `eslint-plugin-unicorn` to version `41.0.1` + +## 5.8.0 - 2022-03-13 + +- [deps] update `eslint` to version `8.11.0` + +## 5.7.0 - 2022-03-01 + +- [deps] update `eslint` to version `8.10.0` + +## 5.6.0 - 2022-02-20 + +- [deps] update `eslint-plugin-unicorn` to version `41.0.0` +- [breaking] enable `unicorn/text-encoding-identifier-case` rule + +## 5.5.0 - 2022-02-16 + +- [deps] update `eslint` to version `8.9.0` + +## 5.4.0 - 2022-01-30 + +- [deps] update `eslint` to version `8.8.0` + +## 5.3.0 - 2022-01-16 + +- [deps] update `eslint` to version `8.7.0` +- [deps] update `eslint-plugin-unicorn` to version `40.1.0` + +## 5.2.2 - 2022-01-09 + +- [deps] update `eslint-plugin-import` to version `2.25.4` + +## 5.2.1 - 2022-01-09 + +- [deps] revert `eslint-plugin-import` to version `2.25.3` + +## 5.2.0 - 2022-01-06 + +- [deps] update `eslint-plugin-import` to version `2.25.4` +- [deps] update `eslint-find-rules` to version `4.1.0` + +## 5.1.0 - 2022-01-01 + +- [deps] update `eslint` to version `8.6.0` +- [deps] update `eslint-plugin-unicorn` to version `40.0.0` +- [breaking] enable `unicorn/no-thenable` rule +- [breaking] enable `unicorn/no-useless-promise-resolve-reject` rule +- [breaking] enable `unicorn/prefer-json-parse-buffer` rule +- [breaking] enable `unicorn/relative-url-style` rule + +## 5.0.1 - 2021-12-18 + +- [patch] disable `prefer-object-has-own` rule + +## 5.0.0 - 2021-12-18 + +- [deps] update `eslint` to version `8.5.0` +- [deps] update `eslint-plugin-promise` to version `6.0.0` +- [breaking] enable `prefer-object-has-own` rule +- [breaking] enable `no-unused-private-class-members` rule + +## 4.66.0 - 2021-12-02 + +- [deps] update `eslint-plugin-promise` to version `5.2.0` + +## 4.65.0 - 2021-11-22 + +- [deps] update `eslint-plugin-unicorn` to version `39.0.0` +- [breaking] enable `unicorn/no-await-expression-member` rule +- [breaking] enable `unicorn/prefer-code-point` rule + +## 4.64.0 - 2021-11-10 + +- [deps] update `eslint-plugin-unicorn` to version `38.0.1` +- [deps] update `eslint-plugin-import` to version `2.25.3` + +## 4.63.0 - 2021-11-07 + +- [deps] update `eslint-plugin-unicorn` to version `38.0.0` +- [breaking] enable `unicorn/no-empty-file` rule +- [breaking] enable `unicorn/prefer-export-from` rule + +## 4.62.0 - 2021-10-21 + +- [deps] update `eslint-plugin-promise` to version `5.1.1` + +## 4.61.0 - 2021-10-13 + +- [deps] update `eslint-plugin-import` to version `2.25.2` + +## 4.60.0 - 2021-10-12 + +- [deps] update `eslint-plugin-unicorn` to version `37.0.1` +- [deps] update `eslint-plugin-import` to version `2.25.1` + +## 4.59.0 - 2021-09-14 + +- [deps] update `eslint-plugin-unicorn` to version `36.0.0` +- [breaking] enable `unicorn/no-invalid-remove-event-listener` rule +- [breaking] enable `unicorn/no-useless-fallback-in-spread` rule + +## 4.58.0 - 2021-08-29 + +- [deps] update `eslint-plugin-import` to version `2.24.2` + +## 4.57.0 - 2021-08-22 + +- [deps] update `eslint-plugin-import` to version `2.24.1` + +## 4.56.0 - 2021-08-10 + +- [deps] update `eslint-plugin-import` to version `2.24.0` + +## 4.55.1 - 2021-08-05 + +- [breaking] disable `unicorn/prefer-object-from-entries` rule + +## 4.55.0 - 2021-08-05 + +- [deps] update `eslint-plugin-unicorn` to version `35.0.0` +- [breaking] enable `unicorn/no-useless-spread` rule +- [breaking] enable `unicorn/no-useless-length-check` rule +- [breaking] enable `unicorn/prefer-object-from-entries` rule + +## 4.54.0 - 2021-08-01 + +- [deps] update `eslint` to version `7.32.0` + +## 4.53.0 - 2021-07-18 + +- [deps] update `eslint` to version `7.31.0` + +## 4.52.0 - 2021-07-04 + +- [deps] update `eslint` to version `7.30.0` + +## 4.51.0 - 2021-06-30 + +- [deps] update `eslint-plugin-unicorn` to version `34.0.1` +- [breaking] enable `unicorn/no-array-method-this-argument` rule +- [breaking] enable `unicorn/require-post-message-target-origin` rule + +## 4.50.0 - 2021-06-20 + +- [deps] update `eslint` to version `7.29.0` + +## 4.49.1 - 2021-06-06 + +- [breaking] disable `unicorn/prefer-prototype-methods` rule + +## 4.49.0 - 2021-06-06 + +- [deps] update `eslint` to version `7.28.0` +- [deps] update `eslint-plugin-unicorn` to version `33.0.1` +- [breaking] enable `unicorn/prefer-prototype-methods` rule +- [breaking] enable `unicorn/require-array-join-separator` rule +- [breaking] enable `unicorn/require-number-to-fixed-digits-argument` rule + +## 4.48.0 - 2021-05-30 + +- [deps] patch `import/order` rule + +## 4.47.0 - 2021-05-30 + +- [deps] update `eslint` to version `7.27.0` +- [deps] update `eslint-plugin-import` to version `2.23.4` + +## 4.46.0 - 2021-05-18 + +- [breaking] disable `import/no-import-module-exports` rule + +## 4.45.0 - 2021-05-18 + +- [deps] update `eslint-plugin-import` to version `2.23.2` +- [breaking] enable `import/no-import-module-exports` rule + +## 4.44.0 - 2021-05-11 + +- [patch] update `import/dynamic-import-chunkname` regex (add `M` postfix) + +## 4.43.0 - 2021-05-10 + +- [deps] update `eslint` to version `7.26.0` +- [deps] update `eslint-plugin-unicorn` to version `32.0.1` + +## 4.42.0 - 2021-05-03 + +- [patch] update `comma-dangle` rule + +## 4.41.1 - 2021-04-25 + +- [breaking] disable `unicorn/prefer-module` rule +- [breaking] disable `unicorn/prefer-node-protocol` rule + +## 4.41.0 - 2021-04-25 + +- [deps] update `eslint` to version `7.25.0` +- [deps] update `eslint-plugin-unicorn` to version `30.0.0` +- [breaking] enable `unicorn/prefer-module` rule +- [breaking] enable `unicorn/prefer-node-protocol` rule +- [breaking] enable `unicorn/prefer-switch` rule + +## 4.40.0 - 2021-04-20 + +- [deps] update `eslint-plugin-unicorn` to version `30.0.0` + +## 4.39.0 - 2021-04-11 + +- [deps] update `eslint` to version `7.24.0` +- [deps] update `eslint-plugin-promise` to version `5.1.0` + +## 4.38.0 - 2021-03-29 + +- [deps] update `eslint` to version `7.23.0` + +## 4.37.0 - 2021-03-22 + +- [deps] update `eslint-plugin-unicorn` to version `29.0.0` +- [breaking] enable `unicorn/no-static-only-class` rule +- [breaking] enable `unicorn/prefer-array-flat` rule + +## 4.36.0 - 2021-03-15 + +- [deps] update `eslint` to version `7.22.0` + +## 4.35.0 - 2021-02-28 + +- [deps] update `eslint` to version `7.21.0` + +## 4.34.0 - 2021-02-18 + +- [deps] update `eslint-plugin-unicorn` to version `28.0.2` + +## 4.33.0 - 2021-02-16 + +- [deps] update `eslint-plugin-unicorn` to version `28.0.1` + +## 4.32.0 - 2021-02-14 + +- [deps] update `eslint` to version `7.20.0` + +## 4.31.0 - 2021-02-11 + +- [deps] update `eslint-plugin-promise` to version `4.3.1` + +## 4.30.0 - 2021-02-10 + +- [deps] update `eslint-plugin-unicorn` to version `28.0.0` + +## 4.29.0 - 2021-01-31 + +- [deps] update `eslint` to version `7.19.0` + +## 4.28.0 - 2021-01-24 + +- [deps] update `eslint-plugin-unicorn` to version `27.0.0` +- [breaking] enable `unicorn/no-array-push-push` rule +- [breaking] enable `unicorn/no-this-assignment` rule +- [breaking] enable `unicorn/prefer-ternary` rule + +## 4.27.0 - 2021-01-17 + +- [deps] update `eslint` to version `7.18.0` +- [deps] update `eslint-plugin-unicorn` to version `26.0.1` + +## 4.26.0 - 2021-01-11 + +- [deps] update `eslint-plugin-unicorn` to version `26.0.0` +- [breaking] enable `require-unicode-regexp` rule +- [breaking] enable `unicorn/consistent-destructuring` rule +- [breaking] enable `unicorn/no-new-array` rule +- [breaking] enable `unicorn/prefer-array-index-of` rule +- [breaking] enable `unicorn/prefer-regexp-test` rule + +## 4.25.0 - 2021-01-03 + +- [deps] update `eslint` to version `7.17.0` + +## 4.24.0 - 2020-12-30 + +- [deps] update `eslint-plugin-unicorn` to version `25.0.1` + +## 4.23.0 - 2020-12-29 + +- [deps] update `eslint-plugin-unicorn` to version `25.0.0` +- [breaking] enable `unicorn/prefer-array-some` rule +- [breaking] enable `unicorn/prefer-default-parameters` rule +- [breaking] enable `unicorn/prefer-math-trunc` rule + +## 4.22.0 - 2020-12-21 + +- [deps] update `eslint` to version `7.16.0` +- [deps] update `eslint-plugin-unicorn` to version `24.0.0` +- [breaking] enable `unicorn/empty-brace-spaces` rule +- [breaking] enable `unicorn/no-lonely-if` rule +- [breaking] enable `unicorn/prefer-date-now` rule + +## 4.21.0 - 2020-12-06 + +- [deps] update `eslint` to version `7.15.0` +- [breaking] enable `no-unsafe-optional-chaining` rule + +## 4.20.0 - 2020-11-21 + +- [deps] update `eslint` to version `7.14.0` +- [breaking] enable `no-nonoctal-decimal-escape` rule + +## 4.19.0 - 2020-11-08 + +- [deps] update `eslint` to version `7.13.0` + +## 4.18.0 - 2020-10-27 + +- [deps] update `eslint` to version `7.12.1` + +## 4.17.0 - 2020-10-25 + +- [deps] update `eslint` to version `7.12.0` + +## 4.16.2 - 2020-10-18 + +- [breaking] disable `unicorn/prefer-ternary` rule + +## 4.16.1 - 2020-10-18 + +- [breaking] disable `unicorn/numeric-separators-style` rule + +## 4.16.0 - 2020-10-18 + +- [deps] update `eslint-plugin-unicorn` to version `23.0.0` +- [breaking] enable `unicorn/prefer-ternary` rule + +## 4.15.0 - 2020-10-15 + +- [breaking] update `import/dynamic-import-chunkname` regex + +## 4.14.0 - 2020-10-11 + +- [deps] update `eslint` to version `7.11.0` + +## 4.13.0 - 2020-09-29 + +- [deps] update `eslint` to version `7.10.0` +- [deps] update `eslint-plugin-import` to version `2.22.1` + +## 4.12.0 - 2020-09-23 + +- [docs] switch to NPM + +## 4.11.0 - 2020-09-21 + +- [deps] update `eslint-plugin-unicorn` to version `22.0.0` + +## 4.10.0 - 2020-09-13 + +- [deps] update `eslint` to version `7.9.0` + +## 4.9.0 - 2020-09-06 + +- [deps] update `eslint` to version `7.8.1` + +## 4.8.0 - 2020-09-01 + +- [deps] update `eslint` to version `7.8.0` + +## 4.7.0 - 2020-08-24 + +- [deps] update `eslint` to version `7.7.0` + +## 4.6.0 - 2020-08-02 + +- [deps] update `eslint` to version `7.6.0` + ## 4.5.0 - 2020-07-19 - - [breaking] enable `unicorn/no-object-as-default-parameter` rule - + +- [breaking] enable `unicorn/no-object-as-default-parameter` rule + ## 4.4.0 - 2020-07-19 - - [deps] update `eslint` to version `7.5.0` - - [deps] update `eslint-plugin-array-func` to version `3.1.7` - - [deps] update `eslint-plugin-unicorn` to version `21.0.0` - - [breaking] enable `prefer-array-find` rule - + +- [deps] update `eslint` to version `7.5.0` +- [deps] update `eslint-plugin-array-func` to version `3.1.7` +- [deps] update `eslint-plugin-unicorn` to version `21.0.0` +- [breaking] enable `prefer-array-find` rule + ## 4.3.0 - 2020-07-05 - - [deps] update `eslint` to version `7.4.0` - + +- [deps] update `eslint` to version `7.4.0` + ## 4.2.0 - 2020-06-28 - - [deps] update `eslint` to version `7.3.1` - - [deps] update `eslint-plugin-import` to version `2.22.0` - + +- [deps] update `eslint` to version `7.3.1` +- [deps] update `eslint-plugin-import` to version `2.22.0` + ## 4.1.0 - 2020-06-21 - - [deps] update `eslint` to version `7.3.0` - - [deps] update `eslint-plugin-import` to version `2.21.1` - - [breaking] enable `no-promise-executor-return` rule - - [breaking] enable `no-unreachable-loop` rule - + +- [deps] update `eslint` to version `7.3.0` +- [deps] update `eslint-plugin-import` to version `2.21.1` +- [breaking] enable `no-promise-executor-return` rule +- [breaking] enable `no-unreachable-loop` rule + ## 4.0.0 - 2020-06-08 - - [deps] update `eslint` to version `7.2.0` - - [deps] update `eslint-plugin-import` to version `2.21.1` - - [deps] update `eslint-plugin-unicorn` to version `20.1.0` - - [patch] removed deprecated rules nodejs and commonJS rules - - [breaking] enable `no-useless-backreference` rule - - [breaking] enable `no-loss-of-precision` rule - - [breaking] enable `unicorn/no-useless-undefined` rule - - [breaking] enable `unicorn/prefer-optional-catch-binding` rule - + +- [deps] update `eslint` to version `7.2.0` +- [deps] update `eslint-plugin-import` to version `2.21.1` +- [deps] update `eslint-plugin-unicorn` to version `20.1.0` +- [patch] removed deprecated rules nodejs and commonJS rules +- [breaking] enable `no-useless-backreference` rule +- [breaking] enable `no-loss-of-precision` rule +- [breaking] enable `unicorn/no-useless-undefined` rule +- [breaking] enable `unicorn/prefer-optional-catch-binding` rule + ## 3.34.0 - 2020-05-31 - - [deps] update `eslint-plugin-array-func` to version `3.1.6` - + +- [deps] update `eslint-plugin-array-func` to version `3.1.6` + ## 3.33.0 - 2020-05-11 - - [breaking] removed `eslint-plugin-jsdoc` - - [deps] update `eslint-find-rules` to version `3.5.0` - + +- [breaking] removed `eslint-plugin-jsdoc` +- [deps] update `eslint-find-rules` to version `3.5.0` + ## 3.32.0 - 2020-05-04 - - [deps] update `eslint-plugin-jsdoc` to version `24.0.2` - - [deps] update `eslint-plugin-unicorn` to version `19.0.1` - + +- [deps] update `eslint-plugin-jsdoc` to version `24.0.2` +- [deps] update `eslint-plugin-unicorn` to version `19.0.1` + ## 3.31.0 - 2020-04-21 - - [deps] update `eslint-plugin-jsdoc` to version `24.0.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `24.0.0` + ## 3.30.0 - 2020-04-13 - - [deps] update `eslint-plugin-jsdoc` to version `23.0.0` - - [deps] update `eslint-plugin-no-use-extend-native` to version `0.5.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `23.0.0` +- [deps] update `eslint-plugin-no-use-extend-native` to version `0.5.0` + ## 3.29.0 - 2020-04-08 - - [deps] update `eslint-plugin-array-func` to version `3.1.5` - + +- [deps] update `eslint-plugin-array-func` to version `3.1.5` + ## 3.28.0 - 2020-03-30 - - [deps] update `eslint-plugin-import` to version `2.20.2` + +- [deps] update `eslint-plugin-import` to version `2.20.2` ## 3.27.0 - 2020-03-27 - - [deps] update `eslint-plugin-unicorn` to version `18.0.1` - - [breaking] enable `unicorn/prefer-number-properties` rule - - [breaking] enable `unicorn/prefer-set-has` rule - + +- [deps] update `eslint-plugin-unicorn` to version `18.0.1` +- [breaking] enable `unicorn/prefer-number-properties` rule +- [breaking] enable `unicorn/prefer-set-has` rule + ## 3.26.0 - 2020-03-20 - - [deps] update `eslint-plugin-jsdoc` to version `22.1.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `22.1.0` + ## 3.25.0 - 2020-03-15 - - [deps] update `eslint-plugin-jsdoc` to version `22.0.1` - - [deps] update `eslint-plugin-unicorn` to version `17.2.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `22.0.1` +- [deps] update `eslint-plugin-unicorn` to version `17.2.0` + ## 3.24.1 - 2020-03-08 - - [patch: loosen rule] removed rule `nicorn/prefer-node-remove` - + +- [patch: loosen rule] removed rule `nicorn/prefer-node-remove` + ## 3.24.0 - 2020-03-08 - - [deps] update `eslint-plugin-jsdoc` to version `22.0.0` - - [deps] update `eslint-plugin-unicorn` to version `17.0.1` - + +- [deps] update `eslint-plugin-jsdoc` to version `22.0.0` +- [deps] update `eslint-plugin-unicorn` to version `17.0.1` + ## 3.23.0 - 2020-03-01 - - [deps] update `eslint-plugin-array-func` to version `3.1.4` - + +- [deps] update `eslint-plugin-array-func` to version `3.1.4` + ## 3.22.0 - 2020-02-23 - - [deps] update `eslint-plugin-unicorn` to version `16.1.1` - + +- [deps] update `eslint-plugin-unicorn` to version `16.1.1` + ## 3.21.0 - 2020-02-02 - - [deps] update `eslint-plugin-import` to version `2.20.1` - - [deps] update `eslint-plugin-unicorn` to version `16.0.0` - + +- [deps] update `eslint-plugin-import` to version `2.20.1` +- [deps] update `eslint-plugin-unicorn` to version `16.0.0` + ## 3.20.0 - 2020-01-25 - - [deps] update `eslint-plugin-jsdoc` to version `21.0.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `21.0.0` + ## 3.19.0 - 2020-01-17 - - [deps] update `eslint-plugin-jsdoc` to version `20.3.1` - + +- [deps] update `eslint-plugin-jsdoc` to version `20.3.1` + ## 3.18.0 - 2020-01-12 - - [deps] update `eslint-plugin-jsdoc` to version `20.3.0` - - [deps] update `eslint-plugin-import` to version `2.20.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `20.3.0` +- [deps] update `eslint-plugin-import` to version `2.20.0` + ## 3.17.0 - 2020-01-09 - - [deps] update `eslint-plugin-jsdoc` to version `20.0.5` - - [breaking] enable `jsdoc/check-property-names` rule - - [breaking] enable `jsdoc/require-property` rule - - [breaking] enable `jsdoc/require-property-description` rule - - [breaking] enable `jsdoc/require-property-name` rule - - [breaking] enable `jsdoc/require-property-type` rule - + +- [deps] update `eslint-plugin-jsdoc` to version `20.0.5` +- [breaking] enable `jsdoc/check-property-names` rule +- [breaking] enable `jsdoc/require-property` rule +- [breaking] enable `jsdoc/require-property-description` rule +- [breaking] enable `jsdoc/require-property-name` rule +- [breaking] enable `jsdoc/require-property-type` rule + ## 3.16.0 - 2019-12-30 - - [deps] update `eslint-plugin-jsdoc` to version `18.6.2` - - [deps] update `eslint-plugin-unicorn` to version `15.0.1` - + +- [deps] update `eslint-plugin-jsdoc` to version `18.6.2` +- [deps] update `eslint-plugin-unicorn` to version `15.0.1` + ## 3.15.0 - 2019-12-21 - - [deps] update `eslint` to version `6.8.0` - + +- [deps] update `eslint` to version `6.8.0` + ## 3.14.2 - 2019-12-11 - - [patch] update `import/order` groups order - + +- [patch] update `import/order` groups order + ## 3.14.1 - 2019-12-11 - - [patch] allow omit `.jsx` extension for `import/extension` rule - + +- [patch] allow omit `.jsx` extension for `import/extension` rule + ## 3.14.0 - 2019-12-11 - - [deps] update `eslint-plugin-import` to version `2.19.1` - - [deps] update `eslint-plugin-jsdoc` to version `18.4.3` - + +- [deps] update `eslint-plugin-import` to version `2.19.1` +- [deps] update `eslint-plugin-jsdoc` to version `18.4.3` + ## 3.13.0 - 2019-12-02 - - [deps] update `eslint` to version `6.7.2` - - [deps] update `eslint-plugin-jsdoc` to version `18.4.1` - - [deps] update `eslint-plugin-unicorn` to version `14.0.1` - - [breaking] enable `unicorn/prefer-negative-index` rule - - [breaking] enable `unicorn/prefer-trim-start-end` rule - + +- [deps] update `eslint` to version `6.7.2` +- [deps] update `eslint-plugin-jsdoc` to version `18.4.1` +- [deps] update `eslint-plugin-unicorn` to version `14.0.1` +- [breaking] enable `unicorn/prefer-negative-index` rule +- [breaking] enable `unicorn/prefer-trim-start-end` rule + ## 3.12.0 - 2019-11-27 - - [deps] update `eslint` to version `6.7.1` - - [deps] update `eslint-plugin-jsdoc` to version `18.1.5` - - [breaking] enable `grouped-accessor-pairs` rule - - [breaking] enable `no-constructor-return` rule - - [breaking] enable `no-dupe-else-if` rule - - [breaking] enable `no-setter-return` rule - - [breaking] enable `prefer-exponentiation-operator` rule - + +- [deps] update `eslint` to version `6.7.1` +- [deps] update `eslint-plugin-jsdoc` to version `18.1.5` +- [breaking] enable `grouped-accessor-pairs` rule +- [breaking] enable `no-constructor-return` rule +- [breaking] enable `no-dupe-else-if` rule +- [breaking] enable `no-setter-return` rule +- [breaking] enable `prefer-exponentiation-operator` rule + ## 3.11.0 - 2019-11-20 - - [deps] update `eslint-plugin-jsdoc` to version `18.1.3` - - [deps] update `eslint-plugin-unicorn` to version `13.0.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `18.1.3` +- [deps] update `eslint-plugin-unicorn` to version `13.0.0` + ## 3.10.0 - 2019-11-14 - - [deps] update `eslint-plugin-jsdoc` to version `18.0.1` - - [breaking] enable `jsdoc/check-access` rule - - [breaking] enable `jsdoc/empty-tags` rule - + +- [deps] update `eslint-plugin-jsdoc` to version `18.0.1` +- [breaking] enable `jsdoc/check-access` rule +- [breaking] enable `jsdoc/empty-tags` rule + ## 3.9.0 - 2019-10-29 - - [deps] update `eslint-plugin-jsdoc` to version `15.12.2` - + +- [deps] update `eslint-plugin-jsdoc` to version `15.12.2` + ## 3.8.0 - 2019-10-27 - - [deps] update `eslint` to version `6.6.0` - - [deps] update `eslint-plugin-jsdoc` to version `15.12.1` - + +- [deps] update `eslint` to version `6.6.0` +- [deps] update `eslint-plugin-jsdoc` to version `15.12.1` + ## 3.7.0 - 2019-10-23 - - [deps] update `eslint-plugin-jsdoc` to version `15.12.0` - + +- [deps] update `eslint-plugin-jsdoc` to version `15.12.0` + ## 3.6.0 - 2019-10-15 - - [deps] update `eslint` to version `6.5.1` - - [deps] update `eslint-plugin-jsdoc` to version `15.11.1` - - [deps] update `eslint-plugin-unicorn` to version `12.1.0` - - [breaking] enable `unicorn/prefer-string-slice` rule - + +- [deps] update `eslint` to version `6.5.1` +- [deps] update `eslint-plugin-jsdoc` to version `15.11.1` +- [deps] update `eslint-plugin-unicorn` to version `12.1.0` +- [breaking] enable `unicorn/prefer-string-slice` rule + ## 3.5.0 - 2019-09-22 - - [deps] update `eslint-plugin-unicorn` to version `11.0.1` - - [breaking] enable `unicorn/consistent-function-scoping` rule - - [breaking] enable `unicorn/prefer-dataset` rule - + +- [deps] update `eslint-plugin-unicorn` to version `11.0.1` +- [breaking] enable `unicorn/consistent-function-scoping` rule +- [breaking] enable `unicorn/prefer-dataset` rule + ## 3.4.0 - 2019-09-15 - - [deps] update `eslint` to version `6.4.0` - - [deps] update `eslint-plugin-jsdoc` to version `15.9.2` - - [breaking] enable `default-param-last` rule - - [breaking] enable `prefer-regex-literals` rule - - [breaking] enable `no-import-assign` rule + +- [deps] update `eslint` to version `6.4.0` +- [deps] update `eslint-plugin-jsdoc` to version `15.9.2` +- [breaking] enable `default-param-last` rule +- [breaking] enable `prefer-regex-literals` rule +- [breaking] enable `no-import-assign` rule ## 3.3.0 - 2019-09-02 - - [deps] update `eslint` to version `6.3.0` - - [deps] update `eslint-plugin-jsdoc` to version `15.9.1` - + +- [deps] update `eslint` to version `6.3.0` +- [deps] update `eslint-plugin-jsdoc` to version `15.9.1` + ## 3.2.0 - 2019-08-25 - - [deps] update `eslint` to version `6.2.2` + +- [deps] update `eslint` to version `6.2.2` ## 3.1.1 - 2019-08-22 - - [patch] disable `function-call-argument-newline` breaking arrow functions + +- [patch] disable `function-call-argument-newline` breaking arrow functions ## 3.1.0 - 2019-08-22 - - [deps] update `eslint` to version `6.2.1` - - [deps] update `eslint-plugin-jsdoc` to version `15.8.3` - - [breaking] enable `function-call-argument-newline` rule with `never` option - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `6.2.1` +- [deps] update `eslint-plugin-jsdoc` to version `15.8.3` +- [breaking] enable `function-call-argument-newline` rule with `never` option +- [docs] updates `README.md` installation guide ## 3.0.1 - 2019-08-10 - - [patch] loosen `unicorn/no-keyword-prefix` rule with `blacklist: ['new']` option + +- [patch] loosen `unicorn/no-keyword-prefix` rule with `blacklist: ['new']` option ## 3.0.0 - 2019-08-10 - - [deps] update `eslint` to version `6.1.0` - - [deps] update `eslint-plugin-jsdoc` to version `15.8.0` - - [deps] update `eslint-plugin-unicorn` to version `10.0.0` - - [breaking] enable `unicorn/no-keyword-prefix` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `6.1.0` +- [deps] update `eslint-plugin-jsdoc` to version `15.8.0` +- [deps] update `eslint-plugin-unicorn` to version `10.0.0` +- [breaking] enable `unicorn/no-keyword-prefix` rule +- [docs] updates `README.md` installation guide ## 2.8.1 - 2019-07-29 - - [deps] update `eslint-plugin-import` to version `2.18.2` - - [deps] update `eslint-plugin-jsdoc` to version `15.7.2` + +- [deps] update `eslint-plugin-import` to version `2.18.2` +- [deps] update `eslint-plugin-jsdoc` to version `15.7.2` ## 2.7.0 - 2019-07-12 - - [deps] update `eslint-plugin-jsdoc` to version `15.3.5` - - [deps] update `eslint-plugin-import` to version `2.18.0` + +- [deps] update `eslint-plugin-jsdoc` to version `15.3.5` +- [deps] update `eslint-plugin-import` to version `2.18.0` ## 2.7.0 - 2019-07-07 - - [deps] update `eslint-plugin-no-use-extend-native` to version `0.4.1` - - [deps] update `eslint-plugin-promise` to version `4.2.1` - - [deps] update `eslint-plugin-unicorn` to version `9.1.1` + +- [deps] update `eslint-plugin-no-use-extend-native` to version `0.4.1` +- [deps] update `eslint-plugin-promise` to version `4.2.1` +- [deps] update `eslint-plugin-unicorn` to version `9.1.1` ## 2.6.0 - 2019-06-18 - - [breaking] `comma-dangle` rule `always` option replaced with `always-multiline` + +- [breaking] `comma-dangle` rule `always` option replaced with `always-multiline` ## 2.5.0 - 2019-06-18 - - [deps] update `eslint-plugin-jsdoc` to version `8.1.0` - - [breaking] `comma-dangle` rule `always-multiline` option replaced with `always` + +- [deps] update `eslint-plugin-jsdoc` to version `8.1.0` +- [breaking] `comma-dangle` rule `always-multiline` option replaced with `always` ## 2.4.0 - 2019-06-11 - - [deps] update `eslint-plugin-jsdoc` to version `8.0.1` - - [deps] update `eslint-plugin-unicorn` to version `9.1.0` + +- [deps] update `eslint-plugin-jsdoc` to version `8.0.1` +- [deps] update `eslint-plugin-unicorn` to version `9.1.0` ## 2.3.1 - 2019-06-08 - - [minor] disable `import/no-unused-modules` rule + +- [minor] disable `import/no-unused-modules` rule ## 2.3.0 - 2019-06-07 - - [deps] update `eslint-plugin-import` to version `2.17.3` - - [deps] update `eslint-plugin-jsdoc` to version `7.2.3` - - [deps] update `eslint-plugin-unicorn` to version `9.0.0` - - [breaking] enable `import/no-unused-modules` rule - - [breaking] enable `jsdoc/implements-on-classes` rule - - [breaking] enable `jsdoc/match-description` rule - - [breaking] enable `jsdoc/no-types` rule - - [breaking] enable `jsdoc/require-jsdoc` rule - - [breaking] enable `unicorn/prefer-event-key` rule - - [breaking] enable `unicorn/prefer-flat-map` rule + +- [deps] update `eslint-plugin-import` to version `2.17.3` +- [deps] update `eslint-plugin-jsdoc` to version `7.2.3` +- [deps] update `eslint-plugin-unicorn` to version `9.0.0` +- [breaking] enable `import/no-unused-modules` rule +- [breaking] enable `jsdoc/implements-on-classes` rule +- [breaking] enable `jsdoc/match-description` rule +- [breaking] enable `jsdoc/no-types` rule +- [breaking] enable `jsdoc/require-jsdoc` rule +- [breaking] enable `unicorn/prefer-event-key` rule +- [breaking] enable `unicorn/prefer-flat-map` rule ## 2.2.0 - 2019-04-24 - - [deps] update `eslint-plugin-import` to version `2.17.2` + +- [deps] update `eslint-plugin-import` to version `2.17.2` ## 2.1.1 - 2019-04-11 - - [breaking] disable `unicorn/prevent-abbreviations` rule + +- [breaking] disable `unicorn/prevent-abbreviations` rule ## 2.1.0 - 2019-04-11 - - [deps] update `eslint` to version `5.16.0` - - [deps] update `eslint-plugin-jsdoc` to version `4.8.3` - - [deps] update `eslint-plugin-promise` to version `4.1.1` - - [deps] update `eslint-plugin-unicorn` to version `8.0.2` - - [breaking] enable `jsdoc/check-alignment` rule - - [breaking] enable `jsdoc/check-indentation` rule - - [breaking] enable `jsdoc/check-syntax` rule - - [breaking] enable `unicorn/no-for-loop` rule - - [breaking] enable `unicorn/no-zero-fractions` rule - - [breaking] enable `unicorn/prefer-includes` rule - - [breaking] enable `unicorn/prefer-node-remove` rule - - [breaking] enable `unicorn/prefer-text-content` rule - - [breaking] enable `unicorn/prevent-abbreviations` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.16.0` +- [deps] update `eslint-plugin-jsdoc` to version `4.8.3` +- [deps] update `eslint-plugin-promise` to version `4.1.1` +- [deps] update `eslint-plugin-unicorn` to version `8.0.2` +- [breaking] enable `jsdoc/check-alignment` rule +- [breaking] enable `jsdoc/check-indentation` rule +- [breaking] enable `jsdoc/check-syntax` rule +- [breaking] enable `unicorn/no-for-loop` rule +- [breaking] enable `unicorn/no-zero-fractions` rule +- [breaking] enable `unicorn/prefer-includes` rule +- [breaking] enable `unicorn/prefer-node-remove` rule +- [breaking] enable `unicorn/prefer-text-content` rule +- [breaking] enable `unicorn/prevent-abbreviations` rule +- [docs] updates `README.md` installation guide ## 2.0.0 - 2019-03-10 - - [deps] update `eslint` to version `5.15.1` - - [deps] update `eslint-plugin-array-func` to version `3.1.3` - - [deps] update `eslint-plugin-jsdoc` to version `4.1.1` - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.15.1` +- [deps] update `eslint-plugin-array-func` to version `3.1.3` +- [deps] update `eslint-plugin-jsdoc` to version `4.1.1` +- [docs] updates `README.md` installation guide ## 1.9.0 - 2019-01-31 - - [deps] update `eslint` to version `5.12.1` - - [deps] update `eslint-plugin-import` to version `5.16.0` - - [deps] update `eslint-plugin-jsdoc` to version `4.1.0` - - [deps] update `eslint-plugin-unicorn` to version `7.1.0` - - [breaking] enable `jsdoc/require-returns-check` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.12.1` +- [deps] update `eslint-plugin-import` to version `5.16.0` +- [deps] update `eslint-plugin-jsdoc` to version `4.1.0` +- [deps] update `eslint-plugin-unicorn` to version `7.1.0` +- [breaking] enable `jsdoc/require-returns-check` rule +- [docs] updates `README.md` installation guide ## 1.8.3 - 2019-01-31 - - [minor] enable `eol-last` + +- [minor] enable `eol-last` ## 1.8.2 - 2019-01-18 - - [minor] loosen `no-duplicate-imports` to resolve conflict with flow types + +- [minor] loosen `no-duplicate-imports` to resolve conflict with flow types ## 1.8.1 - 2019-01-13 - - [deps] update `eslint-plugin-unicorn` to version `7.0.0` - - [deps] update `eslint-plugin-array-func` to version `3.1.2` - - [deps] fix `peerDependencies` versions - - [breaking] enable `unicorn/no-console-spaces` rule - - [breaking] enable `unicorn/no-unreadable-array-destructuring` rule - - [breaking] enable `unicorn/no-unused-properties` rule - - [breaking] enable `unicorn/prefer-node-append` rule - - [breaking] enable `unicorn/prefer-query-selector` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint-plugin-unicorn` to version `7.0.0` +- [deps] update `eslint-plugin-array-func` to version `3.1.2` +- [deps] fix `peerDependencies` versions +- [breaking] enable `unicorn/no-console-spaces` rule +- [breaking] enable `unicorn/no-unreadable-array-destructuring` rule +- [breaking] enable `unicorn/no-unused-properties` rule +- [breaking] enable `unicorn/prefer-node-append` rule +- [breaking] enable `unicorn/prefer-query-selector` rule +- [docs] updates `README.md` installation guide ## 1.8.0 - 2019-01-13 - - [deps] update `eslint` to version `5.12.0` - - [deps] update `eslint-plugin-array-func` to version `3.1.1` - - [deps] update `eslint-plugin-jsdoc` to version `3.15.1` - - [deps] update `eslint-plugin-no-use-extend-native` to version `0.4.0` - - [breaking] enable `import/no-nodejs-modules` rule - - [breaking] enable `unicorn/no-process-exit` rule - - [breaking] enable `no-implicit-coercion` rule - - [breaking] enable `no-process-env` rule - - [breaking] enable `no-process-exit` rule - - [new] added `no-useless-catch` rule - - [new] added `jsdoc/require-returns` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.12.0` +- [deps] update `eslint-plugin-array-func` to version `3.1.1` +- [deps] update `eslint-plugin-jsdoc` to version `3.15.1` +- [deps] update `eslint-plugin-no-use-extend-native` to version `0.4.0` +- [breaking] enable `import/no-nodejs-modules` rule +- [breaking] enable `unicorn/no-process-exit` rule +- [breaking] enable `no-implicit-coercion` rule +- [breaking] enable `no-process-env` rule +- [breaking] enable `no-process-exit` rule +- [new] added `no-useless-catch` rule +- [new] added `jsdoc/require-returns` rule +- [docs] updates `README.md` installation guide ## 1.7.2 - 2018-12-19 - - [patch] disable `import/prefer-default-export` rule + +- [patch] disable `import/prefer-default-export` rule ## 1.7.1 - 2018-12-19 - - [patch] disable `import/exports-last` rule - - [patch] disable `import/no-namespace` rule - - [patch] disable `import/no-anonymous-default-export` rule - - [patch] disable `import/group-exports` rule + +- [patch] disable `import/exports-last` rule +- [patch] disable `import/no-namespace` rule +- [patch] disable `import/no-anonymous-default-export` rule +- [patch] disable `import/group-exports` rule ## 1.7.0 - 2018-12-19 - - [major] remove default `env` configuration - - [major] update `parserOptions` - - [patch] clean React specific methods from `class-methods-use-this` rule + +- [major] remove default `env` configuration +- [major] update `parserOptions` +- [patch] clean React specific methods from `class-methods-use-this` rule ## 1.6.0 - 2018-12-15 - - [major] remove `seekingalpha-base/browser` configuration - - [patch] add eslint-plugin-import [Style guide](https://www.npmjs.com/package/eslint-plugin-import#style-guide) rules - - [patch] add `jsdoc/require-description` rule - - [patch] add `unicorn/prefer-exponentiation-operator` rule - - [docs] updates `README.md` installation guide + +- [major] remove `seekingalpha-base/browser` configuration +- [patch] add eslint-plugin-import [Style guide](https://www.npmjs.com/package/eslint-plugin-import#style-guide) rules +- [patch] add `jsdoc/require-description` rule +- [patch] add `unicorn/prefer-exponentiation-operator` rule +- [docs] updates `README.md` installation guide ## 1.5.1 - 2018-12-10 - - [deps] update `eslint-plugin-jsdoc` to version `3.14.0` - - [docs] updates `README.md` installation guide + +- [deps] update `eslint-plugin-jsdoc` to version `3.14.0` +- [docs] updates `README.md` installation guide ## 1.5.0 - 2018-12-10 - - [deps] fix `peerDependencies` version - - [docs] updates `README.md` installation guide + +- [deps] fix `peerDependencies` version +- [docs] updates `README.md` installation guide ## 1.4.0 - 2018-12-10 - - [deps] update `eslint` to version `5.10.0` - - [deps] update `eslint-plugin-array-func` to version `3.1.0` - - internal lint error fixes and documentation updates + +- [deps] update `eslint` to version `5.10.0` +- [deps] update `eslint-plugin-array-func` to version `3.1.0` +- internal lint error fixes and documentation updates ## 1.3.3 - 2018-11-20 - - [patch: loosen rule] removed rule `array-element-newline` + +- [patch: loosen rule] removed rule `array-element-newline` ## 1.3.2 - 2018-11-20 - - [patch] changed `comma-dangle` rule, now trailing coma is required for multiline statements - - [patch] changed `arrow-body-style` rule, enforces braces around the function body - - [patch] changed `arrow-parens` rule, requires parens around arguments in all cases. + +- [patch] changed `comma-dangle` rule, now trailing coma is required for multiline statements +- [patch] changed `arrow-body-style` rule, enforces braces around the function body +- [patch] changed `arrow-parens` rule, requires parens around arguments in all cases. ## 1.3.1 - 2018-10-16 - - [patch] deprecated `promise/avoid-new` - - [patch] added `0` and `1` to ignore in `no-magic-numbers` + +- [patch] deprecated `promise/avoid-new` +- [patch] added `0` and `1` to ignore in `no-magic-numbers` ## 1.3.0 - 2018-09-18 - - [patch] removed rule for node.js + +- [patch] removed rule for node.js ## 1.2.0 - 2018-09-15 - - [deps] update `eslint` to version 5.6.0 - - [deps] update `eslint-plugin-jsdoc` to version `3.8.0` - - [deps] update `eslint-plugin-promise` to version `4.0.1` - - [deps] update `eslint-plugin-unicorn` to version `6.0.1` - - [docs] update `CHANGELOG.md` including previous releases - - [docs] updates `README.md` installation guide - - [minor] loosen `max-lines-per-function` rule allowing 100 lines - - [minor] extend `import/ignore` rule with `less` and `hbs` extensions + +- [deps] update `eslint` to version 5.6.0 +- [deps] update `eslint-plugin-jsdoc` to version `3.8.0` +- [deps] update `eslint-plugin-promise` to version `4.0.1` +- [deps] update `eslint-plugin-unicorn` to version `6.0.1` +- [docs] update `CHANGELOG.md` including previous releases +- [docs] updates `README.md` installation guide +- [minor] loosen `max-lines-per-function` rule allowing 100 lines +- [minor] extend `import/ignore` rule with `less` and `hbs` extensions ## 1.1.3 - 2018-09-11 - - [new] extend `class-methods-use-this` rule with `exceptMethods` for ReactJS(`componentDidMount`, `componentDidUpdate`, `componentWillMount`, `componentWillReceiveProps`, `componentWillUnmount`, `componentWillUpdate`, `render`, `shouldComponentUpdate`) - - [minor] loosen `promise/catch-or-return` with `{ allowThen: true }` + +- [new] extend `class-methods-use-this` rule with `exceptMethods` for ReactJS(`componentDidMount`, `componentDidUpdate`, `componentWillMount`, `componentWillReceiveProps`, `componentWillUnmount`, `componentWillUpdate`, `render`, `shouldComponentUpdate`) +- [minor] loosen `promise/catch-or-return` with `{ allowThen: true }` ## 1.1.2 - 2018-09-5 - - [patch] disable `romise/no-native` rule - - [minor] loosen `function-paren-newline`rule from `never` to `consistent` + +- [patch] disable `romise/no-native` rule +- [minor] loosen `function-paren-newline`rule from `never` to `consistent` ## 1.1.1 - 2018-08-17 - - [patch] disable `no-sync` rule - - [patch] disable `no-process-env` rule - - [patch] disable `no-process-exit` rule - - [patch] disable `import/no-nodejs-modules` rule + +- [patch] disable `no-sync` rule +- [patch] disable `no-process-env` rule +- [patch] disable `no-process-exit` rule +- [patch] disable `import/no-nodejs-modules` rule ## 1.1.0 - 2018-08-16 - - [new] introduce `seekingalpha-base/browser` and `seekingalpha-base/node` shareable configurations - - [deps] update `eslint-plugin-import` to version `2.14.0` - - [patch] disable `init-declarations` rule - - [patch] disable `no-invalid-this` rule + +- [new] introduce `seekingalpha-base/browser` and `seekingalpha-base/node` shareable configurations +- [deps] update `eslint-plugin-import` to version `2.14.0` +- [patch] disable `init-declarations` rule +- [patch] disable `no-invalid-this` rule ## 1.0.4 - 2018-08-15 - - [minor] loosen `max-len` rule extending max line length to 150 chars - - [fix] `dot-notation` rule allowing keywords - - [patch] disable `func-names` rule + +- [minor] loosen `max-len` rule extending max line length to 150 chars +- [fix] `dot-notation` rule allowing keywords +- [patch] disable `func-names` rule + ## 1.0.3 - 2018-08-15 - - [docs] fix package installation guide using NPM + +- [docs] fix package installation guide using NPM ## 1.0.2 - 2018-08-14 - - [patch: loosen rules] ignore links in `max-len` + +- [patch: loosen rules] ignore links in `max-len` ## 1.0.1 - 2018-08-13 - - Initial commit. + +- Initial commit. diff --git a/eslint-configs/eslint-config-seekingalpha-base/LICENSE.md b/eslint-configs/eslint-config-seekingalpha-base/LICENSE.md index 9d1094d7..2e708102 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/LICENSE.md +++ b/eslint-configs/eslint-config-seekingalpha-base/LICENSE.md @@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/eslint-configs/eslint-config-seekingalpha-base/README.md b/eslint-configs/eslint-config-seekingalpha-base/README.md index 1d3a74db..18a5c086 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/README.md +++ b/eslint-configs/eslint-config-seekingalpha-base/README.md @@ -4,52 +4,39 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ ## Installation -Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/) with **NPM**: - - npm install eslint@7.5.0 eslint-plugin-array-func@3.1.7 eslint-plugin-import@2.22.0 eslint-plugin-no-use-extend-native@0.5.0 eslint-plugin-promise@4.2.1 eslint-plugin-unicorn@21.0.0 --save-dev - -or **Yarn**: - - yarn add --dev eslint@7.5.0 eslint-plugin-array-func@3.1.7 eslint-plugin-import@2.22.0 eslint-plugin-no-use-extend-native@0.5.0 eslint-plugin-promise@4.2.1 eslint-plugin-unicorn@21.0.0 +Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): + npm install eslint@9.39.2 eslint-plugin-import@2.32.0 eslint-plugin-promise@7.3.0 eslint-plugin-unicorn@65.0.1 --save-dev Install SeekingAlpha shareable ESLint: - npm install eslint-config-seekingalpha-base --save-dev - -For **Yarn**: - - yarn add --dev eslint-config-seekingalpha-base + npm install eslint-config-seekingalpha-base@latest --save-dev ## Usage -This shareable config includes all ESLint rules including ECMAScript 6 features and set of [legacy rules](https://eslint.org/docs/rules/#deprecated). We also extend our configuration with following plugins: +This shareable config includes all ESLint rules. We also extend our configuration with following plugins: -* [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) -* [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func) -* [eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native) -* [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) -* [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) +- [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) +- [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) +- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) -We expose three configurations: - -* `seekingalpha-base` - exports all avaliable ESLint [rules](https://eslint.org/docs/rules/) and all rules of plugins above. -* `seekingalpha-base/browser` - exports only browser related rules for ESLint and mentioned plugins. It also sets `browser` as [default environment](https://eslint.org/docs/user-guide/configuring#specifying-environments). -* `seekingalpha-base/node` - exports only Node.js related rules for ESLint and mentioned plugins. It also sets `node` as [default environment](https://eslint.org/docs/user-guide/configuring#specifying-environments). - - -Simply [extend](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) the .eslintrc.js in your project with relevant configuration: +Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration: ```javascript -// for seekingalpha-base -{ - extends: [ - 'seekingalpha-base' - ] -} +import baseConfig from 'eslint-config-seekingalpha-base'; + +export default [ + { + plugins: { + ...baseConfig.plugins, + }, + rules: { + ...baseConfig.rules, + }, + }, +]; ``` ## License MIT © [SeekingAlpha](https://seekingalpha.com/) - diff --git a/eslint-configs/eslint-config-seekingalpha-base/index.js b/eslint-configs/eslint-config-seekingalpha-base/index.js index e7025039..9f3461eb 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/index.js +++ b/eslint-configs/eslint-config-seekingalpha-base/index.js @@ -1,34 +1,18 @@ -module.exports = { - - extends: [ - - // ESLint rules (https://eslint.org/docs/rules/) - './rules/eslint/index.js', - - // eslint-plugin-import rules (https://github.com/benmosher/eslint-plugin-import) - './rules/eslint-plugin-import/index.js', - - // eslint-plugin-array-func rules (https://github.com/freaktechnik/eslint-plugin-array-func) - './rules/eslint-plugin-array-func/index.js', - - // eslint-plugin-no-use-extend-native rules (https://github.com/dustinspecker/eslint-plugin-no-use-extend-native) - './rules/eslint-plugin-no-use-extend-native/index.js', - - // eslint-plugin-promise rules (https://github.com/xjamundx/eslint-plugin-promise) - './rules/eslint-plugin-promise/index.js', - - // eslint-plugin-unicorn rules (https://github.com/sindresorhus/eslint-plugin-unicorn) - './rules/eslint-plugin-unicorn/index.js', - - ], - - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - ecmaFeatures: { - impliedStrict: true, - globalReturn: false, - }, +import esLintPluginImport from './rules/eslint-plugin-import/index.js'; +import esLintPluginPromise from './rules/eslint-plugin-promise/index.js'; +import esLintPluginUnicorn from './rules/eslint-plugin-unicorn/index.js'; +import esLintConfig from './rules/eslint/index.js'; + +export default { + plugins: { + ...esLintPluginImport.plugins, + ...esLintPluginPromise.plugins, + ...esLintPluginUnicorn.plugins, + }, + rules: { + ...esLintConfig.rules, + ...esLintPluginImport.rules, + ...esLintPluginPromise.rules, + ...esLintPluginUnicorn.rules, }, - }; 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..77d48d93 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/oxc.js @@ -0,0 +1,24 @@ +import esLintPluginImport from './rules/eslint-plugin-import/index.js'; +import { ESLintPluginImportDisabled } from './rules/eslint-plugin-import/oxlint-disabled.js'; +import esLintPluginUnicorn from './rules/eslint-plugin-unicorn/index.js'; +import { ESLintPluginUnicornDisabled } from './rules/eslint-plugin-unicorn/oxlint-disabled.js'; +import esLintConfig from './rules/eslint/index.js'; +import { ESLintDisabled } from './rules/eslint/oxlint-disabled.js'; + +const oxcConfig = { + plugins: { + ...esLintPluginImport.plugins, + ...esLintPluginUnicorn.plugins, + }, + rules: { + ...esLintConfig.rules, + ...esLintPluginImport.rules, + ...esLintPluginUnicorn.rules, + // Disabled rules for OXC projects + ...ESLintDisabled, + ...ESLintPluginImportDisabled, + ...ESLintPluginUnicornDisabled, + }, +}; + +export default oxcConfig; diff --git a/eslint-configs/eslint-config-seekingalpha-base/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-base/oxlint-config.js new file mode 100644 index 00000000..afe98a04 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/oxlint-config.js @@ -0,0 +1,7 @@ +import importConfig from './rules/eslint-plugin-import/oxlint-config.js'; +import unicornConfig from './rules/eslint-plugin-unicorn/oxlint-config.js'; +import baseConfig from './rules/eslint/oxlint-config.js'; + +export default { + extends: [baseConfig, importConfig, unicornConfig], +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/package.json b/eslint-configs/eslint-config-seekingalpha-base/package.json index bf6fe7ed..06edd3ad 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/package.json +++ b/eslint-configs/eslint-config-seekingalpha-base/package.json @@ -1,16 +1,16 @@ { "name": "eslint-config-seekingalpha-base", - "version": "4.5.0", + "version": "11.65.1", "description": "SeekingAlpha's sharable base ESLint config", "main": "index.js", + "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", - "lint": "eslint --ext .js .", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "git+https://github.com/seekingalpha/javascript" + "url": "git+https://github.com/seekingalpha/javascript.git" }, "keywords": [ "code", @@ -45,23 +45,19 @@ }, "homepage": "https://github.com/seekingalpha/javascript#readme", "engines": { - "node": ">= 7" + "node": ">= 24" }, "peerDependencies": { - "eslint": "7.5.0", - "eslint-plugin-array-func": "3.1.7", - "eslint-plugin-import": "2.22.0", - "eslint-plugin-no-use-extend-native": "0.5.0", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-unicorn": "21.0.0" + "eslint": "9.39.2", + "eslint-plugin-import": "2.32.0", + "eslint-plugin-promise": "7.3.0", + "eslint-plugin-unicorn": "65.0.1" }, "devDependencies": { - "eslint": "7.5.0", - "eslint-find-rules": "3.6.0", - "eslint-plugin-array-func": "3.1.7", - "eslint-plugin-import": "2.22.0", - "eslint-plugin-no-use-extend-native": "0.5.0", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-unicorn": "21.0.0" + "eslint": "9.39.2", + "eslint-find-rules": "5.0.0", + "eslint-plugin-import": "2.32.0", + "eslint-plugin-promise": "7.3.0", + "eslint-plugin-unicorn": "65.0.1" } } diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/config.js b/eslint-configs/eslint-config-seekingalpha-base/rules/config.js index 39d852d2..2da6adf8 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/config.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/config.js @@ -1,7 +1,6 @@ -module.exports = { - complexity: 5, +export default { + complexity: 10, maxClassesPerFile: 1, - arrayBracketNewlineMinItems: 2, arrayElementNewlineMinItems: 5, idLengthMax: 50, indent: 2, @@ -11,7 +10,7 @@ module.exports = { maxLinesPerFunctionMax: 100, maxNestedCallbacks: 3, maxParams: 4, - maxStatements: 10, + maxStatements: 20, maxStatementsPerLine: 1, noMultipleEmptyLinesMax: 2, noMultipleEmptyLinesEOF: 0, @@ -20,5 +19,4 @@ module.exports = { newlineObjectPatternMin: 4, newlineImportDeclarationMin: 4, newlineExportDeclarationMin: 4, - importMaxDependenciesMax: 15, }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-array-func/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-array-func/index.js deleted file mode 100644 index f57a3b20..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-array-func/index.js +++ /dev/null @@ -1,23 +0,0 @@ -// https://github.com/freaktechnik/eslint-plugin-array-func - -module.exports = { - - plugins: ['array-func'], - - rules: { - - 'array-func/from-map': 'error', - - 'array-func/no-unnecessary-this-arg': 'error', - - 'array-func/prefer-array-from': 'error', - - 'array-func/avoid-reverse': 'error', - - 'array-func/prefer-flat': 'off', - - 'array-func/prefer-flat-map': 'off', - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/helpful-warnings.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/helpful-warnings.js index 50dff7c2..3e86277d 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/helpful-warnings.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/helpful-warnings.js @@ -1,37 +1,34 @@ // https://github.com/benmosher/eslint-plugin-import#helpful-warnings -module.exports = { - - rules: { - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md - 'import/export': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md - 'import/no-named-as-default': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md - 'import/no-named-as-default-member': 'error', - - /* - * Stage 0 rule, may be changed. Cool one ;) - * https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md - */ - 'import/no-deprecated': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md - 'import/no-extraneous-dependencies': [ - 'error', - { - devDependencies: true, - optionalDependencies: true, - peerDependencies: true, - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md - 'import/no-mutable-exports': 'error', - - }, - +export default { + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md + 'import/export': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md + 'import/no-named-as-default': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md + 'import/no-named-as-default-member': 'error', + + /* + * Stage 0 rule, may be changed. Cool one ;) + * https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md + */ + 'import/no-deprecated': 'error', + + // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-empty-named-blocks.md + 'import/no-empty-named-blocks': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: true, + optionalDependencies: true, + peerDependencies: true, + }, + ], + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md + 'import/no-mutable-exports': 'error', }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/index.js index 4434dbd1..1a47ca03 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/index.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/index.js @@ -1,39 +1,18 @@ -// eslint-plugin-import rules (https://github.com/benmosher/eslint-plugin-import) +import importPlugin from 'eslint-plugin-import'; -module.exports = { - - extends: [ - './helpful-warnings.js', - './module-systems.js', - './static-analysis.js', - './style-guide.js', - ], - - plugins: ['import'], - - settings: { - - 'import/resolver': { - node: { - extensions: [ - '.js', - '.jsx', - '.json', - ], - }, - }, - - 'import/extensions': [ - '.js', - '.jsx', - ], - - 'import/core-modules': [], - 'import/ignore': [ - 'node_modules', - '\\.(scss|css|less|hbs|svg|json)$', - ], +import helpfulWarnings from './helpful-warnings.js'; +import moduleSystem from './module-systems.js'; +import staticAnalysis from './static-analysis.js'; +import styleGuide from './style-guide.js'; +export default { + plugins: { + import: importPlugin, + }, + rules: { + ...helpfulWarnings, + ...moduleSystem, + ...staticAnalysis, + ...styleGuide, }, - }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/module-systems.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/module-systems.js index c345f93e..cc97f7b1 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/module-systems.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/module-systems.js @@ -1,21 +1,18 @@ // https://github.com/benmosher/eslint-plugin-import#module-systems -module.exports = { +export default { + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md + 'import/unambiguous': 'off', - rules: { + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md + 'import/no-commonjs': 'off', - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md - 'import/unambiguous': 'off', + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md + 'import/no-amd': 'error', - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md - 'import/no-commonjs': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md - 'import/no-amd': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md - 'import/no-nodejs-modules': 'error', - - }, + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md + 'import/no-nodejs-modules': 'off', + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-import-module-exports.md + 'import/no-import-module-exports': 'error', }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/oxlint-config.js new file mode 100644 index 00000000..8f95aaee --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/oxlint-config.js @@ -0,0 +1,56 @@ +export default { + plugins: ['import'], + rules: { + 'import/no-named-as-default': 'error', + 'import/no-named-as-default-member': 'error', + 'import/no-empty-named-blocks': 'error', + 'import/no-mutable-exports': 'error', + 'import/no-amd': 'error', + 'import/default': 'error', + 'import/export': 'error', + 'import/exports-last': 'off', + 'import/namespace': [ + 'error', + { + allowComputed: true, + }, + ], + 'import/newline-after-import': 'error', + 'import/no-absolute-path': [ + 'error', + { + esmodule: true, + commonjs: true, + amd: false, + }, + ], + 'import/no-dynamic-require': 'error', + 'import/no-webpack-loader-syntax': 'error', + 'import/prefer-default-export': 'off', + 'import/unambiguous': 'off', + 'import/no-relative-parent-imports': 'off', + 'import/no-self-import': 'error', + 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'], + 'import/first': 'error', + 'import/group-exports': 'off', + 'import/max-dependencies': 'off', + 'import/named': 'error', + 'import/no-duplicates': 'error', + 'import/no-namespace': ['error', { ignore: ['*.scss'] }], + 'import/no-nodejs-modules': 'off', + 'import/extensions': [ + 'error', + 'always', + { + ignorePackages: true, + }, + ], + 'import/no-unassigned-import': 'error', + 'import/no-named-default': 'error', + 'import/no-named-export': 'off', + 'import/no-default-export': 'error', + 'import/no-anonymous-default-export': 'error', + 'import/no-commonjs': 'off', + 'import/no-cycle': 'off', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/oxlint-disabled.js new file mode 100644 index 00000000..3ce5753c --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/oxlint-disabled.js @@ -0,0 +1,37 @@ +export const ESLintPluginImportDisabled = { + 'import/no-named-as-default': 'off', + 'import/no-named-as-default-member': 'off', + 'import/no-empty-named-blocks': 'off', + 'import/no-mutable-exports': 'off', + 'import/no-amd': 'off', + 'import/default': 'off', + 'import/export': 'off', + 'import/exports-last': 'off', + 'import/namespace': 'off', + 'import/newline-after-import': 'off', + 'import/no-absolute-path': 'off', + 'import/no-dynamic-require': 'off', + // disabled in favor of typescript/no-deprecated + 'import/no-deprecated': 'off', + 'import/no-webpack-loader-syntax': 'off', + 'import/prefer-default-export': 'off', + 'import/unambiguous': 'off', + 'import/no-relative-parent-imports': 'off', + 'import/no-self-import': 'off', + 'import/consistent-type-specifier-style': 'off', + 'import/first': 'off', + 'import/group-exports': 'off', + 'import/max-dependencies': 'off', + 'import/named': 'off', + 'import/no-duplicates': 'off', + 'import/no-namespace': 'off', + 'import/no-nodejs-modules': 'off', + 'import/extensions': 'off', + 'import/no-unassigned-import': 'off', + 'import/no-named-default': 'off', + 'import/no-named-export': 'off', + 'import/no-default-export': 'off', + 'import/no-anonymous-default-export': 'off', + 'import/no-commonjs': 'off', + 'import/no-cycle': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/static-analysis.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/static-analysis.js index 268b9974..0fe60644 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/static-analysis.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/static-analysis.js @@ -1,71 +1,68 @@ // https://github.com/benmosher/eslint-plugin-import#static-analysis -module.exports = { - - rules: { - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md - 'import/no-unresolved': [ - 'error', - { - commonjs: true, - caseSensitive: true, - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it - 'import/named': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it - 'import/default': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md - 'import/namespace': [ - 'error', - { - allowComputed: true, - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md - 'import/no-restricted-paths': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md - 'import/no-absolute-path': [ - 'error', - { - esmodule: true, - commonjs: true, - amd: false, - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md - 'import/no-dynamic-require': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md - 'import/no-internal-modules': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md - 'import/no-webpack-loader-syntax': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-self-import.md - 'import/no-self-import': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md - 'import/no-cycle': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md - 'import/no-useless-path-segments': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-relative-parent-imports.md - 'import/no-relative-parent-imports': 'off', - - /* - * https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unused-modules.md - * enable after mod.name bug fixed - */ - 'import/no-unused-modules': 'off', - }, - +export default { + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md + // handled by TypeScript + 'import/no-unresolved': 'off', + + // Prefer eslint-plugin-n + // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/enforce-node-protocol-usage.md + 'import/enforce-node-protocol-usage': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it + 'import/named': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it + 'import/default': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md + 'import/namespace': [ + 'error', + { + allowComputed: true, + }, + ], + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md + 'import/no-restricted-paths': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md + 'import/no-absolute-path': [ + 'error', + { + esmodule: true, + commonjs: true, + amd: false, + }, + ], + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md + 'import/no-dynamic-require': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md + 'import/no-internal-modules': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md + 'import/no-webpack-loader-syntax': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-self-import.md + 'import/no-self-import': 'error', + + /* + * very slow + * https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md + */ + 'import/no-cycle': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md + 'import/no-useless-path-segments': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-relative-parent-imports.md + 'import/no-relative-parent-imports': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-relative-packages.md + 'import/no-relative-packages': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unused-modules.md + 'import/no-unused-modules': 'error', }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/style-guide.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/style-guide.js index 964a49b3..5314a5c5 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/style-guide.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-import/style-guide.js @@ -1,94 +1,66 @@ -const config = require('../config'); - // https://github.com/benmosher/eslint-plugin-import#style-guide -module.exports = { - - rules: { - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md - 'import/first': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/exports-last.md - 'import/exports-last': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'import/no-duplicates': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md - 'import/no-namespace': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md - 'import/extensions': [ - 'error', - 'ignorePackages', - { - js: 'never', - jsx: 'never', - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md - 'import/order': [ - 'error', - { - groups: [ - 'builtin', - 'external', - 'internal', - 'parent', - 'sibling', - 'unknown', - 'index', - ], - - 'newlines-between': 'always', - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md - 'import/newline-after-import': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md - 'import/prefer-default-export': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md - 'import/max-dependencies': [ - 'error', - { - max: config.importMaxDependenciesMax, - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md - 'import/no-unassigned-import': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md - 'import/no-named-default': 'error', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md - 'import/no-default-export': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-anonymous-default-export.md - 'import/no-anonymous-default-export': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/group-exports.md - 'import/group-exports': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/dynamic-import-chunkname.md - 'import/dynamic-import-chunkname': [ - 'error', - { - importFunctions: [ - 'dynamicImport', - 'importedComponent', - ], - webpackChunknameFormat: '[0-9a-zA-Z-_/.]+', - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-export.md - 'import/no-named-export': 'off', - - }, +export default { + // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md + 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'], + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md + 'import/first': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/exports-last.md + 'import/exports-last': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md + 'import/no-duplicates': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md + 'import/no-namespace': ['error', { ignore: ['*.scss'] }], + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md + 'import/extensions': [ + 'error', + 'always', + { + ignorePackages: true, + }, + ], + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md + // handled by oxfmt + 'import/order': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md + 'import/newline-after-import': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md + 'import/prefer-default-export': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md + 'import/max-dependencies': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md + 'import/no-unassigned-import': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md + 'import/no-named-default': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md + 'import/no-default-export': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-anonymous-default-export.md + 'import/no-anonymous-default-export': 'error', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/group-exports.md + 'import/group-exports': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/dynamic-import-chunkname.md + 'import/dynamic-import-chunkname': [ + 'error', + { + importFunctions: [], + webpackChunknameFormat: String.raw`[a-zA-Z\d]+-[S|R|W|M](_(Pro|Pre|In|Out)+)?`, + }, + ], + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-export.md + 'import/no-named-export': 'off', }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-no-use-extend-native/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-no-use-extend-native/index.js deleted file mode 100644 index 55db87c6..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-no-use-extend-native/index.js +++ /dev/null @@ -1,13 +0,0 @@ -// https://github.com/dustinspecker/eslint-plugin-no-use-extend-native - -module.exports = { - - plugins: ['no-use-extend-native'], - - rules: { - - 'no-use-extend-native/no-use-extend-native': 'error', - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js index 14248495..b270ecc5 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js @@ -1,11 +1,10 @@ -// https://github.com/xjamundx/eslint-plugin-promise - -module.exports = { - - plugins: ['promise'], +import promisePlugin from 'eslint-plugin-promise'; +export default { + plugins: { + promise: promisePlugin, + }, rules: { - // https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/always-return.md 'promise/always-return': 'error', @@ -23,6 +22,9 @@ module.exports = { }, ], + // https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md + 'promise/no-multiple-resolved': 'error', + // https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/no-native.md 'promise/no-native': 'off', @@ -52,6 +54,11 @@ module.exports = { // https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/prefer-await-to-then.md 'promise/prefer-await-to-then': 'off', - }, + // https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-catch.md + 'promise/prefer-catch': 'error', + + // https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md + 'promise/spec-only': 'error', + }, }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/index.js index 71909190..e5010c0b 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/index.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/index.js @@ -1,13 +1,12 @@ -// https://github.com/sindresorhus/eslint-plugin-unicorn - -module.exports = { - - plugins: ['unicorn'], +import eslintPluginUnicorn from 'eslint-plugin-unicorn'; +export default { + plugins: { + unicorn: eslintPluginUnicorn, + }, rules: { - - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/better-regex.md - 'unicorn/better-regex': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-dom-traversing.md + 'unicorn/better-dom-traversing': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/catch-error-name.md 'unicorn/catch-error-name': [ @@ -17,12 +16,42 @@ module.exports = { }, ], + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md + 'unicorn/consistent-assert': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-compound-words.md + 'unicorn/consistent-compound-words': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md + 'unicorn/consistent-date-clone': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-destructuring.md + 'unicorn/consistent-destructuring': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md + 'unicorn/consistent-empty-array-spread': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md + 'unicorn/consistent-existence-index-check': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-function-scoping.md 'unicorn/consistent-function-scoping': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-json-file-read.md + 'unicorn/consistent-json-file-read': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-template-literal-escape.md + 'unicorn/consistent-template-literal-escape': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/custom-error-definition.md 'unicorn/custom-error-definition': 'error', + /* + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/empty-brace-spaces.md + * Disabled to work with oxfmt + */ + 'unicorn/empty-brace-spaces': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/error-message.md 'unicorn/error-message': 'error', @@ -35,11 +64,17 @@ module.exports = { // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/explicit-length-check.md 'unicorn/explicit-length-check': 'off', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md + /* + * check if can replace plugin-filenames + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md + */ 'unicorn/filename-case': 'off', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/import-index.md - 'unicorn/import-index': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md + 'unicorn/import-style': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/isolated-functions.md + 'unicorn/isolated-functions': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/new-for-builtins.md 'unicorn/new-for-builtins': 'error', @@ -47,14 +82,71 @@ module.exports = { // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-abusive-eslint-disable.md 'unicorn/no-abusive-eslint-disable': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-instanceof.md - 'unicorn/no-array-instanceof': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md + 'unicorn/no-accessor-recursion': 'error', + + /* + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md + * Duplicates import/no-anonymous-default-export + */ + 'unicorn/no-anonymous-default-export': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-callback-reference.md + 'unicorn/no-array-callback-reference': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-fill-with-reference-type.md + 'unicorn/no-array-fill-with-reference-type': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md + 'unicorn/no-array-for-each': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-from-fill.md + 'unicorn/no-array-from-fill': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md + 'unicorn/no-array-method-this-argument': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md + 'unicorn/no-array-sort': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md + 'unicorn/prefer-single-call': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-reduce.md + 'unicorn/no-array-reduce': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reverse.md + 'unicorn/no-array-reverse': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md + 'unicorn/no-await-expression-member': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md + 'unicorn/no-await-in-promise-methods': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-blob-to-file.md + 'unicorn/no-blob-to-file': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-canvas-to-image.md + 'unicorn/no-canvas-to-image': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-confusing-array-splice.md + 'unicorn/no-confusing-array-splice': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-console-spaces.md 'unicorn/no-console-spaces': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-fn-reference-in-iterator.md - 'unicorn/no-fn-reference-in-iterator': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md + 'unicorn/no-document-cookie': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-duplicate-set-values.md + 'unicorn/no-duplicate-set-values': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md + 'unicorn/no-empty-file': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-exports-in-scripts.md + 'unicorn/no-exports-in-scripts': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-for-loop.md 'unicorn/no-for-loop': 'error', @@ -62,55 +154,168 @@ module.exports = { // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-hex-escape.md 'unicorn/no-hex-escape': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md + 'unicorn/no-immediate-mutation': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-incorrect-query-selector.md + 'unicorn/no-incorrect-query-selector': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-instanceof-array.md + 'unicorn/no-instanceof-array': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md + 'unicorn/no-instanceof-builtins': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md + 'unicorn/no-invalid-fetch-options': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-file-input-accept.md + 'unicorn/no-invalid-file-input-accept': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md + 'unicorn/no-invalid-remove-event-listener': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-keyword-prefix.md 'unicorn/no-keyword-prefix': [ 'error', { - blacklist: ['new'], + disallowedPrefixes: ['new'], checkProperties: true, }, ], + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-late-current-target-access.md + 'unicorn/no-late-current-target-access': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-lonely-if.md + 'unicorn/no-lonely-if': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md + 'unicorn/no-magic-array-flat-depth': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-manually-wrapped-comments.md + 'unicorn/no-manually-wrapped-comments': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md + 'unicorn/no-named-default': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md + 'unicorn/no-negation-in-equality-check': 'error', + + /* + * Disabled in favour of native ESLint no-negated-condition rule + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md + */ + 'unicorn/no-negated-condition': 'off', + /* * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-nested-ternary.md - * Disabled in favour of ESLint's rule + * Disabled in favour of ESLint's rule and it does not work with Prettier * https://eslint.org/docs/rules/no-nested-ternary */ 'unicorn/no-nested-ternary': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-new-array.md + 'unicorn/no-new-array': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-new-buffer.md 'unicorn/no-new-buffer': 'error', - // 'unicorn/no-null': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md + 'unicorn/no-null': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-object-as-default-parameter.md 'unicorn/no-object-as-default-parameter': 'error', - /* - * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-process-exit.md - * Already validated by EsLint node rule - */ + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-process-exit.md 'unicorn/no-process-exit': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-reduce.md - 'unicorn/no-reduce': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md + 'unicorn/no-single-promise-in-promise-methods': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-nested-ternary.md + 'unicorn/no-unnecessary-nested-ternary': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md + 'unicorn/no-unnecessary-slice-end': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md + 'unicorn/no-static-only-class': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md + 'unicorn/no-thenable': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md + 'unicorn/no-this-assignment': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-outside-of-class.md + 'unicorn/no-this-outside-of-class': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md + 'unicorn/no-typeof-undefined': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md + 'unicorn/no-unnecessary-await': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-flat-depth.md + 'unicorn/no-unnecessary-array-flat-depth': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-splice-count.md + 'unicorn/no-unnecessary-array-splice-count': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md + 'unicorn/no-unnecessary-polyfills': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unreadable-array-destructuring.md 'unicorn/no-unreadable-array-destructuring': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unsafe-regex.md - 'unicorn/no-unsafe-regex': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md + 'unicorn/no-unreadable-iife': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-array-method-return.md + 'unicorn/no-unused-array-method-return': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md + 'unicorn/no-useless-collection-argument': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-iterator-to-array.md + 'unicorn/no-useless-iterator-to-array': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unused-properties.md 'unicorn/no-unused-properties': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md + 'unicorn/no-useless-spread': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md + 'unicorn/no-useless-switch-case': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-error-capture-stack-trace.md + 'unicorn/no-useless-error-capture-stack-trace': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md + 'unicorn/no-useless-fallback-in-spread': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md + 'unicorn/no-useless-length-check': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md + 'unicorn/no-useless-promise-resolve-reject': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-undefined.md 'unicorn/no-useless-undefined': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-zero-fractions.md 'unicorn/no-zero-fractions': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/number-literal-case.md - 'unicorn/number-literal-case': 'error', + /* + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/number-literal-case.md + * Disabled to work with Prettier + */ + 'unicorn/number-literal-case': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/numeric-separators-style.md + 'unicorn/numeric-separators-style': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-add-event-listener.md 'unicorn/prefer-add-event-listener': 'error', @@ -118,63 +323,208 @@ module.exports = { // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-find.md 'unicorn/prefer-array-find': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dataset.md - 'unicorn/prefer-dataset': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md + 'unicorn/prefer-array-flat': [ + 'error', + { + functions: ['flatDeep'], + }, + ], + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-flat-map.md + 'unicorn/prefer-array-flat-map': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-last-methods.md + 'unicorn/prefer-array-last-methods': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-some.md + 'unicorn/prefer-array-some': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md + 'unicorn/prefer-blob-reading-methods': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md + 'unicorn/prefer-at': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md + 'unicorn/prefer-code-point': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-index-of.md + 'unicorn/prefer-array-index-of': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-bigint-literals.md + 'unicorn/prefer-bigint-literals': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md + 'unicorn/prefer-class-fields': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-classlist-toggle.md + 'unicorn/prefer-classlist-toggle': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-event-key.md - 'unicorn/prefer-event-key': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-date-now.md + 'unicorn/prefer-date-now': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-flat-map.md - 'unicorn/prefer-flat-map': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-default-parameters.md + 'unicorn/prefer-default-parameters': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-append.md + 'unicorn/prefer-dom-node-append': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-get-or-insert-computed.md + 'unicorn/prefer-get-or-insert-computed': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-https.md + 'unicorn/prefer-https': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes-over-repeated-comparisons.md + 'unicorn/prefer-includes-over-repeated-comparisons': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-concat.md + 'unicorn/prefer-iterator-concat': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array-at-end.md + 'unicorn/prefer-iterator-to-array-at-end': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-abs.md + 'unicorn/prefer-math-abs': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-queue-microtask.md + 'unicorn/prefer-queue-microtask': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-dataset.md + 'unicorn/dom-node-dataset': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-remove.md + 'unicorn/prefer-dom-node-remove': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-text-content.md + 'unicorn/prefer-dom-node-text-content': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md + 'unicorn/prefer-event-target': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md + 'unicorn/prefer-export-from': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md + 'unicorn/prefer-global-this': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md + 'unicorn/prefer-import-meta-properties': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-includes.md 'unicorn/prefer-includes': 'error', - // 'unicorn/prefer-modern-dom-apis': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md + 'unicorn/prefer-json-parse-buffer': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-keyboard-event-key.md + 'unicorn/prefer-keyboard-event-key': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md + 'unicorn/prefer-logical-operator-over-ternary': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md + 'unicorn/prefer-math-min-max': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-math-trunc.md + 'unicorn/prefer-math-trunc': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-modern-dom-apis.md + 'unicorn/prefer-modern-dom-apis': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md + 'unicorn/prefer-modern-math-apis': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md + 'unicorn/prefer-module': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md + 'unicorn/prefer-native-coercion-functions': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-negative-index.md 'unicorn/prefer-negative-index': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-node-append.md - 'unicorn/prefer-node-append': 'off', - - /* - * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-node-remove.md - * IE does not support Node.remove(). Should be enabled only after IE support is dropped - */ - 'unicorn/prefer-node-remove': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md + 'unicorn/prefer-node-protocol': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-number-properties.md 'unicorn/prefer-number-properties': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md + 'unicorn/prefer-object-from-entries': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-optional-catch-binding.md 'unicorn/prefer-optional-catch-binding': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md + 'unicorn/prefer-prototype-methods': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-query-selector.md 'unicorn/prefer-query-selector': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-reflect-apply.md 'unicorn/prefer-reflect-apply': 'off', - // 'unicorn/prefer-replace-all': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-regexp-test.md + 'unicorn/prefer-regexp-test': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-response-static-json.md + 'unicorn/prefer-response-static-json': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-set-has.md 'unicorn/prefer-set-has': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md + 'unicorn/prefer-set-size': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-simple-condition-first.md + 'unicorn/prefer-simple-condition-first': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-split-limit.md + 'unicorn/prefer-split-limit': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-spread.md 'unicorn/prefer-spread': 'off', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-starts-ends-with.md - 'unicorn/prefer-starts-ends-with': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-match-all.md + 'unicorn/prefer-string-match-all': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-pad-start-end.md + 'unicorn/prefer-string-pad-start-end': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md + 'unicorn/prefer-string-raw': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-repeat.md + 'unicorn/prefer-string-repeat': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md + 'unicorn/prefer-string-replace-all': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-slice.md 'unicorn/prefer-string-slice': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-text-content.md - 'unicorn/prefer-text-content': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-starts-ends-with.md + 'unicorn/prefer-string-starts-ends-with': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-trim-start-end.md + 'unicorn/prefer-string-trim-start-end': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md + 'unicorn/prefer-structured-clone': 'error', - // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-trim-start-end.md - 'unicorn/prefer-trim-start-end': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md + 'unicorn/prefer-switch': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-ternary.md + 'unicorn/prefer-ternary': 'error', + + /* + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md + * low browser support + */ + 'unicorn/prefer-top-level-await': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-type-error.md 'unicorn/prefer-type-error': 'error', @@ -182,10 +532,48 @@ module.exports = { // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prevent-abbreviations.md 'unicorn/prevent-abbreviations': 'off', + 'unicorn/relative-url-style': ['error', 'never'], + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md + 'unicorn/require-array-join-separator': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-css-escape.md + 'unicorn/require-css-escape': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-attributes.md + 'unicorn/require-module-attributes': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-specifiers.md + 'unicorn/require-module-specifiers': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md + 'unicorn/require-number-to-fixed-digits-argument': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-passive-events.md + 'unicorn/require-passive-events': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md + 'unicorn/require-post-message-target-origin': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md 'unicorn/string-content': 'off', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md + 'unicorn/switch-case-braces': ['error', 'always'], + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-break-position.md + 'unicorn/switch-case-break-position': 'error', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md + 'unicorn/template-indent': 'off', + + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md + 'unicorn/text-encoding-identifier-case': 'error', + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/throw-new-error.md 'unicorn/throw-new-error': 'error', - }, + // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/try-complexity.md + 'unicorn/try-complexity': 'off', + }, }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/oxlint-config.js new file mode 100644 index 00000000..9870e42d --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/oxlint-config.js @@ -0,0 +1,143 @@ +export default { + plugins: ['unicorn'], + rules: { + 'unicorn/catch-error-name': [ + 'error', + { + name: 'err', + }, + ], + 'unicorn/consistent-assert': 'error', + 'unicorn/consistent-date-clone': 'error', + 'unicorn/consistent-empty-array-spread': 'error', + 'unicorn/consistent-existence-index-check': 'error', + 'unicorn/consistent-function-scoping': 'error', + 'unicorn/consistent-template-literal-escape': 'error', + 'unicorn/custom-error-definition': 'error', + 'unicorn/empty-brace-spaces': 'off', + 'unicorn/error-message': 'error', + 'unicorn/escape-case': 'error', + 'unicorn/explicit-length-check': 'off', + 'unicorn/filename-case': 'off', + 'unicorn/import-style': 'off', + 'unicorn/new-for-builtins': 'error', + 'unicorn/no-abusive-eslint-disable': 'error', + 'unicorn/no-accessor-recursion': 'error', + 'unicorn/no-anonymous-default-export': 'off', + 'unicorn/no-array-callback-reference': 'error', + 'unicorn/no-array-fill-with-reference-type': 'error', + 'unicorn/no-array-for-each': 'off', + 'unicorn/no-array-method-this-argument': 'error', + 'unicorn/no-array-reduce': 'off', + 'unicorn/no-array-sort': 'error', + 'unicorn/no-array-reverse': 'error', + 'unicorn/no-await-expression-member': 'error', + 'unicorn/no-await-in-promise-methods': 'error', + 'unicorn/no-console-spaces': 'error', + 'unicorn/no-document-cookie': 'error', + 'unicorn/no-empty-file': 'error', + 'unicorn/no-hex-escape': 'error', + 'unicorn/no-immediate-mutation': 'error', + 'unicorn/no-instanceof-array': 'error', + 'unicorn/no-instanceof-builtins': 'error', + 'unicorn/no-invalid-fetch-options': 'error', + 'unicorn/no-invalid-remove-event-listener': 'error', + 'unicorn/no-length-as-slice-end': 'off', + 'unicorn/no-lonely-if': 'error', + 'unicorn/no-magic-array-flat-depth': 'error', + 'unicorn/no-negation-in-equality-check': 'error', + 'unicorn/no-nested-ternary': 'off', + 'unicorn/no-new-array': 'error', + 'unicorn/no-new-buffer': 'error', + 'unicorn/no-null': 'off', + 'unicorn/no-object-as-default-parameter': 'error', + 'unicorn/no-process-exit': 'error', + 'unicorn/no-single-promise-in-promise-methods': 'error', + 'unicorn/no-unnecessary-slice-end': 'error', + 'unicorn/no-static-only-class': 'error', + 'unicorn/no-thenable': 'error', + 'unicorn/no-this-assignment': 'error', + 'unicorn/no-typeof-undefined': 'error', + 'unicorn/no-unnecessary-await': 'error', + 'unicorn/no-unnecessary-array-flat-depth': 'error', + 'unicorn/no-unnecessary-array-splice-count': 'error', + 'unicorn/no-unreadable-array-destructuring': 'error', + 'unicorn/no-unreadable-iife': 'error', + 'unicorn/no-useless-collection-argument': 'error', + 'unicorn/no-useless-spread': 'error', + 'unicorn/no-useless-switch-case': 'error', + 'unicorn/no-useless-error-capture-stack-trace': 'error', + 'unicorn/no-useless-fallback-in-spread': 'error', + 'unicorn/no-useless-iterator-to-array': 'error', + 'unicorn/no-useless-length-check': 'error', + 'unicorn/no-useless-promise-resolve-reject': 'error', + 'unicorn/no-useless-undefined': 'error', + 'unicorn/no-zero-fractions': 'error', + 'unicorn/number-literal-case': 'off', + 'unicorn/numeric-separators-style': 'off', + 'unicorn/prefer-add-event-listener': 'error', + 'unicorn/prefer-array-find': 'error', + 'unicorn/prefer-array-flat': 'error', + 'unicorn/prefer-array-flat-map': 'error', + 'unicorn/prefer-array-some': 'error', + 'unicorn/prefer-at': 'off', + 'unicorn/prefer-blob-reading-methods': 'error', + 'unicorn/prefer-code-point': 'error', + 'unicorn/prefer-array-index-of': 'error', + 'unicorn/prefer-bigint-literals': 'error', + 'unicorn/prefer-class-fields': 'error', + 'unicorn/prefer-classlist-toggle': 'error', + 'unicorn/prefer-date-now': 'error', + 'unicorn/prefer-default-parameters': 'error', + 'unicorn/prefer-dom-node-append': 'error', + 'unicorn/prefer-dom-node-dataset': 'error', + 'unicorn/prefer-dom-node-remove': 'error', + 'unicorn/prefer-dom-node-text-content': 'error', + 'unicorn/prefer-event-target': 'error', + 'unicorn/prefer-export-from': 'error', + 'unicorn/prefer-global-this': 'off', + 'unicorn/prefer-import-meta-properties': 'error', + 'unicorn/prefer-includes': 'error', + 'unicorn/prefer-keyboard-event-key': 'error', + 'unicorn/prefer-logical-operator-over-ternary': 'error', + 'unicorn/prefer-math-min-max': 'error', + 'unicorn/prefer-math-trunc': 'error', + 'unicorn/prefer-modern-dom-apis': 'error', + 'unicorn/prefer-modern-math-apis': 'error', + 'unicorn/prefer-module': 'error', + 'unicorn/prefer-native-coercion-functions': 'error', + 'unicorn/prefer-negative-index': 'error', + 'unicorn/prefer-node-protocol': 'error', + 'unicorn/prefer-number-properties': 'error', + 'unicorn/prefer-object-from-entries': 'error', + 'unicorn/prefer-optional-catch-binding': 'error', + 'unicorn/prefer-prototype-methods': 'error', + 'unicorn/prefer-query-selector': 'error', + 'unicorn/prefer-reflect-apply': 'off', + 'unicorn/prefer-regexp-test': 'error', + 'unicorn/prefer-response-static-json': 'error', + 'unicorn/prefer-set-has': 'error', + 'unicorn/prefer-set-size': 'error', + 'unicorn/prefer-single-call': 'error', + 'unicorn/prefer-spread': 'off', + 'unicorn/prefer-string-raw': 'error', + 'unicorn/prefer-string-replace-all': 'error', + 'unicorn/prefer-string-slice': 'error', + 'unicorn/prefer-string-starts-ends-with': 'error', + 'unicorn/prefer-string-trim-start-end': 'error', + 'unicorn/prefer-structured-clone': 'error', + 'unicorn/prefer-ternary': 'error', + 'unicorn/prefer-top-level-await': 'off', + 'unicorn/prefer-type-error': 'error', + 'unicorn/relative-url-style': ['error', 'never'], + 'unicorn/require-array-join-separator': 'error', + 'unicorn/require-module-attributes': 'error', + 'unicorn/require-module-specifiers': 'error', + 'unicorn/require-number-to-fixed-digits-argument': 'error', + 'unicorn/require-post-message-target-origin': 'error', + 'unicorn/switch-case-braces': ['error', 'always'], + 'unicorn/switch-case-break-position': 'error', + 'unicorn/text-encoding-identifier-case': 'error', + 'unicorn/throw-new-error': 'error', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/oxlint-disabled.js new file mode 100644 index 00000000..de02a2e1 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-unicorn/oxlint-disabled.js @@ -0,0 +1,135 @@ +export const ESLintPluginUnicornDisabled = { + 'unicorn/catch-error-name': 'off', + 'unicorn/consistent-assert': 'off', + 'unicorn/consistent-date-clone': 'off', + 'unicorn/consistent-empty-array-spread': 'off', + 'unicorn/consistent-existence-index-check': 'off', + 'unicorn/consistent-function-scoping': 'off', + 'unicorn/consistent-template-literal-escape': 'off', + 'unicorn/custom-error-definition': 'off', + 'unicorn/empty-brace-spaces': 'off', + 'unicorn/error-message': 'off', + 'unicorn/escape-case': 'off', + 'unicorn/explicit-length-check': 'off', + 'unicorn/filename-case': 'off', + 'unicorn/import-style': 'off', + 'unicorn/new-for-builtins': 'off', + 'unicorn/no-abusive-eslint-disable': 'off', + 'unicorn/no-accessor-recursion': 'off', + 'unicorn/no-anonymous-default-export': 'off', + 'unicorn/no-array-callback-reference': 'off', + 'unicorn/no-array-fill-with-reference-type': 'off', + 'unicorn/no-array-for-each': 'off', + 'unicorn/no-array-method-this-argument': 'off', + 'unicorn/no-array-reduce': 'off', + 'unicorn/no-array-sort': 'off', + 'unicorn/no-array-reverse': 'off', + 'unicorn/no-await-expression-member': 'off', + 'unicorn/no-await-in-promise-methods': 'off', + 'unicorn/no-console-spaces': 'off', + 'unicorn/no-document-cookie': 'off', + 'unicorn/no-empty-file': 'off', + 'unicorn/no-hex-escape': 'off', + 'unicorn/no-immediate-mutation': 'off', + 'unicorn/no-instanceof-array': 'off', + 'unicorn/no-instanceof-builtins': 'off', + 'unicorn/no-invalid-fetch-options': 'off', + 'unicorn/no-invalid-remove-event-listener': 'off', + 'unicorn/no-length-as-slice-end': 'off', + 'unicorn/no-lonely-if': 'off', + 'unicorn/no-magic-array-flat-depth': 'off', + 'unicorn/no-negation-in-equality-check': 'off', + 'unicorn/no-nested-ternary': 'off', + 'unicorn/no-new-array': 'off', + 'unicorn/no-new-buffer': 'off', + 'unicorn/no-null': 'off', + 'unicorn/no-object-as-default-parameter': 'off', + 'unicorn/no-process-exit': 'off', + 'unicorn/no-single-promise-in-promise-methods': 'off', + 'unicorn/no-unnecessary-slice-end': 'off', + 'unicorn/no-static-only-class': 'off', + 'unicorn/no-thenable': 'off', + 'unicorn/no-this-assignment': 'off', + 'unicorn/no-typeof-undefined': 'off', + 'unicorn/no-unnecessary-await': 'off', + 'unicorn/no-unnecessary-array-flat-depth': 'off', + 'unicorn/no-unnecessary-array-splice-count': 'off', + 'unicorn/no-unreadable-array-destructuring': 'off', + 'unicorn/no-unreadable-iife': 'off', + 'unicorn/no-useless-collection-argument': 'off', + 'unicorn/no-useless-spread': 'off', + 'unicorn/no-useless-switch-case': 'off', + 'unicorn/no-useless-error-capture-stack-trace': 'off', + 'unicorn/no-useless-fallback-in-spread': 'off', + 'unicorn/no-useless-iterator-to-array': 'off', + 'unicorn/no-useless-length-check': 'off', + 'unicorn/no-useless-promise-resolve-reject': 'off', + 'unicorn/no-useless-undefined': 'off', + 'unicorn/no-zero-fractions': 'off', + 'unicorn/number-literal-case': 'off', + 'unicorn/numeric-separators-style': 'off', + 'unicorn/prefer-add-event-listener': 'off', + 'unicorn/prefer-array-find': 'off', + 'unicorn/prefer-array-flat': 'off', + 'unicorn/prefer-array-flat-map': 'off', + 'unicorn/prefer-array-some': 'off', + 'unicorn/prefer-at': 'off', + 'unicorn/prefer-blob-reading-methods': 'off', + 'unicorn/prefer-code-point': 'off', + 'unicorn/prefer-array-index-of': 'off', + 'unicorn/prefer-bigint-literals': 'off', + 'unicorn/prefer-class-fields': 'off', + 'unicorn/prefer-classlist-toggle': 'off', + 'unicorn/prefer-date-now': 'off', + 'unicorn/prefer-default-parameters': 'off', + 'unicorn/prefer-dom-node-append': 'off', + 'unicorn/dom-node-dataset': 'off', + 'unicorn/prefer-dom-node-remove': 'off', + 'unicorn/prefer-dom-node-text-content': 'off', + 'unicorn/prefer-event-target': 'off', + 'unicorn/prefer-export-from': 'off', + 'unicorn/prefer-global-this': 'off', + 'unicorn/prefer-import-meta-properties': 'off', + 'unicorn/prefer-includes': 'off', + 'unicorn/prefer-keyboard-event-key': 'off', + 'unicorn/prefer-logical-operator-over-ternary': 'off', + 'unicorn/prefer-math-min-max': 'off', + 'unicorn/prefer-math-trunc': 'off', + 'unicorn/prefer-modern-dom-apis': 'off', + 'unicorn/prefer-modern-math-apis': 'off', + 'unicorn/prefer-module': 'off', + 'unicorn/prefer-native-coercion-functions': 'off', + 'unicorn/prefer-negative-index': 'off', + 'unicorn/prefer-node-protocol': 'off', + 'unicorn/prefer-number-properties': 'off', + 'unicorn/prefer-object-from-entries': 'off', + 'unicorn/prefer-optional-catch-binding': 'off', + 'unicorn/prefer-prototype-methods': 'off', + 'unicorn/prefer-query-selector': 'off', + 'unicorn/prefer-reflect-apply': 'off', + 'unicorn/prefer-regexp-test': 'off', + 'unicorn/prefer-response-static-json': 'off', + 'unicorn/prefer-set-has': 'off', + 'unicorn/prefer-set-size': 'off', + 'unicorn/prefer-single-call': 'off', + 'unicorn/prefer-spread': 'off', + 'unicorn/prefer-string-raw': 'off', + 'unicorn/prefer-string-replace-all': 'off', + 'unicorn/prefer-string-slice': 'off', + 'unicorn/prefer-string-starts-ends-with': 'off', + 'unicorn/prefer-string-trim-start-end': 'off', + 'unicorn/prefer-structured-clone': 'off', + 'unicorn/prefer-ternary': 'off', + 'unicorn/prefer-top-level-await': 'off', + 'unicorn/prefer-type-error': 'off', + 'unicorn/relative-url-style': 'off', + 'unicorn/require-array-join-separator': 'off', + 'unicorn/require-module-attributes': 'off', + 'unicorn/require-module-specifiers': 'off', + 'unicorn/require-number-to-fixed-digits-argument': 'off', + 'unicorn/require-post-message-target-origin': 'off', + 'unicorn/switch-case-braces': 'off', + 'unicorn/switch-case-break-position': 'off', + 'unicorn/text-encoding-identifier-case': 'off', + 'unicorn/throw-new-error': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/best-practices.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/best-practices.js deleted file mode 100644 index 225e2be1..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/best-practices.js +++ /dev/null @@ -1,374 +0,0 @@ -const config = require('../config'); - -// https://eslint.org/docs/rules/#best-practices - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/accessor-pairs - 'accessor-pairs': [ - 'error', - { - getWithoutSet: true, - }, - ], - - // https://eslint.org/docs/rules/array-callback-return - 'array-callback-return': 'error', - - // https://eslint.org/docs/rules/block-scoped-var - 'block-scoped-var': 'error', - - // https://eslint.org/docs/rules/class-methods-use-this - 'class-methods-use-this': 'error', - - // https://eslint.org/docs/rules/complexity - complexity: [ - 'error', - { - max: config.complexity, - }, - ], - - // https://eslint.org/docs/rules/consistent-return - 'consistent-return': 'error', - - // https://eslint.org/docs/rules/curly - curly: 'error', - - // https://eslint.org/docs/rules/default-case - 'default-case': [ - 'error', - { - commentPattern: '^skip\\sdefault', - }, - ], - - // https://eslint.org/docs/rules/default-case-last - 'default-case-last': 'error', - - // https://eslint.org/docs/rules/default-param-last - 'default-param-last': 'error', - - // https://eslint.org/docs/rules/dot-location - 'dot-location': [ - 'error', - 'property', - ], - - // https://eslint.org/docs/rules/dot-notation - 'dot-notation': [ - 'error', - { - allowKeywords: true, - }, - ], - - // https://eslint.org/docs/rules/eqeqeq - eqeqeq: [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/grouped-accessor-pairs - 'grouped-accessor-pairs': [ - 'error', 'getBeforeSet', - ], - - /* - * https://eslint.org/docs/rules/guard-for-in - * http://2ality.com/2012/01/objects-as-maps.html - */ - 'guard-for-in': 'error', - - // https://eslint.org/docs/rules/max-classes-per-file - 'max-classes-per-file': [ - 'error', - config.maxClassesPerFile, - ], - - // https://eslint.org/docs/rules/no-alert - 'no-alert': 'error', - - // https://eslint.org/docs/rules/no-caller - 'no-caller': 'error', - - // https://eslint.org/docs/rules/no-case-declarations - 'no-case-declarations': 'error', - - // https://eslint.org/docs/rules/no-constructor-return - 'no-constructor-return': 'error', - - // https://eslint.org/docs/rules/no-div-regex - 'no-div-regex': 'error', - - // https://eslint.org/docs/rules/no-else-return - 'no-else-return': [ - 'error', - { - allowElseIf: false, - }, - ], - - // https://eslint.org/docs/rules/no-empty-function - 'no-empty-function': 'error', - - // https://eslint.org/docs/rules/no-empty-pattern - 'no-empty-pattern': 'error', - - // https://eslint.org/docs/rules/no-eq-null - 'no-eq-null': 'error', - - // https://eslint.org/docs/rules/no-eval - 'no-eval': 'error', - - // https://eslint.org/docs/rules/no-extend-native - 'no-extend-native': 'error', - - // https://eslint.org/docs/rules/no-extra-bind - 'no-extra-bind': 'error', - - // https://eslint.org/docs/rules/no-extra-label - 'no-extra-label': 'error', - - // https://eslint.org/docs/rules/no-fallthrough - 'no-fallthrough': 'error', - - // https://eslint.org/docs/rules/no-floating-decimal - 'no-floating-decimal': 'error', - - // https://eslint.org/docs/rules/no-global-assign - 'no-global-assign': [ - 'error', - { - exceptions: [], - }, - ], - - // https://eslint.org/docs/rules/no-implicit-coercion - 'no-implicit-coercion': 'error', - - // https://eslint.org/docs/rules/no-implicit-globals - 'no-implicit-globals': 'error', - - // https://eslint.org/docs/rules/no-implied-eval - 'no-implied-eval': 'error', - - // https://eslint.org/docs/rules/no-invalid-this - 'no-invalid-this': 'off', - - // https://eslint.org/docs/rules/no-iterator - 'no-iterator': 'error', - - // https://eslint.org/docs/rules/no-labels - 'no-labels': 'error', - - // https://eslint.org/docs/rules/no-lone-blocks - 'no-lone-blocks': 'error', - - // https://eslint.org/docs/rules/no-loop-func - 'no-loop-func': 'error', - - // https://eslint.org/docs/rules/no-magic-numbers - 'no-magic-numbers': [ - 'error', - { - // These numbers are used in simple cases, we can exclude them - ignore: [ - // eslint-disable-next-line no-magic-numbers - -1, - 0, - 1, - ], - ignoreArrayIndexes: true, - enforceConst: true, - detectObjects: false, - }, - ], - - // https://eslint.org/docs/rules/no-multi-spaces - 'no-multi-spaces': 'error', - - // https://eslint.org/docs/rules/no-multi-str - 'no-multi-str': 'error', - - // https://eslint.org/docs/rules/no-new - 'no-new': 'error', - - // https://eslint.org/docs/rules/no-new-func - 'no-new-func': 'error', - - // https://eslint.org/docs/rules/no-new-wrappers - 'no-new-wrappers': 'error', - - // https://eslint.org/docs/rules/no-octal - 'no-octal': 'error', - - // https://eslint.org/docs/rules/no-octal-escape - 'no-octal-escape': 'error', - - // https://eslint.org/docs/rules/no-param-reassign - 'no-param-reassign': 'error', - - // https://eslint.org/docs/rules/no-proto - 'no-proto': 'error', - - // https://eslint.org/docs/rules/no-redeclare - 'no-redeclare': 'error', - - // https://eslint.org/docs/rules/no-restricted-properties - 'no-restricted-properties': [ - 'error', - { - object: 'arguments', - property: 'callee', - message: 'arguments.callee is deprecated', - }, - { - object: 'global', - property: 'isFinite', - message: 'Use Number.isFinite instead', - }, - { - object: 'window', - property: 'isFinite', - message: 'Use Number.isFinite instead', - }, - { - object: 'global', - property: 'isNaN', - message: 'Use Number.isNaN instead', - }, - { - object: 'window', - property: 'isNaN', - message: 'Use Number.isNaN instead', - }, - { - property: '__defineGetter__', - message: 'Use Object.defineProperty instead', - }, - { - property: '__defineSetter__', - message: 'Use Object.defineProperty instead', - }, - { - object: 'require', - message: 'Please call require() directly.', - }, - ], - - // https://eslint.org/docs/rules/no-return-assign - 'no-return-assign': 'error', - - // https://eslint.org/docs/rules/no-return-await - 'no-return-await': 'error', - - // https://eslint.org/docs/rules/no-script-url - 'no-script-url': 'error', - - // https://eslint.org/docs/rules/no-self-assign - 'no-self-assign': [ - 'error', - { - props: false, - }, - ], - - // https://eslint.org/docs/rules/no-self-compare - 'no-self-compare': 'error', - - // https://eslint.org/docs/rules/no-sequences - 'no-sequences': 'error', - - // https://eslint.org/docs/rules/no-throw-literal - 'no-throw-literal': 'error', - - // https://eslint.org/docs/rules/no-unmodified-loop-condition - 'no-unmodified-loop-condition': 'error', - - // https://eslint.org/docs/rules/no-unused-expressions - 'no-unused-expressions': [ - 'error', - { - allowShortCircuit: false, - allowTernary: false, - allowTaggedTemplates: false, - }, - ], - - // https://eslint.org/docs/rules/no-unused-labels - 'no-unused-labels': 'error', - - // https://eslint.org/docs/rules/no-useless-call - 'no-useless-call': 'error', - - // https://eslint.org/docs/rules/no-useless-catch - 'no-useless-catch': 'error', - - // https://eslint.org/docs/rules/no-useless-concat - 'no-useless-concat': 'error', - - // https://eslint.org/docs/rules/no-useless-escape - 'no-useless-escape': 'error', - - // https://eslint.org/docs/rules/no-useless-return - 'no-useless-return': 'error', - - // https://eslint.org/docs/rules/no-void - 'no-void': 'error', - - // https://eslint.org/docs/rules/no-warning-comments - 'no-warning-comments': 'off', - - // https://eslint.org/docs/rules/no-with - 'no-with': 'error', - - /* - * https://eslint.org/docs/rules/prefer-named-capture-group - * supported only by ECMAScript 2018 - */ - 'prefer-named-capture-group': 'off', - - // https://eslint.org/docs/rules/prefer-promise-reject-errors - 'prefer-promise-reject-errors': [ - 'error', - { - allowEmptyReject: true, - }, - ], - - // https://eslint.org/docs/rules/prefer-regex-literals - 'prefer-regex-literals': 'error', - - // https://eslint.org/docs/rules/radix - radix: 'error', - - // https://eslint.org/docs/rules/require-await - 'require-await': 'error', - - /* - * https://eslint.org/docs/rules/require-unicode-regexp - * TODO turn on? - */ - 'require-unicode-regexp': 'off', - - // https://eslint.org/docs/rules/vars-on-top - 'vars-on-top': 'error', - - // https://eslint.org/docs/rules/wrap-iife.html - 'wrap-iife': [ - 'error', - 'outside', - { - functionPrototypeMethods: false, - }, - ], - - // https://eslint.org/docs/rules/yoda - yoda: 'error', - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/ecma-script-6.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/ecma-script-6.js deleted file mode 100644 index 258246bb..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/ecma-script-6.js +++ /dev/null @@ -1,175 +0,0 @@ -// https://eslint.org/docs/rules/#ecmascript-6 - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/arrow-body-style - 'arrow-body-style': [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/arrow-parens - 'arrow-parens': [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/arrow-spacing - 'arrow-spacing': [ - 'error', - { - before: true, - after: true, - }, - ], - - // https://eslint.org/docs/rules/constructor-super - 'constructor-super': 'error', - - // https://eslint.org/docs/rules/generator-star-spacing - 'generator-star-spacing': [ - 'error', - { - before: false, - after: true, - }, - ], - - // https://eslint.org/docs/rules/no-class-assign - 'no-class-assign': 'error', - - // https://eslint.org/docs/rules/no-confusing-arrow - 'no-confusing-arrow': [ - 'error', - { - allowParens: true, - }, - ], - - // https://eslint.org/docs/rules/no-const-assign - 'no-const-assign': 'error', - - // https://eslint.org/docs/rules/no-dupe-class-members - 'no-dupe-class-members': 'error', - - // https://eslint.org/docs/rules/no-duplicate-imports - 'no-duplicate-imports': 'off', - - // https://eslint.org/docs/rules/no-new-symbol - 'no-new-symbol': 'error', - - // https://eslint.org/docs/rules/no-restricted-exports - 'no-restricted-exports': 'off', - - // https://eslint.org/docs/rules/no-restricted-imports - 'no-restricted-imports': ['error'], - - // https://eslint.org/docs/rules/no-this-before-super - 'no-this-before-super': 'error', - - // https://eslint.org/docs/rules/no-useless-computed-key - 'no-useless-computed-key': 'error', - - // https://eslint.org/docs/rules/no-useless-constructor - 'no-useless-constructor': 'error', - - // https://eslint.org/docs/rules/no-useless-rename - 'no-useless-rename': [ - 'error', - { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }, - ], - - // https://eslint.org/docs/rules/no-var - 'no-var': 'error', - - // https://eslint.org/docs/rules/object-shorthand - 'object-shorthand': [ - 'error', - 'always', - { - ignoreConstructors: false, - avoidQuotes: true, - }, - ], - - // https://eslint.org/docs/rules/prefer-arrow-callback - 'prefer-arrow-callback': [ - 'error', - { - allowNamedFunctions: false, - allowUnboundThis: true, - }, - ], - - // https://eslint.org/docs/rules/prefer-const - 'prefer-const': [ - 'error', - { - destructuring: 'any', - ignoreReadBeforeAssign: false, - }, - ], - - // https://eslint.org/docs/rules/prefer-destructuring - 'prefer-destructuring': [ - 'error', - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: true, - object: true, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - - // https://eslint.org/docs/rules/prefer-numeric-literals - 'prefer-numeric-literals': 'error', - - // https://eslint.org/docs/rules/prefer-rest-params - 'prefer-rest-params': 'error', - - // https://eslint.org/docs/rules/prefer-spread - 'prefer-spread': 'error', - - // https://eslint.org/docs/rules/prefer-template - 'prefer-template': 'error', - - // https://eslint.org/docs/rules/require-yield - 'require-yield': 'error', - - // https://eslint.org/docs/rules/rest-spread-spacing - 'rest-spread-spacing': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/sort-imports - 'sort-imports': 'off', - - // https://eslint.org/docs/rules/symbol-description - 'symbol-description': 'error', - - // https://eslint.org/docs/rules/template-curly-spacing - 'template-curly-spacing': 'error', - - // https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js - 'yield-star-spacing': [ - 'error', - 'after', - ], - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/index.js index 6c28068d..fafbf87f 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/index.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/index.js @@ -1,12 +1,11 @@ -module.exports = { - - extends: [ - './possible-errors.js', - './best-practices.js', - './strict-mode.js', - './variables.js', - './stylistic-issues.js', - './ecma-script-6.js', - ], +import layout from './layout-and-formatting.js'; +import problems from './possible-problems.js'; +import suggestions from './suggestions.js'; +export default { + rules: { + ...layout, + ...problems, + ...suggestions, + }, }; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js new file mode 100644 index 00000000..a1695a33 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js @@ -0,0 +1,8 @@ +// https://eslint.org/docs/rules/#layout-formatting +export default { + /* + * https://eslint.org/docs/rules/unicode-bom + * disable to work with oxfmt + */ + 'unicode-bom': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/oxlint-config.js new file mode 100644 index 00000000..9b3285b6 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/oxlint-config.js @@ -0,0 +1,432 @@ +export default { + rules: { + 'array-callback-return': 'error', + 'constructor-super': 'error', + 'for-direction': 'error', + 'func-name-matching': [ + 'error', + 'always', + { + considerPropertyDescriptor: true, + includeCommonJSModuleExports: true, + }, + ], + '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-implicit-globals': '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-shadow': [ + 'error', + { + builtinGlobals: true, + hoist: 'all', + allow: [], + ignoreFunctionTypeParameterNameValueShadow: true, + ignoreOnInitialization: false, + ignoreTypeValueShadow: true, + }, + ], + '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-underscore-dangle': [ + 'error', + { + allow: [], + allowAfterThis: false, + allowAfterSuper: false, + enforceInMethodNames: false, + }, + ], + 'no-unmodified-loop-condition': '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', + destructuredArrayIgnorePattern: '[iI]gnored', + fix: { imports: 'suggestion', variables: 'suggestion' }, + ignoreClassWithStaticInitBlock: false, + ignoreRestSiblings: false, + ignoreUsingDeclarations: false, + reportUsedIgnorePattern: false, + reportVarsOnlyUsedAsTypes: 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: [], + }, + ], + 'id-match': 'off', + 'init-declarations': 'off', + 'logical-assignment-operators': ['error', 'always'], + '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', + { + // eslint-disable-next-line unicorn/no-keyword-prefix + newIsCap: true, + // eslint-disable-next-line unicorn/no-keyword-prefix + 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-exports': 'off', + '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-restricted-properties': [ + 'error', + { + object: 'arguments', + property: 'callee', + message: 'arguments.callee is deprecated', + }, + { + object: 'global', + property: 'isFinite', + message: 'Use Number.isFinite instead', + }, + { + object: 'window', + property: 'isFinite', + message: 'Use Number.isFinite instead', + }, + { + object: 'global', + property: 'isNaN', + message: 'Use Number.isNaN instead', + }, + { + object: 'window', + property: 'isNaN', + message: 'Use Number.isNaN instead', + }, + { + property: '__defineGetter__', + message: 'Use Object.defineProperty instead', + }, + { + property: '__defineSetter__', + message: 'Use Object.defineProperty instead', + }, + { + object: 'require', + message: 'Please call require() directly.', + }, + ], + '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-assignment': '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', + 'object-shorthand': [ + 'error', + 'always', + { + ignoreConstructors: false, + avoidQuotes: true, + }, + ], + 'operator-assignment': ['error', 'never'], + 'prefer-arrow-callback': [ + 'error', + { + allowNamedFunctions: false, + allowUnboundThis: true, + }, + ], + 'prefer-const': [ + 'error', + { + destructuring: 'any', + ignoreReadBeforeAssign: false, + }, + ], + 'prefer-destructuring': [ + 'error', + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: true, + object: true, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + 'prefer-exponentiation-operator': 'error', + 'prefer-named-capture-group': 'off', + 'prefer-numeric-literals': 'error', + 'prefer-object-has-own': 'off', + 'prefer-object-spread': 'error', + 'prefer-promise-reject-errors': [ + 'error', + { + allowEmptyReject: true, + }, + ], + 'prefer-regex-literals': 'error', + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'prefer-template': 'error', + 'preserve-caught-error': [ + 'error', + { + requireCatchParameter: false, + }, + ], + radix: 'error', + 'require-await': 'error', + 'require-unicode-regexp': '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/rules/eslint/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/oxlint-disabled.js new file mode 100644 index 00000000..3e08bc6f --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/oxlint-disabled.js @@ -0,0 +1,191 @@ +export const ESLintDisabled = { + 'array-callback-return': 'off', + // implemented in ts + 'consistent-return': 'off', + 'constructor-super': 'off', + 'for-direction': 'off', + 'func-name-matching': '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-implicit-globals': '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-shadow': '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-underscore-dangle': '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-use-before-define': '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', + // implemented in ts + 'dot-notation': 'off', + eqeqeq: 'off', + 'func-names': 'off', + 'func-style': 'off', + 'getter-return': 'off', + 'grouped-accessor-pairs': 'off', + 'guard-for-in': 'off', + 'id-length': 'off', + 'id-match': 'off', + 'init-declarations': 'off', + 'logical-assignment-operators': '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', + // implemented in ts + 'no-implied-eval': '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-exports': 'off', + 'no-restricted-globals': 'off', + 'no-restricted-imports': 'off', + 'no-restricted-properties': 'off', + 'no-return-assign': 'off', + 'no-script-url': 'off', + 'no-sequences': 'off', + 'no-shadow-restricted-names': 'off', + 'no-throw-literal': 'off', + 'no-undef': 'off', + 'no-undefined': 'off', + 'no-unmodified-loop-condition': 'off', + 'no-unneeded-ternary': 'off', + 'no-unreachable': 'off', + 'no-unused-expressions': 'off', + 'no-unused-labels': 'off', + 'no-useless-assignment': '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', + 'object-shorthand': 'off', + 'operator-assignment': 'off', + 'prefer-arrow-callback': 'off', + 'prefer-const': 'off', + 'prefer-destructuring': 'off', + 'prefer-exponentiation-operator': 'off', + 'prefer-named-capture-group': 'off', + 'prefer-numeric-literals': 'off', + 'prefer-object-has-own': 'off', + 'prefer-object-spread': 'off', + 'prefer-promise-reject-errors': 'off', + 'prefer-regex-literals': 'off', + 'prefer-rest-params': 'off', + 'prefer-spread': 'off', + 'prefer-template': 'off', + 'preserve-caught-error': 'off', + radix: 'off', + 'require-await': 'off', + 'require-unicode-regexp': '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', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-errors.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-errors.js deleted file mode 100644 index 5d0090f8..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-errors.js +++ /dev/null @@ -1,171 +0,0 @@ -// https://eslint.org/docs/rules/#possible-errors - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/for-direction - 'for-direction': 'error', - - // https://eslint.org/docs/rules/getter-return - 'getter-return': [ - 'error', - { - allowImplicit: false, - }, - ], - - // https://eslint.org/docs/rules/no-async-promise-executor - 'no-async-promise-executor': 'error', - - // https://eslint.org/docs/rules/no-await-in-loop - 'no-await-in-loop': 'error', - - // https://eslint.org/docs/rules/no-compare-neg-zero - 'no-compare-neg-zero': 'error', - - // https://eslint.org/docs/rules/no-cond-assign - 'no-cond-assign': 'error', - - // https://eslint.org/docs/rules/no-console - 'no-console': 'error', - - // https://eslint.org/docs/rules/no-constant-condition - 'no-constant-condition': 'error', - - // https://eslint.org/docs/rules/no-control-regex - 'no-control-regex': 'error', - - // https://eslint.org/docs/rules/no-debugger - 'no-debugger': 'error', - - // https://eslint.org/docs/rules/no-dupe-args - 'no-dupe-args': 'error', - - // https://eslint.org/docs/rules/no-dupe-else-if - 'no-dupe-else-if': 'error', - - // https://eslint.org/docs/rules/no-dupe-keys - 'no-dupe-keys': 'error', - - // https://eslint.org/docs/rules/no-duplicate-case - 'no-duplicate-case': 'error', - - // https://eslint.org/docs/rules/no-empty - 'no-empty': [ - 'error', - { - allowEmptyCatch: true, - }, - ], - - // https://eslint.org/docs/rules/no-empty-character-class - 'no-empty-character-class': 'error', - - /* - * https://eslint.org/docs/rules/no-ex-assign - * https://bocoup.com/blog/the-catch-with-try-catch - */ - 'no-ex-assign': 'error', - - // https://eslint.org/docs/rules/no-extra-boolean-cast - 'no-extra-boolean-cast': 'error', - - // https://eslint.org/docs/rules/no-extra-parens - 'no-extra-parens': [ - 'error', - 'all', - { - conditionalAssign: false, - nestedBinaryExpressions: false, - returnAssign: false, - ignoreJSX: 'all', - enforceForArrowConditionals: false, - enforceForSequenceExpressions: false, - enforceForNewInMemberExpressions: false, - enforceForFunctionPrototypeMethods: false, - }, - ], - - // https://eslint.org/docs/rules/no-extra-semi - 'no-extra-semi': 'error', - - // https://eslint.org/docs/rules/no-func-assign - 'no-func-assign': 'error', - - // https://eslint.org/docs/rules/no-import-assign - 'no-import-assign': 'error', - - // https://eslint.org/docs/rules/no-inner-declarations - 'no-inner-declarations': 'error', - - // https://eslint.org/docs/rules/no-invalid-regexp - 'no-invalid-regexp': 'error', - - // https://eslint.org/docs/rules/no-irregular-whitespace - 'no-irregular-whitespace': 'error', - - // https://eslint.org/docs/rules/no-loss-of-precision - 'no-loss-of-precision': 'error', - - // https://eslint.org/docs/rules/no-misleading-character-class - 'no-misleading-character-class': 'error', - - // https://eslint.org/docs/rules/no-obj-calls - 'no-obj-calls': 'error', - - // https://eslint.org/docs/rules/no-promise-executor-return - 'no-promise-executor-return': 'error', - - // https://eslint.org/docs/rules/no-prototype-builtins - 'no-prototype-builtins': 'error', - - // https://eslint.org/docs/rules/no-regex-spaces - 'no-regex-spaces': 'error', - - // https://eslint.org/docs/rules/no-setter-return - 'no-setter-return': 'error', - - /* - * https://eslint.org/docs/rules/no-sparse-arrays - * https://humanwhocodes.com/blog/2007/09/09/inconsistent-array-literals/ - */ - 'no-sparse-arrays': 'error', - - // https://eslint.org/docs/rules/no-template-curly-in-string - 'no-template-curly-in-string': 'error', - - // https://eslint.org/docs/rules/no-unexpected-multiline - 'no-unexpected-multiline': 'error', - - // https://eslint.org/docs/rules/no-unreachable - 'no-unreachable': 'error', - - // https://eslint.org/docs/rules/no-unreachable-loop - 'no-unreachable-loop': 'error', - - // https://eslint.org/docs/rules/no-unsafe-finally - 'no-unsafe-finally': 'error', - - // https://eslint.org/docs/rules/no-unsafe-negation - 'no-unsafe-negation': 'error', - - // https://eslint.org/docs/rules/no-useless-backreference - 'no-useless-backreference': 'error', - - // https://eslint.org/docs/rules/require-atomic-updates - 'require-atomic-updates': 'error', - - // https://eslint.org/docs/rules/use-isnan - 'use-isnan': 'error', - - // https://eslint.org/docs/rules/valid-typeof - 'valid-typeof': [ - 'error', - { - requireStringLiterals: true, - }, - ], - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js new file mode 100644 index 00000000..f9244c06 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js @@ -0,0 +1,226 @@ +// https://eslint.org/docs/rules/#possible-problems +export default { + // https://eslint.org/docs/rules/array-callback-return + 'array-callback-return': 'error', + + // https://eslint.org/docs/rules/constructor-super + 'constructor-super': 'error', + + // https://eslint.org/docs/rules/for-direction + 'for-direction': 'error', + + // https://eslint.org/docs/rules/getter-return + 'getter-return': [ + 'error', + { + allowImplicit: false, + }, + ], + + // https://eslint.org/docs/rules/no-async-promise-executor + 'no-async-promise-executor': 'error', + + // https://eslint.org/docs/rules/no-await-in-loop + 'no-await-in-loop': 'error', + + // https://eslint.org/docs/rules/no-class-assign + 'no-class-assign': 'error', + + // https://eslint.org/docs/rules/no-compare-neg-zero + 'no-compare-neg-zero': 'error', + + // https://eslint.org/docs/rules/no-cond-assign + 'no-cond-assign': 'error', + + // https://eslint.org/docs/rules/no-const-assign + 'no-const-assign': 'error', + + // https://eslint.org/docs/rules/no-constant-binary-expression + 'no-constant-binary-expression': 'error', + + // https://eslint.org/docs/rules/no-constant-condition + 'no-constant-condition': 'error', + + // https://eslint.org/docs/rules/no-constructor-return + 'no-constructor-return': 'error', + + // https://eslint.org/docs/rules/no-control-regex + 'no-control-regex': 'error', + + // https://eslint.org/docs/rules/no-debugger + 'no-debugger': 'error', + + // https://eslint.org/docs/rules/no-dupe-args + // It is safe to disable this rule when using TypeScript because TypeScript's compiler enforces this check + 'no-dupe-args': 'off', + + // https://eslint.org/docs/rules/no-dupe-class-members + 'no-dupe-class-members': 'error', + + // https://eslint.org/docs/rules/no-dupe-else-if + 'no-dupe-else-if': 'error', + + // https://eslint.org/docs/rules/no-dupe-keys + 'no-dupe-keys': 'error', + + // https://eslint.org/docs/rules/no-duplicate-case + 'no-duplicate-case': 'error', + + // https://eslint.org/docs/rules/no-duplicate-imports + 'no-duplicate-imports': 'off', + + // https://eslint.org/docs/rules/no-empty-character-class + 'no-empty-character-class': 'error', + + // https://eslint.org/docs/rules/no-empty-pattern + 'no-empty-pattern': 'error', + + /* + * https://eslint.org/docs/rules/no-ex-assign + * https://bocoup.com/blog/the-catch-with-try-catch + */ + 'no-ex-assign': 'error', + + // https://eslint.org/docs/rules/no-fallthrough + 'no-fallthrough': 'error', + + // https://eslint.org/docs/rules/no-func-assign + 'no-func-assign': 'error', + + // https://eslint.org/docs/rules/no-import-assign + 'no-import-assign': 'error', + + // https://eslint.org/docs/rules/no-inner-declarations + 'no-inner-declarations': 'error', + + // https://eslint.org/docs/rules/no-invalid-regexp + 'no-invalid-regexp': 'error', + + // https://eslint.org/docs/rules/no-irregular-whitespace + 'no-irregular-whitespace': 'error', + + // https://eslint.org/docs/rules/no-loss-of-precision + 'no-loss-of-precision': 'error', + + // https://eslint.org/docs/rules/no-misleading-character-class + 'no-misleading-character-class': 'error', + + // https://eslint.org/docs/latest/rules/no-new-native-nonconstructor + 'no-new-native-nonconstructor': 'error', + + // https://eslint.org/docs/rules/no-obj-calls + 'no-obj-calls': 'error', + + // https://eslint.org/docs/rules/no-promise-executor-return + 'no-promise-executor-return': 'error', + + // https://eslint.org/docs/rules/no-prototype-builtins + 'no-prototype-builtins': 'error', + + // https://eslint.org/docs/rules/no-self-assign + 'no-self-assign': [ + 'error', + { + props: false, + }, + ], + + // https://eslint.org/docs/rules/no-self-compare + 'no-self-compare': 'error', + + // https://eslint.org/docs/rules/no-setter-return + 'no-setter-return': 'error', + + /* + * https://eslint.org/docs/rules/no-sparse-arrays + * https://humanwhocodes.com/blog/2007/09/09/inconsistent-array-literals/ + */ + 'no-sparse-arrays': 'error', + + // https://eslint.org/docs/rules/no-template-curly-in-string + 'no-template-curly-in-string': 'error', + + // https://eslint.org/docs/rules/no-this-before-super + 'no-this-before-super': 'error', + + // https://eslint.org/docs/rules/no-undef + 'no-undef': 'error', + + // https://eslint.org/docs/latest/rules/no-unassigned-vars + 'no-unassigned-vars': 'error', + + // https://eslint.org/docs/rules/no-unexpected-multiline + 'no-unexpected-multiline': 'error', + + // https://eslint.org/docs/rules/no-unmodified-loop-condition + 'no-unmodified-loop-condition': 'error', + + // https://eslint.org/docs/rules/no-unreachable + 'no-unreachable': 'error', + + // https://eslint.org/docs/rules/no-unreachable-loop + 'no-unreachable-loop': 'error', + + // https://eslint.org/docs/rules/no-unsafe-finally + 'no-unsafe-finally': 'error', + + // https://eslint.org/docs/rules/no-unsafe-negation + 'no-unsafe-negation': 'error', + + // https://eslint.org/docs/rules/no-unsafe-optional-chaining + 'no-unsafe-optional-chaining': [ + 'error', + { + disallowArithmeticOperators: true, + }, + ], + + // https://eslint.org/docs/rules/no-unused-private-class-members + 'no-unused-private-class-members': 'error', + + // https://eslint.org/docs/rules/no-unused-vars + 'no-unused-vars': [ + 'error', + { + args: 'after-used', + argsIgnorePattern: '[iI]gnored', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '[iI]gnored', + ignoreRestSiblings: false, + vars: 'all', + varsIgnorePattern: '[iI]gnored', + }, + ], + + // https://eslint.org/docs/rules/no-use-before-define + 'no-use-before-define': [ + 'error', + { + functions: true, + classes: true, + variables: true, + enums: true, + typedefs: true, + }, + ], + + // https://eslint.org/docs/latest/rules/no-useless-assignment + 'no-useless-assignment': 'error', + + // https://eslint.org/docs/rules/no-useless-backreference + 'no-useless-backreference': 'error', + + // https://eslint.org/docs/rules/require-atomic-updates + 'require-atomic-updates': 'error', + + // https://eslint.org/docs/rules/use-isnan + 'use-isnan': 'error', + + // https://eslint.org/docs/rules/valid-typeof + 'valid-typeof': [ + 'error', + { + requireStringLiterals: true, + }, + ], +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/strict-mode.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/strict-mode.js deleted file mode 100644 index 15714ce5..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/strict-mode.js +++ /dev/null @@ -1,15 +0,0 @@ -// https://eslint.org/docs/rules/#strict-mode - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/strict - strict: [ - 'error', - 'never', - ], - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/stylistic-issues.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/stylistic-issues.js deleted file mode 100644 index bee3b52a..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/stylistic-issues.js +++ /dev/null @@ -1,817 +0,0 @@ -const config = require('../config'); - -// https://eslint.org/docs/rules/#stylistic-issues - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/array-bracket-newline - 'array-bracket-newline': [ - 'error', - { - multiline: true, - minItems: config.arrayBracketNewlineMinItems, - }, - ], - - // https://eslint.org/docs/rules/array-bracket-spacing - 'array-bracket-spacing': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/array-element-newline - 'array-element-newline': 'off', - - // https://eslint.org/docs/rules/block-spacing - 'block-spacing': [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/brace-style - 'brace-style': [ - 'error', - '1tbs', - { - allowSingleLine: false, - }, - ], - - // https://eslint.org/docs/rules/camelcase - camelcase: [ - 'error', - { - properties: 'never', - ignoreDestructuring: false, - }, - ], - - // https://eslint.org/docs/rules/capitalized-comments - 'capitalized-comments': [ - 'off', - 'never', - { - line: { - ignorePattern: '.*', - ignoreInlineComments: true, - ignoreConsecutiveComments: true, - }, - block: { - ignorePattern: '.*', - ignoreInlineComments: true, - ignoreConsecutiveComments: true, - }, - }, - ], - - // https://eslint.org/docs/rules/comma-dangle - 'comma-dangle': [ - 'error', - 'always-multiline', - ], - - // https://eslint.org/docs/rules/comma-spacing - 'comma-spacing': [ - 'error', - { - before: false, - after: true, - }, - ], - - // https://eslint.org/docs/rules/comma-style - 'comma-style': [ - 'error', - 'last', - { - exceptions: { - ArrayExpression: false, - ArrayPattern: false, - ArrowFunctionExpression: false, - CallExpression: false, - FunctionDeclaration: false, - FunctionExpression: false, - ImportDeclaration: false, - ObjectExpression: false, - ObjectPattern: false, - VariableDeclaration: false, - NewExpression: false, - }, - }, - ], - - // https://eslint.org/docs/rules/computed-property-spacing - 'computed-property-spacing': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/consistent-this - 'consistent-this': [ - 'error', - 'that', - ], - - // https://eslint.org/docs/rules/eol-last - 'eol-last': [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/func-call-spacing - 'func-call-spacing': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/func-name-matching - 'func-name-matching': [ - 'error', - 'always', - { - considerPropertyDescriptor: true, - includeCommonJSModuleExports: true, - }, - ], - - /* - * https://eslint.org/docs/rules/func-names - * TODO enable when needed? - */ - 'func-names': [ - 'off', - 'always', - ], - - // https://eslint.org/docs/rules/func-style - 'func-style': [ - 'error', - 'expression', - { - allowArrowFunctions: true, - }, - ], - - /* - * TODO Enable when fixed for arrow functions - * https://eslint.org/docs/rules/function-call-argument-newline - */ - 'function-call-argument-newline': 'off', - - // https://eslint.org/docs/rules/function-paren-newline - 'function-paren-newline': [ - 'error', - 'consistent', - ], - - // https://eslint.org/docs/rules/id-blacklist - 'id-denylist': 'off', - - // https://eslint.org/docs/rules/id-length - 'id-length': [ - 'error', - { - max: config.idLengthMax, - properties: 'always', - exceptions: [], - }, - ], - - // https://eslint.org/docs/rules/id-match - 'id-match': 'off', - - // https://eslint.org/docs/rules/implicit-arrow-linebreak - 'implicit-arrow-linebreak': [ - 'error', - 'beside', - ], - - // https://eslint.org/docs/rules/indent - indent: [ - 'error', - config.indent, - { - SwitchCase: 1, - VariableDeclarator: 1, - outerIIFEBody: 1, - MemberExpression: 0, - FunctionDeclaration: { - parameters: 1, - body: 1, - }, - FunctionExpression: { - parameters: 1, - body: 1, - }, - CallExpression: { - arguments: 1, - }, - ArrayExpression: 1, - ObjectExpression: 1, - ImportDeclaration: 1, - flatTernaryExpressions: false, - offsetTernaryExpressions: false, - ignoredNodes: [], - ignoreComments: false, - }, - ], - - // https://eslint.org/docs/rules/jsx-quotes - 'jsx-quotes': [ - 'error', - 'prefer-double', - ], - - // https://eslint.org/docs/rules/key-spacing - 'key-spacing': [ - 'error', - { - beforeColon: false, - afterColon: true, - mode: 'strict', - }, - ], - - // https://eslint.org/docs/rules/keyword-spacing - 'keyword-spacing': [ - 'error', - { - before: true, - after: true, - overrides: { - return: { - after: true, - }, - throw: { - after: true, - }, - case: { - after: true, - }, - }, - }, - ], - - // https://eslint.org/docs/rules/line-comment-position - 'line-comment-position': [ - 'error', - { - position: 'above', - ignorePattern: '', - applyDefaultPatterns: true, - }, - ], - - // https://eslint.org/docs/rules/linebreak-style - 'linebreak-style': [ - 'error', - 'unix', - ], - - // https://eslint.org/docs/rules/lines-around-comment - 'lines-around-comment': [ - 'error', - { - beforeBlockComment: true, - afterBlockComment: false, - beforeLineComment: true, - afterLineComment: false, - allowBlockStart: true, - allowBlockEnd: false, - allowObjectStart: true, - allowObjectEnd: false, - allowArrayStart: false, - allowArrayEnd: false, - allowClassStart: true, - allowClassEnd: false, - applyDefaultIgnorePatterns: true, - ignorePattern: 'ignore-comment', - }, - ], - - // https://eslint.org/docs/rules/lines-between-class-members - 'lines-between-class-members': [ - 'error', - 'always', - { - exceptAfterSingleLine: false, - }, - ], - - // https://eslint.org/docs/rules/max-depth - 'max-depth': [ - 'error', - config.maxDepth, - ], - - // https://eslint.org/docs/rules/max-len - 'max-len': [ - 'error', - { - code: config.maxLen, - tabWidth: config.indent, - comments: config.maxLen, - ignorePattern: 'ignore-long-line', - ignoreComments: false, - ignoreTrailingComments: false, - ignoreRegExpLiterals: false, - ignoreStrings: false, - ignoreTemplateLiterals: false, - ignoreUrls: true, - }, - ], - - // https://eslint.org/docs/rules/max-lines - 'max-lines': [ - 'off', - { - max: config.maxLinesMax, - skipBlankLines: true, - skipComments: true, - }, - ], - - // https://eslint.org/docs/rules/max-lines-per-function - 'max-lines-per-function': [ - 'error', - { - max: config.maxLinesPerFunctionMax, - skipBlankLines: true, - skipComments: true, - IIFEs: true, - }, - ], - - // https://eslint.org/docs/rules/max-nested-callbacks - 'max-nested-callbacks': [ - 'error', - config.maxNestedCallbacks, - ], - - // https://eslint.org/docs/rules/max-params - 'max-params': [ - 'error', - config.maxParams, - ], - - // https://eslint.org/docs/rules/max-statements - 'max-statements': [ - 'error', - config.maxStatements, - ], - - // https://eslint.org/docs/rules/max-statements-per-line - 'max-statements-per-line': [ - 'error', - { - max: config.maxStatementsPerLine, - }, - ], - - // https://eslint.org/docs/rules/multiline-comment-style - 'multiline-comment-style': [ - 'error', - 'starred-block', - ], - - // https://eslint.org/docs/rules/multiline-ternary - 'multiline-ternary': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/new-cap - 'new-cap': [ - 'error', - { - newIsCap: true, // eslint-disable-line unicorn/no-keyword-prefix - newIsCapExceptions: [], // eslint-disable-line unicorn/no-keyword-prefix - capIsNew: false, - capIsNewExceptions: [], - properties: true, - }, - ], - - // https://eslint.org/docs/rules/new-parens - 'new-parens': 'error', - - // https://eslint.org/docs/rules/newline-per-chained-call - 'newline-per-chained-call': [ - 'error', - { - ignoreChainWithDepth: 2, - }, - ], - - // https://eslint.org/docs/rules/no-array-constructor - 'no-array-constructor': 'error', - - // https://eslint.org/docs/rules/no-bitwise - 'no-bitwise': 'error', - - // https://eslint.org/docs/rules/no-continue - 'no-continue': 'error', - - // https://eslint.org/docs/rules/no-inline-comments - 'no-inline-comments': 'off', - - // https://eslint.org/docs/rules/no-lonely-if - 'no-lonely-if': 'error', - - // https://eslint.org/docs/rules/no-mixed-operators - 'no-mixed-operators': [ - 'error', - { - groups: [ - [ - '+', - '-', - '*', - '/', - '%', - '**', - ], - [ - '&', - '|', - '^', - '~', - '<<', - '>>', - '>>>', - ], - [ - '==', - '!=', - '===', - '!==', - '>', - '>=', - '<', - '<=', - ], - [ - '&&', - '||', - ], - [ - 'in', - 'instanceof', - ], - ], - allowSamePrecedence: true, - }, - ], - - // https://eslint.org/docs/rules/no-mixed-spaces-and-tabs - 'no-mixed-spaces-and-tabs': 'error', - - // https://eslint.org/docs/rules/no-multi-assign - 'no-multi-assign': 'error', - - // https://eslint.org/docs/rules/no-multiple-empty-lines - 'no-multiple-empty-lines': [ - 'error', - { - max: config.noMultipleEmptyLinesMax, - maxEOF: config.noMultipleEmptyLinesEOF, - maxBOF: config.noMultipleEmptyLinesBOF, - }, - ], - - // https://eslint.org/docs/rules/no-negated-condition - 'no-negated-condition': 'error', - - // https://eslint.org/docs/rules/no-nested-ternary - 'no-nested-ternary': 'error', - - // https://eslint.org/docs/rules/no-new-object - 'no-new-object': 'error', - - // https://eslint.org/docs/rules/no-plusplus - 'no-plusplus': 'error', - - // https://eslint.org/docs/rules/no-restricted-syntax - 'no-restricted-syntax': [ - 'error', - { - selector: 'CallExpression[callee.name="setTimeout"][arguments.length!=2]', - message: 'setTimeout must always be invoked with two arguments.', - }, - { - selector: 'ForInStatement', - message: 'Use Object.(keys || values) instead', - }, - { - selector: 'LabeledStatement', - message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', - }, - { - selector: 'WithStatement', - message: 'Do not use with DOT', - }, - { - selector: 'BinaryExpression[operator="in"]', - message: 'use prototype.hasOwnProperty() instead', - }, - ], - - // https://eslint.org/docs/rules/no-tabs - 'no-tabs': 'error', - - // https://eslint.org/docs/rules/no-ternary - 'no-ternary': 'off', - - // https://eslint.org/docs/rules/no-trailing-space - 'no-trailing-spaces': [ - 'error', - { - skipBlankLines: false, - ignoreComments: false, - }, - ], - - // https://eslint.org/docs/rules/no-underscore-dangle - 'no-underscore-dangle': [ - 'error', - { - allow: [], - allowAfterThis: false, - allowAfterSuper: false, - enforceInMethodNames: false, - }, - ], - - // https://eslint.org/docs/rules/no-unneeded-ternary - 'no-unneeded-ternary': [ - 'error', - { - defaultAssignment: false, - }, - ], - - // https://eslint.org/docs/rules/no-whitespace-before-property - 'no-whitespace-before-property': 'error', - - // https://eslint.org/docs/rules/nonblock-statement-body-position - 'nonblock-statement-body-position': [ - 'error', - 'beside', - { - overrides: {}, - }, - ], - - // https://eslint.org/docs/rules/object-curly-newline - 'object-curly-newline': [ - 'error', - { - ObjectExpression: { - minProperties: config.newlineObjectExpressionMin, - multiline: true, - consistent: true, - }, - ObjectPattern: { - minProperties: config.newlineObjectPatternMin, - multiline: true, - consistent: true, - }, - ImportDeclaration: { - minProperties: config.newlineImportDeclarationMin, - multiline: true, - consistent: true, - }, - ExportDeclaration: { - minProperties: config.newlineExportDeclarationMin, - multiline: true, - consistent: true, - }, - }, - ], - - // https://eslint.org/docs/rules/object-curly-spacing - 'object-curly-spacing': [ - 'error', - 'always', - { - arraysInObjects: true, - objectsInObjects: true, - }, - ], - - // https://eslint.org/docs/rules/object-property-newline - 'object-property-newline': [ - 'error', - { - allowAllPropertiesOnSameLine: false, - }, - ], - - // https://eslint.org/docs/rules/one-var - 'one-var': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/one-var-declaration-per-line - 'one-var-declaration-per-line': [ - 'error', - 'initializations', - ], - - // https://eslint.org/docs/rules/operator-assignment - 'operator-assignment': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/operator-linebreak - 'operator-linebreak': [ - 'error', - 'none', - ], - - // https://eslint.org/docs/rules/padded-blocks - 'padded-blocks': [ - 'error', - { - blocks: 'never', - classes: 'never', - switches: 'never', - }, - ], - - // https://eslint.org/docs/rules/padding-line-between-statements - 'padding-line-between-statements': [ - 'error', - - // following 2 lines are replacement for deprecated lines-around-directive https://eslint.org/docs/rules/lines-around-directive - { - blankLine: 'always', - prev: 'directive', - next: '*', - }, - { - blankLine: 'any', - prev: 'directive', - next: 'directive', - }, - - // following 2 lines are replacement for deprecated newline-after-var https://eslint.org/docs/rules/newline-after-var - { - blankLine: 'always', - prev: [ - 'const', 'let', 'var', - ], - next: '*', - }, - { - blankLine: 'any', - prev: [ - 'const', 'let', 'var', - ], - next: [ - 'const', 'let', 'var', - ], - }, - - // following line are replacement for deprecated newline-before-return https://eslint.org/docs/rules/newline-before-return - { - blankLine: 'always', - prev: '*', - next: 'return', - }, - ], - - // https://eslint.org/docs/rules/prefer-exponentiation-operator - 'prefer-exponentiation-operator': 'error', - - // https://eslint.org/docs/rules/prefer-object-spread - 'prefer-object-spread': 'error', - - // https://eslint.org/docs/rules/quote-props.html - 'quote-props': [ - 'error', - 'as-needed', - { - keywords: false, - unnecessary: true, - numbers: false, - }, - ], - - // https://eslint.org/docs/rules/quotes - quotes: [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: false, - }, - ], - - // https://eslint.org/docs/rules/semi - semi: [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/semi-spacing - 'semi-spacing': [ - 'error', - { - before: false, - after: true, - }, - ], - - // https://eslint.org/docs/rules/semi-style - 'semi-style': [ - 'error', - 'last', - ], - - // https://eslint.org/docs/rules/sort-keys - 'sort-keys': [ - 'off', - 'asc', - { - caseSensitive: false, - natural: true, - }, - ], - - // https://eslint.org/docs/rules/sort-vars - 'sort-vars': [ - 'off', - { - ignoreCase: true, - }, - ], - - // https://eslint.org/docs/rules/space-before-blocks - 'space-before-blocks': 'error', - - // https://eslint.org/docs/rules/space-before-function-paren - 'space-before-function-paren': [ - 'error', - { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }, - ], - - // https://eslint.org/docs/rules/space-in-parens - 'space-in-parens': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/space-infix-ops - 'space-infix-ops': 'error', - - // https://eslint.org/docs/rules/space-unary-ops - 'space-unary-ops': [ - 'error', - { - words: true, - nonwords: false, - overrides: {}, - }, - ], - - // https://eslint.org/docs/rules/spaced-comment - 'spaced-comment': [ - 'error', - 'always', - ], - - // https://eslint.org/docs/rules/switch-colon-spacing - 'switch-colon-spacing': [ - 'error', - { - after: true, - before: false, - }, - ], - - // https://eslint.org/docs/rules/template-tag-spacing - 'template-tag-spacing': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/unicode-bom - 'unicode-bom': [ - 'error', - 'never', - ], - - // https://eslint.org/docs/rules/wrap-regex - 'wrap-regex': 'error', - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js new file mode 100644 index 00000000..cead6aa1 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js @@ -0,0 +1,691 @@ +import config from '../config.js'; + +// https://eslint.org/docs/rules/#suggestions +export default { + // https://eslint.org/docs/rules/accessor-pairs + 'accessor-pairs': [ + 'error', + { + setWithoutGet: true, + getWithoutSet: false, + enforceForClassMembers: true, + }, + ], + + // https://eslint.org/docs/rules/arrow-body-style + 'arrow-body-style': ['error', 'always'], + + // https://eslint.org/docs/rules/block-scoped-var + 'block-scoped-var': 'error', + + // https://eslint.org/docs/rules/camelcase + camelcase: [ + 'error', + { + properties: 'never', + ignoreDestructuring: false, + }, + ], + + // https://eslint.org/docs/rules/capitalized-comments + 'capitalized-comments': [ + 'off', + 'never', + { + line: { + ignorePattern: '.*', + ignoreInlineComments: true, + ignoreConsecutiveComments: true, + }, + block: { + ignorePattern: '.*', + ignoreInlineComments: true, + ignoreConsecutiveComments: true, + }, + }, + ], + + // https://eslint.org/docs/rules/class-methods-use-this + 'class-methods-use-this': 'error', + + // https://eslint.org/docs/rules/complexity + complexity: [ + 'error', + { + max: config.complexity, + }, + ], + + // https://eslint.org/docs/rules/consistent-return + 'consistent-return': 'error', + + // https://eslint.org/docs/rules/consistent-this + 'consistent-this': ['error', 'that'], + + // https://eslint.org/docs/rules/curly + curly: 'error', + + // https://eslint.org/docs/rules/default-case + 'default-case': [ + 'error', + { + commentPattern: String.raw`^skip\sdefault`, + }, + ], + + // https://eslint.org/docs/rules/default-case-last + 'default-case-last': 'error', + + // https://eslint.org/docs/rules/default-param-last + 'default-param-last': 'error', + + // https://eslint.org/docs/rules/dot-notation + 'dot-notation': [ + 'error', + { + allowKeywords: true, + }, + ], + + // https://eslint.org/docs/rules/eqeqeq + eqeqeq: ['error', 'always'], + + // https://eslint.org/docs/rules/func-name-matching + 'func-name-matching': [ + 'error', + 'always', + { + considerPropertyDescriptor: true, + includeCommonJSModuleExports: true, + }, + ], + + /* + * https://eslint.org/docs/rules/func-names + * TODO enable when needed? + */ + 'func-names': ['off', 'always'], + + // https://eslint.org/docs/rules/func-style + 'func-style': [ + 'error', + 'expression', + { + allowArrowFunctions: true, + }, + ], + + // https://eslint.org/docs/rules/grouped-accessor-pairs + 'grouped-accessor-pairs': ['error', 'getBeforeSet'], + + /* + * https://eslint.org/docs/rules/guard-for-in + * https://2ality.com/2012/01/objects-as-maps.html + */ + 'guard-for-in': 'error', + + // https://eslint.org/docs/rules/id-blacklist + 'id-denylist': 'off', + + // https://eslint.org/docs/rules/id-length + 'id-length': [ + 'error', + { + max: config.idLengthMax, + properties: 'always', + exceptions: [], + }, + ], + + // https://eslint.org/docs/rules/id-match + 'id-match': 'off', + + // https://eslint.org/docs/rules/init-declarations + 'init-declarations': 'off', + + // https://eslint.org/docs/latest/rules/logical-assignment-operators + 'logical-assignment-operators': ['error', 'always'], + + // https://eslint.org/docs/rules/max-classes-per-file + 'max-classes-per-file': ['error', config.maxClassesPerFile], + + // https://eslint.org/docs/rules/max-depth + 'max-depth': ['error', config.maxDepth], + + // https://eslint.org/docs/rules/max-lines + 'max-lines': [ + 'off', + { + max: config.maxLinesMax, + skipBlankLines: true, + skipComments: true, + }, + ], + + // https://eslint.org/docs/rules/max-lines-per-function + 'max-lines-per-function': [ + 'error', + { + max: config.maxLinesPerFunctionMax, + skipBlankLines: true, + skipComments: true, + IIFEs: true, + }, + ], + + // https://eslint.org/docs/rules/max-nested-callbacks + 'max-nested-callbacks': ['error', config.maxNestedCallbacks], + + // https://eslint.org/docs/rules/max-params + 'max-params': ['error', config.maxParams], + + // https://eslint.org/docs/rules/max-statements + 'max-statements': ['error', config.maxStatements], + + // https://eslint.org/docs/rules/new-cap + 'new-cap': [ + 'error', + { + // eslint-disable-next-line unicorn/no-keyword-prefix + newIsCap: true, + // eslint-disable-next-line unicorn/no-keyword-prefix + newIsCapExceptions: [], + capIsNew: false, + capIsNewExceptions: [], + properties: true, + }, + ], + + // https://eslint.org/docs/rules/no-alert + 'no-alert': 'error', + + // https://eslint.org/docs/rules/no-array-constructor + 'no-array-constructor': 'error', + + // https://eslint.org/docs/rules/no-bitwise + 'no-bitwise': 'error', + + // https://eslint.org/docs/rules/no-caller + 'no-caller': 'error', + + // https://eslint.org/docs/rules/no-case-declarations + 'no-case-declarations': 'error', + + // https://eslint.org/docs/rules/no-console + 'no-console': 'error', + + // https://eslint.org/docs/rules/no-continue + 'no-continue': 'error', + + // https://eslint.org/docs/rules/no-delete-var + 'no-delete-var': 'error', + + // https://eslint.org/docs/rules/no-div-regex + 'no-div-regex': 'error', + + // https://eslint.org/docs/rules/no-else-return + 'no-else-return': [ + 'error', + { + allowElseIf: false, + }, + ], + + // https://eslint.org/docs/rules/no-empty + 'no-empty': [ + 'error', + { + allowEmptyCatch: true, + }, + ], + + // https://eslint.org/docs/rules/no-empty-function + 'no-empty-function': 'error', + + // https://eslint.org/docs/rules/no-eq-null + 'no-eq-null': 'error', + + // https://eslint.org/docs/latest/rules/no-empty-static-block + 'no-empty-static-block': 'error', + + // https://eslint.org/docs/rules/no-eval + 'no-eval': 'error', + + // https://eslint.org/docs/rules/no-extend-native + 'no-extend-native': 'error', + + // https://eslint.org/docs/rules/no-extra-bind + 'no-extra-bind': 'error', + + // https://eslint.org/docs/rules/no-extra-boolean-cast + 'no-extra-boolean-cast': 'error', + + // https://eslint.org/docs/rules/no-extra-label + 'no-extra-label': 'error', + + // https://eslint.org/docs/rules/no-global-assign + 'no-global-assign': [ + 'error', + { + exceptions: [], + }, + ], + + // https://eslint.org/docs/rules/no-implicit-coercion + 'no-implicit-coercion': 'error', + + // https://eslint.org/docs/rules/no-implicit-globals + 'no-implicit-globals': 'error', + + // https://eslint.org/docs/rules/no-implied-eval + 'no-implied-eval': 'error', + + // https://eslint.org/docs/rules/no-inline-comments + 'no-inline-comments': 'off', + + // https://eslint.org/docs/rules/no-invalid-this + 'no-invalid-this': 'error', + + // https://eslint.org/docs/rules/no-iterator + 'no-iterator': 'error', + + // https://eslint.org/docs/rules/no-label-va + 'no-label-var': 'error', + + // https://eslint.org/docs/rules/no-labels + 'no-labels': 'error', + + // https://eslint.org/docs/rules/no-lone-blocks + 'no-lone-blocks': 'error', + + // https://eslint.org/docs/rules/no-lonely-if + 'no-lonely-if': 'error', + + // https://eslint.org/docs/rules/no-loop-func + 'no-loop-func': 'error', + + // https://eslint.org/docs/rules/no-magic-numbers + 'no-magic-numbers': 'off', + + // https://eslint.org/docs/rules/no-multi-assign + 'no-multi-assign': 'error', + + // https://eslint.org/docs/rules/no-multi-str + 'no-multi-str': 'error', + + // https://eslint.org/docs/rules/no-negated-condition + 'no-negated-condition': 'error', + + // https://eslint.org/docs/rules/no-nested-ternary + 'no-nested-ternary': 'error', + + // https://eslint.org/docs/rules/no-new + 'no-new': 'error', + + // https://eslint.org/docs/rules/no-new-func + 'no-new-func': 'error', + + // https://eslint.org/docs/rules/no-new-wrappers + 'no-new-wrappers': 'error', + + // https://eslint.org/docs/rules/no-nonoctal-decimal-escape + 'no-nonoctal-decimal-escape': 'error', + + // https://eslint.org/docs/latest/rules/no-object-constructor + 'no-object-constructor': 'error', + + // https://eslint.org/docs/rules/no-octal + 'no-octal': 'error', + + // https://eslint.org/docs/rules/no-octal-escape + 'no-octal-escape': 'error', + + // https://eslint.org/docs/rules/no-param-reassign + 'no-param-reassign': 'error', + + // https://eslint.org/docs/rules/no-plusplus + 'no-plusplus': 'error', + + // https://eslint.org/docs/rules/no-proto + 'no-proto': 'error', + + // https://eslint.org/docs/rules/no-redeclare + 'no-redeclare': 'error', + + // https://eslint.org/docs/rules/no-regex-spaces + 'no-regex-spaces': 'error', + + // https://eslint.org/docs/rules/no-restricted-exports + 'no-restricted-exports': 'off', + + // https://eslint.org/docs/rules/no-restricted-globals + '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', + }, + ], + + // https://eslint.org/docs/rules/no-restricted-imports + 'no-restricted-imports': 'error', + + // https://eslint.org/docs/rules/no-restricted-properties + 'no-restricted-properties': [ + 'error', + { + object: 'arguments', + property: 'callee', + message: 'arguments.callee is deprecated', + }, + { + object: 'global', + property: 'isFinite', + message: 'Use Number.isFinite instead', + }, + { + object: 'window', + property: 'isFinite', + message: 'Use Number.isFinite instead', + }, + { + object: 'global', + property: 'isNaN', + message: 'Use Number.isNaN instead', + }, + { + object: 'window', + property: 'isNaN', + message: 'Use Number.isNaN instead', + }, + { + property: '__defineGetter__', + message: 'Use Object.defineProperty instead', + }, + { + property: '__defineSetter__', + message: 'Use Object.defineProperty instead', + }, + { + object: 'require', + message: 'Please call require() directly.', + }, + ], + + // https://eslint.org/docs/rules/no-restricted-syntax + 'no-restricted-syntax': [ + 'error', + { + selector: 'CallExpression[callee.name="setTimeout"][arguments.length!=2]', + message: 'setTimeout must always be invoked with two arguments.', + }, + { + selector: 'ForInStatement', + message: 'Use Object.(keys || values) instead', + }, + { + selector: 'LabeledStatement', + message: + 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', + }, + { + selector: 'WithStatement', + message: 'Do not use with DOT', + }, + ], + + // https://eslint.org/docs/rules/no-return-assign + 'no-return-assign': 'error', + + // https://eslint.org/docs/rules/no-script-url + 'no-script-url': 'error', + + // https://eslint.org/docs/rules/no-sequences + 'no-sequences': 'error', + + /* + * https://eslint.org/docs/rules/no-shadow + * https://en.wikipedia.org/wiki/Variable_shadowing + */ + 'no-shadow': [ + 'error', + { + builtinGlobals: true, + hoist: 'all', + allow: [], + }, + ], + + // https://eslint.org/docs/rules/no-shadow-restricted-names + 'no-shadow-restricted-names': 'error', + + // https://eslint.org/docs/rules/no-ternary + 'no-ternary': 'off', + + // https://eslint.org/docs/rules/no-throw-literal + 'no-throw-literal': 'error', + + // https://eslint.org/docs/rules/no-undef-init + 'no-undef-init': 'error', + + // https://eslint.org/docs/rules/no-undefined + 'no-undefined': 'error', + + // https://eslint.org/docs/rules/no-underscore-dangle + 'no-underscore-dangle': [ + 'error', + { + allow: [], + allowAfterThis: false, + allowAfterSuper: false, + enforceInMethodNames: false, + }, + ], + + // https://eslint.org/docs/rules/no-unneeded-ternary + 'no-unneeded-ternary': [ + 'error', + { + defaultAssignment: false, + }, + ], + + // https://eslint.org/docs/rules/no-unused-expressions + 'no-unused-expressions': [ + 'error', + { + allowShortCircuit: false, + allowTernary: false, + allowTaggedTemplates: false, + }, + ], + + // https://eslint.org/docs/rules/no-unused-labels + 'no-unused-labels': 'error', + + // https://eslint.org/docs/rules/no-useless-call + 'no-useless-call': 'error', + + // https://eslint.org/docs/rules/no-useless-catch + 'no-useless-catch': 'error', + + // https://eslint.org/docs/rules/no-useless-computed-key + 'no-useless-computed-key': 'error', + + // https://eslint.org/docs/rules/no-useless-concat + 'no-useless-concat': 'error', + + // https://eslint.org/docs/rules/no-useless-constructor + 'no-useless-constructor': 'error', + + // https://eslint.org/docs/rules/no-useless-escape + 'no-useless-escape': 'error', + + // https://eslint.org/docs/rules/no-useless-rename + 'no-useless-rename': [ + 'error', + { + ignoreDestructuring: false, + ignoreImport: false, + ignoreExport: false, + }, + ], + + // https://eslint.org/docs/rules/no-useless-return + 'no-useless-return': 'error', + + // https://eslint.org/docs/rules/no-var + 'no-var': 'error', + + // https://eslint.org/docs/rules/no-void + 'no-void': 'error', + + // https://eslint.org/docs/rules/no-warning-comments + 'no-warning-comments': 'off', + + // https://eslint.org/docs/rules/no-with + 'no-with': 'error', + + // https://eslint.org/docs/rules/object-shorthand + 'object-shorthand': [ + 'error', + 'always', + { + ignoreConstructors: false, + avoidQuotes: true, + }, + ], + + // https://eslint.org/docs/rules/one-var + 'one-var': ['error', 'never'], + + // https://eslint.org/docs/rules/operator-assignment + 'operator-assignment': ['error', 'never'], + + // https://eslint.org/docs/rules/prefer-arrow-callback + 'prefer-arrow-callback': [ + 'error', + { + allowNamedFunctions: false, + allowUnboundThis: true, + }, + ], + + // https://eslint.org/docs/rules/prefer-const + 'prefer-const': [ + 'error', + { + destructuring: 'any', + ignoreReadBeforeAssign: false, + }, + ], + + // https://eslint.org/docs/rules/prefer-destructuring + 'prefer-destructuring': [ + 'error', + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: true, + object: true, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + + // https://eslint.org/docs/rules/prefer-exponentiation-operator + 'prefer-exponentiation-operator': 'error', + + /* + * https://eslint.org/docs/rules/prefer-named-capture-group + * supported only by ECMAScript 2018 + */ + 'prefer-named-capture-group': 'off', + + // https://eslint.org/docs/rules/prefer-numeric-literals + 'prefer-numeric-literals': 'error', + + // https://eslint.org/docs/rules/prefer-object-has-own + 'prefer-object-has-own': 'off', + + // https://eslint.org/docs/rules/prefer-object-spread + 'prefer-object-spread': 'error', + + // https://eslint.org/docs/rules/prefer-promise-reject-errors + 'prefer-promise-reject-errors': [ + 'error', + { + allowEmptyReject: true, + }, + ], + + // https://eslint.org/docs/rules/prefer-regex-literals + 'prefer-regex-literals': 'error', + + // https://eslint.org/docs/rules/prefer-rest-params + 'prefer-rest-params': 'error', + + // https://eslint.org/docs/rules/prefer-spread + 'prefer-spread': 'error', + + // https://eslint.org/docs/rules/prefer-template + 'prefer-template': 'error', + + // https://eslint.org/docs/latest/rules/preserve-caught-error + 'preserve-caught-error': ['error', { requireCatchParameter: true }], + + // https://eslint.org/docs/rules/radix + radix: 'error', + + // https://eslint.org/docs/rules/require-await + 'require-await': 'error', + + // https://eslint.org/docs/rules/require-unicode-regexp + 'require-unicode-regexp': 'error', + + // https://eslint.org/docs/rules/require-yield + 'require-yield': 'error', + + // https://eslint.org/docs/rules/sort-imports + 'sort-imports': 'off', + + // https://eslint.org/docs/rules/sort-keys + 'sort-keys': 'off', + + // https://eslint.org/docs/rules/sort-vars + 'sort-vars': [ + 'off', + { + ignoreCase: true, + }, + ], + + // https://eslint.org/docs/rules/strict + strict: ['error', 'never'], + + // https://eslint.org/docs/rules/symbol-description + 'symbol-description': 'error', + + // https://eslint.org/docs/rules/vars-on-top + 'vars-on-top': 'error', + + // https://eslint.org/docs/rules/yoda + yoda: 'error', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/variables.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/variables.js deleted file mode 100644 index 30c7e3d3..00000000 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/variables.js +++ /dev/null @@ -1,91 +0,0 @@ -// https://eslint.org/docs/rules/#variables - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/init-declarations - 'init-declarations': [ - 'off', - 'always', - ], - - // https://eslint.org/docs/rules/no-delete-var - 'no-delete-var': 'error', - - // https://eslint.org/docs/rules/no-label-va - 'no-label-var': 'error', - - // https://eslint.org/docs/rules/no-restricted-globals - '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', - }, - ], - - /* - * https://eslint.org/docs/rules/no-shadow - * https://en.wikipedia.org/wiki/Variable_shadowing - */ - 'no-shadow': [ - 'error', - { - builtinGlobals: true, - hoist: 'all', - allow: [], - }, - ], - - // https://eslint.org/docs/rules/no-shadow-restricted-names - 'no-shadow-restricted-names': 'error', - - // https://eslint.org/docs/rules/no-undef - 'no-undef': 'error', - - // https://eslint.org/docs/rules/no-undefined - 'no-undefined': 'error', - - // https://eslint.org/docs/rules/no-undef-init - 'no-undef-init': 'error', - - // https://eslint.org/docs/rules/no-unused-vars - 'no-unused-vars': [ - 'error', - { - args: 'after-used', - argsIgnorePattern: '[iI]gnored', - caughtErrors: 'all', - caughtErrorsIgnorePattern: '[iI]gnored', - ignoreRestSiblings: false, - vars: 'all', - varsIgnorePattern: '[iI]gnored', - }, - ], - - // https://eslint.org/docs/rules/no-use-before-define - 'no-use-before-define': [ - 'error', - { - functions: true, - classes: true, - variables: true, - }, - ], - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md index 3a88aecf..de051e9e 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md @@ -1,145 +1,722 @@ # Change Log -## 4.3.0 - 2020-07-19 - - [deps] update `eslint` to version `7.5.0` - +## 10.1.0 - 2026-06-09 + +- [deps] update `eslint-plugin-n` to version `18.1.0` + +## 10.0.0 - 2026-06-01 + +- [new] add sharable oxlint config with eslint-plugin-n rules + +## 9.34.0 - 2026-05-05 + +- [deps] update `eslint-plugin-n` to version `18.0.1` + +## 9.33.0 - 2026-04-05 + +- [deps] update `eslint-plugin-n` to version `18.0.0` + +## 9.32.0 - 2026-02-16 + +- [deps] update `eslint-plugin-n` to version `17.24.0` + +## 9.31.0 - 2026-01-14 + +- [deps] update `eslint-plugin-n` to version `17.23.2` + +## 9.30.0 - 2025-12-13 + +- [deps] update `eslint` to version `9.39.2` + +## 9.29.0 - 2025-11-04 + +- [deps] update `eslint` to version `9.39.1` + +## 9.28.0 - 2025-11-01 + +- [deps] update `eslint` to version `9.39.0` + +## 9.27.0 - 2025-10-18 + +- [deps] update `eslint` to version `9.38.0` + +## 9.26.0 - 2025-10-04 + +- [deps] update `eslint` to version `9.37.0` + +## 9.25.0 - 2025-09-20 + +- [deps] update `eslint` to version `9.36.0` +- [deps] update `eslint-plugin-n` to version `17.23.1` + +## 9.24.0 - 2025-09-16 + +- [deps] update `eslint-plugin-n` to version `17.23.0` + +## 9.23.0 - 2025-09-14 + +- [deps] update `eslint-plugin-n` to version `17.22.0` + +## 9.22.0 - 2025-09-05 + +- [deps] update `eslint` to version `9.35.0` + +## 9.21.0 - 2025-08-23 + +- [deps] update `eslint` to version `9.34.0` + +## 9.20.0 - 2025-08-09 + +- [deps] update `eslint` to version `9.33.0` + +## 9.19.0 - 2025-07-29 + +- [deps] update `eslint-plugin-n` to version `17.21.3` + +## 9.18.0 - 2025-07-27 + +- [deps] update `eslint-plugin-n` to version `17.21.1` + +## 9.17.0 - 2025-07-26 + +- [deps] update `eslint` to version `9.32.0` + +## 9.16.0 - 2025-07-13 + +- [deps] update `eslint` to version `9.31.0` + +## 9.15.0 - 2025-07-06 + +- [deps] update `eslint-plugin-n` to version `17.21.0` + +## 9.14.0 - 2025-07-02 + +- [deps] update `eslint` to version `9.30.1` + +## 9.13.0 - 2025-06-28 + +- [deps] update `eslint` to version `9.30.0` + +## 9.12.0 - 2025-06-03 + +- [deps] update `eslint` to version `9.29.0` +- [deps] update `eslint-plugin-n` to version `17.20.0` + +## 9.11.0 - 2025-06-03 + +- [deps] update `eslint-plugin-n` to version `17.19.0` + +## 9.10.0 - 2025-05-31 + +- [deps] update `eslint` to version `9.28.0` + +## 9.9.0 - 2025-05-17 + +- [deps] update `eslint` to version `9.27.0` + +## 9.8.0 - 2025-05-09 + +- [deps] update `eslint-plugin-n` to version `17.18.0` + +## 9.7.0 - 2025-05-03 + +- [deps] update `eslint` to version `9.26.0` + +## 9.6.0 - 2025-04-22 + +- [deps] update `eslint` to version `9.25.1` + +## 9.5.0 - 2025-04-21 + +- [deps] update `eslint` to version `9.25.0` + +## 9.4.0 - 2025-04-06 + +- [deps] update `eslint` to version `9.24.0` + +## 9.3.0 - 2025-03-26 + +- [deps] update `eslint-plugin-n` to version `17.17.0` + +## 9.2.0 - 2025-03-22 + +- [deps] update `eslint` to version `9.23.0` + +## 9.1.0 - 2025-03-19 + +- [breaking] disabled rules `n/no-extraneous-require`, `n/no-missing-require`, `n/exports-style`, `n/no-extraneous-import`, `n/no-missing-import`, `n/no-callback-literal`, `n/global-require`, `n/handle-callback-err`, `n/no-mixed-requires`, `n/no-new-require`, `n/callback-return`, `n/file-extension-in-import`, `n/file-extension-in-import`, `n/no-exports-assign` after migration to ESM + +## 9.0.0 - 2025-03-09 + +- [deps] update `eslint` to version `9.22.0` + +## 8.0.0 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 7.0.0 - 2025-03-06 + +- [deps] update `eslint-plugin-n` to version `17.16.2` +- [new] flat config + +## 6.9.0 - 2025-03-03 + +- [deps] update `eslint-plugin-n` to version `17.16.1` + +## 6.8.0 - 2025-01-23 + +- [deps] update `eslint` to version `8.57.1` + +## 6.7.0 - 2024-12-21 + +- [deps] update `eslint-plugin-n` to version `17.15.1` + +## 6.6.0 - 2024-12-10 + +- [deps] update `eslint-plugin-n` to version `17.15.0` + +## 6.5.0 - 2024-11-23 + +- [deps] update `eslint-plugin-n` to version `17.14.0` + +## 6.4.0 - 2024-11-15 + +- [deps] update `eslint-plugin-n` to version `17.13.2` + +## 6.3.0 - 2024-11-09 + +- [deps] update `eslint-plugin-n` to version `17.13.1` + +## 6.2.0 - 2024-11-07 + +- [deps] update `eslint-plugin-n` to version `17.13.0` + +## 6.1.0 - 2024-11-01 + +- [deps] update `eslint-plugin-n` to version `17.12.0` + +## 6.0.0 - 2024-10-23 + +- [deps] migrate to `eslint-plugin-n` + +## 5.54.0 - 2024-02-25 + +- [deps] update `eslint` to version `8.57.0` + +## 5.53.0 - 2023-12-16 + +- [deps] update `eslint` to version `8.56.0` + +## 5.52.0 - 2023-12-03 + +- [deps] update `eslint` to version `8.55.0` + +## 5.51.0 - 2023-11-18 + +- [deps] update `eslint` to version `8.54.0` + +## 5.50.0 - 2023-11-05 + +- [deps] update `eslint` to version `8.53.0` + +## 5.49.0 - 2023-10-22 + +- [deps] update `eslint` to version `8.52.0` + +## 5.48.0 - 2023-10-08 + +- [deps] update `eslint` to version `8.51.0` + +## 5.47.0 - 2023-09-25 + +- [deps] update `eslint` to version `8.50.0` + +## 5.46.0 - 2023-09-11 + +- [deps] update `eslint` to version `8.49.0` + +## 5.45.0 - 2023-08-27 + +- [deps] update `eslint` to version `8.48.0` + +## 5.44.0 - 2023-08-12 + +- [deps] update `eslint` to version `8.47.0` + +## 5.43.0 - 2023-07-28 + +- [deps] update `eslint` to version `8.46.0` + +## 5.42.0 - 2023-07-17 + +- [deps] update `eslint` to version `8.45.0` + +## 5.41.1 - 2023-07-02 + +- version bump + +## 5.41.0 - 2023-07-02 + +- [deps] update `eslint` to version `8.44.0` + +## 5.40.0 - 2023-06-18 + +- [deps] update `eslint` to version `8.43.0` + +## 5.39.0 - 2023-06-04 + +- [deps] update `eslint` to version `8.42.0` + +## 5.38.0 - 2023-05-21 + +- [deps] update `eslint` to version `8.41.0` + +## 5.37.0 - 2023-05-07 + +- [deps] update `eslint` to version `8.40.0` + +## 5.36.0 - 2023-04-23 + +- [deps] update `eslint` to version `8.39.0` + +## 5.35.0 - 2023-04-09 + +- [deps] update `eslint` to version `8.38.0` + +## 5.34.0 - 2023-03-29 + +- [deps] update `eslint` to version `8.37.0` + +## 5.33.0 - 2023-03-12 + +- [deps] update `eslint` to version `8.36.0` + +## 5.32.0 - 2023-02-27 + +- [deps] update `eslint` to version `8.35.0` + +## 5.31.0 - 2023-02-12 + +- [deps] update `eslint` to version `8.34.0` + +## 5.30.0 - 2023-01-29 + +- [deps] update `eslint` to version `8.33.0` + +## 5.29.0 - 2023-01-19 + +- [breaking] disable `import/no-nodejs-modules` rule + +## 5.28.0 - 2023-01-17 + +- [deps] update `eslint` to version `8.32.0` + +## 5.27.0 - 2023-01-03 + +- [deps] update `eslint` to version `8.31.0` + +## 5.26.0 - 2022-12-18 + +- [deps] update `eslint` to version `8.30.0` + +## 5.25.0 - 2022-12-08 + +- [deps] update `eslint` to version `8.29.0` + +## 5.24.0 - 2022-11-06 + +- [deps] update `eslint` to version `8.27.0` + +## 5.23.0 - 2022-10-23 + +- [deps] update `eslint` to version `8.26.0` + +## 5.22.0 - 2022-10-11 + +- [deps] update `eslint` to version `8.25.0` + +## 5.21.0 - 2022-10-02 + +- [deps] update `eslint` to version `8.24.0` + +## 5.20.0 - 2022-09-19 + +- [deps] update `eslint` to version `8.23.1` + +## 5.19.0 - 2022-08-27 + +- [deps] update `eslint` to version `8.23.0` + +## 5.18.0 - 2022-08-14 + +- [deps] update `eslint` to version `8.22.0` + +## 5.17.0 - 2022-08-01 + +- [deps] update `eslint` to version `8.21.0` + +## 5.16.0 - 2022-07-17 + +- [deps] update `eslint` to version `8.20.0` + +## 5.15.0 - 2022-07-03 + +- [deps] update `eslint` to version `8.19.0` + +## 5.14.0 - 2022-06-19 + +- [deps] update `eslint` to version `8.18.0` + +## 5.13.0 - 2022-06-06 + +- [deps] update `eslint` to version `8.17.0` + +## 5.12.0 - 2022-05-22 + +- [deps] update `eslint` to version `8.16.0` + +## 5.11.0 - 2022-05-08 + +- [deps] update `eslint` to version `8.15.0` + +## 5.10.0 - 2022-04-26 + +- [deps] update `eslint` to version `8.14.0` + +## 5.9.0 - 2022-04-10 + +- [deps] update `eslint` to version `8.13.0` + +## 5.8.0 - 2022-03-27 + +- [deps] update `eslint` to version `8.12.0` + +## 5.7.0 - 2022-03-13 + +- [deps] update `eslint` to version `8.11.0` + +## 5.6.0 - 2022-03-01 + +- [deps] update `eslint` to version `8.10.0` + +## 5.5.0 - 2022-02-16 + +- [deps] update `eslint` to version `8.9.0` + +## 5.4.0 - 2022-01-30 + +- [deps] update `eslint` to version `8.8.0` + +## 5.3.0 - 2022-01-16 + +- [deps] update `eslint` to version `8.7.0` + +## 5.2.0 - 2022-01-06 + +- [deps] update `eslint-find-rules` to version `4.1.0` + +## 5.1.0 - 2022-01-01 + +- [deps] update `eslint` to version `8.6.0` + +## 5.0.0 - 2021-08-18 + +- [deps] update `eslint` to version `8.5.0` + +## 4.34.0 - 2021-08-01 + +- [deps] update `eslint` to version `7.32.0` + +## 4.33.0 - 2021-07-18 + +- [deps] update `eslint` to version `7.31.0` + +## 4.32.0 - 2021-07-04 + +- [deps] update `eslint` to version `7.30.0` + +## 4.31.0 - 2021-06-20 + +- [deps] update `eslint` to version `7.29.0` + +## 4.30.0 - 2021-06-06 + +- [deps] update `eslint` to version `7.28.0` + +## 4.29.0 - 2021-05-30 + +- [deps] update `eslint` to version `7.27.0` + +## 4.28.0 - 2021-05-10 + +- [deps] update `eslint` to version `7.26.0` + +## 4.27.0 - 2021-04-25 + +- [deps] update `eslint` to version `7.25.0` + +## 4.26.0 - 2021-04-11 + +- [deps] update `eslint` to version `7.24.0` + +## 4.25.0 - 2021-03-29 + +- [deps] update `eslint` to version `7.23.0` + +## 4.24.0 - 2021-03-15 + +- [deps] update `eslint` to version `7.22.0` + +## 4.23.0 - 2021-02-28 + +- [deps] update `eslint` to version `7.21.0` + +## 4.22.0 - 2021-02-14 + +- [deps] update `eslint` to version `7.20.0` + +## 4.21.0 - 2021-01-31 + +- [deps] update `eslint` to version `7.19.0` + +## 4.20.0 - 2021-01-17 + +- [deps] update `eslint` to version `7.18.0` + +## 4.19.0 - 2021-01-03 + +- [deps] update `eslint` to version `7.17.0` + +## 4.18.0 - 2020-12-21 + +- [deps] update `eslint` to version `7.16.0` + +## 4.17.0 - 2020-12-06 + +- [deps] update `eslint` to version `7.15.0` + +## 4.16.0 - 2020-11-21 + +- [deps] update `eslint` to version `7.14.0` + +## 4.15.0 - 2020-11-08 + +- [deps] update `eslint` to version `7.13.0` + +## 4.14.0 - 2020-10-27 + +- [deps] update `eslint` to version `7.12.1` + +## 4.13.0 - 2020-10-23 + +- [deps] update `eslint` to version `7.12.0` + +## 4.12.0 - 2020-10-11 + +- [deps] update `eslint` to version `7.11.0` + +## 4.11.0 - 2020-09-29 + +- [deps] update `eslint` to version `7.10.0` + +## 4.10.0 - 2020-09-23 + +- [docs] switch to NPM + +## 4.9.0 - 2020-09-13 + +- [deps] update `eslint` to version `7.9.0` + +## 4.8.0 - 2020-09-06 + +- [deps] update `eslint` to version `7.8.1` + +## 4.7.0 - 2020-09-01 + +- [deps] update `eslint` to version `7.8.0` + +## 4.6.0 - 2020-08-24 + +- [deps] update `eslint` to version `7.7.0` + +## 4.5.0 - 2020-08-02 + +- [deps] update `eslint` to version `7.6.0` + +## 4.4.0 - 2020-07-19 + +- [deps] update `eslint` to version `7.5.0` + ## 4.3.0 - 2020-07-05 - - [deps] update `eslint` to version `7.4.0` - + +- [deps] update `eslint` to version `7.4.0` + ## 4.2.0 - 2020-06-28 - - [deps] update `eslint` to version `7.3.1` - + +- [deps] update `eslint` to version `7.3.1` + ## 4.1.0 - 2020-06-21 - - [deps] update `eslint` to version `7.3.0` - + +- [deps] update `eslint` to version `7.3.0` + ## 4.0.0 - 2020-06-08 - - [deps] update `eslint` to version `7.2.0` - - [breaking] enable `node/no-callback-literal` rule - - [breaking] enable `node/global-require` rule - - [breaking] enable `node/handle-callback-err` rule - - [breaking] enable `node/no-mixed-requires` rule - - [breaking] enable `node/no-new-require` rule - - [breaking] enable `node/no-path-concat` rule - - [breaking] enable `node/no-process-env` rule - - [breaking] enable `node/no-process-exit` rule - - [breaking] enable `node/no-sync` rule - - [breaking] enable `node/callback-return` rule - + +- [deps] update `eslint` to version `7.2.0` +- [breaking] enable `node/no-callback-literal` rule +- [breaking] enable `node/global-require` rule +- [breaking] enable `node/handle-callback-err` rule +- [breaking] enable `node/no-mixed-requires` rule +- [breaking] enable `node/no-new-require` rule +- [breaking] enable `node/no-path-concat` rule +- [breaking] enable `node/no-process-env` rule +- [breaking] enable `node/no-process-exit` rule +- [breaking] enable `node/no-sync` rule +- [breaking] enable `node/callback-return` rule + ## 3.13.0 - 2020-05-11 - - [deps] update `eslint-find-rules` to version `3.5.0` - + +- [deps] update `eslint-find-rules` to version `3.5.0` + ## 3.12.0 - 2020-04-13 - - [deps] update `eslint-plugin-node` to version `11.1.0` - + +- [deps] update `eslint-plugin-node` to version `11.1.0` + ## 3.11.0 - 2019-12-30 - - [deps] update `eslint-plugin-node` to version `11.0.0` - + +- [deps] update `eslint-plugin-node` to version `11.0.0` + ## 3.10.0 - 2019-12-21 - - [deps] update `eslint` to version `6.8.0` - + +- [deps] update `eslint` to version `6.8.0` + ## 3.9.0 - 2019-12-02 - - [deps] update `eslint` to version `6.7.2` - + +- [deps] update `eslint` to version `6.7.2` + ## 3.8.0 - 2019-11-22 - - [deps] update `eslint` to version `6.7.1` - + +- [deps] update `eslint` to version `6.7.1` + ## 3.7.0 - 2019-10-27 - - [deps] update `eslint` to version `6.6.0` - + +- [deps] update `eslint` to version `6.6.0` + ## 3.6.0 - 2019-10-16 - - [deps] update `eslint` to version `6.5.1` - + +- [deps] update `eslint` to version `6.5.1` + ## 3.5.0 - 2019-09-15 - - [deps] update `eslint` to version `6.4.0` - + +- [deps] update `eslint` to version `6.4.0` + ## 3.4.0 - 2019-09-10 - - [deps] update `eslint-plugin-node` to version `10.0.0` - - [breaking] enable `node/no-exports-assign` rule - + +- [deps] update `eslint-plugin-node` to version `10.0.0` +- [breaking] enable `node/no-exports-assign` rule + ## 3.3.0 - 2019-09-02 - - [deps] update `eslint` to version `6.3.0` - - [deps] update `eslint-plugin-node` to version `9.2.0` - + +- [deps] update `eslint` to version `6.3.0` +- [deps] update `eslint-plugin-node` to version `9.2.0` + ## 3.2.0 - 2019-08-25 - - [deps] update `eslint` to version `6.2.2` - + +- [deps] update `eslint` to version `6.2.2` + ## 3.1.0 - 2019-08-22 - - [deps] update `eslint` to version `6.2.1` + +- [deps] update `eslint` to version `6.2.1` ## 3.0.0 - 2019-08-10 - - [deps] update `eslint` to version `6.1.0` - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `6.1.0` +- [docs] updates `README.md` installation guide ## 2.6.0 - 2019-07-06 - - [deps] update `eslint-plugin-node` to version `9.1.0` - - [breaking] enable `node/file-extension-in-import` rule with `{ '.js': 'never', '.jsx': 'never' }` option - - [breaking] enable `node/prefer-promises/dns` rule - - [breaking] enable `node/prefer-promises/fs` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint-plugin-node` to version `9.1.0` +- [breaking] enable `node/file-extension-in-import` rule with `{ '.js': 'never', '.jsx': 'never' }` option +- [breaking] enable `node/prefer-promises/dns` rule +- [breaking] enable `node/prefer-promises/fs` rule +- [docs] updates `README.md` installation guide ## 2.5.0 - 2019-04-11 - - [deps] update `eslint` to version `5.16.0` - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.16.0` +- [docs] updates `README.md` installation guide ## 2.4.0 - 2019-03-10 - - [deps] update `eslint` to version `5.15.1` - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.15.1` +- [docs] updates `README.md` installation guide ## 2.3.0 - 2019-01-31 - - [deps] update `eslint` to version `5.12.1` - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.12.1` +- [docs] updates `README.md` installation guide ## 2.2.0 - 2019-01-13 - - [breaking] enable `node/no-extraneous-import` rule - - [breaking] enable `node/process-exit-as-throw` rule - - [breaking] enable `node/no-unsupported-features/es-builtins` rule - - [breaking] enable `node/no-unsupported-features/node-builtins` rule - - [breaking] enable `node/no-unpublished-bin` rule - - [breaking] enable `node/no-missing-import` rule - - [breaking] enable `node/no-deprecated-api` rule + +- [breaking] enable `node/no-extraneous-import` rule +- [breaking] enable `node/process-exit-as-throw` rule +- [breaking] enable `node/no-unsupported-features/es-builtins` rule +- [breaking] enable `node/no-unsupported-features/node-builtins` rule +- [breaking] enable `node/no-unpublished-bin` rule +- [breaking] enable `node/no-missing-import` rule +- [breaking] enable `node/no-deprecated-api` rule ## 2.1.1 - 2019-01-13 - - [deps] fix `peerDependencies` versions + +- [deps] fix `peerDependencies` versions ## 2.1.0 - 2019-01-13 - - [deps] update `eslint` to version `5.12.0` - - [deps] update `eslint-plugin-node` to version `8.0.1` - - [breaking] enable `node/no-process-exit` rule - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.12.0` +- [deps] update `eslint-plugin-node` to version `8.0.1` +- [breaking] enable `node/no-process-exit` rule +- [docs] updates `README.md` installation guide ## 2.0.0 - 2018-12-19 - - [major] make this config standalone dropping direct dependency on `eslint-config-seekingalpha-base` - - [major] keep only `eslint-plugin-node` rules - - [major] remove default `env` configuration - - [major] update `parserOptions` - - [docs] updates `README.md` installation guide + +- [major] make this config standalone dropping direct dependency on `eslint-config-seekingalpha-base` +- [major] keep only `eslint-plugin-node` rules +- [major] remove default `env` configuration +- [major] update `parserOptions` +- [docs] updates `README.md` installation guide ## 1.2.0 - 2018-12-11 - - [deps] update `eslint-config-seekingalpha-base` to version `1.5.1` - - [deps] update `eslint` to version `5.10.0` - - [deps] update `eslint-plugin-array-func` to version `3.1.0` - - [deps] update `eslint-plugin-jsdoc` to version `3.14.0` - - [deps] update `eslint-plugin-node` to version `8.0.0` - - [deps] update `eslint-plugin-unicorn` to version `6.0.1` - - [deps] fix `peerDependencies` version - - [docs] updates `README.md` installation guide - - [new] `node/prefer-global/text-decoder` rule error - - [new] `node/prefer-global/text-encoder` rule error + +- [deps] update `eslint-config-seekingalpha-base` to version `1.5.1` +- [deps] update `eslint` to version `5.10.0` +- [deps] update `eslint-plugin-array-func` to version `3.1.0` +- [deps] update `eslint-plugin-jsdoc` to version `3.14.0` +- [deps] update `eslint-plugin-node` to version `8.0.0` +- [deps] update `eslint-plugin-unicorn` to version `6.0.1` +- [deps] fix `peerDependencies` version +- [docs] updates `README.md` installation guide +- [new] `node/prefer-global/text-decoder` rule error +- [new] `node/prefer-global/text-encoder` rule error ## 1.0.5 - 2018-11-20 - - [deps] update `eslint-config-seekingalpha-base` to version `1.3.2` + +- [deps] update `eslint-config-seekingalpha-base` to version `1.3.2` ## 1.0.4 - 2018-11-20 - - wrong update + +- wrong update ## 1.0.3 - 2018-10-16 - - [deps] update `eslint-config-seekingalpha-base` to version `1.3.1` + +- [deps] update `eslint-config-seekingalpha-base` to version `1.3.1` ## 1.0.2 - 2018-09-18 - - [deps] delete `eslint-config-seekingalpha-base` from peer deps + +- [deps] delete `eslint-config-seekingalpha-base` from peer deps ## 1.0.1 - 2018-09-18 - - [deps] update `eslint-config-seekingalpha-base` to version `1.3.0` + +- [deps] update `eslint-config-seekingalpha-base` to version `1.3.0` ## 1.0.0 - 2018-09-14 - - Initial commit + +- Initial commit diff --git a/eslint-configs/eslint-config-seekingalpha-node/LICENSE.md b/eslint-configs/eslint-config-seekingalpha-node/LICENSE.md index 9d1094d7..2e708102 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/LICENSE.md +++ b/eslint-configs/eslint-config-seekingalpha-node/LICENSE.md @@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/eslint-configs/eslint-config-seekingalpha-node/README.md b/eslint-configs/eslint-config-seekingalpha-node/README.md index 4598751a..4351fd5e 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/README.md +++ b/eslint-configs/eslint-config-seekingalpha-node/README.md @@ -4,40 +4,37 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ ## Installation -Install ESlint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/) with **NPM**: - - npm install eslint@7.5.0 eslint-plugin-node@11.1.0 --save-dev - -or **Yarn**: - - yarn add --dev eslint@7.5.0 eslint-plugin-node@11.1.0 +Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): + npm install eslint@9.39.2 eslint-plugin-n@18.1.0 --save-dev Install SeekingAlpha shareable ESLint: - npm install eslint-config-seekingalpha-node --save-dev - -For **Yarn**: - - yarn add --dev eslint-config-seekingalpha-node + npm install eslint-config-seekingalpha-node@latest --save-dev ## Usage This shareable config includes all rules from following plugins: -* [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) +- [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) -Simply [extend](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) the relevant .eslintrc.js configuration in your project with `seekingalpha-node` rules: +Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration: ```javascript -{ - extends: [ - 'seekingalpha-node' - ] -} +import nodeConfig from 'eslint-config-seekingalpha-node'; + +export default [ + { + plugins: { + ...nodeConfig.plugins, + }, + rules: { + ...nodeConfig.rules, + }, + }, +]; ``` ## License MIT © [SeekingAlpha](https://seekingalpha.com/) - diff --git a/eslint-configs/eslint-config-seekingalpha-node/index.js b/eslint-configs/eslint-config-seekingalpha-node/index.js index 931284a3..f2a51a55 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/index.js +++ b/eslint-configs/eslint-config-seekingalpha-node/index.js @@ -1,18 +1,6 @@ -module.exports = { - - extends: [ - - // https://github.com/mysticatea/eslint-plugin-node - './rules/eslint-plugin-node/index.js', - ], - - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - ecmaFeatures: { - impliedStrict: true, - globalReturn: false, - }, - }, +import config from './rules/eslint-plugin-n/index.js'; +export default { + plugins: config.plugins, + rules: config.rules, }; diff --git a/eslint-configs/eslint-config-seekingalpha-node/oxc.js b/eslint-configs/eslint-config-seekingalpha-node/oxc.js new file mode 100644 index 00000000..b5d44fd1 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-node/oxc.js @@ -0,0 +1,12 @@ +import config from './index.js'; +import { ESLintPluginNodeDisabled } from './rules/eslint-plugin-n/oxlint-disabled.js'; + +const oxcConfig = { + ...config, + rules: { + ...config.rules, + ...ESLintPluginNodeDisabled, + }, +}; + +export default oxcConfig; diff --git a/eslint-configs/eslint-config-seekingalpha-node/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-node/oxlint-config.js new file mode 100644 index 00000000..cd5d0525 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-node/oxlint-config.js @@ -0,0 +1,5 @@ +import nodeConfig from './rules/eslint-plugin-n/oxlint-config.js'; + +export default { + extends: [nodeConfig], +}; diff --git a/eslint-configs/eslint-config-seekingalpha-node/package.json b/eslint-configs/eslint-config-seekingalpha-node/package.json index f77da350..8cc3cc6d 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/package.json +++ b/eslint-configs/eslint-config-seekingalpha-node/package.json @@ -1,15 +1,16 @@ { "name": "eslint-config-seekingalpha-node", - "version": "4.4.0", + "version": "10.1.0", "description": "SeekingAlpha's sharable node.js ESLint config", "main": "index.js", + "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "git+https://github.com/seekingalpha/javascript" + "url": "git+https://github.com/seekingalpha/javascript.git" }, "keywords": [ "code", @@ -46,15 +47,15 @@ }, "homepage": "https://github.com/seekingalpha/javascript#readme", "engines": { - "node": ">= 7" + "node": ">= 24" }, "peerDependencies": { - "eslint": "7.5.0", - "eslint-plugin-node": "11.1.0" + "eslint": "9.39.2", + "eslint-plugin-n": "18.1.0" }, "devDependencies": { - "eslint": "7.5.0", - "eslint-find-rules": "3.6.0", - "eslint-plugin-node": "11.1.0" + "eslint": "9.39.2", + "eslint-find-rules": "5.0.0", + "eslint-plugin-n": "18.1.0" } } diff --git a/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/index.js b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/index.js new file mode 100644 index 00000000..7e6c6fcb --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/index.js @@ -0,0 +1,148 @@ +import nodePlugin from 'eslint-plugin-n'; + +export default { + plugins: { + // oxlint-disable-next-line id-length + n: nodePlugin, + }, + rules: { + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-extraneous-require.md + // migrated to ESM + 'n/no-extraneous-require': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-require.md + // migrated to ESM + 'n/no-missing-require': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/es-syntax.md + 'n/no-unsupported-features/es-syntax': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/exports-style.md + // migrated to ESM + 'n/exports-style': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/buffer.md + 'n/prefer-global/buffer': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/crypto.md + 'n/prefer-global/crypto': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/console.md + 'n/prefer-global/console': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/process.md + 'n/prefer-global/process': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/timers.md + 'n/prefer-global/timers': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/url-search-params.md + 'n/prefer-global/url-search-params': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/url.md + 'n/prefer-global/url': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-extraneous-import.md + // disabled in favour of import/no-extraneous-dependencies + 'n/no-extraneous-import': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/process-exit-as-throw.md + 'n/process-exit-as-throw': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-top-level-await.md + 'n/no-top-level-await': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/es-builtins.md + 'n/no-unsupported-features/es-builtins': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/node-builtins.md + 'n/no-unsupported-features/node-builtins': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unpublished-bin.md + 'n/no-unpublished-bin': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-import.md + // disabled in favor of import/no-unresolved + 'n/no-missing-import': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unpublished-import.md + 'n/no-unpublished-import': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unpublished-require.md + 'n/no-unpublished-require': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-deprecated-api.md + 'n/no-deprecated-api': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-callback-literal.md + 'n/no-callback-literal': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/global-require.md + // migrated to ESM + 'n/global-require': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/handle-callback-err.md + 'n/handle-callback-err': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-mixed-requires.md + // migrated to ESM + 'n/no-mixed-requires': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-new-require.md + // migrated to ESM + 'n/no-new-require': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-path-concat.md + 'n/no-path-concat': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-env.md + 'n/no-process-env': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-restricted-import.md + 'n/no-restricted-import': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-restricted-require.md + 'n/no-restricted-require': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-exit.md + // prefer unicorn + 'n/no-process-exit': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-sync.md + // requires type checking + 'n/no-sync': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/callback-return.md + 'n/callback-return': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/shebang.md + 'n/shebang': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/text-decoder.md + 'n/prefer-global/text-decoder': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/text-encoder.md + 'n/prefer-global/text-encoder': ['error', 'always'], + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/file-extension-in-import.md + // disabled in favour of import/extensions + 'n/file-extension-in-import': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-promises/dns.md + 'n/prefer-promises/dns': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-promises/fs.md + 'n/prefer-promises/fs': 'error', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-exports-assign.md + // migrated to ESM + 'n/no-exports-assign': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/hashbang.md + 'n/hashbang': 'off', + + // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-node-protocol.md + // prefer unicorn + 'n/prefer-node-protocol': 'off', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/oxlint-config.js new file mode 100644 index 00000000..1775f418 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/oxlint-config.js @@ -0,0 +1,12 @@ +export default { + plugins: ['node'], + rules: { + 'node/callback-return': 'off', + 'node/global-require': 'off', + 'node/handle-callback-err': 'off', + 'node/no-exports-assign': 'off', + 'node/no-new-require': 'off', + 'node/no-path-concat': 'error', + 'node/no-process-env': 'error', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/oxlint-disabled.js new file mode 100644 index 00000000..8d384305 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-n/oxlint-disabled.js @@ -0,0 +1,9 @@ +export const ESLintPluginNodeDisabled = { + 'n/callback-return': 'off', + 'n/global-require': 'off', + 'n/handle-callback-err': 'off', + 'n/no-exports-assign': 'off', + 'n/no-new-require': 'off', + 'n/no-path-concat': 'off', + 'n/no-process-env': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-node/index.js b/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-node/index.js deleted file mode 100644 index 153fb2b9..00000000 --- a/eslint-configs/eslint-config-seekingalpha-node/rules/eslint-plugin-node/index.js +++ /dev/null @@ -1,148 +0,0 @@ -module.exports = { - plugins: ['node'], - - rules: { - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-require.md - 'node/no-extraneous-require': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md - 'node/no-missing-require': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-syntax.md - 'node/no-unsupported-features/es-syntax': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/exports-style.md - 'node/exports-style': [ - 'error', - 'module.exports', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/buffer.md - 'node/prefer-global/buffer': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/console.md - 'node/prefer-global/console': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/process.md - 'node/prefer-global/process': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/url-search-params.md - 'node/prefer-global/url-search-params': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/url.md - 'node/prefer-global/url': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md - 'node/no-extraneous-import': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/process-exit-as-throw.md - 'node/process-exit-as-throw': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-builtins.md - 'node/no-unsupported-features/es-builtins': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/node-builtins.md - 'node/no-unsupported-features/node-builtins': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-bin.md - 'node/no-unpublished-bin': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md - 'node/no-missing-import': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md - 'node/no-unpublished-import': 'off', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-require.md - 'node/no-unpublished-require': 'off', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md - 'node/no-deprecated-api': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-callback-literal.md - 'node/no-callback-literal': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/global-require.md - 'node/global-require': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/handle-callback-err.md - 'node/handle-callback-err': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-mixed-requires.md - 'node/no-mixed-requires': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-new-require.md - 'node/no-new-require': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-path-concat.md - 'node/no-path-concat': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-env.md - 'node/no-process-env': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-import.md - 'node/no-restricted-import': 'off', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-require.md - 'node/no-restricted-require': 'off', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-exit.md - 'node/no-process-exit': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-sync.md - 'node/no-sync': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/callback-return.md - 'node/callback-return': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/shebang.md - 'node/shebang': 'off', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/text-decoder.md - 'node/prefer-global/text-decoder': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/text-encoder.md - 'node/prefer-global/text-encoder': [ - 'error', - 'always', - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/file-extension-in-import.md - 'node/file-extension-in-import': [ - 'error', - 'always', - { - '.js': 'never', - '.jsx': 'never', - }, - ], - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-promises/dns.md - 'node/prefer-promises/dns': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-promises/fs.md - 'node/prefer-promises/fs': 'error', - - // https://github.com/mysticatea/eslint-plugin-node/blob/HEAD/docs/rules/no-exports-assign.md - 'node/no-exports-assign': 'error', - }, -}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-qa/CHANGELOG.md deleted file mode 100644 index 4e7e28c2..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/CHANGELOG.md +++ /dev/null @@ -1,84 +0,0 @@ -# Change Log - -## 3.4.0 - 2019-07-19 - - [deps] update `eslint` to version `7.5.0` - -## 3.3.0 - 2019-07-05 - - [deps] update `eslint` to version `7.4.0` - -## 3.2.0 - 2019-06-28 - - [deps] update `eslint` to version `7.3.1` - -## 3.1.0 - 2019-06-21 - - [deps] update `eslint` to version `7.3.0` - -## 3.0.0 - 2019-06-08 - - [deps] update `eslint` to version `7.2.0` - - [deps] update `eslint-plugin-mocha` to version `7.0.1` - -## 2.13.0 - 2019-05-11 - - [deps] update `eslint-find-rules` to version `3.5.0` - -## 2.12.0 - 2019-02-23 - - [deps] update `eslint-plugin-mocha` to version `6.3.0` - -## 2.11.0 - 2019-12-21 - - [deps] update `eslint` to version `6.8.0` - -## 2.10.0 - 2019-12-02 - - [deps] update `eslint` to version `6.7.2` - -## 2.9.0 - 2019-11-27 - - [deps] update `eslint` to version `6.7.1` - - [deps] update `eslint-plugin-mocha` to version `6.2.2` - -## 2.8.0 - 2019-10-29 - - [deps] update `eslint-plugin-mocha` to version `6.2.1` - -## 2.7.0 - 2019-10-27 - - [deps] update `eslint` to version `6.6.0` - -## 2.6.0 - 2019-10-16 - - [deps] update `eslint` to version `6.5.1` - - [deps] update `eslint-plugin-mocha` to version `6.2.0` - -## 2.5.0 - 2019-09-22 - - [deps] update `eslint-plugin-protractor` to version `2.1.1` - - [breaking] enable `protractor/empty-script` rule - -## 2.4.0 - 2019-09-15 - - [deps] update `eslint` to version `6.4.0` - - [deps] update `eslint-plugin-mocha` to version `6.1.1` - -## 2.3.0 - 2019-08-02 - - [deps] update `eslint` to version `6.3.0` - -## 2.2.0 - 2018-08-25 - - [deps] update `eslint` to version `6.2.2` - -## 2.1.0 - 2018-08-22 - - [deps] update `eslint` to version `6.2.1` - - [deps] update `eslint-plugin-mocha` to version `6.1.0` - -## 2.0.1 - 2018-08-10 - - [breaking] disable broken `protractor/empty-script` rule - -## 2.0.0 - 2018-08-10 - - [deps] update `eslint` to version `6.1.0` - - [deps] update `eslint-plugin-protractor` to version `2.1.0` - - [breaking] enable `protractor/empty-script` rule - -## 1.3.0 - 2018-07-29 - - [deps] update `eslint-plugin-mocha` to version `5.3.0` - - [deps] update `eslint-plugin-protractor` to version `2.0.0` - - [breaking] enable `mocha/no-return-from-async` rule - -## 1.2.0 - 2018-07-17 - - [breaking] revert `mocha/valid-suite-description` validation regex to `^[A-Z]` - - [breaking] `mocha/valid-test-description` updated validation regex to be `^[A-Z]\\d+: should` - -## 1.1.0 - 2018-07-17 - - [breaking] `mocha/valid-suite-description` updated validation regex to be `^[A-Z]\\d+: should` - -## 1.0.0 - 2018-07-11 - - Initial commit diff --git a/eslint-configs/eslint-config-seekingalpha-qa/README.md b/eslint-configs/eslint-config-seekingalpha-qa/README.md deleted file mode 100644 index 9bd0895f..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# eslint-config-seekingalpha-qa - -This package includes the shareable ESLint config used by [SeekingAlpha](https://seekingalpha.com/). - -## Installation - -Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/) with **NPM**: - - npm install eslint@7.5.0 eslint-plugin-protractor@2.1.1 eslint-plugin-mocha@7.0.1 --save-dev - -or **Yarn**: - - yarn add --dev eslint@7.5.0 eslint-plugin-protractor@2.1.1 eslint-plugin-mocha@7.0.1 - - -Install SeekingAlpha shareable ESLint: - - npm install eslint-config-seekingalpha-qa --save-dev - -For **Yarn**: - - yarn add --dev eslint-config-seekingalpha-qa - -## Usage - -This shareable config includes all rules from following plugins: - -* [eslint-plugin-protractor](https://github.com/alecxe/eslint-plugin-protractor) -* [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) - -Simply [extend](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) the relevant .eslintrc.js configuration in your project with `seekingalpha-qa` rules: - -```javascript -{ - extends: [ - 'seekingalpha-qa' - ] -} -``` - -## License - -MIT © [SeekingAlpha](https://seekingalpha.com/) - diff --git a/eslint-configs/eslint-config-seekingalpha-qa/index.js b/eslint-configs/eslint-config-seekingalpha-qa/index.js deleted file mode 100644 index 64a7c89f..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/index.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - - extends: [ - - // https://github.com/alecxe/eslint-plugin-protractor - './rules/eslint-plugin-protractor/index.js', - - // https://github.com/lo1tuma/eslint-plugin-mocha - './rules/eslint-plugin-mocha/index.js', - ], - - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - ecmaFeatures: { - impliedStrict: true, - globalReturn: false, - }, - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-mocha/index.js b/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-mocha/index.js deleted file mode 100644 index fceda460..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-mocha/index.js +++ /dev/null @@ -1,82 +0,0 @@ -module.exports = { - - plugins: ['mocha'], - - rules: { - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/handle-done-callback.md - 'mocha/handle-done-callback': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/max-top-level-suites.md - 'mocha/max-top-level-suites': [ - 'error', - { - limit: 2, - }, - ], - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-exclusive-tests.md - 'mocha/no-exclusive-tests': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-global-tests.md - 'mocha/no-global-tests': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-hooks.md - 'mocha/no-hooks': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-hooks-for-single-case.md - 'mocha/no-hooks-for-single-case': 'off', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-identical-title.md - 'mocha/no-identical-title': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-mocha-arrows.md - 'mocha/no-mocha-arrows': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-nested-tests.md - 'mocha/no-nested-tests': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-pending-tests.md - 'mocha/no-pending-tests': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-return-and-callback.md - 'mocha/no-return-and-callback': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-setup-in-describe.md - 'mocha/no-setup-in-describe': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-sibling-hooks.md - 'mocha/no-sibling-hooks': 'off', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-skipped-tests.md - 'mocha/no-skipped-tests': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-synchronous-tests.md - 'mocha/no-synchronous-tests': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-top-level-hooks.md - 'mocha/no-top-level-hooks': 'off', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/prefer-arrow-callback.md - 'mocha/prefer-arrow-callback': 'off', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/valid-suite-description.md - 'mocha/valid-suite-description': [ - 'error', - '^[A-Z]', - ], - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/valid-test-description.md - 'mocha/valid-test-description': [ - 'error', - '^[A-Z]\\d+: should', - ], - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-async-describe.md - 'mocha/no-async-describe': 'error', - - // https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-return-from-async.md - 'mocha/no-return-from-async': 'error', - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/api.js b/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/api.js deleted file mode 100644 index 05b88a8b..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/api.js +++ /dev/null @@ -1,38 +0,0 @@ -// https://github.com/alecxe/eslint-plugin-protractor#correct-protractor-api-usage-and-common-errors - -module.exports = { - - rules: { - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/missing-perform.md - 'protractor/missing-perform': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/correct-chaining.md - 'protractor/correct-chaining': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-array-finder-methods.md - 'protractor/no-array-finder-methods': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/array-callback-return.md - 'protractor/array-callback-return': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-get-inner-outer-html.md - 'protractor/no-get-inner-outer-html': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-get-raw-id.md - 'protractor/no-get-raw-id': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-get-location-abs-url.md - 'protractor/no-get-location-abs-url': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-promise-in-if.md - 'protractor/no-promise-in-if': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/bare-element-finders.md - 'protractor/bare-element-finders': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/empty-script.md - 'protractor/empty-script': 'error', - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/index.js b/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/index.js deleted file mode 100644 index e0d14fb4..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/index.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - - plugins: ['protractor'], - - extends: [ - './api.js', - './locating_elements.js', - './style_guide.js', - ], - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/locating_elements.js b/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/locating_elements.js deleted file mode 100644 index 80e84ab8..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/locating_elements.js +++ /dev/null @@ -1,52 +0,0 @@ -// https://github.com/alecxe/eslint-plugin-protractor#locating-elements - -const MAX_SELECTORS_DEPTH = 3; - -module.exports = { - - rules: { - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-invalid-selectors.md - 'protractor/no-invalid-selectors': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/valid-locator-type.md - 'protractor/valid-locator-type': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-compound-classes.md - 'protractor/no-compound-classes': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-angular-classes.md - 'protractor/no-angular-classes': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/use-angular-locators.md - 'protractor/use-angular-locators': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-angular-attributes.md - 'protractor/no-angular-attributes': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-bootstrap-classes.md - 'protractor/no-bootstrap-classes': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/use-simple-repeaters.md - 'protractor/use-simple-repeaters': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-repetitive-locators.md - 'protractor/no-repetitive-locators': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-repetitive-selectors.md - 'protractor/no-repetitive-selectors': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/valid-by-id.md - 'protractor/valid-by-id': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/valid-by-tagname.md - 'protractor/valid-by-tagname': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/limit-selector-depth.md - 'protractor/limit-selector-depth': [ - 'error', - MAX_SELECTORS_DEPTH, - ], - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/style_guide.js b/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/style_guide.js deleted file mode 100644 index f300152a..00000000 --- a/eslint-configs/eslint-config-seekingalpha-qa/rules/eslint-plugin-protractor/style_guide.js +++ /dev/null @@ -1,53 +0,0 @@ -// https://github.com/alecxe/eslint-plugin-protractor#style-guide-recommendations-and-best-practices - -module.exports = { - - rules: { - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/missing-wait-message.md - 'protractor/missing-wait-message': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-by-xpath.md - 'protractor/no-by-xpath': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-get-in-it.md - 'protractor/no-get-in-it': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-execute-script.md - 'protractor/no-execute-script': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-expect-in-po.md - 'protractor/no-expect-in-po': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-absolute-url.md - 'protractor/no-absolute-url': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/use-first-last.md - 'protractor/use-first-last': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-shadowing.md - 'protractor/no-shadowing': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/use-count-method.md - 'protractor/use-count-method': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/use-promise-all.md - 'protractor/use-promise-all': 'off', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/by-css-shortcut.md - 'protractor/by-css-shortcut': 'off', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-describe-selectors.md - 'protractor/no-describe-selectors': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-browser-pause.md - 'protractor/no-browser-pause': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-browser-sleep.md - 'protractor/no-browser-sleep': 'error', - - // https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-browser-driver.md - 'protractor/no-browser-driver': 'off', - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md index 31414f10..7ce77905 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md @@ -1,418 +1,1541 @@ # Change Log +## 10.39.3 - 2026-06-16 + +- [new] extend oxlint config + +## 10.39.2 - 2026-06-16 + +- [new] extend oxlint config + +## 10.39.1 - 2026-06-16 + +- [new] extend oxlint config + +## 10.39.0 - 2026-05-19 + +- [new] extend oxlint config + +## 10.38.0 - 2026-05-15 + +- [new] extend oxlint config + +## 10.37.0 - 2026-05-12 + +- [new] extend oxlint config + +## 10.36.0 - 2026-05-05 + +- [new] extend oxlint config + +## 10.35.0 - 2026-04-27 + +- [new] extend oxlint config + +## 10.34.0 - 2026-04-17 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `7.1.1` + +## 10.33.0 - 2026-04-17 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `7.1.0` + +## 10.32.0 - 2026-04-07 + +- [new] extend oxlint config + +## 10.31.1 - 2026-03-12 + +- [new] extend oxlint config + +## 10.31.0 - 2026-03-12 + +- [new] extend oxlint config + +## 10.30.1 - 2026-03-10 + +- [new] extend oxlint config + +## 10.30.0 - 2026-03-10 + +- [new] extend oxlint config + +## 10.29.0 - 2026-03-10 + +- [new] extend oxlint config + +## 10.28.2 - 2026-02-02 + +- [new] extend oxlint config + +## 10.28.1 - 2026-02-02 + +- [new] extend oxlint config + +## 10.28.0 - 2026-02-02 + +- [new] extend oxlint config + +## 10.27.0 - 2026-01-27 + +- [new] add sharable oxlint config with eslint-plugin-jsx-a11y and eslint-plugin-react-hooks rules + +## 10.26.0 - 2026-01-27 + +- [new] add sharable oxlint config with eslint-plugin-react rules + +## 10.25.0 - 2025-12-13 + +- [deps] upgrade `eslint` to version `9.39.2` + +## 10.24.0 - 2025-11-04 + +- [breaking] extend `eslint-plugin-react-hooks` rules + +## 10.23.0 - 2025-11-04 + +- [deps] upgrade `eslint` to version `9.39.1` + +## 10.22.0 - 2025-11-01 + +- [deps] upgrade `eslint` to version `9.39.0` + +## 10.21.0 - 2025-10-29 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `7.0.1` + +## 10.20.0 - 2025-10-18 + +- [deps] upgrade `eslint` to version `9.38.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `7.0.0` + +## 10.19.0 - 2025-10-06 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `6.1.1` + +## 10.18.0 - 2025-10-04 + +- [deps] upgrade `eslint` to version `9.37.0` + +## 10.17.0 - 2025-10-02 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `6.1.0` + +## 10.16.0 - 2025-09-20 + +- [deps] upgrade `eslint` to version `9.36.0` + +## 10.15.0 - 2025-09-05 + +- [deps] upgrade `eslint` to version `9.35.0` + +## 10.14.0 - 2025-08-23 + +- [deps] upgrade `eslint` to version `9.34.0` + +## 10.13.0 - 2025-08-09 + +- [deps] upgrade `eslint` to version `9.33.0` + +## 10.12.0 - 2025-07-26 + +- [deps] upgrade `eslint` to version `9.32.0` + +## 10.11.0 - 2025-07-13 + +- [deps] upgrade `eslint` to version `9.31.0` + +## 10.10.0 - 2025-07-02 + +- [deps] upgrade `eslint` to version `9.30.1` + +## 10.9.0 - 2025-06-28 + +- [deps] upgrade `eslint` to version `9.30.0` + +## 10.8.0 - 2025-06-14 + +- [deps] upgrade `eslint` to version `9.29.0` + +## 10.7.0 - 2025-05-31 + +- [deps] upgrade `eslint` to version `9.28.0` + +## 10.6.0 - 2025-05-17 + +- [deps] upgrade `eslint` to version `9.27.0` + +## 10.5.0 - 2025-05-03 + +- [deps] upgrade `eslint` to version `9.26.0` + +## 10.4.0 - 2025-04-22 + +- [deps] upgrade `eslint` to version `9.25.1` + +## 10.3.0 - 2025-04-21 + +- [deps] upgrade `eslint` to version `9.25.0` + +## 10.2.0 - 2025-04-06 + +- [deps] upgrade `eslint` to version `9.24.0` +- [deps] upgrade `eslint-plugin-react` to version `7.37.5` + +## 10.1.0 - 2025-03-22 + +- [deps] upgrade `eslint` to version `9.23.0` + +## 10.0.0 - 2025-03-09 + +- [deps] upgrade `eslint` to version `9.22.0` + +## 9.0.2 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 9.0.1 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 9.0.0 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 8.0.0 - 2025-03-07 + +- [new] expose flat config + +## 7.49.0 - 2025-03-01 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `5.2.0` + +## 7.48.0 - 2025-01-23 + +- [deps] upgrade `eslint` to version `8.57.1` + +## 7.47.0 - 2025-01-14 + +- [deps] upgrade `eslint-plugin-react` to version `7.37.4` + +## 7.46.0 - 2024-12-24 + +- [deps] upgrade `eslint-plugin-react` to version `7.37.3` + +## 7.45.0 - 2024-12-08 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `5.1.0` + +## 7.44.0 - 2024-10-26 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.10.2` + +## 7.43.0 - 2024-10-23 + +- [deps] upgrade `eslint-plugin-react` to version `7.37.2` + +## 7.42.0 - 2024-10-21 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.10.1` + +## 7.41.0 - 2024-10-12 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `5.0.0` + +## 7.40.0 - 2024-10-04 + +- [deps] upgrade `eslint-plugin-react` to version `7.37.1` + +## 7.39.0 - 2024-09-27 + +- [deps] upgrade `eslint-plugin-react` to version `7.37.0` + +## 7.38.0 - 2024-09-13 + +- [deps] upgrade `eslint-plugin-react` to version `7.36.1` + +## 7.37.0 - 2024-09-12 + +- [deps] upgrade `eslint-plugin-react` to version `7.36.0` + +## 7.36.0 - 2024-09-04 + +- [deps] upgrade `eslint-plugin-react` to version `7.35.2` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.10.0` + +## 7.35.0 - 2024-09-03 + +- [deps] upgrade `eslint-plugin-react` to version `7.35.1` + +## 7.34.0 - 2024-07-20 + +- [deps] upgrade `eslint-plugin-react` to version `7.35.0` +- [breaking] introduce `react/jsx-props-no-spread-multi` rule + +## 7.33.0 - 2024-07-14 + +- [deps] upgrade `eslint-plugin-react` to version `7.34.4` + +## 7.32.0 - 2024-06-22 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.9.0` + +## 7.31.0 - 2024-06-19 + +- [deps] upgrade `eslint-plugin-react` to version `7.34.3` + +## 7.30.0 - 2024-05-28 + +- [deps] upgrade `eslint-plugin-react` to version `7.34.2` + +## 7.29.0 - 2024-04-27 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.6.2` + +## 7.28.0 - 2024-04-26 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.6.1` + +## 7.27.0 - 2024-03-17 + +- [deps] upgrade `eslint-plugin-react` to version `7.34.1` + +## 7.26.0 - 2024-03-04 + +- [deps] upgrade `eslint-plugin-react` to version `7.34.0` + +## 7.25.0 - 2024-02-25 + +- [deps] upgrade `eslint` to version `8.57.0` + +## 7.24.0 - 2023-12-16 + +- [deps] upgrade `eslint` to version `8.56.0` + +## 7.23.0 - 2023-12-03 + +- [deps] upgrade `eslint` to version `8.55.0` + +## 7.22.0 - 2023-11-18 + +- [deps] upgrade `eslint` to version `8.54.0` + +## 7.21.0 - 2023-11-05 + +- [deps] upgrade `eslint` to version `8.53.0` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.8.0` + +## 7.20.0 - 2023-10-22 + +- [deps] upgrade `eslint` to version `8.52.0` + +## 7.19.0 - 2023-10-08 + +- [deps] upgrade `eslint` to version `8.51.0` + +## 7.18.0 - 2023-09-25 + +- [deps] upgrade `eslint` to version `8.50.0` + +## 7.17.0 - 2023-09-11 + +- [deps] upgrade `eslint` to version `8.49.0` + +## 7.16.0 - 2023-08-27 + +- [deps] upgrade `eslint` to version `8.48.0` + +## 7.15.0 - 2023-08-16 + +- [deps] upgrade `eslint-plugin-react` to version `7.33.2` + +## 7.14.0 - 2023-08-12 + +- [deps] upgrade `eslint` to version `8.47.0` + +## 7.13.0 - 2023-08-04 + +- [patch] delete `style` and `name` from forbidden dom props + +## 7.12.0 - 2023-07-30 + +- [deps] upgrade `eslint-plugin-react` to version `7.33.1` + +## 7.11.0 - 2023-07-28 + +- [deps] upgrade `eslint` to version `8.46.0` + +## 7.10.0 - 2023-07-25 + +- [breaking] drop `class-methods-use-this` extension rule + +## 7.9.0 - 2023-07-20 + +- [deps] upgrade `eslint-plugin-react` to version `7.33.0` + +## 7.8.0 - 2023-07-17 + +- [deps] upgrade `eslint` to version `8.45.0` + +## 7.7.0 - 2023-07-02 + +- [deps] upgrade `eslint` to version `8.44.0` + +## 7.6.0 - 2023-06-18 + +- [deps] upgrade `eslint` to version `8.43.0` + +## 7.5.0 - 2023-06-04 + +- [deps] upgrade `eslint` to version `8.42.0` + +## 7.4.0 - 2023-05-21 + +- [deps] upgrade `eslint` to version `8.41.0` + +## 7.3.0 - 2023-05-07 + +- [deps] upgrade `eslint` to version `8.40.0` + +## 7.2.0 - 2023-04-23 + +- [deps] upgrade `eslint` to version `8.39.0` + +## 7.1.0 - 2023-04-09 + +- [deps] upgrade `eslint` to version `8.38.0` + +## 7.0.0 - 2023-03-29 + +- introduce `eslint-config-seekingalpha-react/prettier` config +- [deps] upgrade `eslint` to version `8.37.0` + +## 6.9.0 - 2023-03-12 + +- [deps] upgrade `eslint` to version `8.36.0` + +## 6.8.0 - 2023-02-27 + +- [deps] upgrade `eslint` to version `8.35.0` + +## 6.7.0 - 2023-02-12 + +- [deps] upgrade `eslint` to version `8.34.0` + +## 6.6.1 - 2023-01-29 + +- [deps] upgrade `eslint-plugin-react` to version `7.32.2` + +## 6.6.0 - 2023-01-29 + +- [deps] upgrade `eslint` to version `8.33.0` + +## 6.5.0 - 2023-01-17 + +- [deps] upgrade `eslint` to version `8.32.0` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.7.1` +- [deps] upgrade `eslint-plugin-react` to version `7.32.1` + +## 6.4.0 - 2023-01-11 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.7.0` +- [deps] upgrade `eslint-plugin-react` to version `7.32.0` +- [breaking] update `react/hook-use-state` rule +- [breaking] introduce `jsx-a11y/prefer-tag-over-role` rule +- [breaking] introduce `react/no-object-type-as-default-prop` rule +- [breaking] `react/jsx-sort-default-props` deprecated, replace with `react/sort-default-props` + +## 6.3.0 - 2023-01-03 + +- [deps] upgrade `eslint` to version `8.31.0` + +## 6.2.0 - 2022-12-18 + +- [deps] upgrade `eslint` to version `8.30.0` + +## 6.1.2 - 2022-12-13 + +- [breaking] `react/jsx-no-useless-fragment` - allow fragment expressions + +## 6.1.1 - 2022-12-10 + +- [breaking] `react/jsx-filename-extension` - `.tsx` support + +## 6.1.0 - 2022-12-08 + +- [deps] upgrade `eslint` to version `8.29.0` +- [deps] upgrade `eslint-plugin-react` to version `7.31.11` + +## 6.0.0 - 2022-11-17 + +- [deps] remove `eslint-plugin-flowtype` +- [breaking] drop `Flow` rules + +## 5.36.0 - 2022-11-06 + +- [deps] upgrade `eslint` to version `8.27.0` + +## 5.35.0 - 2022-10-23 + +- [deps] upgrade `eslint` to version `8.26.0` + +## 5.34.0 - 2022-10-11 + +- [deps] upgrade `eslint` to version `8.25.0` +- [deps] upgrade `eslint-plugin-react` to version `7.31.10` + +## 5.33.0 - 2022-10-02 + +- [deps] upgrade `eslint` to version `8.24.0` + +## 5.32.0 - 2022-09-19 + +- [deps] upgrade `eslint` to version `8.23.1` +- [deps] upgrade `eslint-plugin-react` to version `7.31.8` + +## 5.31.0 - 2022-09-04 + +- [deps] upgrade `eslint-plugin-react` to version `7.31.5` + +## 5.30.0 - 2022-08-27 + +- [deps] upgrade `eslint` to version `8.23.0` +- [deps] upgrade `eslint-plugin-react` to version `7.31.1` + +## 5.29.0 - 2022-08-25 + +- [deps] upgrade `eslint-plugin-react` to version `7.31.0` + +## 5.28.0 - 2022-08-14 + +- [deps] upgrade `eslint` to version `8.22.0` + +## 5.27.0 - 2022-08-01 + +- [deps] upgrade `eslint` to version `8.21.0` + +## 5.26.0 - 2022-07-24 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.6.1` + +## 5.25.0 - 2022-07-17 + +- [deps] upgrade `eslint` to version `8.20.0` + +## 5.24.0 - 2022-07-03 + +- [deps] upgrade `eslint` to version `8.19.0` + +## 5.23.0 - 2022-06-26 + +- [deps] upgrade `eslint-plugin-react` to version `7.30.1` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.6.0` + +## 5.22.0 - 2022-06-19 + +- [deps] upgrade `eslint` to version `8.18.0` + +## 5.21.0 - 2022-06-15 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.6.0` + +## 5.20.0 - 2022-06-06 + +- [deps] upgrade `eslint` to version `8.17.0` + +## 5.19.0 - 2022-05-22 + +- [deps] upgrade `eslint` to version `8.16.0` + +## 5.18.0 - 2022-05-19 + +- [deps] upgrade `eslint-plugin-react` to version `7.30.0` +- [breaking] enable `react/jsx-no-leaked-render` rule + +## 5.17.0 - 2022-05-08 + +- [deps] upgrade `eslint` to version `8.15.0` + +## 5.16.0 - 2022-04-27 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.5.0` + +## 5.15.0 - 2022-04-26 + +- [deps] upgrade `eslint` to version `8.14.0` + +## 5.14.0 - 2022-04-10 + +- [deps] upgrade `eslint` to version `8.13.0` + +## 5.13.0 - 2022-04-03 + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.4.0` + +## 5.12.0 - 2022-03-27 + +- [deps] upgrade `eslint` to version `8.12.0` + +## 5.11.0 - 2022-03-14 + +- [deps] upgrade `eslint-plugin-react` to version `7.29.4` + +## 5.10.0 - 2022-03-13 + +- [deps] upgrade `eslint` to version `8.11.0` + +## 5.9.0 - 2022-03-06 + +- [deps] upgrade `eslint-plugin-react` to version `7.29.3` + +## 5.8.0 - 2022-03-02 + +- [deps] upgrade `eslint` to version `8.10.0` +- [deps] upgrade `eslint-plugin-react` to version `7.29.2` +- [breaking] enable `react/hook-use-state` rule +- [breaking] enable `react/iframe-missing-sandbox` rule + +## 5.7.0 - 2022-02-16 + +- [deps] upgrade `eslint` to version `8.9.0` + +## 5.6.0 - 2022-01-30 + +- [deps] upgrade `eslint` to version `8.8.0` + +## 5.5.0 - 2022-01-16 + +- [breaking] separate `eslint-plugin-jest` plugin to `eslint-config-seekingalpha-tests` sharable config + +## 5.4.0 - 2022-01-16 + +- [deps] upgrade `eslint` to version `8.7.0` +- [deps] upgrade `eslint-plugin-jest` to version `25.3.4` +- [breaking] enable `jest/prefer-comparison-matcher` rule +- [breaking] enable `jest/prefer-equality-matcher` rule + +## 5.3.0 - 2022-01-06 + +- [deps] update `eslint-find-rules` to version `4.1.0` + +## 5.2.0 - 2022-01-01 + +- [deps] upgrade `eslint` to version `8.6.0` +- [deps] upgrade `eslint-plugin-jest` to version `25.3.4` + +## 5.1.0 - 2021-12-23 + +- [deps] upgrade `eslint-plugin-react` to version `7.28.0` + +## 5.0.0 - 2021-12-18 + +- [deps] upgrade `eslint` to version `8.5.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `8.0.3` + +## 4.93.0 - 2021-11-23 + +- [deps] upgrade `eslint-plugin-jest` to version `25.3.0` + +## 4.92.0 - 2021-11-22 + +- [deps] upgrade `eslint-plugin-react` to version `7.27.1` + +## 4.91.0 - 2021-11-11 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.5.1` +- [breaking] removed deprecated `jsx-a11y/accessible-emoji` rule + +## 4.90.0 - 2021-11-10 + +- [deps] upgrade `eslint-plugin-jest` to version `25.2.4` +- [deps] upgrade `eslint-plugin-react` to version `7.27.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.3.0` + +## 4.89.0 - 2021-11-07 + +- [deps] upgrade `eslint-plugin-jest` to version `25.2.3` + +## 4.88.0 - 2021-10-19 + +- [deps] upgrade `eslint-plugin-flowtype` to version `6.1.1` + +## 4.87.0 - 2021-10-18 + +- [deps] upgrade `eslint-plugin-jest` to version `25.2.2` + +## 4.86.0 - 2021-10-10 + +- [deps] upgrade `eslint-plugin-jest` to version `25.0.6` +- [patch: loosen rules] drop `id` from `react/forbid-dom-props` rule + +## 4.85.0 - 2021-10-10 + +- [deps] upgrade `eslint-plugin-jest` to version `25.0.5` + +## 4.84.0 - 2021-10-10 + +- [deps] upgrade `eslint-plugin-jest` to version `25.0.1` + +## 4.83.1 - 2021-10-10 + +- [breaking] update `jest/no-restricted-matchers` rule + +## 4.83.0 - 2021-10-10 + +- [deps] upgrade `eslint-plugin-jest` to version `24.7.0` + +## 4.82.0 - 2021-10-10 + +- [deps] upgrade `eslint-plugin-jest` to version `24.6.0` + +## 4.81.0 - 2021-10-03 + +- [deps] upgrade `eslint-plugin-jest` to version `24.5.2` + +## 4.80.0 - 2021-10-03 + +- [patch] fixed `jest/no-restricted-matchers` rule according to `jest/prefer-expect-resolves` + +## 4.79.0 - 2021-10-03 + +- [deps] upgrade `eslint-plugin-react` to version `7.26.1` +- [deps] upgrade `eslint-plugin-flowtype` to version `6.1.0` +- [deps] upgrade `eslint-plugin-jest` to version `24.5.0` +- [breaking] enable `react/no-namespace` rule +- [breaking] enable `jest/prefer-expect-resolves` rule +- [breaking] enable `jest/prefer-to-be` rule +- [breaking] disable `react/default-props-match-prop-types` rule +- [breaking] disable `react/forbid-foreign-prop-types` rule +- [breaking] disable `react/forbid-prop-types` rule +- [breaking] disable `react/no-unused-prop-types` rule +- [breaking] disable `react/prop-types` rule +- [breaking] update `class-methods-use-this` rule + +## 4.78.0 - 2021-09-19 + +- [deps] upgrade `eslint-plugin-react` to version `7.25.2` +- [deps] upgrade `eslint-plugin-flowtype` to version `6.0.1` +- [deps] upgrade `eslint-plugin-jest` to version `24.4.2` + +## 4.77.0 - 2021-09-14 + +- [deps] upgrade `eslint-plugin-react` to version `7.25.2` + +## 4.76.0 - 2021-08-30 + +- [deps] upgrade `eslint-plugin-react` to version `7.25.1` + +## 4.75.0 - 2021-08-29 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.9.1` +- [deps] upgrade `eslint-plugin-react` to version `7.25.0` + +## 4.74.0 - 2021-08-05 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.9.0` + +## 4.73.0 - 2021-08-01 + +- [deps] upgrade `eslint` to version `7.32.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `5.8.2` + +## 4.72.0 - 2021-07-25 + +- [deps] disable `react/jsx-handler-names` rule + +## 4.71.0 - 2021-07-25 + +- [breaking] set `jest/max-nested-describe` rule to `2` + +## 4.70.0 - 2021-07-25 + +- [deps] upgrade `eslint-plugin-jest` to version `24.4.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `5.8.1` +- [breaking] enable `jest/max-nested-describe` rule + +## 4.69.0 - 2021-07-21 + +- [deps] upgrade `eslint-plugin-jest` to version `24.3.7` + +## 4.68.0 - 2021-07-18 + +- [deps] upgrade `eslint` to version `7.31.0` + +## 4.67.0 - 2021-07-04 + +- [deps] upgrade `eslint` to version `7.30.0` + +## 4.66.0 - 2021-06-30 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.8.0` +- [breaking] enable `flowtype/enforce-line-break` rule + +## 4.65.0 - 2021-06-20 + +- [deps] upgrade `eslint` to version `7.29.0` + +## 4.64.0 - 2021-06-06 + +- [deps] upgrade `eslint` to version `7.28.0` +- [deps] update `eslint-plugin-react` to version `7.24.0` + +## 4.63.1 - 2021-05-30 + +- [deps] revert `eslint-plugin-react` to version `7.22.0` + +## 4.63.0 - 2021-05-30 + +- [deps] upgrade `eslint` to version `7.27.0` +- [deps] update `eslint-plugin-react` to version `7.24.0` + +## 4.62.0 - 2021-05-10 + +- [deps] upgrade `eslint` to version `7.26.0` + +## 4.61.0 - 2021-05-02 + +- [deps] drop direct dependency on `babel-eslint` + +## 4.60.0 - 2021-04-26 + +- [deps] upgrade `eslint-plugin-jest` to version `24.3.6` + +## 4.59.0 - 2021-04-25 + +- [deps] upgrade `eslint` to version `7.25.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `5.7.2` + +## 4.58.0 - 2021-04-18 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.7.1` + +## 4.57.0 - 2021-04-11 + +- [deps] upgrade `eslint` to version `7.24.0` +- [deps] upgrade `eslint-plugin-jest` to version `24.3.5` + +## 4.56.0 - 2021-04-06 + +- [deps] upgrade `eslint-plugin-jest` to version `24.3.4` +- [deps] upgrade `eslint-plugin-flowtype` to version `5.6.0` + +## 4.55.0 - 2021-04-04 + +- [deps] upgrade `eslint-plugin-jest` to version `24.3.3` + +## 4.54.1 - 2021-03-29 + +- [fix] revert `react/no-unstable-nested-components` rule error + +## 4.54.0 - 2021-03-29 + +- [fix] revert `react/boolean-prop-naming` rule regexp +- [deps] revert `eslint-plugin-react` to version `7.22.0` +- [deps] upgrade `eslint` to version `7.23.0` + +## 4.53.0 - 2021-03-28 + +- [fix] update `react/boolean-prop-naming` rule regexp + +## 4.52.0 - 2021-03-24 + +- [deps] upgrade `eslint-plugin-react` to version `7.23.1` +- [new] `react/no-unstable-nested-components` rule error + +## 4.51.0 - 2021-03-18 + +- [deps] upgrade `eslint-plugin-jest` to version `24.3.2` + +## 4.50.0 - 2021-03-15 + +- [deps] upgrade `eslint` to version `7.22.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `5.4.0` +- [deps] upgrade `eslint-plugin-jest` to version `24.3.1` + +## 4.49.0 - 2021-03-11 + +- [deps] upgrade `eslint-plugin-jest` to version `24.2.1` + +## 4.48.0 - 2021-03-09 + +- [deps] upgrade `eslint-plugin-jest` to version `24.1.10` + +## 4.47.0 - 2021-03-08 + +- [deps] upgrade `eslint-plugin-jest` to version `24.1.9` + +## 4.46.0 - 2021-03-07 + +- [deps] upgrade `eslint-plugin-jest` to version `24.1.7` + +## 4.45.0 - 2021-02-28 + +- [deps] upgrade `eslint` to version `7.21.0` + +## 4.44.0 - 2021-02-24 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.3.1` +- [new] `flowtype/object-type-curly-spacing` rule error + +## 4.43.1 - 2021-02-23 + +- [patch: loosen rules] disable `flowtype/object-type-curly-spacing` rule + +## 4.43.0 - 2021-02-23 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.3.0` +- [new] `flowtype/object-type-curly-spacing` rule error + +## 4.42.0 - 2021-02-19 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.2.2` + +## 4.41.0 - 2021-02-18 + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.2.1` + +## 4.40.0 - 2021-02-17 + +- [deps] upgrade `eslint-plugin-jest` to version `24.1.5` + +## 4.39.0 - 2021-02-14 + +- [deps] upgrade `eslint` to version `7.20.0` + +## 4.38.0 - 2021-01-31 + +- [deps] upgrade `eslint` to version `7.19.0` + +## 4.37.0 - 2021-01-17 + +- [deps] upgrade `eslint` to version `7.18.0` + +## 4.36.0 - 2021-01-05 + +- [new] `react/function-component-definition` rule error + +## 4.35.0 - 2021-01-05 + +- [deps] upgrade `eslint-plugin-react` to version `7.22.0` +- [new] `react/jsx-newline` rule error +- [new] `react/jsx-no-constructed-context-values` rule error +- [new] `react/no-adjacent-inline-elements` rule error + +## 4.34.0 - 2021-01-03 + +- [deps] upgrade `eslint` to version `7.17.0` + +## 4.33.0 - 2020-12-21 + +- [deps] upgrade `eslint` to version `7.16.0` + +## 4.32.0 - 2020-12-06 + +- [deps] upgrade `eslint` to version `7.15.0` + +## 4.31.0 - 2020-11-21 + +- [deps] upgrade `eslint` to version `7.14.0` + +## 4.30.0 - 2020-11-15 + +- [deps] upgrade `eslint-plugin-jest` to version `24.1.3` + +## 4.29.0 - 2020-11-08 + +- [deps] upgrade `eslint` to version `7.13.0` + +## 4.28.0 - 2020-10-27 + +- [deps] upgrade `eslint` to version `7.12.1` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.4.1` + +## 4.27.0 - 2020-10-26 + +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.4.0` + +## 4.26.0 - 2020-10-25 + +- [deps] upgrade `eslint` to version `7.12.0` + +## 4.25.0 - 2020-10-21 + +- [deps] upgrade `eslint-plugin-react` to version `7.21.5` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.2.0` + +## 4.24.0 - 2020-10-15 + +- [breaking] disable `react/jsx-uses-react` rule (React 16.4 update) +- [breaking] disable `react/react-in-jsx-scope` rule (React 16.4 update) + +## 4.23.0 - 2020-10-11 + +- [deps] upgrade `eslint` to version `7.11.0` +- [deps] upgrade `eslint-plugin-react` to version `7.21.4` + +## 4.22.0 - 2020-10-07 + +- [deps] upgrade `eslint-plugin-jest` to version `24.1.0` + +## 4.21.0 - 2020-10-05 + +- [deps] upgrade `eslint-plugin-react` to version `7.21.3` + +## 4.20.0 - 2020-09-29 + +- [deps] upgrade `eslint` to version `7.10.0` + +## 4.19.0 - 2020-09-25 + +- [deps] upgrade `eslint-plugin-react` to version `7.21.2` + +## 4.18.0 - 2020-09-24 + +- [deps] upgrade `eslint-plugin-react` to version `7.21.1` + +## 4.17.0 - 2020-09-22 + +- [deps] upgrade `eslint-plugin-react` to version `7.21.0` +- [docs] switch to NPM + +## 4.16.0 - 2020-09-21 + +- [deps] upgrade `eslint-plugin-jest` to version `24.0.2` + +## 4.15.0 - 2020-09-13 + +- [deps] upgrade `eslint` to version `7.9.0` +- [deps] upgrade `eslint-plugin-jest` to version `24.0.1` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.1.2` + +## 4.14.0 - 2020-09-06 + +- [deps] upgrade `eslint` to version `7.8.1` +- [deps] upgrade `eslint-plugin-jest` to version `24.0.0` + +## 4.13.0 - 2020-09-01 + +- [deps] upgrade `eslint` to version `7.8.0` + +## 4.12.0 - 2020-08-24 + +- [deps] upgrade `eslint` to version `7.7.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.1.0` + +## 4.11.0 - 2020-08-14 + +- [deps] upgrade `eslint-plugin-react` to version `7.20.6` + +## 4.10.0 - 2020-08-02 + +- [deps] upgrade `eslint` to version `7.6.0` +- [deps] upgrade `eslint-plugin-jest` to version `23.20.0` + +## 4.9.0 - 2020-07-29 + +- [deps] upgrade `eslint-plugin-jest` to version `23.19.0` +- [deps] upgrade `eslint-plugin-react` to version `7.20.5` +- [new] `jest/no-interpolation-in-snapshots` rule error + ## 4.8.0 - 2020-07-26 - - [deps] upgrade `eslint-plugin-jest` to version `23.18.2` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.18.2` + ## 4.7.0 - 2020-07-19 - - [deps] upgrade `eslint` to version `7.5.0` - + +- [deps] upgrade `eslint` to version `7.5.0` + ## 4.6.0 - 2020-07-15 - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.8` - + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.8` + ## 4.5.0 - 2020-07-12 - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.7` - + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.7` + ## 4.4.0 - 2020-07-08 - - [deps] upgrade `eslint-plugin-jest` to version `23.18.0` - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.6` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.18.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.6` + ## 4.3.0 - 2020-07-05 - - [deps] upgrade `eslint` to version `7.4.0` - + +- [deps] upgrade `eslint` to version `7.4.0` + ## 4.2.0 - 2020-07-01 - - [deps] upgrade `eslint-plugin-flowtype` to version `5.2.0` - - [deps] upgrade `eslint-plugin-react` to version `7.20.3` - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.5` - + +- [deps] upgrade `eslint-plugin-flowtype` to version `5.2.0` +- [deps] upgrade `eslint-plugin-react` to version `7.20.3` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.5` + ## 4.1.0 - 2020-06-28 - - [deps] upgrade `eslint` to version `7.3.1` - - [deps] upgrade `eslint-plugin-jest` to version `23.17.1` - + +- [deps] upgrade `eslint` to version `7.3.1` +- [deps] upgrade `eslint-plugin-jest` to version `23.17.1` + ## 4.0.0 - 2020-06-21 - - [deps] upgrade `eslint` to version `7.3.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `5.1.3` - - [deps] upgrade `eslint-plugin-jest` to version `23.16.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `6.3.1` - - [new] `jest/no-conditional-expect` rule error - - [new] `jsx-a11y/autocomplete-valid` rule error - + +- [deps] upgrade `eslint` to version `7.3.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `5.1.3` +- [deps] upgrade `eslint-plugin-jest` to version `23.16.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `6.3.1` +- [new] `jest/no-conditional-expect` rule error +- [new] `jsx-a11y/autocomplete-valid` rule error + ## 3.32.0 - 2020-05-31 - - [deps] upgrade `eslint-plugin-jest` to version `23.13.2` - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.4` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.13.2` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.4` + ## 3.31.1 - 2020-05-17 - - [patch: loosen rules] disable `jest/no-restricted-matchers` + +- [patch: loosen rules] disable `jest/no-restricted-matchers` ## 3.31.0 - 2020-05-17 - - [deps] upgrade `eslint-plugin-jest` to version `23.13.0` - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.2` - - [patch] removed deprecated `jest/no-truthy-falsy`, `jest/prefer-inline-snapshots`, `jest/no-expect-resolves` - - [new] `jest/no-restricted-matchers` rule error - + +- [deps] upgrade `eslint-plugin-jest` to version `23.13.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.2` +- [patch] removed deprecated `jest/no-truthy-falsy`, `jest/prefer-inline-snapshots`, `jest/no-expect-resolves` +- [new] `jest/no-restricted-matchers` rule error + ## 3.30.0 - 2020-05-13 - - [deps] upgrade `eslint-plugin-react` to version `7.20.0` - - [deps] upgrade `eslint-plugin-jest` to version `23.10.0` - + +- [deps] upgrade `eslint-plugin-react` to version `7.20.0` +- [deps] upgrade `eslint-plugin-jest` to version `23.10.0` + ## 3.29.0 - 2020-05-12 - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.1` - + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.1` + ## 3.28.0 - 2020-05-11 - - [deps] upgrade `eslint-plugin-jest` to version `23.10.0` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.10.0` + ## 3.27.0 - 2020-03-27 - - [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.0` - - [deps] upgrade `eslint-plugin-jest` to version `23.9.0` - - [new] `jest/no-deprecated-functions` rule error - + +- [deps] upgrade `eslint-plugin-react-hooks` to version `4.0.0` +- [deps] upgrade `eslint-plugin-jest` to version `23.9.0` +- [new] `jest/no-deprecated-functions` rule error + ## 3.26.0 - 2020-03-27 - - [deps] upgrade `eslint-plugin-react-hooks` to version `3.0.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.6.0` - + +- [deps] upgrade `eslint-plugin-react-hooks` to version `3.0.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.6.0` + ## 3.25.0 - 2020-03-20 - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.5.1` - + +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.5.1` + ## 3.24.1 - 2020-03-08 - - [patch: loosen rules] disable `react/no-adjacent-inline-elements` - + +- [patch: loosen rules] disable `react/no-adjacent-inline-elements` + ## 3.24.0 - 2020-03-08 - - [deps] upgrade `eslint-plugin-jest` to version `23.8.2` - - [deps] upgrade `eslint-plugin-react` to version `7.19.0` - - [new] `react/no-adjacent-inline-elements` rule error - + +- [deps] upgrade `eslint-plugin-jest` to version `23.8.2` +- [deps] upgrade `eslint-plugin-react` to version `7.19.0` +- [new] `react/no-adjacent-inline-elements` rule error + ## 3.23.0 - 2020-03-01 - - [deps] update `babel-eslint` to version `10.1.0` - - [deps] upgrade `eslint-plugin-jest` to version `23.8.1` - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.5.0` - + +- [deps] update `babel-eslint` to version `10.1.0` +- [deps] upgrade `eslint-plugin-jest` to version `23.8.1` +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.5.0` + ## 3.22.0 - 2020-02-23 - - [deps] upgrade `eslint-plugin-react` to version `7.18.3` - - [deps] upgrade `eslint-plugin-jest` to version `23.8.0` - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.4.0` - + +- [deps] upgrade `eslint-plugin-react` to version `7.18.3` +- [deps] upgrade `eslint-plugin-jest` to version `23.8.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.4.0` + ## 3.21.2 - 2020-02-02 - - [patch: loosen rules] disable `react/function-component-definition` - + +- [patch: loosen rules] disable `react/function-component-definition` + ## 3.21.1 - 2020-02-02 - - [patch: loosen rules] disable `react/no-adjacent-inline-elements` - + +- [patch: loosen rules] disable `react/no-adjacent-inline-elements` + ## 3.21.0 - 2020-02-02 - - [deps] upgrade `eslint-plugin-react` to version `7.18.2` - - [new] `react/jsx-no-script-url` rule error - - [new] `react/no-adjacent-inline-elements` rule error - - [new] `react/function-component-definition` rule error - + +- [deps] upgrade `eslint-plugin-react` to version `7.18.2` +- [new] `react/jsx-no-script-url` rule error +- [new] `react/no-adjacent-inline-elements` rule error +- [new] `react/function-component-definition` rule error + ## 3.20.0 - 2020-01-17 - - [deps] upgrade `eslint-plugin-react` to version `7.18.0` - + +- [deps] upgrade `eslint-plugin-react` to version `7.18.0` + ## 3.19.0 - 2020-01-12 - - [deps] upgrade `eslint-plugin-jest` to version `23.6.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.6.0` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.6.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.6.0` + ## 3.18.0 - 2020-01-09 - - [deps] upgrade `eslint-plugin-jest` to version `23.3.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.5.3` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.3.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.5.3` + ## 3.17.0 - 2019-12-31 - - [deps] upgrade `eslint-plugin-jest` to version `23.2.0` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.2.0` + ## 3.16.0 - 2019-12-21 - - [deps] upgrade `eslint` to version `6.8.0` - + +- [deps] upgrade `eslint` to version `6.8.0` + ## 3.15.1 - 2019-12-06 - - [patch: loosen rules] disable `react/require-default-props` + +- [patch: loosen rules] disable `react/require-default-props` ## 3.15.0 - 2019-12-02 - - [deps] upgrade `eslint` to version `6.7.2` - - [deps] upgrade `eslint-plugin-jest` to version `23.1.1` - - [deps] upgrade `eslint-plugin-react` to version `7.17.0` - + +- [deps] upgrade `eslint` to version `6.7.2` +- [deps] upgrade `eslint-plugin-jest` to version `23.1.1` +- [deps] upgrade `eslint-plugin-react` to version `7.17.0` + ## 3.14.0 - 2019-11-27 - - [deps] upgrade `eslint` to version `6.7.1` - - [deps] upgrade `eslint-plugin-jest` to version `23.0.5` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.5.2` - + +- [deps] upgrade `eslint` to version `6.7.1` +- [deps] upgrade `eslint-plugin-jest` to version `23.0.5` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.5.2` + ## 3.13.0 - 2019-11-20 - - [deps] upgrade `eslint-plugin-jest` to version `23.0.4` - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.3.0` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.0.4` +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.3.0` + ## 3.12.0 - 2019-11-14 - - [deps] upgrade `eslint-plugin-jest` to version `23.0.3` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.4.1` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.0.3` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.4.1` + ## 3.11.1 - 2019-10-29 - - [patch] remove `jest/no-empty-title` rule which was replaced with `jest/valid-title` rule - + +- [patch] remove `jest/no-empty-title` rule which was replaced with `jest/valid-title` rule + ## 3.11.0 - 2019-10-29 - - [deps] upgrade `eslint-plugin-jest` to version `23.0.2` - + +- [deps] upgrade `eslint-plugin-jest` to version `23.0.2` + ## 3.10.0 - 2019-10-27 - - [deps] upgrade `eslint` to version `6.6.0` - - [deps] upgrade `eslint-plugin-jest` to version `22.21.0` - + +- [deps] upgrade `eslint` to version `6.6.0` +- [deps] upgrade `eslint-plugin-jest` to version `22.21.0` + ## 3.9.0 - 2019-10-23 - - [deps] upgrade `eslint-plugin-jest` to version `22.20.0` - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.2.0` - - [new] `jest/valid-title` rule error - - [patch] `react/sort-comp` updated order - + +- [deps] upgrade `eslint-plugin-jest` to version `22.20.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.2.0` +- [new] `jest/valid-title` rule error +- [patch] `react/sort-comp` updated order + ## 3.8.0 - 2019-10-16 - - [deps] upgrade `eslint` to version `6.5.1` - - [deps] upgrade `eslint-plugin-jest` to version `22.19.0` - - [deps] upgrade `eslint-plugin-react` to version `7.16.0` - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.1.2` - - [new] `jest/prefer-hooks-on-top` rule error - - [new] `react/jsx-no-useless-fragment` rule error - + +- [deps] upgrade `eslint` to version `6.5.1` +- [deps] upgrade `eslint-plugin-jest` to version `22.19.0` +- [deps] upgrade `eslint-plugin-react` to version `7.16.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.1.2` +- [new] `jest/prefer-hooks-on-top` rule error +- [new] `react/jsx-no-useless-fragment` rule error + ## 3.7.0 - 2019-09-15 - - [deps] upgrade `eslint` to version `6.4.0` - + +- [deps] upgrade `eslint` to version `6.4.0` + ## 3.6.0 - 2019-09-10 - - [deps] upgrade `eslint-plugin-jest` to version `22.17.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.3.0` - + +- [deps] upgrade `eslint-plugin-jest` to version `22.17.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.3.0` + ## 3.5.0 - 2019-09-02 - - [deps] upgrade `eslint` to version `6.3.0` - - [deps] upgrade `eslint-plugin-jest` to version `22.16.0` - - [new] `jest/require-top-level-describe` rule error + +- [deps] upgrade `eslint` to version `6.3.0` +- [deps] upgrade `eslint-plugin-jest` to version `22.16.0` +- [new] `jest/require-top-level-describe` rule error ## 3.4.0 - 2019-08-28 - - [deps] update `babel-eslint` to version `10.0.3` + +- [deps] update `babel-eslint` to version `10.0.3` ## 3.3.0 - 2019-08-25 - - [deps] upgrade `eslint` to version `6.2.2` - + +- [deps] upgrade `eslint` to version `6.2.2` + ## 3.2.0 - 2019-08-22 - - [deps] upgrade `eslint` to version `6.2.1` - - [deps] upgrade `eslint-plugin-jest` to version `22.15.2` - - [deps] upgrade `eslint-plugin-react-hooks` to version `2.0.1` + +- [deps] upgrade `eslint` to version `6.2.1` +- [deps] upgrade `eslint-plugin-jest` to version `22.15.2` +- [deps] upgrade `eslint-plugin-react-hooks` to version `2.0.1` ## 3.1.0 - 2019-15-10 - - [deps] upgrade `eslint-plugin-jest` to version `22.15.1` - - [patch: loosen rules] `react/jsx-no-bind` enable `ignoreDOMComponents` option - + +- [deps] upgrade `eslint-plugin-jest` to version `22.15.1` +- [patch: loosen rules] `react/jsx-no-bind` enable `ignoreDOMComponents` option + ## 3.0.1 - 2019-08-10 - - [patch: loosen rules] `flowtype/require-indexer-name` switched to `never` option + +- [patch: loosen rules] `flowtype/require-indexer-name` switched to `never` option ## 3.0.0 - 2019-08-10 - - [deps] upgrade `eslint` to version `6.1.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `4.2.0` - - [deps] upgrade `eslint-plugin-jest` to version `22.15.0` - - [deps] upgrade `eslint-plugin-react-hooks` to version `1.7.0` - - [new] `flowtype/arrow-parens` rule error - - [new] `flowtype/require-indexer-name` rule error - - [new] `jest/no-expect-resolves` rule error + +- [deps] upgrade `eslint` to version `6.1.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `4.2.0` +- [deps] upgrade `eslint-plugin-jest` to version `22.15.0` +- [deps] upgrade `eslint-plugin-react-hooks` to version `1.7.0` +- [new] `flowtype/arrow-parens` rule error +- [new] `flowtype/require-indexer-name` rule error +- [new] `jest/no-expect-resolves` rule error ## 2.10.0 - 2019-07-19 - - [deps] upgrade `eslint-plugin-jest` to version `22.14.0` - - [deps] upgrade `eslint-plugin-react` to version `7.14.3` - - [new] `jest/no-duplicate-hooks` rule error - - [new] `jest/no-export` rule error - - [new] `jest/no-if` rule error - - [new] `jest/no-standalone-expect` rule error - - [new] `jest/no-try-expect` rule error + +- [deps] upgrade `eslint-plugin-jest` to version `22.14.0` +- [deps] upgrade `eslint-plugin-react` to version `7.14.3` +- [new] `jest/no-duplicate-hooks` rule error +- [new] `jest/no-export` rule error +- [new] `jest/no-if` rule error +- [new] `jest/no-standalone-expect` rule error +- [new] `jest/no-try-expect` rule error ## 2.9.1 - 2019-07-07 - - [loosen] `react/jsx-curly-newline` enable with `{ multiline: 'consistent', singleline: 'consistent' }` + +- [loosen] `react/jsx-curly-newline` enable with `{ multiline: 'consistent', singleline: 'consistent' }` ## 2.9.0 - 2019-07-06 - - [deps] upgrade `eslint-plugin-flowtype` to version `3.10.4` - - [deps] upgrade `eslint-plugin-jest` to version `22.7.2` - - [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.2.3` - - [deps] upgrade `eslint-plugin-react` to version `7.14.2` - - [deps] upgrade `eslint-plugin-react-hooks` to version `1.6.1` - - [new] `react/jsx-curly-newline` enable with `{ multiline: 'require', singleline: 'forbid' }` + +- [deps] upgrade `eslint-plugin-flowtype` to version `3.10.4` +- [deps] upgrade `eslint-plugin-jest` to version `22.7.2` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.2.3` +- [deps] upgrade `eslint-plugin-react` to version `7.14.2` +- [deps] upgrade `eslint-plugin-react-hooks` to version `1.6.1` +- [new] `react/jsx-curly-newline` enable with `{ multiline: 'require', singleline: 'forbid' }` ## 2.8.0 - 2019-06-18 - - [breaking] `flowtype/delimiter-dangle` rule `always` option replaced with `always-multiline` + +- [breaking] `flowtype/delimiter-dangle` rule `always` option replaced with `always-multiline` ## 2.7.0 - 2019-06-18 - - [deps] update `babel-eslint` to version `10.0.1` + +- [deps] update `babel-eslint` to version `10.0.1` ## 2.6.0 - 2019-06-16 - - [deps] upgrade `eslint-plugin-flowtype` to version `3.10.3` - - [new] `flowtype/delimiter-dangle` enable with 'always' option + +- [deps] upgrade `eslint-plugin-flowtype` to version `3.10.3` +- [new] `flowtype/delimiter-dangle` enable with 'always' option ## 2.5.1 - 2019-06-12 - - [loosen rules] `flowtype/require-return-type` disabled + +- [loosen rules] `flowtype/require-return-type` disabled ## 2.5.0 - 2019-06-11 - - [deps] upgrade `eslint-plugin-flowtype` to version `3.10.1` - - [deps] upgrade `eslint-plugin-jest` to version `22.6.4` - - [deps] upgrade `eslint-plugin-react` to version `7.13.0` - - [new] `flowtype/require-parameter-type` rule error - - [new] `flowtype/require-return-type` rule error - - [new] `flowtype/type-id-match` rule error - - [new] `flowtype/type-import-style` rule error - - [new] `flowtype/no-mixed` rule error - - [new] `flowtype/spread-exact-type` rule error - - [new] `flowtype/require-readonly-react-props` rule error - - [new] `jest/no-commented-out-tests` rule error - - [new] `jest/no-mocks-import` rule error - - [new] `react/prefer-read-only-props` rule error - - [new] `react/state-in-constructor` rule error - - [new] `react/boolean-prop-naming` rule error - - [new] `react/static-property-placement` rule error - - [docs] updates `README.md` installation guide + +- [deps] upgrade `eslint-plugin-flowtype` to version `3.10.1` +- [deps] upgrade `eslint-plugin-jest` to version `22.6.4` +- [deps] upgrade `eslint-plugin-react` to version `7.13.0` +- [new] `flowtype/require-parameter-type` rule error +- [new] `flowtype/require-return-type` rule error +- [new] `flowtype/type-id-match` rule error +- [new] `flowtype/type-import-style` rule error +- [new] `flowtype/no-mixed` rule error +- [new] `flowtype/spread-exact-type` rule error +- [new] `flowtype/require-readonly-react-props` rule error +- [new] `jest/no-commented-out-tests` rule error +- [new] `jest/no-mocks-import` rule error +- [new] `react/prefer-read-only-props` rule error +- [new] `react/state-in-constructor` rule error +- [new] `react/boolean-prop-naming` rule error +- [new] `react/static-property-placement` rule error +- [docs] updates `README.md` installation guide ## 2.4.0 - 2019-04-11 - - [deps] upgrade `eslint` to version `5.16.0` - - [deps] upgrade `eslint-plugin-flowtype` to version `3.6.1` - - [deps] upgrade `eslint-plugin-jest` to version `22.4.1` - - [deps] upgrade `eslint-plugin-react-hooks` to version `1.6.0` - - [new] `jest/no-empty-title` rule error - - [new] `jsx-a11y/control-has-associated-label` rule error - - [docs] updates `README.md` installation guide + +- [deps] upgrade `eslint` to version `5.16.0` +- [deps] upgrade `eslint-plugin-flowtype` to version `3.6.1` +- [deps] upgrade `eslint-plugin-jest` to version `22.4.1` +- [deps] upgrade `eslint-plugin-react-hooks` to version `1.6.0` +- [new] `jest/no-empty-title` rule error +- [new] `jsx-a11y/control-has-associated-label` rule error +- [docs] updates `README.md` installation guide ## 2.3.0 - 2019-03-10 - - [deps] upgrade `eslint` to version `5.15.1` - - [deps] upgrade `eslint-plugin-flowtype` to version `3.4.2` - - [deps] upgrade `eslint-plugin-jest` to version `22.3.0` - - [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.2.1` - - [deps] upgrade `eslint-plugin-react` to version `7.12.4` - - [new] `jest/prefer-called-with` rule error - - [new] add `eslint-plugin-react-hooks` - - [docs] updates `README.md` installation guide + +- [deps] upgrade `eslint` to version `5.15.1` +- [deps] upgrade `eslint-plugin-flowtype` to version `3.4.2` +- [deps] upgrade `eslint-plugin-jest` to version `22.3.0` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.2.1` +- [deps] upgrade `eslint-plugin-react` to version `7.12.4` +- [new] `jest/prefer-called-with` rule error +- [new] add `eslint-plugin-react-hooks` +- [docs] updates `README.md` installation guide ## 2.2.0 - 2019-01-31 - - [deps] upgrade `eslint` to version `5.12.1` - - [deps] upgrade `eslint-plugin-jest` to version `22.2.1` - - [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.2.0` - - [deps] upgrade `eslint-plugin-react` to version `7.12.4` - - [new] `jest/prefer-todo` rule error - - [docs] updates `README.md` installation guide + +- [deps] upgrade `eslint` to version `5.12.1` +- [deps] upgrade `eslint-plugin-jest` to version `22.2.1` +- [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.2.0` +- [deps] upgrade `eslint-plugin-react` to version `7.12.4` +- [new] `jest/prefer-todo` rule error +- [docs] updates `README.md` installation guide ## 2.1.3 - 2019-01-21 - - [patch: loosen rules] disable `flowtype/no-existential-type` + +- [patch: loosen rules] disable `flowtype/no-existential-type` ## 2.1.2 - 2019-01-21 - - [deps] upgrade `eslint-plugin-react` to version `7.12.4` + +- [deps] upgrade `eslint-plugin-react` to version `7.12.4` ## 2.1.1 - 2019-01-13 - - [deps] fix `peerDependencies` versions + +- [deps] fix `peerDependencies` versions ## 2.1.0 - 2019-01-13 - - [deps] update `eslint` to version `5.12.0` - - [deps] update `eslint-plugin-flowtype` to version `3.2.1` - - [deps] update `eslint-plugin-jest"` to version `22.1.3` - - [deps] update `eslint-plugin-react` to version `7.12.3` - - [breaking] drop `eslint-plugin-chai-expect` plugin integration - - [new] added `react/jsx-fragments` rule to force short Fragment notation - - [docs] updates `README.md` installation guide + +- [deps] update `eslint` to version `5.12.0` +- [deps] update `eslint-plugin-flowtype` to version `3.2.1` +- [deps] update `eslint-plugin-jest"` to version `22.1.3` +- [deps] update `eslint-plugin-react` to version `7.12.3` +- [breaking] drop `eslint-plugin-chai-expect` plugin integration +- [new] added `react/jsx-fragments` rule to force short Fragment notation +- [docs] updates `README.md` installation guide ## 2.0.1 - 2018-12-19 - - [patch: loosen rules] disable `jest/no-test-return-statement` + +- [patch: loosen rules] disable `jest/no-test-return-statement` ## 2.0.0 - 2018-12-19 - - [major] make this config standalone dropping direct dependency on `eslint-config-seekingalpha-base` - - [major] remove default `env` configuration - - [major] update `parserOptions` - - [docs] updates `README.md` installation guide + +- [major] make this config standalone dropping direct dependency on `eslint-config-seekingalpha-base` +- [major] remove default `env` configuration +- [major] update `parserOptions` +- [docs] updates `README.md` installation guide ## 1.4.0 - 2018-12-18 - - [deps] update `eslint-config-seekingalpha-base` to version `1.6.0` - - [new] `flowtype/require-compound-type-alias` rule error with `never` option - - [new] `jest/consistent-test-it` rule error - - [new] `jest/expect-expect` rule error - - [new] `jest/no-jasmine-globals` rule error - - [new] `jest/no-jest-import` rule error - - [new] `jest/no-large-snapshots` rule error with `maxSize: 50` option - - [new] `jest/no-test-prefixes` rule error - - [new] `jest/no-test-return-statement` rule error - - [new] `jest/prefer-strict-equal` rule error - - [new] `jest/prefer-to-be-null` rule error - - [new] `jest/prefer-to-be-undefined` rule error - - [new] `jest/valid-describe` rule error - - [new] `jest/valid-expect` rule error - - [new] `jest/valid-expect-in-promise` rule error - - [new] `jsx-a11y/label-has-associated-control` rule error - - [new] `react/no-danger` rule error + +- [deps] update `eslint-config-seekingalpha-base` to version `1.6.0` +- [new] `flowtype/require-compound-type-alias` rule error with `never` option +- [new] `jest/consistent-test-it` rule error +- [new] `jest/expect-expect` rule error +- [new] `jest/no-jasmine-globals` rule error +- [new] `jest/no-jest-import` rule error +- [new] `jest/no-large-snapshots` rule error with `maxSize: 50` option +- [new] `jest/no-test-prefixes` rule error +- [new] `jest/no-test-return-statement` rule error +- [new] `jest/prefer-strict-equal` rule error +- [new] `jest/prefer-to-be-null` rule error +- [new] `jest/prefer-to-be-undefined` rule error +- [new] `jest/valid-describe` rule error +- [new] `jest/valid-expect` rule error +- [new] `jest/valid-expect-in-promise` rule error +- [new] `jsx-a11y/label-has-associated-control` rule error +- [new] `react/no-danger` rule error ## 1.3.0 - 2018-12-11 - - [deps] update `eslint-config-seekingalpha-base` to version `1.5.1` - - [deps] update `eslint` to version `5.10.0` - - [deps] update `eslint-plugin-array-func` to version `3.1.0` - - [deps] update `eslint-plugin-jsdoc` to version `3.14.0` - - [deps] update `eslint-plugin-node` to version `8.0.0` - - [deps] update `eslint-plugin-unicorn` to version `6.0.1` - - [deps] update `babel-eslint` to version `10.0.1` - - [deps] update `eslint-plugin-chai-expect` to version `2.0.1` - - [deps] update `eslint-plugin-flowtype` to version `3.2.0` - - [deps] update `eslint-plugin-jsx-a11y` to version `6.1.1` - - [deps] update `eslint-plugin-jest` to version `22.1.2` - - [deps] fix `peerDependencies` version - - [docs] updates `README.md` installation guide - - [new] `jest/require-tothrow-message` rule error - - [new] `jest/no-alias-methods` rule error - - [new] `jest/prefer-to-contain` rule error - - [new] `jest/no-test-callback` rule error - - [new] `jest/prefer-spy-on` rule error - - [new] `jest/no-truthy-falsy` rule error + +- [deps] update `eslint-config-seekingalpha-base` to version `1.5.1` +- [deps] update `eslint` to version `5.10.0` +- [deps] update `eslint-plugin-array-func` to version `3.1.0` +- [deps] update `eslint-plugin-jsdoc` to version `3.14.0` +- [deps] update `eslint-plugin-node` to version `8.0.0` +- [deps] update `eslint-plugin-unicorn` to version `6.0.1` +- [deps] update `babel-eslint` to version `10.0.1` +- [deps] update `eslint-plugin-chai-expect` to version `2.0.1` +- [deps] update `eslint-plugin-flowtype` to version `3.2.0` +- [deps] update `eslint-plugin-jsx-a11y` to version `6.1.1` +- [deps] update `eslint-plugin-jest` to version `22.1.2` +- [deps] fix `peerDependencies` version +- [docs] updates `README.md` installation guide +- [new] `jest/require-tothrow-message` rule error +- [new] `jest/no-alias-methods` rule error +- [new] `jest/prefer-to-contain` rule error +- [new] `jest/no-test-callback` rule error +- [new] `jest/prefer-spy-on` rule error +- [new] `jest/no-truthy-falsy` rule error ## 1.2.6 - 2018-11-20 - - [deps] update `eslint-config-seekingalpha-base` to version `1.3.2` + +- [deps] update `eslint-config-seekingalpha-base` to version `1.3.2` ## 1.2.5 - 2018-11-20 - - wrong update + +- wrong update ## 1.2.4 - 2018-11-20 - - [patch: loosen rules] disable `flowtype/sort-keys` - - [patch: loosen rules] disable `react/no-danger` + +- [patch: loosen rules] disable `flowtype/sort-keys` +- [patch: loosen rules] disable `react/no-danger` ## 1.2.3 - 2018-10-17 - - [patch] allowRequiredDefaults according to comment [https://github.com/facebook/flow/issues/1660#issuecomment-386619834](https://github.com/facebook/flow/issues/1660#issuecomment-386619834) + +- [patch] allowRequiredDefaults according to comment [https://github.com/facebook/flow/issues/1660#issuecomment-386619834](https://github.com/facebook/flow/issues/1660#issuecomment-386619834) ## 1.2.2 - 2018-10-16 - - [deps] update `eslint-config-seekingalpha-base` to version `1.3.1` + +- [deps] update `eslint-config-seekingalpha-base` to version `1.3.1` ## 1.2.1 - 2018-09-18 - - [deps] update `eslint-config-seekingalpha-base` to version `1.3.0` + +- [deps] update `eslint-config-seekingalpha-base` to version `1.3.0` ## 1.2.0 - 2018-09-15 - - [deps] update `eslint` to version `5.6.0` - - [deps] update `eslint-plugin-jsdoc` to version `3.8.0` - - [deps] update `eslint-plugin-promise` to version `4.0.1` - - [deps] update `eslint-plugin-unicorn` to version `6.0.1` - - [docs] update `CHANGELOG.md` including previous releases - - [docs] updates `README.md` installation guide - - [breaking] make `eslint-config-seekingalpha-base` pkg direct dependency + +- [deps] update `eslint` to version `5.6.0` +- [deps] update `eslint-plugin-jsdoc` to version `3.8.0` +- [deps] update `eslint-plugin-promise` to version `4.0.1` +- [deps] update `eslint-plugin-unicorn` to version `6.0.1` +- [docs] update `CHANGELOG.md` including previous releases +- [docs] updates `README.md` installation guide +- [breaking] make `eslint-config-seekingalpha-base` pkg direct dependency ## 1.1.5 - 2018-09-06 - - [breaking] make `eslint-config-seekingalpha-base` peerDependency + +- [breaking] make `eslint-config-seekingalpha-base` peerDependency ## 1.1.4 - 2018-08-28 - - [breaking] update `react/jsx-closing-bracket-location` rule, set `selfClosing: 'tag-aligned'` and `nonEmpty: 'tag-aligned'` options - - [minor] loosen `react/forbid-component-props` rule allowing `className` for `Button`, `Icon`, and `Link` components + +- [breaking] update `react/jsx-closing-bracket-location` rule, set `selfClosing: 'tag-aligned'` and `nonEmpty: 'tag-aligned'` options +- [minor] loosen `react/forbid-component-props` rule allowing `className` for `Button`, `Icon`, and `Link` components ## 1.1.3 - 2018-08-27 - - [new] integrate `eslint-plugin-flowtype` + +- [new] integrate `eslint-plugin-flowtype` ## 1.1.2 - 2018-08-22 - - [doc] README.md language fixes + +- [doc] README.md language fixes ## 1.1.1 - 2018-08-17 - - [doc] fix npm installation guide + +- [doc] fix npm installation guide ## 1.1.0 - 2018-08-17 - - [deps] update `eslint-config-seekingalpha-base` dependency to `^1.1.1` - - [deps] update `eslint-plugin-import` dependency to `^2.14.0` + +- [deps] update `eslint-config-seekingalpha-base` dependency to `^1.1.1` +- [deps] update `eslint-plugin-import` dependency to `^2.14.0` ## 1.0.4 - 2018-08-15 - - [fix] `react/jsx-one-expression-per-line` allow only literals + +- [fix] `react/jsx-one-expression-per-line` allow only literals ## 1.0.3 - 2018-08-15 - - [deps] update `eslint-config-seekingalpha-base` dependency to `^1.0.4` - - [deps] update `eslint-plugin-react` dependency to `^7.11.1` - - [patch: loosen rules] `react/prop-types` rule now skips undeclared propTypes validation - - [patch: loosen rules] `react/jsx-one-expression-per-line` rule allows single-child one line expressions - - [fix] `react/forbid-dom-props` reenable 'type' property - - [fix] added settings section for `eslint-plugin-react` with React ver. 16.4.1 + +- [deps] update `eslint-config-seekingalpha-base` dependency to `^1.0.4` +- [deps] update `eslint-plugin-react` dependency to `^7.11.1` +- [patch: loosen rules] `react/prop-types` rule now skips undeclared propTypes validation +- [patch: loosen rules] `react/jsx-one-expression-per-line` rule allows single-child one line expressions +- [fix] `react/forbid-dom-props` reenable 'type' property +- [fix] added settings section for `eslint-plugin-react` with React ver. 16.4.1 ## 1.0.2 - 2018-08-15 - - [fix] Remove deprecated [`react/jsx-space-before-closing`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md) rule + +- [fix] Remove deprecated [`react/jsx-space-before-closing`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md) rule ## 1.0.1 - 2018-08-15 - - [doc] fix package installation guide using NPM - - [deps] set direct dependency on `eslint-config-seekingalpha-base` + +- [doc] fix package installation guide using NPM +- [deps] set direct dependency on `eslint-config-seekingalpha-base` ## 1.0.0 - 2018-08-14 - - Initial commit + +- Initial commit diff --git a/eslint-configs/eslint-config-seekingalpha-react/LICENSE.md b/eslint-configs/eslint-config-seekingalpha-react/LICENSE.md index 9d1094d7..2e708102 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/LICENSE.md +++ b/eslint-configs/eslint-config-seekingalpha-react/LICENSE.md @@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/eslint-configs/eslint-config-seekingalpha-react/README.md b/eslint-configs/eslint-config-seekingalpha-react/README.md index ebe9a71a..f85b3f64 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/README.md +++ b/eslint-configs/eslint-config-seekingalpha-react/README.md @@ -4,46 +4,39 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ ## Installation -Install ESlint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/) with **NPM**: - - npm install babel-eslint@10.1.0 eslint@7.5.0 eslint-plugin-flowtype@5.2.0 eslint-plugin-jest@23.18.2 eslint-plugin-jsx-a11y@6.3.1 eslint-plugin-react@7.20.3 eslint-plugin-react-hooks@4.0.8 --save-dev - -or **Yarn**: - - yarn add --dev babel-eslint@10.1.0 eslint@7.5.0 eslint-plugin-flowtype@5.2.0 eslint-plugin-jest@23.18.2 eslint-plugin-jsx-a11y@6.3.1 eslint-plugin-react@7.20.3 eslint-plugin-react-hooks@4.0.8 +Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): + npm install eslint@9.39.2 eslint-plugin-jsx-a11y@6.10.2 eslint-plugin-react@7.37.5 eslint-plugin-react-hooks@7.1.1 --save-dev Install SeekingAlpha shareable ESLint: - npm install eslint-config-seekingalpha-react --save-dev - -For **Yarn**: - - yarn add --dev eslint-config-seekingalpha-react + npm install eslint-config-seekingalpha-react@latest --save-dev ## Usage -This shareable config includes all ESLint rules including ECMAScript 6 features, set of [legacy rules](https://eslint.org/docs/rules/#deprecated) and additional rules for `React` We also extend our configuration with following plugins: - -* [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) -* [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) -* [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) -* [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) -* [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks) +This shareable config includes all rules from following plugins: -If you don't need configuration extended with `React` rules, check out our [base config](https://www.npmjs.com/package/eslint-config-seekingalpha-base). +- [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) +- [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) +- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks) -Simply [extend](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) the relevant .eslintrc.js configuration in your project with `seekingalpha-react` rules: +Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration: ```javascript -{ - extends: [ - 'seekingalpha-react' - ] -} +import reactConfig from 'eslint-config-seekingalpha-react'; + +export default [ + { + plugins: { + ...reactConfig.plugins, + }, + rules: { + ...reactConfig.rules, + }, + }, +]; ``` ## License MIT © [SeekingAlpha](https://seekingalpha.com/) - diff --git a/eslint-configs/eslint-config-seekingalpha-react/index.js b/eslint-configs/eslint-config-seekingalpha-react/index.js index 7c4cf070..aceae99b 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/index.js +++ b/eslint-configs/eslint-config-seekingalpha-react/index.js @@ -1,35 +1,16 @@ -module.exports = { - - extends: [ - - // https://github.com/yannickcr/eslint-plugin-react - './rules/eslint/index.js', - - // https://github.com/yannickcr/eslint-plugin-react - './rules/eslint-plugin-react/index.js', - - // https://github.com/evcohen/eslint-plugin-jsx-a11y - './rules/eslint-plugin-jsx-a11y/index.js', - - // https://github.com/gajus/eslint-plugin-flowtype - './rules/eslint-plugin-flowtype/index.js', - - // https://github.com/jest-community/eslint-plugin-jest - './rules/eslint-plugin-jest/index.js', - - // https://reactjs.org/docs/hooks-rules.html - './rules/eslint-plugin-react-hooks/index.js', - - ], - - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - ecmaFeatures: { - impliedStrict: true, - globalReturn: false, - jsx: true, - }, +import jsxA11yConfig from './rules/eslint-plugin-jsx-a11y/index.js'; +import reactHooksConfig from './rules/eslint-plugin-react-hooks/index.js'; +import reactConfig from './rules/eslint-plugin-react/index.js'; + +export default { + plugins: { + ...jsxA11yConfig.plugins, + ...reactConfig.plugins, + ...reactHooksConfig.plugins, + }, + rules: { + ...jsxA11yConfig.rules, + ...reactConfig.rules, + ...reactHooksConfig.rules, }, - }; diff --git a/eslint-configs/eslint-config-seekingalpha-react/oxc.js b/eslint-configs/eslint-config-seekingalpha-react/oxc.js new file mode 100644 index 00000000..5f9efe91 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/oxc.js @@ -0,0 +1,16 @@ +import config from './index.js'; +import { ESLintPluginA11YDisabled } from './rules/eslint-plugin-jsx-a11y/oxlint-disabled.js'; +import { ESLintPluginReactHooksDisabled } from './rules/eslint-plugin-react-hooks/oxlint-disabled.js'; +import { ESLintPluginReactDisabled } from './rules/eslint-plugin-react/oxlint-disabled.js'; + +const oxcConfig = { + ...config, + rules: { + ...config.rules, + ...ESLintPluginReactDisabled, + ...ESLintPluginA11YDisabled, + ...ESLintPluginReactHooksDisabled, + }, +}; + +export default oxcConfig; diff --git a/eslint-configs/eslint-config-seekingalpha-react/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-react/oxlint-config.js new file mode 100644 index 00000000..ffb742f2 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/oxlint-config.js @@ -0,0 +1,7 @@ +import jsxA11yConfig from './rules/eslint-plugin-jsx-a11y/oxlint-config.js'; +import reactHooksConfig from './rules/eslint-plugin-react-hooks/oxlint-config.js'; +import reactConfig from './rules/eslint-plugin-react/oxlint-config.js'; + +export default { + extends: [reactConfig, jsxA11yConfig, reactHooksConfig], +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/package.json b/eslint-configs/eslint-config-seekingalpha-react/package.json index 30fb9d25..0627fbd5 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/package.json +++ b/eslint-configs/eslint-config-seekingalpha-react/package.json @@ -1,15 +1,16 @@ { "name": "eslint-config-seekingalpha-react", - "version": "4.8.0", + "version": "10.39.3", "description": "SeekingAlpha's sharable React.js ESLint config", "main": "index.js", + "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "git+https://github.com/seekingalpha/javascript" + "url": "git+https://github.com/seekingalpha/javascript.git" }, "keywords": [ "code", @@ -46,25 +47,19 @@ }, "homepage": "https://github.com/seekingalpha/javascript#readme", "engines": { - "node": ">= 7" + "node": ">= 24" }, "peerDependencies": { - "babel-eslint": "10.1.0", - "eslint": "7.5.0", - "eslint-plugin-flowtype": "5.2.0", - "eslint-plugin-jest": "23.18.2", - "eslint-plugin-jsx-a11y": "6.3.1", - "eslint-plugin-react": "7.20.3", - "eslint-plugin-react-hooks": "4.0.8" + "eslint": "9.39.2", + "eslint-plugin-jsx-a11y": "6.10.2", + "eslint-plugin-react": "7.37.5", + "eslint-plugin-react-hooks": "7.1.1" }, "devDependencies": { - "babel-eslint": "10.1.0", - "eslint": "7.5.0", - "eslint-find-rules": "3.6.0", - "eslint-plugin-flowtype": "5.2.0", - "eslint-plugin-jest": "23.18.2", - "eslint-plugin-jsx-a11y": "6.3.1", - "eslint-plugin-react": "7.20.3", - "eslint-plugin-react-hooks": "4.0.8" + "eslint": "9.39.2", + "eslint-find-rules": "5.0.0", + "eslint-plugin-jsx-a11y": "6.10.2", + "eslint-plugin-react": "7.37.5", + "eslint-plugin-react-hooks": "7.1.1" } } diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/config.js b/eslint-configs/eslint-config-seekingalpha-react/rules/config.js index a2e71f62..c50028ec 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/config.js +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { jsxIndent: 2, jsxIndentProps: 2, jsxMaxDepth: 10, diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-flowtype/index.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-flowtype/index.js deleted file mode 100644 index 936b1ecd..00000000 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-flowtype/index.js +++ /dev/null @@ -1,200 +0,0 @@ -module.exports = { - - parser: 'babel-eslint', - - plugins: ['flowtype'], - - rules: { - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-array-style-complex-type - 'flowtype/array-style-complex-type': [ - 'error', - 'verbose', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-array-style-simple-type - 'flowtype/array-style-simple-type': [ - 'error', - 'verbose', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-boolean-style - 'flowtype/boolean-style': [ - 'error', - 'boolean', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-define-flow-type - 'flowtype/define-flow-type': 'warn', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-delimiter-dangle - 'flowtype/delimiter-dangle': [ - 'error', - 'always-multiline', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-generic-spacing - 'flowtype/generic-spacing': [ - 'error', - 'never', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-newline-after-flow-annotation - 'flowtype/newline-after-flow-annotation': [ - 'error', - 'always', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-dupe-keys - 'flowtype/no-dupe-keys': 'error', - - /* - * https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-existential-type - * should be disabled to support recompose flow types - */ - 'flowtype/no-existential-type': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-flow-fix-me-comments - 'flowtype/no-flow-fix-me-comments': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-mutable-array - 'flowtype/no-mutable-array': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-primitive-constructor-types - 'flowtype/no-primitive-constructor-types': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-types-missing-file-annotation - 'flowtype/no-types-missing-file-annotation': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-unused-expressions - 'flowtype/no-unused-expressions': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-weak-types - 'flowtype/no-weak-types': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-object-type-delimiter - 'flowtype/object-type-delimiter': [ - 'error', - 'comma', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-parameter-type - 'flowtype/require-parameter-type': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-return-type - 'flowtype/require-return-type': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-types-at-top - 'flowtype/require-types-at-top': [ - 'error', - 'always', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-types-at-top - 'flowtype/require-valid-file-annotation': [ - 'error', - 'always', - { - annotationStyle: 'line', - }, - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-variable-type - 'flowtype/require-variable-type': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-semi - 'flowtype/semi': [ - 'error', - 'always', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-after-type-colon - 'flowtype/space-after-type-colon': [ - 'error', - 'always', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-before-generic-bracket - 'flowtype/space-before-generic-bracket': [ - 'error', - 'never', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-before-type-colon - 'flowtype/space-before-type-colon': [ - 'error', - 'never', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-type-id-match - 'flowtype/type-id-match': [ - 'error', - '^([A-Z][a-z0-9]*)+T$', - ], - - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-type-import-style - 'flowtype/type-import-style': [ - 'error', - 'declaration', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-union-intersection-spacing - 'flowtype/union-intersection-spacing': [ - 'error', - 'always', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-use-flow-type - 'flowtype/use-flow-type': 'warn', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-compound-type-alias - 'flowtype/require-compound-type-alias': [ - 'error', - 'never', - ], - - /* - * TODO enable? - * https://github.com/gajus/eslint-plugin-flowtype#require-exact-type - */ - 'flowtype/require-exact-type': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#sort-keys - 'flowtype/sort-keys': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#no-mixed - 'flowtype/no-mixed': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-spread-exact-type - 'flowtype/spread-exact-type': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-readonly-react-props - 'flowtype/require-readonly-react-props': 'error', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-require-inexact-type - 'flowtype/require-inexact-type': 'off', - - // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-arrow-parens - 'flowtype/arrow-parens': [ - 'error', - 'always', - ], - - // https://github.com/gajus/eslint-plugin-flowtype#require-indexer-name - 'flowtype/require-indexer-name': [ - 'error', - 'never', - ], - - }, - - settings: { - - flowtype: { - onlyFilesWithFlowAnnotation: true, - }, - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/index.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/index.js index 8cd255fe..15cf4cc5 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/index.js +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/index.js @@ -1,24 +1,15 @@ -// - -module.exports = { - - plugins: ['jsx-a11y'], +import jsxA11y from 'eslint-plugin-jsx-a11y'; +export default { + plugins: { + 'jsx-a11y': jsxA11y, + }, rules: { - - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md - 'jsx-a11y/accessible-emoji': 'error', - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md 'jsx-a11y/alt-text': [ 'error', { - elements: [ - 'img', - 'object', - 'area', - "input[type='image']", - ], + elements: ['img', 'object', 'area', "input[type='image']"], img: [], object: [], area: [], @@ -26,14 +17,13 @@ module.exports = { }, ], + 'anchor-ambiguous-text': 'off', + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md 'jsx-a11y/anchor-has-content': [ 'error', { - components: [ - 'Anchor', - 'Link', - ], + components: ['Anchor', 'Link'], }, ], @@ -41,16 +31,9 @@ module.exports = { 'jsx-a11y/anchor-is-valid': [ 'error', { - components: [ - 'Anchor', - 'Link', - ], + components: ['Anchor', 'Link'], specialLink: ['to'], - aspects: [ - 'noHref', - 'invalidHref', - 'preferButton', - ], + aspects: ['noHref', 'invalidHref', 'preferButton'], }, ], @@ -67,7 +50,7 @@ module.exports = { 'jsx-a11y/aria-role': [ 'error', { - ignoreNonDom: false, + ignoreNonDOM: false, }, ], @@ -170,10 +153,7 @@ module.exports = { 'jsx-a11y/no-distracting-elements': [ 'error', { - elements: [ - 'marquee', - 'blink', - ], + elements: ['marquee', 'blink'], }, ], @@ -181,10 +161,7 @@ module.exports = { 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ 'error', { - tr: [ - 'none', - 'presentation', - ], + tr: ['none', 'presentation'], }, ], @@ -225,13 +202,7 @@ module.exports = { 'tree', 'treegrid', ], - li: [ - 'menuitem', - 'option', - 'row', - 'tab', - 'treeitem', - ], + li: ['menuitem', 'option', 'row', 'tab', 'treeitem'], table: ['grid'], td: ['gridcell'], }, @@ -298,6 +269,8 @@ module.exports = { 'jsx-a11y/control-has-associated-label': 'error', - }, + 'jsx-a11y/prefer-tag-over-role': 'error', + 'jsx-a11y/no-aria-hidden-on-focusable': 'off', + }, }; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/oxlint-config.js new file mode 100644 index 00000000..b652d5fd --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/oxlint-config.js @@ -0,0 +1,161 @@ +export default { + plugins: ['jsx-a11y'], + rules: { + 'jsx-a11y/alt-text': [ + 'error', + { + elements: ['img', 'object', 'area', "input[type='image']"], + img: [], + object: [], + area: [], + "input[type='image']": [], + }, + ], + 'jsx-a11y/anchor-ambiguous-text': 'off', + 'jsx-a11y/anchor-has-content': 'off', + 'jsx-a11y/anchor-is-valid': [ + 'error', + { + components: ['Anchor', 'Link'], + specialLink: ['to'], + aspects: ['noHref', 'invalidHref', 'preferButton'], + }, + ], + 'jsx-a11y/aria-activedescendant-has-tabindex': 'error', + 'jsx-a11y/aria-props': 'error', + 'jsx-a11y/aria-proptypes': 'error', + 'jsx-a11y/aria-role': [ + 'error', + { + ignoreNonDOM: false, + }, + ], + 'jsx-a11y/aria-unsupported-elements': 'error', + 'jsx-a11y/autocomplete-valid': 'error', + 'jsx-a11y/click-events-have-key-events': 'error', + 'jsx-a11y/control-has-associated-label': 'error', + 'jsx-a11y/heading-has-content': [ + 'error', + { + components: [''], + }, + ], + 'jsx-a11y/html-has-lang': 'error', + 'jsx-a11y/iframe-has-title': 'error', + 'jsx-a11y/img-redundant-alt': 'error', + 'jsx-a11y/interactive-supports-focus': [ + 'error', + { + tabbable: [ + 'button', + 'checkbox', + 'columnheader', + 'combobox', + 'grid', + 'gridcell', + 'link', + 'listbox', + 'menu', + 'menubar', + 'menuitem', + 'menuitemcheckbox', + 'menuitemradio', + 'option', + 'progressbar', + 'radio', + 'radiogroup', + 'row', + 'rowheader', + 'searchbox', + 'slider', + 'spinbutton', + 'switch', + 'tab', + 'tablist', + 'textbox', + 'tree', + 'treegrid', + 'treeitem', + 'doc-backlink', + 'doc-biblioref', + 'doc-glossref', + 'doc-noteref', + ], + }, + ], + 'jsx-a11y/lang': 'error', + 'jsx-a11y/media-has-caption': [ + 'error', + { + audio: [], + video: [], + track: [], + }, + ], + 'jsx-a11y/mouse-events-have-key-events': 'error', + 'jsx-a11y/no-access-key': 'error', + 'jsx-a11y/no-aria-hidden-on-focusable': 'off', + 'jsx-a11y/no-autofocus': [ + 'error', + { + ignoreNonDOM: true, + }, + ], + 'jsx-a11y/no-distracting-elements': 'error', + 'jsx-a11y/no-noninteractive-element-interactions': [ + 'error', + { + handlers: [ + 'onClick', + 'onMouseDown', + 'onMouseUp', + 'onKeyPress', + 'onKeyDown', + 'onKeyUp', + ], + }, + ], + 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'error', + 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ + 'error', + { + tr: ['none', 'presentation'], + }, + ], + 'jsx-a11y/no-noninteractive-tabindex': [ + 'error', + { + tags: [], + roles: ['tabpanel'], + }, + ], + 'jsx-a11y/no-redundant-roles': 'error', + 'jsx-a11y/no-static-element-interactions': [ + 'error', + { + handlers: [ + 'onClick', + 'onMouseDown', + 'onKeyPress', + 'onKeyDown', + 'onKeyUp', + ], + }, + ], + 'jsx-a11y/role-has-required-aria-props': 'error', + 'jsx-a11y/role-supports-aria-props': 'error', + 'jsx-a11y/scope': 'error', + 'jsx-a11y/tabindex-no-positive': 'error', + 'jsx-a11y/label-has-associated-control': [ + 'error', + { + labelComponents: [], + labelAttributes: [], + controlComponents: [], + assert: 'both', + depth: 10, + }, + ], + 'jsx-a11y/prefer-tag-over-role': 'error', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/oxlint-disabled.js new file mode 100644 index 00000000..6381f097 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jsx-a11y/oxlint-disabled.js @@ -0,0 +1,38 @@ +export const ESLintPluginA11YDisabled = { + 'jsx-a11y/alt-text': 'off', + 'jsx-a11y/anchor-ambiguous-text': 'off', + 'jsx-a11y/anchor-has-content': 'off', + 'jsx-a11y/anchor-is-valid': 'off', + 'jsx-a11y/aria-activedescendant-has-tabindex': 'off', + 'jsx-a11y/aria-props': 'off', + 'jsx-a11y/aria-proptypes': 'off', + 'jsx-a11y/aria-role': 'off', + 'jsx-a11y/aria-unsupported-elements': 'off', + 'jsx-a11y/autocomplete-valid': 'off', + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/control-has-associated-label': 'error', + 'jsx-a11y/heading-has-content': 'off', + 'jsx-a11y/html-has-lang': 'off', + 'jsx-a11y/iframe-has-title': 'off', + 'jsx-a11y/img-redundant-alt': 'off', + 'jsx-a11y/interactive-supports-focus': 'off', + 'jsx-a11y/lang': 'off', + 'jsx-a11y/media-has-caption': 'off', + 'jsx-a11y/mouse-events-have-key-events': 'off', + 'jsx-a11y/no-access-key': 'off', + 'jsx-a11y/no-aria-hidden-on-focusable': 'off', + 'jsx-a11y/no-autofocus': 'off', + 'jsx-a11y/no-distracting-elements': 'off', + 'jsx-a11y/no-noninteractive-element-interactions': 'off', + 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'off', + 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'off', + 'jsx-a11y/no-noninteractive-tabindex': 'off', + 'jsx-a11y/no-redundant-roles': 'off', + 'jsx-a11y/no-static-element-interactions': 'off', + 'jsx-a11y/role-has-required-aria-props': 'off', + 'jsx-a11y/role-supports-aria-props': 'off', + 'jsx-a11y/scope': 'off', + 'jsx-a11y/tabindex-no-positive': 'off', + 'jsx-a11y/label-has-associated-control': 'off', + 'jsx-a11y/prefer-tag-over-role': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/index.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/index.js index 0e8c1008..9c6b7521 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/index.js +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/index.js @@ -1,7 +1,9 @@ -module.exports = { - - plugins: ['react-hooks'], +import reactHooksPlugin from 'eslint-plugin-react-hooks'; +export default { + plugins: { + 'react-hooks': reactHooksPlugin, + }, rules: { // React Hooks Plugin https://www.npmjs.com/package/eslint-plugin-react-hooks @@ -11,6 +13,21 @@ module.exports = { // https://reactjs.org/docs/hooks-rules.html 'react-hooks/exhaustive-deps': 'error', + // React Compiler rules + 'react-hooks/config': 'error', + 'react-hooks/error-boundaries': 'error', + 'react-hooks/component-hook-factories': 'error', + 'react-hooks/gating': 'error', + 'react-hooks/globals': 'error', + 'react-hooks/immutability': 'error', + 'react-hooks/preserve-manual-memoization': 'error', + 'react-hooks/purity': 'error', + 'react-hooks/refs': 'error', + 'react-hooks/set-state-in-effect': 'error', + 'react-hooks/set-state-in-render': 'error', + 'react-hooks/static-components': 'error', + 'react-hooks/unsupported-syntax': 'error', + 'react-hooks/use-memo': 'error', + 'react-hooks/incompatible-library': 'error', }, - }; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/oxlint-config.js new file mode 100644 index 00000000..24e03808 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/oxlint-config.js @@ -0,0 +1,7 @@ +export default { + plugins: ['react'], + rules: { + 'react/rules-of-hooks': 'error', + 'react/exhaustive-deps': 'error', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/oxlint-disabled.js new file mode 100644 index 00000000..c20c2bad --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react-hooks/oxlint-disabled.js @@ -0,0 +1,4 @@ +export const ESLintPluginReactHooksDisabled = { + 'react-hooks/rules-of-hooks': 'off', + 'react-hooks/exhaustive-deps': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/index.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/index.js index e3e9edb3..4e8f9e65 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/index.js +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/index.js @@ -1,10 +1,14 @@ -module.exports = { +import reactPlugin from 'eslint-plugin-react'; - plugins: ['react'], - - extends: [ - './react.js', - './jsx.js', - ], +import jsxConfig from './jsx.js'; +import reactConfig from './react.js'; +export default { + plugins: { + react: reactPlugin, + }, + rules: { + ...jsxConfig, + ...reactConfig, + }, }; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/jsx.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/jsx.js index 747ace79..7f59979d 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/jsx.js +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/jsx.js @@ -1,258 +1,242 @@ -const config = require('../config'); +import config from '../config.js'; // https://github.com/yannickcr/eslint-plugin-react#jsx-specific-rules - -module.exports = { - - rules: { - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md - 'react/jsx-boolean-value': [ - 'error', - 'never', - { - always: [], - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md - 'react/jsx-child-element-spacing': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md - 'react/jsx-closing-bracket-location': [ - 'error', - { - selfClosing: 'tag-aligned', - nonEmpty: 'tag-aligned', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md - 'react/jsx-closing-tag-location': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md - 'react/jsx-curly-spacing': [ - 'error', - { - when: 'never', - allowMultiline: true, - spacing: { - objectLiterals: 'always', - }, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md - 'react/jsx-equals-spacing': [ - 'error', - 'never', - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md - 'react/jsx-filename-extension': [ - 'error', - { - extensions: ['.jsx'], - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md - 'react/jsx-first-prop-new-line': [ - 'error', - 'multiline-multiprop', - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md - 'react/jsx-fragments': [ - 'error', 'syntax', - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md - 'react/jsx-handler-names': [ - 'error', - { - eventHandlerPrefix: 'handle', - eventHandlerPropPrefix: 'on', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md - 'react/jsx-indent': [ - 'error', - config.jsxIndent, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md - 'react/jsx-indent-props': [ - 'error', - config.jsxIndentProps, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md - 'react/jsx-key': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md - 'react/jsx-max-depth': [ - 'error', - { - max: config.jsxMaxDepth, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md - 'react/jsx-max-props-per-line': [ - 'error', - { - maximum: config.jsxMaxPropsPerLine, - when: 'always', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md - 'react/jsx-no-bind': [ - 'error', { - ignoreDOMComponents: true, - ignoreRefs: false, - allowArrowFunctions: false, - allowFunctions: false, - allowBind: false, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md - 'react/jsx-no-comment-textnodes': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md - 'react/jsx-no-duplicate-props': [ - 'error', - { - ignoreCase: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md - 'react/jsx-no-literals': [ - 'off', - { - noStrings: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md - 'react/jsx-no-target-blank': [ - 'error', - { - enforceDynamicLinks: 'always', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md - 'react/jsx-no-undef': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md - 'react/jsx-one-expression-per-line': [ - 'error', - { - allow: 'literal', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md - 'react/jsx-curly-brace-presence': [ - 'error', - { - props: 'never', - children: 'never', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md - 'react/jsx-pascal-case': [ - 'error', - { - allowAllCaps: false, - ignore: [], - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md - 'react/jsx-props-no-multi-spaces': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md - 'react/jsx-sort-default-props': [ - 'off', - { - ignoreCase: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md - 'react/jsx-sort-props': [ - 'error', - { - ignoreCase: true, - callbacksLast: true, - shorthandFirst: true, - shorthandLast: false, - noSortAlphabetically: false, - reservedFirst: false, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md - 'react/jsx-tag-spacing': [ - 'error', - { - closingSlash: 'never', - beforeSelfClosing: 'always', - afterOpening: 'never', - beforeClosing: 'never', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md - 'react/jsx-uses-react': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md - 'react/jsx-uses-vars': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md - 'react/jsx-wrap-multilines': [ - 'error', - { - declaration: 'parens-new-line', - assignment: 'parens-new-line', - return: 'parens-new-line', - arrow: 'parens-new-line', - condition: 'parens-new-line', - logical: 'parens-new-line', - prop: 'parens-new-line', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md - 'react/no-danger': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md - 'react/jsx-props-no-spreading': 'off', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md - 'react/prefer-read-only-props': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md - 'react/jsx-curly-newline': [ - 'error', - { - multiline: 'consistent', - singleline: 'consistent', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md - 'react/jsx-no-useless-fragment': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md - 'react/jsx-no-script-url': 'error', - }, - +export default { + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md + 'react/jsx-boolean-value': [ + 'error', + 'never', + { + always: [], + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md + * Disabled to work with oxfmt + */ + 'react/jsx-child-element-spacing': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md + * disable to work with oxfmt + */ + 'react/jsx-closing-bracket-location': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md + * disable to work with oxfmt + */ + 'react/jsx-closing-tag-location': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md + * disable to work with oxfmt + */ + 'react/jsx-curly-spacing': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md + * disable to work with oxfmt + */ + 'react/jsx-equals-spacing': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md + 'react/jsx-filename-extension': [ + 'error', + { + extensions: ['.tsx'], + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md + * disable to work with oxfmt + */ + 'react/jsx-first-prop-new-line': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md + 'react/jsx-fragments': ['error', 'syntax'], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md + 'react/jsx-handler-names': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md + * disable to work with oxfmt + */ + 'react/jsx-indent': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md + * disable ti work with oxfmt + */ + 'react/jsx-indent-props': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md + 'react/jsx-key': [ + 'error', + { + checkFragmentShorthand: true, + checkKeyMustBeforeSpread: true, + warnOnDuplicates: true, + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md + 'react/jsx-max-depth': [ + 'error', + { + max: config.jsxMaxDepth, + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md + * disable to work with oxfmt + */ + 'react/jsx-max-props-per-line': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md + * disable to work with oxfmt + */ + 'react/jsx-newline': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md + 'react/jsx-no-bind': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md + 'react/jsx-no-comment-textnodes': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md + 'react/jsx-no-constructed-context-values': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md + 'react/jsx-no-duplicate-props': [ + 'error', + { + ignoreCase: true, + }, + ], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md + 'react/jsx-no-leaked-render': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md + 'react/jsx-no-literals': [ + 'off', + { + noStrings: true, + }, + ], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md + 'react/jsx-props-no-spread-multi': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md + 'react/jsx-no-target-blank': [ + 'error', + { + enforceDynamicLinks: 'always', + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md + 'react/jsx-no-undef': 'error', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md + * disable to worl with oxfmt + */ + 'react/jsx-one-expression-per-line': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md + 'react/jsx-curly-brace-presence': [ + 'error', + { + props: 'never', + children: 'never', + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md + 'react/jsx-pascal-case': [ + 'error', + { + allowAllCaps: false, + ignore: [], + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md + * disable to work with oxfmt + */ + 'react/jsx-props-no-multi-spaces': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md + 'react/sort-default-props': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md + 'react/jsx-sort-props': [ + 'error', + { + ignoreCase: true, + callbacksLast: true, + shorthandFirst: true, + shorthandLast: false, + noSortAlphabetically: false, + reservedFirst: false, + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md + * disable to work with oxfmt + */ + 'react/jsx-tag-spacing': 'off', + + /* + * off after update to 16.4 + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md + */ + 'react/jsx-uses-react': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md + 'react/jsx-uses-vars': 'error', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md + * disable to work with oxfmt + */ + 'react/jsx-wrap-multilines': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md + 'react/no-danger': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md + 'react/jsx-props-no-spreading': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md + 'react/prefer-read-only-props': 'error', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md + * disable to work with oxfmt + */ + 'react/jsx-curly-newline': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md + 'react/jsx-no-useless-fragment': [ + 'error', + { + allowExpressions: true, + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md + 'react/jsx-no-script-url': 'error', + + 'react/no-object-type-as-default-prop': 'error', }; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/oxlint-config.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/oxlint-config.js new file mode 100644 index 00000000..5004b1c9 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/oxlint-config.js @@ -0,0 +1,187 @@ +export default { + plugins: ['react'], + rules: { + 'react/jsx-boolean-value': [ + 'error', + 'never', + { + always: [], + }, + ], + 'react/jsx-filename-extension': [ + 'error', + { + extensions: ['.tsx'], + }, + ], + 'react/jsx-fragments': ['error', 'syntax'], + 'react/jsx-handler-names': 'off', + 'react/jsx-key': [ + 'error', + { + checkFragmentShorthand: true, + checkKeyMustBeforeSpread: true, + warnOnDuplicates: true, + }, + ], + 'react/jsx-max-depth': [ + 'error', + { + max: 10, + }, + ], + 'react/jsx-no-comment-textnodes': 'error', + 'react/jsx-no-constructed-context-values': 'error', + 'react/jsx-no-duplicate-props': 'error', + 'react/jsx-no-literals': 'off', + 'react/jsx-props-no-spread-multi': 'error', + 'react/no-multi-comp': 'off', + 'react/jsx-no-target-blank': [ + 'error', + { + enforceDynamicLinks: 'always', + }, + ], + 'react/jsx-no-undef': 'error', + 'react/jsx-curly-brace-presence': [ + 'error', + { + props: 'never', + children: 'never', + }, + ], + 'react/jsx-pascal-case': [ + 'error', + { + allowAllCaps: false, + ignore: [], + }, + ], + 'react/no-danger': 'error', + 'react/jsx-props-no-spreading': 'off', + 'react/jsx-no-useless-fragment': [ + 'error', + { + allowExpressions: true, + }, + ], + 'react/jsx-no-script-url': 'error', + 'react/button-has-type': [ + 'error', + { + button: true, + submit: true, + reset: true, + }, + ], + 'react/checked-requires-onchange-or-readonly': 'error', + 'react/display-name': 'off', + 'react/forbid-component-props': [ + 'error', + { + forbid: [ + 'style', + { + propName: 'className', + allowedFor: ['Button', 'Icon', 'Link'], + }, + ], + }, + ], + 'react/forbid-dom-props': [ + 'error', + { + forbid: [ + 'abbr', + 'align', + 'axis', + 'bgcolor', + 'border', + 'cellpadding', + 'cellspacing', + 'char', + 'charoff', + 'charset', + 'clear', + 'coords', + 'frame', + 'frameborder', + 'hspace', + 'longdesc', + 'marginheight', + 'marginwidth', + 'rev', + 'scope', + 'scrolling', + 'shape', + 'size', + 'valign', + 'vspace', + ], + }, + ], + 'react/forbid-elements': [ + 'error', + { + forbid: [ + 'acronym', + 'applet', + 'basefont', + 'big', + 'center', + 'dir', + 'font', + 'frame', + 'frameset', + 'noframes', + 'isindex', + 'noframes', + 's', + 'strike', + 'tt', + 'u', + ], + }, + ], + 'react/forward-ref-uses-ref': 'error', + 'react/hook-use-state': [ + 'error', + { + allowDestructuredState: true, + }, + ], + 'react/iframe-missing-sandbox': 'error', + 'react/no-array-index-key': 'error', + 'react/no-children-prop': 'error', + 'react/no-danger-with-children': 'error', + 'react/no-did-mount-set-state': 'off', + 'react/no-did-update-set-state': 'off', + 'react/no-direct-mutation-state': 'error', + 'react/no-find-dom-node': 'error', + 'react/no-is-mounted': 'error', + 'react/no-namespace': 'error', + 'react/no-object-type-as-default-prop': 'error', + 'react/no-redundant-should-component-update': 'error', + 'react/no-render-return-value': 'error', + 'react/no-set-state': 'off', + 'react/only-export-components': 'off', + 'react/no-string-refs': 'error', + 'react/no-this-in-sfc': 'error', + 'react/no-unescaped-entities': 'error', + 'react/no-unknown-property': 'error', + 'react/no-unsafe': 'error', + 'react/no-unstable-nested-components': 'error', + 'react/no-will-update-set-state': 'error', + 'react/prefer-es6-class': ['error', 'always'], + 'react/react-in-jsx-scope': 'off', + 'react/require-render-return': 'error', + 'react/self-closing-comp': 'error', + 'react/style-prop-object': 'error', + 'react/void-dom-elements-no-children': 'error', + 'react/state-in-constructor': ['error', 'always'], + + // Oxlint specific rules + 'react/no-clone-element': 'error', + 'react/no-react-children': 'error', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/oxlint-disabled.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/oxlint-disabled.js new file mode 100644 index 00000000..d665c474 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/oxlint-disabled.js @@ -0,0 +1,58 @@ +export const ESLintPluginReactDisabled = { + 'react/jsx-boolean-value': 'off', + 'react/jsx-filename-extension': 'off', + 'react/jsx-fragments': 'off', + 'react/jsx-handler-names': 'off', + 'react/jsx-key': 'off', + 'react/jsx-max-depth': 'off', + 'react/jsx-no-comment-textnodes': 'off', + 'react/jsx-no-constructed-context-values': 'off', + 'react/jsx-no-duplicate-props': 'off', + 'react/jsx-props-no-spread-multi': 'off', + 'react/jsx-no-literals': 'off', + 'react/jsx-no-target-blank': 'off', + 'react/jsx-no-undef': 'off', + 'react/jsx-curly-brace-presence': 'off', + 'react/jsx-pascal-case': 'off', + 'react/no-danger': 'off', + 'react/jsx-props-no-spreading': 'off', + 'react/jsx-no-useless-fragment': 'off', + 'react/jsx-no-script-url': 'off', + 'react/button-has-type': 'off', + 'react/checked-requires-onchange-or-readonly': 'off', + 'react/display-name': 'off', + 'react/forbid-component-props': 'off', + 'react/forbid-dom-props': 'off', + 'react/forbid-elements': 'off', + 'react/forward-ref-uses-ref': 'off', + 'react/hook-use-state': 'off', + 'react/iframe-missing-sandbox': 'off', + 'react/no-array-index-key': 'off', + 'react/no-children-prop': 'off', + 'react/no-danger-with-children': 'off', + 'react/no-did-mount-set-state': 'off', + 'react/no-did-update-set-state': 'off', + 'react/no-direct-mutation-state': 'off', + 'react/no-find-dom-node': 'off', + 'react/no-is-mounted': 'off', + 'react/no-namespace': 'off', + 'react/no-object-type-as-default-prop': 'off', + 'react/no-multi-comp': 'off', + 'react/no-redundant-should-component-update': 'off', + 'react/no-render-return-value': 'off', + 'react/no-set-state': 'off', + 'react/no-string-refs': 'off', + 'react/no-this-in-sfc': 'off', + 'react/no-unescaped-entities': 'off', + 'react/no-unknown-property': 'off', + 'react/no-unsafe': 'off', + 'react/no-unstable-nested-components': 'off', + 'react/no-will-update-set-state': 'off', + 'react/prefer-es6-class': 'off', + 'react/react-in-jsx-scope': 'off', + 'react/require-render-return': 'off', + 'react/self-closing-comp': 'off', + 'react/style-prop-object': 'off', + 'react/void-dom-elements-no-children': 'off', + 'react/state-in-constructor': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/react.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/react.js index 2f04450f..f1f5e48f 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/react.js +++ b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-react/react.js @@ -1,374 +1,361 @@ // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules -module.exports = { - - rules: { - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md - 'react/boolean-prop-naming': [ - 'error', - { - propTypeNames: [ - 'bool', - 'mutuallyExclusiveTrueProps', - ], - rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+', - message: 'It is better if your prop ({{ propName }}) matches this pattern: ({{ pattern }})', - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/button-has-type.md - 'react/button-has-type': [ - 'error', - { - button: true, - submit: true, - reset: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md - 'react/default-props-match-prop-types': [ - 'error', - { - allowRequiredDefaults: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md - 'react/destructuring-assignment': [ - 'error', - 'always', - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md - 'react/display-name': [ - 'off', - { - ignoreTranspilerName: false, - }, - ], - - /* - * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md - * https://brigade.engineering/don-t-pass-css-classes-between-components-e9f7ab192785 - */ - 'react/forbid-component-props': [ - 'error', - { - forbid: [ - 'style', - { - propName: 'className', - allowedFor: [ - 'Button', - 'Icon', - 'Link', - ], - }, - ], - }, - ], - - /* - * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md - * https://www.w3.org/TR/html5-diff/#obsolete-attributes - */ - 'react/forbid-dom-props': [ - 'error', - { - forbid: [ - 'abbr', - 'align', - 'axis', - 'bgcolor', - 'border', - 'cellpadding', - 'cellspacing', - 'char', - 'charoff', - 'charset', - 'clear', - 'coords', - 'frame', - 'frameborder', - 'hspace', - 'id', - 'longdesc', - 'marginheight', - 'marginwidth', - 'name', - 'rev', - 'scope', - 'scrolling', - 'shape', - 'size', - 'style', - 'valign', - 'vspace', - ], - }, - ], - - /* - * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md - * https://www.w3.org/TR/html5-diff/#obsolete-elements - */ - 'react/forbid-elements': [ - 'error', - { - forbid: [ - 'acronym', - 'applet', - 'basefont', - 'big', - 'center', - 'dir', - 'font', - 'frame', - 'frameset', - 'noframes', - 'isindex', - 'noframes', - 's', - 'strike', - 'tt', - 'u', - ], - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md - 'react/forbid-prop-types': [ - 'error', - { - forbid: [ - 'any', - 'array', - 'object', - ], - checkContextTypes: true, - checkChildContextTypes: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md - 'react/forbid-foreign-prop-types': [ - 'error', - { - allowInPropTypes: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md - 'react/no-access-state-in-setstate': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md - 'react/no-array-index-key': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md - 'react/no-children-prop': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md - 'react/no-danger-with-children': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md - 'react/no-deprecated': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md - 'react/no-did-mount-set-state': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md - 'react/no-did-update-set-state': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md - 'react/no-direct-mutation-state': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md - 'react/no-find-dom-node': 'error', - - /* - * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md - * https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html - */ - 'react/no-is-mounted': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md - 'react/no-multi-comp': [ - 'error', - { - ignoreStateless: false, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md - 'react/no-redundant-should-component-update': 'error', - - /* - * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md - * using this return value is legacy and should be avoided because future versions of React may render - * components asynchronously in some cases. - */ - 'react/no-render-return-value': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md - 'react/no-set-state': 'off', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-typos.md - 'react/no-typos': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md - 'react/no-string-refs': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md - 'react/no-this-in-sfc': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md - 'react/no-unescaped-entities': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md - 'react/no-unknown-property': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md - 'react/no-unsafe': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md - 'react/no-unused-prop-types': [ - 'error', - { - customValidators: [], - skipShapeProps: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md - 'react/no-unused-state': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md - 'react/no-will-update-set-state': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md - 'react/prefer-es6-class': [ - 'error', - 'always', - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md - 'react/prefer-stateless-function': [ - 'error', - { - ignorePureComponents: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md - 'react/prop-types': [ - 'error', - { - ignore: [], - customValidators: [], - skipUndeclared: true, - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md - 'react/react-in-jsx-scope': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md - 'react/require-default-props': 'off', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md - 'react/require-optimization': [ - 'error', - { - allowDecorators: ['pureComponentDecorator'], - }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md - 'react/require-render-return': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md - 'react/self-closing-comp': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md - 'react/sort-comp': [ - 'error', { - order: [ - 'static-methods', - 'lifecycle', - '/^on.+$/', - 'getters', - 'setters', - 'instance-methods', - 'everything-else', - 'rendering', - ], - groups: { - lifecycle: [ - 'displayName', - 'propTypes', - 'contextTypes', - 'childContextTypes', - 'mixins', - 'statics', - 'defaultProps', - 'instance-variables', - 'constructor', - 'getDefaultProps', - 'state', - 'getInitialState', - 'getChildContext', - 'getDerivedStateFromProps', - 'componentWillMount', - 'UNSAFE_componentWillMount', - 'componentDidMount', - 'componentWillReceiveProps', - 'UNSAFE_componentWillReceiveProps', - 'shouldComponentUpdate', - 'componentWillUpdate', - 'UNSAFE_componentWillUpdate', - 'getSnapshotBeforeUpdate', - 'componentDidUpdate', - 'componentDidCatch', - 'componentWillUnmount', - ], - rendering: [ - '/^render.+$/', - 'render', - ], +export default { + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md + 'react/boolean-prop-naming': [ + 'error', + { + propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'], + rule: '^(is|has|should)[A-Z]([A-Za-z0-9]?)+', + message: + 'It is better if your prop ({{ propName }}) matches this pattern: ({{ pattern }})', + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/button-has-type.md + 'react/button-has-type': [ + 'error', + { + button: true, + submit: true, + reset: true, + }, + ], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md + 'react/checked-requires-onchange-or-readonly': 'error', + + /* + * no prop types usage + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md + */ + 'react/default-props-match-prop-types': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md + 'react/destructuring-assignment': ['error', 'always'], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md + 'react/display-name': 'off', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md + * https://brigade.engineering/don-t-pass-css-classes-between-components-e9f7ab192785 + */ + 'react/forbid-component-props': [ + 'error', + { + forbid: [ + 'style', + { + propName: 'className', + allowedFor: ['Button', 'Icon', 'Link'], }, + ], + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md + * https://www.w3.org/TR/html5-diff/#obsolete-attributes + */ + 'react/forbid-dom-props': [ + 'error', + { + forbid: [ + 'abbr', + 'align', + 'axis', + 'bgcolor', + 'border', + 'cellpadding', + 'cellspacing', + 'char', + 'charoff', + 'charset', + 'clear', + 'coords', + 'frame', + 'frameborder', + 'hspace', + 'longdesc', + 'marginheight', + 'marginwidth', + 'rev', + 'scope', + 'scrolling', + 'shape', + 'size', + 'valign', + 'vspace', + ], + }, + ], + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md + * https://www.w3.org/TR/html5-diff/#obsolete-elements + */ + 'react/forbid-elements': [ + 'error', + { + forbid: [ + 'acronym', + 'applet', + 'basefont', + 'big', + 'center', + 'dir', + 'font', + 'frame', + 'frameset', + 'noframes', + 'isindex', + 'noframes', + 's', + 'strike', + 'tt', + 'u', + ], + }, + ], + + /* + * no prop types usage + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md + */ + 'react/forbid-foreign-prop-types': 'off', + + /* + * no prop types usage + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md + */ + 'react/forbid-prop-types': 'off', + + 'react/forward-ref-uses-ref': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md + 'react/function-component-definition': [ + 'error', + { + namedComponents: 'arrow-function', + unnamedComponents: 'arrow-function', + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md + 'react/hook-use-state': [ + 'error', + { + allowDestructuredState: true, + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md + 'react/iframe-missing-sandbox': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md + 'react/no-access-state-in-setstate': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md + 'react/no-adjacent-inline-elements': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md + 'react/no-array-index-key': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-arrow-function-lifecycle.md + 'react/no-arrow-function-lifecycle': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md + 'react/no-children-prop': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md + 'react/no-danger-with-children': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md + 'react/no-deprecated': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md + 'react/no-did-mount-set-state': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md + 'react/no-did-update-set-state': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md + 'react/no-direct-mutation-state': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md + 'react/no-find-dom-node': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-invalid-html-attribute.md + 'react/no-invalid-html-attribute': 'error', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md + * https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html + */ + 'react/no-is-mounted': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md + 'react/no-multi-comp': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-namespace.md + 'react/no-namespace': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md + 'react/no-redundant-should-component-update': 'error', + + /* + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md + * using this return value is legacy and should be avoided because future versions of React may render + * components asynchronously in some cases. + */ + 'react/no-render-return-value': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md + 'react/no-set-state': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-typos.md + 'react/no-typos': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md + 'react/no-string-refs': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md + 'react/no-this-in-sfc': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md + 'react/no-unescaped-entities': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md + 'react/no-unknown-property': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md + 'react/no-unsafe': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md + 'react/no-unstable-nested-components': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-class-component-methods.md + 'react/no-unused-class-component-methods': 'error', + + /* + * no prop types usage + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md + */ + 'react/no-unused-prop-types': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md + 'react/no-unused-state': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md + 'react/no-will-update-set-state': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md + 'react/prefer-es6-class': ['error', 'always'], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-exact-props.md + 'react/prefer-exact-props': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md + 'react/prefer-stateless-function': [ + 'error', + { + ignorePureComponents: true, + }, + ], + + /* + * no prop types usage + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md + */ + 'react/prop-types': 'off', + + /* + * off after update to 16.4 + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md + */ + 'react/react-in-jsx-scope': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md + 'react/require-default-props': 'off', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md + 'react/require-optimization': [ + 'error', + { + allowDecorators: ['pureComponentDecorator'], + }, + ], + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md + 'react/require-render-return': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md + 'react/self-closing-comp': 'error', + + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md + 'react/sort-comp': [ + 'error', + { + order: [ + 'static-methods', + 'lifecycle', + '/^on.+$/', + 'getters', + 'setters', + 'instance-methods', + 'everything-else', + 'rendering', + ], + groups: { + lifecycle: [ + 'displayName', + 'propTypes', + 'contextTypes', + 'childContextTypes', + 'mixins', + 'statics', + 'defaultProps', + 'instance-variables', + 'constructor', + 'getDefaultProps', + 'state', + 'getInitialState', + 'getChildContext', + 'getDerivedStateFromProps', + 'componentWillMount', + 'UNSAFE_componentWillMount', + 'componentDidMount', + 'componentWillReceiveProps', + 'UNSAFE_componentWillReceiveProps', + 'shouldComponentUpdate', + 'componentWillUpdate', + 'UNSAFE_componentWillUpdate', + 'getSnapshotBeforeUpdate', + 'componentDidUpdate', + 'componentDidCatch', + 'componentWillUnmount', + ], + rendering: ['/^render.+$/', 'render'], }, - ], - - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md - 'react/sort-prop-types': [ - 'error', - { - ignoreCase: true, - callbacksLast: true, - requiredFirst: true, - sortShapeProp: true, - }, - ], + }, + ], - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md - 'react/style-prop-object': 'error', + /* + * no prop types usage + * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md + */ + 'react/sort-prop-types': 'off', - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md - 'react/void-dom-elements-no-children': 'error', + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md + 'react/style-prop-object': 'error', - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md - 'react/state-in-constructor': [ - 'error', - 'always', - ], + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md + 'react/void-dom-elements-no-children': 'error', - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md - 'react/static-property-placement': [ - 'error', - 'static public field', - ], - }, + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md + 'react/state-in-constructor': ['error', 'always'], + // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md + 'react/static-property-placement': ['error', 'static public field'], }; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/best-practices.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/best-practices.js deleted file mode 100644 index aa465436..00000000 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/best-practices.js +++ /dev/null @@ -1,33 +0,0 @@ -// https://eslint.org/docs/rules/#best-practices - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/class-methods-use-this - 'class-methods-use-this': [ - 'error', - { - exceptMethods: [ - 'render', - 'getInitialState', - 'getDefaultProps', - 'getChildContext', - 'componentWillMount', - 'UNSAFE_componentWillMount', - 'componentDidMount', - 'componentWillReceiveProps', - 'UNSAFE_componentWillReceiveProps', - 'shouldComponentUpdate', - 'componentWillUpdate', - 'UNSAFE_componentWillUpdate', - 'componentDidUpdate', - 'componentWillUnmount', - 'componentDidCatch', - 'getSnapshotBeforeUpdate', - ], - }, - ], - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/index.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/index.js deleted file mode 100644 index 3bd95b91..00000000 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - - extends: [ - './best-practices.js', - './nodejs-and-commonjs.js', - ], - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/nodejs-and-commonjs.js b/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/nodejs-and-commonjs.js deleted file mode 100644 index b600c6eb..00000000 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint/nodejs-and-commonjs.js +++ /dev/null @@ -1,59 +0,0 @@ -// https://eslint.org/docs/rules/#nodejs-and-commonjs - -module.exports = { - - rules: { - - // https://eslint.org/docs/rules/callback-return - 'callback-return': 'error', - - // https://eslint.org/docs/rules/global-require - 'global-require': 'error', - - // https://eslint.org/docs/rules/handle-callback-err - 'handle-callback-err': 'error', - - /* - * https://eslint.org/docs/rules/no-buffer-constructor - * https://github.com/nodejs/node/issues/4660 - */ - 'no-buffer-constructor': 'error', - - // https://eslint.org/docs/rules/no-mixed-requires - 'no-mixed-requires': [ - 'error', - { - allowCall: false, - grouping: false, - }, - ], - - // https://eslint.org/docs/rules/no-new-require - 'no-new-require': 'error', - - // https://eslint.org/docs/rules/no-path-concat - 'no-path-concat': 'error', - - /* - * https://eslint.org/docs/rules/no-process-env - * https://stackoverflow.com/questions/5869216/how-to-store-node-js-deployment-settings-configuration-files - */ - 'no-process-env': 'error', - - // https://eslint.org/docs/rules/no-process-exit - 'no-process-exit': 'error', - - // https://eslint.org/docs/rules/no-restricted-modules - 'no-restricted-modules': [ - 'error', - { - paths: [], - }, - ], - - // https://eslint.org/docs/rules/no-sync - 'no-sync': 'error', - - }, - -}; diff --git a/eslint-configs/eslint-config-seekingalpha-tests/.gitignore b/eslint-configs/eslint-config-seekingalpha-tests/.gitignore new file mode 100644 index 00000000..68a7330b --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-tests/.gitignore @@ -0,0 +1,82 @@ +# Logs +log +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +dist +tmp +build + +#Certs +*.pem +*.key + +#MAC +.DS_Store + +#RubyMine +.idea +*.tmproj +*.swo +Thumbs.db + +yarn.lock +package-lock.json \ No newline at end of file diff --git a/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md new file mode 100644 index 00000000..9e69ce63 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md @@ -0,0 +1,800 @@ +# Change Log + +## 4.60.0 - 2026-04-13 + +- [new] migrate oxlint config to `oxlint-config` package + +## 4.59.0 - 2026-04-13 + +- [new] migrate oxlint config to `oxlint-config` package + +## 4.58.0 - 2026-04-13 + +- [new] extend oxlint config + +## 4.57.0 - 2026-04-12 + +- [deps] upgrade `eslint-plugin-jest` to version `29.15.2` + +## 4.56.0 - 2026-04-07 + +- [new] extend oxlint config + +## 4.55.0 - 2026-03-29 + +- [deps] upgrade `eslint-plugin-jest` to version `29.15.1` + +## 4.54.0 - 2026-03-24 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.16.2` + +## 4.53.0 - 2026-03-24 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.16.1` + +## 4.52.0 - 2026-03-10 + +- [new] extend oxlint config + +## 4.51.0 - 2026-03-10 + +- [new] sharable ts oxlint config + +## 4.50.0 - 2026-02-20 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.16.0` + +## 4.49.0 - 2026-02-16 + +- [deps] upgrade `eslint-plugin-jest` to version `29.15.0` + +## 4.48.0 - 2026-02-10 + +- [deps] upgrade `eslint-plugin-jest` to version `29.13.0` + +## 4.47.0 - 2026-01-28 + +- [new] add sharable oxlint config with eslint-plugin-jest rules + +## 4.46.0 - 2026-01-04 + +- [deps] upgrade `eslint-plugin-jest` to version `29.12.1` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.15.4` + +## 4.45.0 - 2025-12-30 + +- [deps] upgrade `eslint-plugin-jest` to version `29.11.2` + +## 4.44.0 - 2025-12-24 + +- [deps] upgrade `eslint-plugin-jest` to version `29.11.0` +- [breaking] enable `jest/prefer-mock-return-shorthand` rule + +## 4.43.0 - 2025-12-23 + +- [deps] upgrade `eslint-plugin-jest` to version `29.10.1` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.15.3` + +## 4.42.0 - 2025-12-22 + +- [deps] upgrade `eslint-plugin-jest` to version `29.9.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.15.2` + +## 4.41.0 - 2025-12-17 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.15.1` + +## 4.40.0 - 2025-12-15 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.14.0` +- [deps] upgrade `eslint-plugin-jest` to version `29.5.0` +- [breaking] enable `jest/no-unneeded-async-expect-function` rule +- [breaking] enable `testing-library/prefer-user-event-setup` rule + +## 4.39.0 - 2025-12-14 + +- [deps] upgrade `eslint-plugin-jest` to version `29.4.0` +- [breaking] enable `jest/prefer-to-have-been-called` rule +- [breaking] enable `jest/prefer-to-have-been-called-times` rule + +## 4.38.0 - 2025-12-13 + +- [deps] upgrade `eslint` to version `9.39.2` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.13.6` +- [deps] upgrade `eslint-plugin-jest` to version `29.2.2` + +## 4.37.1 - 2025-11-26 + +- [breaking] disable `jest/valid-mock-module-path` rule + +## 4.37.0 - 2025-11-26 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.13.5` +- [deps] upgrade `eslint-plugin-jest` to version `29.2.1` +- [breaking] enable `jest/valid-mock-module-path` rule + +## 4.36.0 - 2025-11-04 + +- [deps] upgrade `eslint` to version `9.39.1` + +## 4.35.0 - 2025-11-01 + +- [deps] upgrade `eslint` to version `9.39.0` + +## 4.34.0 - 2025-10-18 + +- [deps] upgrade `eslint` to version `9.38.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.13.3` + +## 4.33.0 - 2025-10-07 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.12.0` + +## 4.32.0 - 2025-10-04 + +- [deps] upgrade `eslint` to version `9.37.0` + +## 4.31.0 - 2025-09-30 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.11.0` + +## 4.30.0 - 2025-09-28 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.10.0` + +## 4.29.0 - 2025-09-24 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.9.2` + +## 4.28.0 - 2025-09-20 + +- [deps] upgrade `eslint` to version `9.36.0` + +## 4.27.0 - 2025-09-16 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.8.0` + +## 4.26.0 - 2025-09-14 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.7.0` + +## 4.25.0 - 2025-09-05 + +- [deps] upgrade `eslint` to version `9.35.0` + +## 4.24.0 - 2025-09-03 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.6.8` + +## 4.23.0 - 2025-08-23 + +- [deps] upgrade `eslint` to version `9.34.0` + +## 4.22.0 - 2025-08-12 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.6.6` + +## 4.21.0 - 2025-08-09 + +- [deps] upgrade `eslint` to version `9.33.0` + +## 4.20.0 - 2025-07-29 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.6.3` + +## 4.19.0 - 2025-07-26 + +- [deps] upgrade `eslint` to version `9.32.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.6.1` + +## 4.18.0 - 2025-07-15 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.6.0` + +## 4.17.0 - 2025-07-13 + +- [deps] upgrade `eslint` to version `9.31.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.5.4` + +## 4.16.0 - 2025-07-02 + +- [deps] upgrade `eslint` to version `9.30.1` + +## 4.15.0 - 2025-06-28 + +- [deps] upgrade `eslint` to version `9.30.0` + +## 4.14.0 - 2025-06-19 + +- [deps] upgrade `eslint-plugin-jest` to version `29.0.1` + +## 4.13.0 - 2025-06-14 + +- [deps] upgrade `eslint` to version `9.29.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.5.3` +- [deps] upgrade `eslint-plugin-jest` to version `28.13.5` + +## 4.12.0 - 2025-06-10 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.5.1` +- [breaking] enable `testing-library/no-node-access` rule + +## 4.11.1 - 2025-06-07 + +- [breaking] disable `jest/prefer-ending-with-an-expect` rule + +## 4.11.0 - 2025-06-07 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.4.0` +- [deps] upgrade `eslint-plugin-jest` to version `28.13.0` +- [breaking] enable `jest/prefer-ending-with-an-expect` rule + +## 4.10.0 - 2025-05-31 + +- [deps] upgrade `eslint` to version `9.28.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `7.3.0` +- [deps] upgrade `eslint-plugin-jest` to version `28.12.0` + +## 4.9.0 - 2025-05-28 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.2.2` +- [deps] upgrade `eslint-plugin-jest` to version `28.11.1` + +## 4.8.0 - 2025-05-19 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.2.1` + +## 4.7.0 - 2025-05-17 + +- [deps] upgrade `eslint` to version `9.27.0` + +## 4.6.0 - 2025-05-14 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.2.0` + +## 4.5.0 - 2025-05-03 + +- [deps] upgrade `eslint` to version `9.26.0` + +## 4.4.0 - 2025-04-22 + +- [deps] upgrade `eslint` to version `9.25.1` + +## 4.3.0 - 2025-04-21 + +- [deps] upgrade `eslint` to version `9.25.0` + +## 4.2.0 - 2025-04-06 + +- [deps] upgrade `eslint` to version `9.24.0` + +## 4.1.0 - 2025-03-22 + +- [deps] upgrade `eslint` to version `9.23.0` + +## 4.0.0 - 2025-03-09 + +- [deps] upgrade `eslint` to version `9.22.0` + +## 3.0.0 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 2.0.0 - 2025-03-06 + +- [new] expose flat config + +## 1.114.0 - 2025-01-23 + +- [deps] upgrade `eslint` to version `8.57.1` + +## 1.113.0 - 2025-01-19 + +- [deps] upgrade `eslint-plugin-jest` to version `28.11.0` + +## 1.112.0 - 2024-12-20 + +- [deps] upgrade `eslint-plugin-jest` to version `28.10.0` + +## 1.111.0 - 2024-12-08 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.1.1` + +## 1.110.0 - 2024-12-04 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.1.0` + +## 1.109.0 - 2024-11-23 + +- [deps] upgrade `eslint-plugin-testing-library` to version `7.0.0` + +## 1.108.0 - 2024-11-21 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.5.0` + +## 1.107.0 - 2024-11-07 + +- [deps] upgrade `eslint-plugin-jest` to version `28.9.0` + +## 1.106.0 - 2024-10-18 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.4.0` + +## 1.105.0 - 2024-10-17 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.3.2` + +## 1.104.0 - 2024-09-10 + +- [deps] upgrade `eslint-plugin-jest` to version `28.8.3` + +## 1.103.0 - 2024-09-03 + +- [deps] upgrade `eslint-plugin-jest` to version `28.8.2` + +## 1.102.0 - 2024-08-13 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.3.0` + +## 1.101.0 - 2024-08-08 + +- [deps] upgrade `eslint-plugin-jest` to version `28.8.0` + +## 1.100.0 - 2024-08-04 + +- [deps] upgrade `eslint-plugin-jest` to version `28.7.0` + +## 1.99.0 - 2024-06-11 + +- [deps] upgrade `eslint-plugin-jest` to version `28.6.0` +- [breaking] enable `jest/prefer-jest-mocked` rule + +## 1.98.0 - 2024-05-04 + +- [deps] upgrade `eslint-plugin-jest` to version `28.5.0` + +## 1.97.0 - 2024-04-17 + +- [deps] upgrade `eslint-plugin-jest` to version `28.3.0` +- [breaking] enable `jest/prefer-importing-jest-globals` rule + +## 1.96.0 - 2024-04-16 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.2.2` + +## 1.95.0 - 2024-04-07 + +- [deps] upgrade `eslint-plugin-jest` to version `28.2.0` + +## 1.94.0 - 2024-02-25 + +- [deps] upgrade `eslint` to version `8.57.0` + +## 1.93.0 - 2024-02-18 + +- [deps] upgrade `eslint-plugin-jest` to version `27.9.0` + +## 1.92.0 - 2024-02-14 + +- [deps] upgrade `eslint-plugin-jest` to version `27.8.0` + +## 1.91.0 - 2024-01-14 + +- [deps] upgrade `eslint-plugin-jest` to version `27.6.3` + +## 1.90.0 - 2024-01-02 + +- [deps] upgrade `eslint-plugin-jest` to version `27.6.1` + +## 1.89.0 - 2023-12-16 + +- [deps] upgrade `eslint` to version `8.56.0` + +## 1.88.0 - 2023-12-03 + +- [deps] upgrade `eslint` to version `8.55.0` + +## 1.87.0 - 2023-11-21 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.2.0` + +## 1.86.0 - 2023-11-18 + +- [deps] upgrade `eslint` to version `8.54.0` + +## 1.85.0 - 2023-11-12 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.1.2` + +## 1.84.0 - 2023-11-05 + +- [deps] upgrade `eslint` to version `8.53.0` + +## 1.83.0 - 2023-11-01 + +- [deps] upgrade `eslint-plugin-jest` to version `27.6.0` + +## 1.82.0 - 2023-10-22 + +- [deps] upgrade `eslint` to version `8.52.0` +- [deps] upgrade `eslint-plugin-jest` to version `27.4.3` + +## 1.81.0 - 2023-10-15 + +- [deps] upgrade `eslint-plugin-testing-library` to version `6.1.0` + +## 1.80.0 - 2023-10-08 + +- [deps] upgrade `eslint` to version `8.51.0` + +## 1.79.0 - 2023-10-02 + +- [deps] upgrade `eslint-plugin-jest` to version `27.4.2` + +## 1.78.0 - 2023-09-25 + +- [deps] upgrade `eslint` to version `8.50.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `6.0.2` + +## 1.77.0 - 2023-09-18 + +- [deps] upgrade `eslint-plugin-jest` to version `27.4.0` +- [breaking] enable `jest/no-confusing-set-timeout` rule + +## 1.76.0 - 2023-09-11 + +- [deps] upgrade `eslint` to version `8.49.0` + +## 1.75.0 - 2023-08-27 + +- [deps] upgrade `eslint` to version `8.48.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `6.0.1` + +## 1.74.1 - 2023-08-12 + +- [breaking] removed deprecated `testing-library/no-wait-for-empty-callback` rule + +## 1.74.0 - 2023-08-12 + +- [deps] upgrade `eslint` to version `8.47.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `6.0.0` + +## 1.73.0 - 2023-08-06 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.11.1` + +## 1.72.0 - 2023-07-28 + +- [deps] upgrade `eslint` to version `8.46.0` + +## 1.71.0 - 2023-07-17 + +- [deps] upgrade `eslint` to version `8.45.0` + +## 1.70.0 - 2023-07-13 + +- [deps] upgrade `eslint-plugin-jest` to version `27.2.3` + +## 1.69.0 - 2023-07-02 + +- [deps] upgrade `eslint` to version `8.44.0` + +## 1.68.0 - 2023-06-20 + +- [deps] upgrade `eslint-plugin-jest` to version `27.2.2` + +## 1.67.0 - 2023-06-18 + +- [deps] upgrade `eslint` to version `8.43.0` + +## 1.66.0 - 2023-06-04 + +- [deps] upgrade `eslint` to version `8.42.0` + +## 1.65.0 - 2023-05-21 + +- [deps] upgrade `eslint` to version `8.41.0` + +## 1.64.0 - 2023-05-10 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.11.0` + +## 1.63.0 - 2023-05-07 + +- [deps] upgrade `eslint` to version `8.40.0` + +## 1.62.0 - 2023-04-23 + +- [deps] upgrade `eslint` to version `8.39.0` + +## 1.61.0 - 2023-04-13 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.10.3` + +## 1.60.0 - 2023-04-09 + +- [deps] upgrade `eslint` to version `8.38.0` + +## 1.59.0 - 2023-03-29 + +- [deps] upgrade `eslint` to version `8.37.0` + +## 1.58.0 - 2023-03-12 + +- [deps] upgrade `eslint` to version `8.36.0` + +## 1.57.0 - 2023-03-07 + +- [breaking] turn off `eslint-plugin-jest/no-mocks-import` rule + +## 1.56.0 - 2023-02-27 + +- [deps] upgrade `eslint` to version `8.35.0` + +## 1.55.0 - 2023-02-19 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.10.2` + +## 1.54.0 - 2023-02-12 + +- [deps] upgrade `eslint` to version `8.34.0` + +## 1.53.0 - 2023-02-09 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.10.1` + +## 1.52.0 - 2023-01-29 + +- [deps] upgrade `eslint` to version `8.33.0` + +## 1.51.0 - 2023-01-24 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.10.0` + +## 1.50.0 - 2023-01-17 + +- [deps] upgrade `eslint` to version `8.32.0` + +## 1.49.0 - 2023-01-08 + +- [deps] upgrade `eslint-plugin-jest` to version `27.2.1` + +## 1.48.0 - 2023-01-03 + +- [deps] upgrade `eslint` to version `8.31.0` +- [deps] upgrade `eslint-plugin-jest` to version `27.2.0` + +## 1.47.0 - 2022-12-18 + +- [deps] upgrade `eslint` to version `8.30.0` +- [deps] upgrade `eslint-plugin-jest` to version `27.1.7` + +## 1.46.0 - 2022-12-08 + +- [deps] upgrade `eslint` to version `8.29.0` +- [deps] upgrade `eslint-plugin-jest` to version `27.1.6` + +## 1.45.0 - 2022-11-06 + +- [deps] upgrade `eslint` to version `8.27.0` +- [deps] upgrade `eslint-plugin-jest` to version `27.1.4` + +## 1.44.0 - 2022-10-23 + +- [deps] upgrade `eslint` to version `8.26.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.9.1` + +## 1.43.0 - 2022-10-20 + +- [deps] upgrade `eslint-plugin-jest` to version `27.1.3` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.8.0` + +## 1.42.0 - 2022-10-18 + +- [deps] upgrade `eslint-plugin-jest` to version `27.1.2` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.7.3` + +## 1.41.0 - 2022-10-11 + +- [deps] upgrade `eslint` to version `8.25.0` + +## 1.40.0 - 2022-10-05 + +- [deps] upgrade `eslint-plugin-jest` to version `27.1.1` + +## 1.39.0 - 2022-10-02 + +- [deps] upgrade `eslint` to version `8.24.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.7.2` + +## 1.38.0 - 2022-09-19 + +- [deps] upgrade `eslint` to version `8.23.1` +- [deps] upgrade `eslint-plugin-jest` to version `27.0.4` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.6.4` + +## 1.37.0 - 2022-09-04 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.6.1` + +## 1.36.0 - 2022-08-29 + +- [deps] upgrade `eslint-plugin-jest` to version `27.0.1` +- [breaking] enable `jest/no-jest-import` rule + +## 1.35.0 - 2022-08-27 + +- [deps] upgrade `eslint` to version `8.23.0` + +## 1.34.0 - 2022-08-22 + +- [deps] upgrade `eslint-plugin-jest` to version `26.8.7` + +## 1.33.0 - 2022-08-21 + +- [deps] upgrade `eslint-plugin-jest` to version `26.8.5` + +## 1.32.0 - 2022-08-20 + +- [deps] upgrade `eslint-plugin-jest` to version `26.8.4` + +## 1.31.0 - 2022-08-17 + +- [deps] upgrade `eslint-plugin-jest` to version `26.8.3` + +## 1.30.0 - 2022-08-14 + +- [deps] upgrade `eslint` to version `8.22.0` + +## 1.29.0 - 2022-08-09 + +- [deps] upgrade `eslint-plugin-jest` to version `26.8.2` + +## 1.28.0 - 2022-08-08 + +- [deps] upgrade `eslint-plugin-jest` to version `26.8.0` + +## 1.27.0 - 2022-08-01 + +- [deps] upgrade `eslint` to version `8.21.0` + +## 1.26.0 - 2022-07-31 + +- [deps] upgrade `eslint-plugin-jest` to version `26.7.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.6.0` +- [breaking] enable `jest/prefer-mock-promise-shorthand` rule + +## 1.25.0 - 2022-07-17 + +- [deps] upgrade `eslint` to version `8.20.0` + +## 1.24.0 - 2022-07-03 + +- [deps] upgrade `eslint` to version `8.19.0` + +## 1.23.0 - 2022-06-19 + +- [deps] upgrade `eslint` to version `8.18.0` +- [breaking] enable `testing-library/no-unnecessary-act` rule + +## 1.22.0 - 2022-06-16 + +- [breaking] update `testing-library/no-await-sync-events` rule + +## 1.21.0 - 2022-06-06 + +- [deps] upgrade `eslint` to version `8.17.0` +- [deps] upgrade `eslint-plugin-jest` to version `26.5.3` + +## 1.20.0 - 2022-05-31 + +- [deps] upgrade `eslint-plugin-jest` to version `26.4.6` + +## 1.19.0 - 2022-05-30 + +- [deps] upgrade `eslint-plugin-jest` to version `26.4.5` + +## 1.18.0 - 2022-05-29 + +- [deps] upgrade `eslint-plugin-jest` to version `26.4.2` +- [breaking] enable `jest/prefer-hooks-in-order` rule + +## 1.17.0 - 2022-05-26 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.5.1` + +## 1.16.0 - 2022-05-22 + +- [deps] upgrade `eslint` to version `8.16.0` + +## 1.15.0 - 2022-05-15 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.5.0` +- [deps] upgrade `eslint-plugin-jest` to version `26.2.2` + +## 1.14.0 - 2022-05-08 + +- [deps] upgrade `eslint` to version `8.15.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.4.0` + +## 1.13.0 - 2022-04-26 + +- [deps] upgrade `eslint` to version `8.14.0` +- [deps] upgrade `eslint-plugin-jest` to version `26.1.5` + +## 1.12.0 - 2022-04-13 + +- [deps] upgrade `eslint` to version `8.13.0` +- [deps] upgrade `eslint-plugin-jest` to version `26.1.4` + +## 1.11.0 - 2022-04-10 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.3.0` + +## 1.10.0 - 2022-04-06 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.2.1` + +## 1.9.0 - 2022-04-03 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.2.0` +- [breaking] enable `testing-library/no-global-regexp-flag-in-query` rule + +## 1.8.0 - 2022-03-27 + +- [deps] upgrade `eslint` to version `8.12.0` +- [deps] upgrade `eslint-plugin-jest` to version `26.1.3` + +## 1.7.0 - 2022-03-20 + +- [deps] upgrade `eslint-plugin-jest` to version `26.1.2` + +## 1.6.0 - 2022-03-13 + +- [deps] upgrade `eslint` to version `8.11.0` +- [deps] upgrade `eslint-plugin-testing-library` to version `5.1.0` + +## 1.5.0 - 2022-03-06 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.0.6` + +## 1.4.0 - 2022-03-02 + +- [deps] upgrade `eslint` to version `8.10.0` + +## 1.3.0 - 2022-02-16 + +- [deps] upgrade `eslint` to version `8.9.0` +- [deps] upgrade `eslint-plugin-jest` to version `26.1.1` + +## 1.2.0 - 2022-02-09 + +- [deps] more `eslint-plugin-testing-library` rules + +## 1.1.0 - 2022-02-09 + +- [deps] upgrade `eslint-plugin-jest` to version `26.1.0` + +## 1.0.0 - 2022-02-03 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.0.5` + +## 0.5.0 - 2022-01-30 + +- [deps] upgrade `eslint` to version `8.8.0` + +## 0.4.0 - 2022-01-26 + +- [deps] upgrade `eslint-plugin-jest` to version `26.0.0` + +## 0.3.0 - 2022-01-23 + +- [deps] upgrade `eslint-plugin-testing-library` to version `5.0.4` + +## 0.2.0 - 2022-01-16 + +- [deps] integrate `eslint-plugin-testing-library` + +## 0.1.0 - 2022-01-16 + +- initial commit diff --git a/eslint-configs/eslint-config-seekingalpha-qa/LICENSE.md b/eslint-configs/eslint-config-seekingalpha-tests/LICENSE.md similarity index 98% rename from eslint-configs/eslint-config-seekingalpha-qa/LICENSE.md rename to eslint-configs/eslint-config-seekingalpha-tests/LICENSE.md index 9d1094d7..2e708102 100644 --- a/eslint-configs/eslint-config-seekingalpha-qa/LICENSE.md +++ b/eslint-configs/eslint-config-seekingalpha-tests/LICENSE.md @@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/eslint-configs/eslint-config-seekingalpha-tests/README.md b/eslint-configs/eslint-config-seekingalpha-tests/README.md new file mode 100644 index 00000000..3377ad98 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-tests/README.md @@ -0,0 +1,41 @@ +# eslint-config-seekingalpha-tests + +This package includes the shareable ESLint config used by [SeekingAlpha](https://seekingalpha.com/). + +## Installation + +Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): + + npm install eslint@9.39.2 eslint-plugin-jest@29.15.2 eslint-plugin-testing-library@7.16.2 --save-dev + +Install SeekingAlpha shareable ESLint: + + npm install eslint-config-seekingalpha-tests@latest --save-dev + +## Usage + +This configuration extended with following plugins: + +- [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) +- [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library) + +Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration: + +```javascript +import testsConfig from 'eslint-config-seekingalpha-tests'; + +export default [ + { + plugins: { + ...testsConfig.plugins, + }, + rules: { + ...testsConfig.rules, + }, + }, +]; +``` + +## License + +MIT © [SeekingAlpha](https://seekingalpha.com/) diff --git a/eslint-configs/eslint-config-seekingalpha-tests/index.js b/eslint-configs/eslint-config-seekingalpha-tests/index.js new file mode 100644 index 00000000..7884a386 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-tests/index.js @@ -0,0 +1,13 @@ +import esLintPluginJestConfig from './rules/eslint-plugin-jest/index.js'; +import esLintPluginTestingLibraryConfig from './rules/eslint-plugin-testing-library/index.js'; + +export default { + plugins: { + ...esLintPluginJestConfig.plugins, + ...esLintPluginTestingLibraryConfig.plugins, + }, + rules: { + ...esLintPluginJestConfig.rules, + ...esLintPluginTestingLibraryConfig.rules, + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-tests/oxc.js b/eslint-configs/eslint-config-seekingalpha-tests/oxc.js new file mode 100644 index 00000000..567b6a24 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-tests/oxc.js @@ -0,0 +1,10 @@ +import esLintPluginTestingLibraryConfig from './rules/eslint-plugin-testing-library/index.js'; + +export default { + plugins: { + ...esLintPluginTestingLibraryConfig.plugins, + }, + rules: { + ...esLintPluginTestingLibraryConfig.rules, + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-qa/package.json b/eslint-configs/eslint-config-seekingalpha-tests/package.json similarity index 53% rename from eslint-configs/eslint-config-seekingalpha-qa/package.json rename to eslint-configs/eslint-config-seekingalpha-tests/package.json index c3bd0957..e40e7dbd 100644 --- a/eslint-configs/eslint-config-seekingalpha-qa/package.json +++ b/eslint-configs/eslint-config-seekingalpha-tests/package.json @@ -1,15 +1,16 @@ { - "name": "eslint-config-seekingalpha-qa", - "version": "3.4.0", - "description": "SeekingAlpha's sharable QA ESLint config", + "name": "eslint-config-seekingalpha-tests", + "version": "4.60.0", + "description": "SeekingAlpha's sharable testing ESLint config", "main": "index.js", + "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "git+https://github.com/seekingalpha/javascript" + "url": "git+https://github.com/seekingalpha/javascript.git" }, "keywords": [ "code", @@ -26,7 +27,7 @@ "rules", "style", "guide", - "protractor" + "jest" ], "author": "Aleksey Kovalevsky", "license": "MIT", @@ -35,17 +36,17 @@ }, "homepage": "https://github.com/seekingalpha/javascript#readme", "engines": { - "node": ">= 7" + "node": ">= 24" }, "peerDependencies": { - "eslint": "7.5.0", - "eslint-plugin-mocha": "7.0.1", - "eslint-plugin-protractor": "2.1.1" + "eslint": "9.39.2", + "eslint-plugin-jest": "29.15.2", + "eslint-plugin-testing-library": "7.16.2" }, "devDependencies": { - "eslint": "7.5.0", - "eslint-find-rules": "3.6.0", - "eslint-plugin-mocha": "7.0.1", - "eslint-plugin-protractor": "2.1.1" + "eslint": "9.39.2", + "eslint-find-rules": "5.0.0", + "eslint-plugin-jest": "29.15.2", + "eslint-plugin-testing-library": "7.16.2" } } diff --git a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jest/index.js b/eslint-configs/eslint-config-seekingalpha-tests/rules/eslint-plugin-jest/index.js similarity index 55% rename from eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jest/index.js rename to eslint-configs/eslint-config-seekingalpha-tests/rules/eslint-plugin-jest/index.js index 484cd38b..b121b8e2 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/rules/eslint-plugin-jest/index.js +++ b/eslint-configs/eslint-config-seekingalpha-tests/rules/eslint-plugin-jest/index.js @@ -1,52 +1,102 @@ -module.exports = { +import pluginJest from 'eslint-plugin-jest'; - plugins: ['jest'], +const RULES_REQUIRE_TS = { + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-error-equal.md + 'jest/no-error-equal': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-unnecessary-assertion.md + 'jest/no-unnecessary-assertion': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md + 'jest/unbound-method': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-expect-with-promise.md + 'jest/valid-expect-with-promise': 'off', +}; + +export default { + plugins: { + jest: pluginJest, + }, rules: { // Jest Plugin https://github.com/jest-community/eslint-plugin-jest - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-disabled-tests.md - 'jest/no-disabled-tests': 'error', + ...RULES_REQUIRE_TS, - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-focused-tests.md - 'jest/no-focused-tests': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/consistent-test-it.md + 'jest/consistent-test-it': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-identical-title.md - 'jest/no-identical-title': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/expect-expect.md + 'jest/expect-expect': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-to-have-length.md - 'jest/prefer-to-have-length': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-expects.md + 'jest/max-expects': 'off', - // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/require-tothrow-message.md - 'jest/require-to-throw-message': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-each.md + 'jest/prefer-each': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-lowercase-title.md + 'jest/prefer-lowercase-title': 'off', + + 'jest/prefer-mock-promise-shorthand': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-mock-return-shorthand.md + 'jest/prefer-mock-return-shorthand': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-snapshot-hint.md + 'jest/prefer-snapshot-hint': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-nested-describe.md + 'jest/max-nested-describe': [ + 'error', + { + max: 2, + }, + ], // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/no-alias-methods.md 'jest/no-alias-methods': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-to-contain.md - 'jest/prefer-to-contain': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-commented-out-tests.md + 'jest/no-commented-out-tests': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/no-test-callback.md - 'jest/no-test-callback': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-conditional-expect.md + 'jest/no-conditional-expect': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-spy-on.md - 'jest/prefer-spy-on': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-in-test.md + 'jest/no-conditional-in-test': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/consistent-test-it.md - 'jest/consistent-test-it': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-confusing-set-timeout.md + 'jest/no-confusing-set-timeout': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/expect-expect.md - 'jest/expect-expect': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-deprecated-functions.md + 'jest/no-deprecated-functions': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/lowercase-name.md - 'jest/lowercase-name': 'off', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-disabled-tests.md + 'jest/no-disabled-tests': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-duplicate-hooks.md + 'jest/no-duplicate-hooks': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-export.md + 'jest/no-export': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-focused-tests.md + 'jest/no-focused-tests': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-hooks.md + 'jest/no-hooks': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-identical-title.md + 'jest/no-identical-title': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-interpolation-in-snapshots.md + 'jest/no-interpolation-in-snapshots': 'error', // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-jasmine-globals.md 'jest/no-jasmine-globals': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-jest-import.md - 'jest/no-jest-import': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-large-snapshots.md 'jest/no-large-snapshots': [ 'error', @@ -55,87 +105,116 @@ module.exports = { }, ], + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-mocks-import.md + 'jest/no-mocks-import': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-restricted-matchers.md + 'jest/no-restricted-matchers': [ + 'error', + { + toBeFalsy: 'Use `toBe(false)` instead.', + toBeTruthy: 'Use `toBe(true)` instead.', + }, + ], + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-standalone-expect.md + 'jest/no-standalone-expect': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/no-test-callback.md + 'jest/no-done-callback': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-restricted-jest-methods.md + 'jest/no-restricted-jest-methods': 'off', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-test-prefixes.md 'jest/no-test-prefixes': 'error', // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-test-return-statement.md - 'jest/no-test-return-statement': 'off', + 'jest/no-test-return-statement': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-expect-assertions.md - 'jest/prefer-expect-assertions': 'off', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-unneeded-async-expect-function.md + 'jest/no-unneeded-async-expect-function': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-strict-equal.md - 'jest/prefer-strict-equal': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-untyped-mock-factory.md + 'jest/no-untyped-mock-factory': 'off', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-to-be-null.md - 'jest/prefer-to-be-null': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-called-with.md + 'jest/prefer-called-with': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-hooks.md - 'jest/no-hooks': 'off', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-comparison-matcher.md + 'jest/prefer-comparison-matcher': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-to-be-undefined.md - 'jest/prefer-to-be-undefined': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-ending-with-an-expect.md + 'jest/prefer-ending-with-an-expect': 'off', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-describe.md - 'jest/valid-describe': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-equality-matcher.md + 'jest/prefer-equality-matcher': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect.md - 'jest/valid-expect': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-expect-assertions.md + 'jest/prefer-expect-assertions': 'off', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect-in-promise.md - 'jest/valid-expect-in-promise': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-expect-resolves.md + 'jest/prefer-expect-resolves': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-todo.md - 'jest/prefer-todo': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-in-order.md + 'jest/prefer-hooks-in-order': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-called-with.md - 'jest/prefer-called-with': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-hooks-on-top.md + 'jest/prefer-hooks-on-top': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-conditional-expect.md - 'jest/no-conditional-expect': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-importing-jest-globals.md + 'jest/prefer-importing-jest-globals': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-commented-out-tests.md - 'jest/no-commented-out-tests': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-jest-mocked.md + 'jest/prefer-jest-mocked': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-mocks-import.md - 'jest/no-mocks-import': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-spy-on.md + 'jest/prefer-spy-on': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-duplicate-hooks.md - 'jest/no-duplicate-hooks': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-strict-equal.md + 'jest/prefer-strict-equal': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-export.md - 'jest/no-export': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-be.md + 'jest/prefer-to-be': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-if.md - 'jest/no-if': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-to-contain.md + 'jest/prefer-to-contain': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-standalone-expect.md - 'jest/no-standalone-expect': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-have-been-called.md + 'jest/prefer-to-have-been-called': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-try-expect.md - 'jest/no-try-expect': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-have-been-called-times.md + 'jest/prefer-to-have-been-called-times': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-to-have-length.md + 'jest/prefer-to-have-length': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-todo.md + 'jest/prefer-todo': 'error', + + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/require-hook.md + 'jest/require-hook': 'off', + + // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/require-tothrow-message.md + 'jest/require-to-throw-message': 'error', // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/require-top-level-describe.md 'jest/require-top-level-describe': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-hooks-on-top.md - 'jest/prefer-hooks-on-top': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-describe-callback.md + 'jest/valid-describe-callback': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-title.md - 'jest/valid-title': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect.md + 'jest/valid-expect': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-deprecated-functions.md - 'jest/no-deprecated-functions': 'error', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect-in-promise.md + 'jest/valid-expect-in-promise': 'error', - // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-restricted-matchers.md - 'jest/no-restricted-matchers': [ - 'error', - { - toBeFalsy: 'Use `toBe(false)` instead.', - toBeTruthy: 'Use `toBe(true)` instead.', - resolves: 'Use `expect(await promise)` instead.', - }, - ], - }, + // does not work with aliases + // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-mock-module-path.md + 'jest/valid-mock-module-path': 'off', + // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-title.md + 'jest/valid-title': 'error', + }, }; diff --git a/eslint-configs/eslint-config-seekingalpha-tests/rules/eslint-plugin-testing-library/index.js b/eslint-configs/eslint-config-seekingalpha-tests/rules/eslint-plugin-testing-library/index.js new file mode 100644 index 00000000..9a88d391 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-tests/rules/eslint-plugin-testing-library/index.js @@ -0,0 +1,100 @@ +import pluginTestingLibrary from 'eslint-plugin-testing-library'; + +export default { + plugins: { + 'testing-library': pluginTestingLibrary, + }, + + rules: { + // Testing Library Plugin https://github.com/testing-library/eslint-plugin-testing-library + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-queries.md + 'testing-library/await-async-queries': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-utils.md + 'testing-library/await-async-utils': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-fire-event.md + 'testing-library/await-async-events': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/consistent-data-testid.md + 'testing-library/consistent-data-testid': 'off', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-await-sync-events.md + 'testing-library/no-await-sync-events': [ + 'error', + { + eventModules: ['fire-event'], + }, + ], + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-await-sync-queries.md + 'testing-library/no-await-sync-queries': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-container.md + 'testing-library/no-container': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-debugging-utils.md + 'testing-library/no-debugging-utils': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-dom-import.md + 'testing-library/no-dom-import': ['error', 'react'], + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-global-regexp-flag-in-query.md + 'testing-library/no-global-regexp-flag-in-query': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-manual-cleanup.md + 'testing-library/no-manual-cleanup': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-node-access.md + 'testing-library/no-node-access': [ + 'error', + { allowContainerFirstChild: true }, + ], + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-promise-in-fire-event.md + 'testing-library/no-promise-in-fire-event': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-render-in-lifecycle.md + 'testing-library/no-render-in-lifecycle': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-test-id-queries.md + 'testing-library/no-test-id-queries': 'off', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-unnecessary-act.md + 'testing-library/no-unnecessary-act': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-multiple-assertions.md + 'testing-library/no-wait-for-multiple-assertions': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-side-effects.md + 'testing-library/no-wait-for-side-effects': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-snapshot.md + 'testing-library/no-wait-for-snapshot': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-explicit-assert.md + 'testing-library/prefer-explicit-assert': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-find-by.md + 'testing-library/prefer-find-by': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-implicit-assert.md + 'testing-library/prefer-implicit-assert': 'off', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-presence-queries.md + 'testing-library/prefer-presence-queries': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-query-by-disappearance.md + 'testing-library/prefer-query-by-disappearance': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-screen-queries.md + 'testing-library/prefer-screen-queries': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/render-result-naming-convention.md + 'testing-library/render-result-naming-convention': 'error', + + // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-user-event-setup.md + 'testing-library/prefer-user-event-setup': 'error', + }, +}; diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md new file mode 100644 index 00000000..aca5d9f1 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md @@ -0,0 +1,1116 @@ +# Change Log + +## 8.81.0 - 2026-06-16 + +- [deps] upgrade `typescript-eslint` to version `8.61.1` + +## 8.80.0 - 2026-06-09 + +- [deps] upgrade `typescript-eslint` to version `8.61.0` + +## 8.79.0 - 2026-06-02 + +- [deps] upgrade `typescript-eslint` to version `8.60.1` + +## 8.78.0 - 2026-05-27 + +- [deps] upgrade `typescript-eslint` to version `8.60.0` + +## 8.77.0 - 2026-05-19 + +- [deps] upgrade `typescript-eslint` to version `8.59.4` + +## 8.76.0 - 2026-05-12 + +- [deps] upgrade `typescript-eslint` to version `8.59.3` + +## 8.75.0 - 2026-05-05 + +- [deps] upgrade `typescript-eslint` to version `8.59.2` + +## 8.74.0 - 2026-04-17 + +- [deps] upgrade `typescript-eslint` to version `8.59.1` + +## 8.73.0 - 2026-04-17 + +- [deps] upgrade `typescript-eslint` to version `8.58.2` + +## 8.72.0 - 2026-04-12 + +- [deps] upgrade `typescript-eslint` to version `8.58.1` + +## 8.71.0 - 2026-04-07 + +- [new] extend oxlint rules + +## 8.70.0 - 2026-03-31 + +- [deps] upgrade `typescript-eslint` to version `8.58.0` + +## 8.69.0 - 2026-03-24 + +- [deps] upgrade `typescript-eslint` to version `8.57.2` + +## 8.68.0 - 2026-03-10 + +- [deps] upgrade `typescript-eslint` to version `8.57.0` + +## 8.67.0 - 2026-03-04 + +- [new] extend oxlint rules + +## 8.66.0 - 2026-03-02 + +- [new] extend oxlint rules with type-aware rules + +## 8.65.0 - 2026-02-24 + +- [deps] upgrade `typescript-eslint` to version `8.56.1` + +## 8.64.0 - 2026-02-20 + +- [new] extend oxlint rules + +## 8.63.0 - 2026-02-16 + +- [deps] upgrade `typescript-eslint` to version `8.56.0` + +## 8.62.0 - 2026-02-16 + +- [new] extend oxlint rules + +## 8.61.0 - 2026-02-11 + +- [new] extend oxlint rules + +## 8.60.0 - 2026-02-11 + +- [new] extend oxlint rules + +## 8.59.0 - 2026-02-10 + +- [deps] upgrade `typescript-eslint` to version `8.55.0` + +## 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` + +## 8.56.0 - 2026-01-13 + +- [deps] upgrade `typescript-eslint` to version `8.53.0` + +## 8.55.0 - 2026-01-06 + +- [deps] upgrade `typescript-eslint` to version `8.52.0` + +## 8.54.0 - 2025-12-30 + +- [deps] upgrade `typescript-eslint` to version `8.51.0` + +## 8.53.0 - 2025-12-23 + +- [deps] upgrade `typescript-eslint` to version `8.50.1` + +## 8.52.0 - 2025-12-15 + +- [breaking] disable `@typescript-eslint/no-useless-default-assignment` rule + +## 8.51.0 - 2025-12-15 + +- [deps] upgrade `typescript-eslint` to version `8.50.0` +- [breaking] add `@typescript-eslint/no-useless-default-assignment` rule + +## 8.50.0 - 2025-12-13 + +- [deps] upgrade `eslint` to version `9.39.2` +- [deps] upgrade `typescript-eslint` to version `8.49.0` + +## 8.49.0 - 2025-11-26 + +- [deps] upgrade `typescript-eslint` to version `8.48.0` + +## 8.48.0 - 2025-11-04 + +- [deps] upgrade `eslint` to version `9.39.1` +- [deps] upgrade `typescript-eslint` to version `8.46.3` + +## 8.47.0 - 2025-11-01 + +- [deps] upgrade `eslint` to version `9.39.0` + +## 8.46.0 - 2025-10-29 + +- [deps] upgrade `typescript-eslint` to version `8.46.2` + +## 8.45.0 - 2025-10-18 + +- [deps] upgrade `eslint` to version `9.38.0` +- [deps] upgrade `typescript-eslint` to version `8.46.1` + +## 8.44.0 - 2025-10-07 + +- [deps] upgrade `typescript-eslint` to version `8.46.0` + +## 8.43.0 - 2025-10-04 + +- [deps] upgrade `eslint` to version `9.37.0` + +## 8.42.0 - 2025-09-30 + +- [deps] upgrade `typescript-eslint` to version `8.45.0` + +## 8.41.0 - 2025-09-24 + +- [deps] upgrade `typescript-eslint` to version `8.44.1` + +## 8.40.0 - 2025-09-20 + +- [deps] upgrade `eslint` to version `9.36.0` + +## 8.39.0 - 2025-09-16 + +- [deps] upgrade `typescript-eslint` to version `8.44.0` + +## 8.38.0 - 2025-09-09 + +- [deps] upgrade `typescript-eslint` to version `8.43.0` + +## 8.37.0 - 2025-09-05 + +- [deps] upgrade `eslint` to version `9.35.0` + +## 8.36.0 - 2025-09-03 + +- [deps] upgrade `typescript-eslint` to version `8.42.0` + +## 8.35.0 - 2025-08-23 + +- [deps] upgrade `eslint` to version `9.34.0` + +## 8.34.0 - 2025-08-19 + +- [deps] upgrade `typescript-eslint` to version `8.40.0` + +## 8.33.0 - 2025-08-12 + +- [deps] upgrade `typescript-eslint` to version `8.39.1` + +## 8.32.0 - 2025-08-09 + +- [deps] upgrade `eslint` to version `9.33.0` + +## 8.31.0 - 2025-08-05 + +- [deps] upgrade `typescript-eslint` to version `8.39.0` + +## 8.30.0 - 2025-07-26 + +- [deps] upgrade `eslint` to version `9.32.0` + +## 8.29.0 - 2025-07-22 + +- [deps] upgrade `typescript-eslint` to version `8.38.0` + +## 8.28.0 - 2025-07-15 + +- [deps] upgrade `typescript-eslint` to version `8.37.0` + +## 8.27.0 - 2025-07-13 + +- [deps] upgrade `eslint` to version `9.31.0` + +## 8.26.0 - 2025-07-08 + +- [deps] upgrade `typescript-eslint` to version `8.36.0` + +## 8.25.0 - 2025-07-02 + +- [deps] upgrade `eslint` to version `9.30.1` +- [deps] upgrade `typescript-eslint` to version `8.35.1` + +## 8.24.0 - 2025-06-28 + +- [deps] upgrade `eslint` to version `9.30.0` + +## 8.23.0 - 2025-06-24 + +- [deps] upgrade `typescript-eslint` to version `8.35.0` + +## 8.22.0 - 2025-06-19 + +- [deps] upgrade `typescript-eslint` to version `8.34.1` + +## 8.21.0 - 2025-06-14 + +- [deps] upgrade `eslint` to version `9.29.0` + +## 8.20.0 - 2025-06-10 + +- [deps] upgrade `typescript-eslint` to version `8.34.0` + +## 8.19.0 - 2025-06-03 + +- [deps] upgrade `typescript-eslint` to version `8.33.1` + +## 8.18.0 - 2025-05-31 + +- [deps] upgrade `eslint` to version `9.28.0` + +## 8.17.0 - 2025-05-28 + +- [deps] upgrade `typescript-eslint` to version `8.33.0` + +## 8.16.0 - 2025-05-17 + +- [deps] upgrade `eslint` to version `9.27.0` + +## 8.15.0 - 2025-05-13 + +- [deps] upgrade `typescript-eslint` to version `8.32.1` + +## 8.14.0 - 2025-05-06 + +- [deps] upgrade `typescript-eslint` to version `8.32.0` + +## 8.13.0 - 2025-05-03 + +- [deps] upgrade `eslint` to version `9.26.0` + +## 8.12.0 - 2025-04-29 + +- [deps] upgrade `typescript-eslint` to version `8.31.1` + +## 8.11.0 - 2025-04-22 + +- [deps] upgrade `eslint` to version `9.25.1` +- [deps] upgrade `typescript-eslint` to version `8.31.0` + +## 8.10.0 - 2025-04-21 + +- [deps] upgrade `eslint` to version `9.25.0` + +## 8.9.0 - 2025-04-15 + +- [deps] upgrade `typescript-eslint` to version `8.30.1` + +## 8.8.0 - 2025-04-08 + +- [deps] upgrade `typescript-eslint` to version `8.29.1` + +## 8.7.0 - 2025-04-06 + +- [deps] upgrade `eslint` to version `9.24.0` + +## 8.6.0 - 2025-04-01 + +- [deps] upgrade `typescript-eslint` to version `8.29.0` + +## 8.5.0 - 2025-03-25 + +- [deps] upgrade `typescript-eslint` to version `8.28.0` + +## 8.4.0 - 2025-03-22 + +- [deps] upgrade `eslint` to version `9.23.0` + +## 8.3.0 - 2025-03-20 + +- [deps] upgrade `typescript-eslint` to version `8.27.0` + +## 8.2.0 - 2025-03-19 + +- [breaking] disabled `@typescript-eslint/no-magic-numbers` and `@typescript-eslint/sort-type-constituents` + +## 8.1.0 - 2025-03-10 + +- [deps] replace `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` with `typescript-eslin` +- [deps] upgrade `typescript-eslint` to version `8.26.1` + +## 8.0.0 - 2025-03-09 + +- [deps] upgrade `eslint` to version `9.22.0` + +## 7.0.1 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 7.0.0 - 2025-03-09 + +- [breaking] migrate to ESM and make flat config default + +## 6.0.0 - 2025-03-04 + +- [new] introduce flat config + +## 5.49.0 - 2025-03-04 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.26.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.26.0` + +## 5.48.0 - 2025-02-25 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.25.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.25.0` + +## 5.47.0 - 2025-02-18 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.24.1` +- [deps] upgrade `@typescript-eslint/parser` to version `8.24.1` + +## 5.46.0 - 2025-02-11 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.24.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.24.0` + +## 5.45.0 - 2025-02-04 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.23.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.23.0` + +## 5.44.0 - 2025-01-28 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.22.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.22.0` + +## 5.43.0 - 2025-01-23 + +- [deps] upgrade `eslint` to version `8.57.1` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.21.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.21.0` + +## 5.42.0 - 2025-01-14 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.20.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.20.0` + +## 5.41.0 - 2025-01-07 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.19.1` +- [deps] upgrade `@typescript-eslint/parser` to version `8.19.1` + +## 5.40.0 - 2024-12-31 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.19.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.19.0` + +## 5.39.0 - 2024-12-24 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.18.2` +- [deps] upgrade `@typescript-eslint/parser` to version `8.18.2` + +## 5.38.0 - 2024-12-17 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.18.1` +- [deps] upgrade `@typescript-eslint/parser` to version `8.18.1` + +## 5.37.0 - 2024-12-10 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.18.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.18.0` + +## 5.36.0 - 2024-12-03 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.17.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.17.0` + +## 5.35.0 - 2024-11-26 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.16.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.16.0` + +## 5.34.0 - 2024-11-19 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.15.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.15.0` + +## 5.33.0 - 2024-11-12 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.14.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.14.0` + +## 5.32.0 - 2024-11-05 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.13.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.13.0` + +## 5.31.0 - 2024-10-30 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.12.2` +- [deps] upgrade `@typescript-eslint/parser` to version `8.12.2` + +## 5.30.0 - 2024-10-29 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.12.1` +- [deps] upgrade `@typescript-eslint/parser` to version `8.12.1` + +## 5.29.0 - 2024-10-22 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.11.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.11.0` + +## 5.28.0 - 2024-10-17 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.10.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.10.0` + +## 5.27.0 - 2024-10-15 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.9.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.9.0` + +## 5.26.0 - 2024-10-08 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.8.1` +- [deps] upgrade `@typescript-eslint/parser` to version `8.8.1` + +## 5.25.0 - 2024-10-01 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.8.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.8.0` + +## 5.24.0 - 2024-09-24 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.7.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.7.0` + +## 5.23.0 - 2024-09-17 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.6.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.6.0` + +## 5.22.0 - 2024-09-10 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.5.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.5.0` + +## 5.21.0 - 2024-09-03 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.4.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.4.0` + +## 5.20.0 - 2024-08-27 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.3.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.3.0` + +## 5.19.0 - 2024-08-21 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.2.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.2.0` + +## 5.18.0 - 2024-08-13 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.1.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.1.0` + +## 5.17.0 - 2024-08-06 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.0.1` +- [deps] upgrade `@typescript-eslint/parser` to version `8.0.1` + +## 5.16.0 - 2024-08-01 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `8.0.0` +- [deps] upgrade `@typescript-eslint/parser` to version `8.0.0` +- [breaking] enable `@typescript-eslint/no-unsafe-function-type` rule +- [breaking] enable `@typescript-eslint/no-wrapper-object-types` rule +- + +## 5.15.0 - 2024-07-30 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.18.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.18.0` + +## 5.14.0 - 2024-07-23 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.17.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.17.0` + +## 5.13.0 - 2024-07-20 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.16.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.16.1` + +## 5.12.0 - 2024-07-09 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.16.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.16.0` +- [breaking] enable `@typescript-eslint/no-empty-object-type` rule +- [breaking] enable `@typescript-eslint/no-unnecessary-parameter-property-assignment` rule + +## 5.11.0 - 2024-07-02 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.15.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.15.0` + +## 5.10.0 - 2024-06-25 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.14.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.14.1` + +## 5.9.0 - 2024-06-19 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.13.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.13.1` + +## 5.8.0 - 2024-06-11 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.13.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.13.0` + +## 5.7.0 - 2024-06-04 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.12.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.12.0` + +## 5.6.0 - 2024-05-28 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.11.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.11.0` + +## 5.5.0 - 2024-05-21 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.10.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.10.0` + +## 5.4.0 - 2024-05-15 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.9.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.9.0` + +## 5.3.0 - 2024-04-30 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.8.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.8.0` + +## 5.2.0 - 2024-04-26 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.7.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.7.1` + +## 5.1.0 - 2024-04-16 + +- [breaking] enable `@typescript-eslint/max-params` rule +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.7.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.7.0` + +## 5.0.0 - 2024-04-08 + +- [breaking] remove `@stylistic/eslint-plugin-ts` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.6.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.6.0` + +## 4.35.0 - 2024-04-08 + +- [breaking] disable `@stylistic/ts/lines-around-comment` for prettier config + +## 4.34.0 - 2024-04-02 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.5.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.5.0` + +## 4.33.0 - 2024-03-26 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.4.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.4.0` + +## 4.32.0 - 2024-03-19 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.3.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.3.1` + +## 4.31.0 - 2024-03-17 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.7.0` + +## 4.30.1 - 2024-03-12 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.2.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.2.0` + +## 4.30.0 - 2024-03-12 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.2.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.2.0` + +## 4.29.0 - 2024-03-05 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.1.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.1.1` + +## 4.28.0 - 2024-03-03 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.6.3` + +## 4.27.0 - 2024-02-27 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.1.0` +- [deps] upgrade `@typescript-eslint/parser` to version `7.1.0` + +## 4.26.0 - 2024-02-25 + +- [deps] upgrade `eslint` to version `8.57.0` + +## 4.25.0 - 2024-02-20 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.0.2` +- [deps] upgrade `@typescript-eslint/parser` to version `7.0.2` + +## 4.24.0 - 2024-02-18 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.6.2` + +## 4.23.0 - 2024-02-14 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `7.0.1` +- [deps] upgrade `@typescript-eslint/parser` to version `7.0.1` + +## 4.22.0 - 2024-02-11 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.6.1` + +## 4.21.0 - 2024-02-06 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.21.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.21.0` +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.6.0` + +## 4.20.0 - 2024-01-30 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.20.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.20.0` + +## 4.19.0 - 2024-01-28 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.19.1` +- [deps] upgrade `@typescript-eslint/parser` to version `6.19.1` +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.5.4` + +## 4.18.0 - 2024-01-16 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.19.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.19.0` + +## 4.17.0 - 2024-01-09 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.18.1` +- [deps] upgrade `@typescript-eslint/parser` to version `6.18.1` + +## 4.16.0 - 2024-01-07 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.18.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.18.0` + +## 4.15.0 - 2024-01-04 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.5.3` + +## 4.14.0 - 2024-01-02 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.17.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.17.0` + +## 4.13.0 - 2023-12-26 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.16.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.16.0` + +## 4.12.0 - 2023-12-19 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.15.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.15.0` + +## 4.11.0 - 2023-12-16 + +- [deps] upgrade `eslint` to version `8.56.0` + +## 4.10.0 - 2023-12-12 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.5.1` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.14.0` +- [deps] upgrade `@typescript-eslint/parser` to version `6.14.0` + +## 4.9.0 - 2023-12-07 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.5.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.13.2` +- [deps] upgrade `@typescript-eslint/parser` to version `6.13.2` + +## 4.8.0 - 2023-12-03 + +- [deps] upgrade `eslint` to version `8.55.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.13.1` +- [deps] upgrade `@typescript-eslint/parser` to version `6.13.1` + +## 4.7.0 - 2023-11-28 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.13.0` + +## 4.6.0 - 2023-11-26 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.4.1` + +## 4.5.0 - 2023-11-21 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.12.0` + +## 4.4.0 - 2023-11-19 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.4.0` + +## 4.3.0 - 2023-11-18 + +- [deps] upgrade `eslint` to version `8.54.0` +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.3.3` + +## 4.2.0 - 2023-11-14 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.2.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.11.0` + +## 4.1.0 - 2023-11-12 + +- [deps] upgrade `@stylistic/eslint-plugin-ts` to version `1.1.0` + +## 4.0.0 - 2023-11-07 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.10.0` +- [breaking] migrate to `@stylistic/eslint-plugin-ts` + +## 3.24.0 - 2023-11-05 + +- [deps] upgrade `eslint` to version `8.53.0` + +## 3.23.0 - 2023-11-01 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.9.1` + +## 3.22.0 - 2023-10-24 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.9.0` + +## 3.21.0 - 2023-10-22 + +- [deps] upgrade `eslint` to version `8.52.0` + +## 3.20.0 - 2023-10-19 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.8.0` + +## 3.19.1 - 2023-10-15 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.7.5` + +## 3.18.1 - 2023-10-08 + +- [deps] fixed peerDependencies + +## 3.18.0 - 2023-10-08 + +- [deps] upgrade `eslint` to version `8.51.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.7.4` + +## 3.17.0 - 2023-09-25 + +- [deps] upgrade `eslint` to version `8.50.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.7.3` + +## 3.16.0 - 2023-09-19 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.7.2` + +## 3.15.0 - 2023-09-12 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.7.0` + +## 3.14.0 - 2023-09-11 + +- [deps] upgrade `eslint` to version `8.49.0` + +## 3.13.0 - 2023-09-05 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.6.0` + +## 3.12.0 - 2023-08-29 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.5.0` + +## 3.11.0 - 2023-08-27 + +- [deps] upgrade `eslint` to version `8.48.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.4.1` + +## 3.10.0 - 2023-08-15 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.4.0` + +## 3.9.0 - 2023-08-12 + +- [deps] upgrade `eslint` to version `8.47.0` + +## 3.8.0 - 2023-08-08 + +- [patch] allow template literals in the `quotes` rule + +## 3.7.0 - 2023-08-08 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.3.0` + +## 3.6.0 - 2023-08-01 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.2.1` + +## 3.5.0 - 2023-07-28 + +- [deps] upgrade `eslint` to version `8.46.0` + +## 3.4.0 - 2023-07-25 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.2.0` + +## 3.3.0 - 2023-07-18 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.1.0` + +## 3.2.0 - 2023-07-17 + +- [deps] upgrade `eslint` to version `8.45.0` + +## 3.1.0 - 2023-07-13 + +- [breaking] disable `@typescript-eslint/prefer-optional-chain` rule + +## 3.0.0 - 2023-07-11 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `6.0.0` + +## 2.19.0 - 2023-07-04 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.61.0` + +## 2.18.0 - 2023-07-02 + +- [deps] upgrade `eslint` to version `8.44.0` + +## 2.17.0 - 2023-06-27 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.60.1` + +## 2.16.0 - 2023-06-20 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.60.0` + +## 2.15.0 - 2023-06-18 + +- [deps] upgrade `eslint` to version `8.43.0` + +## 2.14.0 - 2023-06-15 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.11` + +## 2.13.0 - 2023-06-04 + +- [deps] upgrade `eslint` to version `8.42.0` + +## 2.12.0 - 2023-05-30 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.8` + +## 2.11.0 - 2023-05-23 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.7` + +## 2.10.0 - 2023-05-21 + +- [deps] upgrade `eslint` to version `8.41.0` + +## 2.9.0 - 2023-05-16 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.6` + +## 2.8.0 - 2023-05-10 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.5` + +## 2.7.0 - 2023-05-07 + +- [deps] upgrade `eslint` to version `8.40.0` + +## 2.6.0 - 2023-05-04 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.2` + +## 2.5.1 - 2023-04-25 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.1` + +## 2.5.0 - 2023-04-25 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.1` + +## 2.4.0 - 2023-04-23 + +- [deps] upgrade `eslint` to version `8.39.0` + +## 2.3.0 - 2023-04-18 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.59.0` + +## 2.2.0 - 2023-04-13 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.58.0` + +## 2.1.0 - 2023-04-09 + +- [deps] upgrade `eslint` to version `8.38.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.57.1` + +## 2.0.0 - 2023-03-29 + +- introduce `eslint-config-seekingalpha-typescript/prettier` config +- [deps] upgrade `eslint` to version `8.37.0` + +## 1.23.1 - 2023-03-28 + +- [breaking] disable `@typescript-eslint/no-duplicate-type-constituents` rule + +## 1.23.0 - 2023-03-28 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.57.0` +- [breaking] enable `@typescript-eslint/no-duplicate-type-constituents` rule +- [breaking] enable `@typescript-eslint/lines-around-comment` rule + +## 1.22.0 - 2023-03-23 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.56.0` + +## 1.21.0 - 2023-03-14 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.55.0` +- [breaking] enable `@typescript-eslint/block-spacing` rule +- [breaking] enable `@typescript-eslint/no-import-type-side-effects` rule + +## 1.20.0 - 2023-03-12 + +- [deps] upgrade `eslint` to version `8.36.0` + +## 1.19.0 - 2023-03-07 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.54.1` + +## 1.18.0 - 2023-02-28 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.54.0` + +## 1.17.0 - 2023-02-27 + +- [deps] upgrade `eslint` to version `8.35.0` + +## 1.16.0 - 2023-02-21 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.53.0` + +## 1.15.0 - 2023-02-15 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.52.0` + +## 1.14.0 - 2023-02-12 + +- [deps] upgrade `eslint` to version `8.34.0` + +## 1.13.0 - 2023-02-08 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.51.0` + +## 1.12.0 - 2023-01-31 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.50.0` +- [breaking] enable `@typescript-eslint/key-spacing` rule + +## 1.11.0 - 2023-01-29 + +- [deps] upgrade `eslint` to version `8.33.0` + +## 1.10.0 - 2023-01-24 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.49.0` + +## 1.9.0 - 2023-01-17 + +- [deps] upgrade `eslint` to version `8.32.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.48.2` + +## 1.8.0 - 2023-01-11 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.48.1` + +## 1.7.0 - 2023-01-03 + +- [deps] upgrade `eslint` to version `8.31.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.48.0` + +## 1.6.0 - 2022-12-29 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.47.1` +- [deps] adjust enabled ts rules +- [deps] disable `@typescript-eslint/explicit-module-boundary-types` +- [deps] disable `@typescript-eslint/explicit-function-return-type` +- [deps] disable `@typescript-eslint/no-explicit-any` + +## 1.5.0 - 2022-12-25 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.47.0` + +## 1.4.0 - 2022-12-18 + +- [deps] upgrade `eslint` to version `8.30.0` + +## 1.3.0 - 2022-12-14 + +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.46.0` +- [breaking] disable `@typescript-eslint/eslint-plugin` rules which require TS + +## 1.2.0 - 2022-12-12 + +- [breaking] disable override rules which require TS + +## 1.1.0 - 2022-12-08 + +- [deps] upgrade `eslint` to version `8.29.0` +- [deps] upgrade `@typescript-eslint/eslint-plugin` to version `5.46.0` + +## 1.0.4 - 2022-12-08 + +- [breaking] disable `no-undef` rule + +## 1.0.3 - 2022-12-08 + +- [breaking] relax `@typescript-eslint/no-magic-numbers` rule for types + +## 1.0.2 - 2022-12-08 + +- [breaking] relax `@typescript-eslint/no-magic-numbers` rule for types + +## 1.0.1 - 2022-11-09 + +- [breaking] update `@typescript-eslint/space-before-function-paren` rule preferences +- [breaking] update `@typescript-eslint/brace-style` rule preferences +- [breaking] update `@typescript-eslint/comma-spacing` rule preferences +- [breaking] update `@typescript-eslint/dot-notation` rule preferences +- [breaking] update `@typescript-eslint/func-call-spacing` rule preferences +- [breaking] update `@typescript-eslint/keyword-spacing` rule preferences +- [breaking] update `@typescript-eslint/lines-between-class-members` rule preferences +- [breaking] update `@typescript-eslint/no-shadow` rule preferences +- [breaking] update `@typescript-eslint/no-use-before-define` rule preferences +- [breaking] update `@typescript-eslint/padding-line-between-statements` rule preferences +- [breaking] update `@typescript-eslint/semi` rule preferences +- [breaking] update `@typescript-eslint/no-extra-parens` rule preferences + +## 1.0.0 - 2022-11-08 + +- Initial commit diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/LICENSE.md b/eslint-configs/eslint-config-seekingalpha-typescript/LICENSE.md new file mode 100644 index 00000000..2e708102 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/LICENSE.md @@ -0,0 +1,9 @@ +MIT License + +Copyright 2018 Seekinga Alpha + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/README.md b/eslint-configs/eslint-config-seekingalpha-typescript/README.md new file mode 100644 index 00000000..080fdce1 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/README.md @@ -0,0 +1,43 @@ +# eslint-config-seekingalpha-typescript + +This package includes the shareable ESLint config used by [SeekingAlpha](https://seekingalpha.com/). + +## Installation + +Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): + + npm install eslint@9.39.2 typescript-eslint@8.61.1 --save-dev + +Install SeekingAlpha shareable ESLint: + + npm install eslint-config-seekingalpha-typescript@latest --save-dev + +## Usage + +This shareable config includes all rules from following plugins: + +- [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) + +Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration: + +```javascript +import tsConfig from 'eslint-config-seekingalpha-typescript'; + +export default [ + { + plugins: { + ...tsConfig.plugins, + }, + rules: { + ...tsConfig.rules, + }, + settings: { + ...tsConfig.settings, + }, + }, +]; +``` + +## License + +MIT © [SeekingAlpha](https://seekingalpha.com/) diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/index.js b/eslint-configs/eslint-config-seekingalpha-typescript/index.js new file mode 100644 index 00000000..b3d93995 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/index.js @@ -0,0 +1,17 @@ +import typescriptEslint from 'typescript-eslint'; + +import disableConfig from './rules/disable-recommended-eslint-rules/index.js'; +import config from './rules/typescript-eslint/index.js'; + +export default { + plugins: { + '@typescript-eslint': typescriptEslint.plugin, + }, + rules: { + ...disableConfig, + ...config, + }, + languageOptions: { + parser: typescriptEslint.parser, + }, +}; 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..e22ff959 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/oxc.js @@ -0,0 +1,12 @@ +import config from './index.js'; +import { ESLintPluginTypescriptDisabled } from './rules/typescript-eslint/oxlint-disabled.js'; + +const oxcConfig = { + ...config, + rules: { + ...config.rules, + ...ESLintPluginTypescriptDisabled, + }, +}; + +export default oxcConfig; diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/package.json b/eslint-configs/eslint-config-seekingalpha-typescript/package.json new file mode 100644 index 00000000..4c60b127 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/package.json @@ -0,0 +1,49 @@ +{ + "name": "eslint-config-seekingalpha-typescript", + "version": "8.81.0", + "description": "SeekingAlpha's sharable typescript ESLint config", + "main": "index.js", + "type": "module", + "scripts": { + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/seekingalpha/javascript.git" + }, + "keywords": [ + "code", + "codelinter", + "policy", + "quality", + "eslint", + "eslintconfig", + "ECMAScript6", + "sa", + "seekingalpha", + "javascript", + "ES6", + "rules", + "style", + "guide", + "typescript" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/seekingalpha/javascript/issues" + }, + "homepage": "https://github.com/seekingalpha/javascript#readme", + "engines": { + "node": ">= 24" + }, + "peerDependencies": { + "eslint": "9.39.2", + "typescript-eslint": "8.61.1" + }, + "devDependencies": { + "eslint": "9.39.2", + "eslint-find-rules": "5.0.0", + "typescript-eslint": "8.61.1" + } +} diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/rules/disable-recommended-eslint-rules/index.js b/eslint-configs/eslint-config-seekingalpha-typescript/rules/disable-recommended-eslint-rules/index.js new file mode 100644 index 00000000..6325f971 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/rules/disable-recommended-eslint-rules/index.js @@ -0,0 +1,12 @@ +export default { + /* + * Disabled as per TS recommendation + * https://typescript-eslint.io/troubleshooting/faqs/eslint#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors + */ + 'no-undef': 'off', + + // still does not have TS support + 'no-unused-vars': 'off', + + 'no-unused-private-class-members': 'off', +}; diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/index.js b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/index.js new file mode 100644 index 00000000..8935bab5 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/index.js @@ -0,0 +1,311 @@ +const rulesRunTs = { + '@typescript-eslint/require-await': 'off', + + '@typescript-eslint/return-await': 'off', + + '@typescript-eslint/dot-notation': 'off', + + '@typescript-eslint/no-implied-eval': 'off', + + '@typescript-eslint/await-thenable': 'off', + + '@typescript-eslint/consistent-return': 'off', + + '@typescript-eslint/consistent-type-exports': 'off', + + '@typescript-eslint/naming-convention': 'off', + + '@typescript-eslint/no-array-delete': 'off', + + '@typescript-eslint/no-base-to-string': 'off', + + '@typescript-eslint/no-deprecated': 'off', + + '@typescript-eslint/no-duplicate-type-constituents': 'off', + + '@typescript-eslint/no-for-in-array': 'off', + + '@typescript-eslint/no-misused-promises': 'off', + + '@typescript-eslint/no-mixed-enums': 'off', + + '@typescript-eslint/no-misused-spread': 'off', + + '@typescript-eslint/no-meaningless-void-operator': 'off', + + '@typescript-eslint/no-unnecessary-template-expression': 'off', + + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', + + '@typescript-eslint/no-unnecessary-qualifier': 'off', + + '@typescript-eslint/no-unnecessary-type-arguments': 'off', + + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + + '@typescript-eslint/no-unsafe-unary-minus': 'off', + + '@typescript-eslint/no-useless-default-assignment': 'off', + + '@typescript-eslint/non-nullable-type-assertion-style': 'off', + + '@typescript-eslint/only-throw-error': 'off', + + '@typescript-eslint/prefer-find': 'off', + + '@typescript-eslint/prefer-includes': 'off', + + '@typescript-eslint/prefer-optional-chain': 'off', + + '@typescript-eslint/prefer-promise-reject-errors': 'off', + + '@typescript-eslint/prefer-readonly': 'off', + + '@typescript-eslint/prefer-reduce-type-parameter': 'off', + + '@typescript-eslint/prefer-regexp-exec': 'off', + + '@typescript-eslint/prefer-return-this-type': 'off', + + '@typescript-eslint/prefer-string-starts-ends-with': 'off', + + '@typescript-eslint/promise-function-async': 'off', + + '@typescript-eslint/related-getter-setter-pairs': 'off', + + '@typescript-eslint/switch-exhaustiveness-check': 'off', + + '@typescript-eslint/unbound-method': 'off', + + '@typescript-eslint/strict-boolean-expressions': 'off', + + '@typescript-eslint/no-confusing-void-expression': 'off', + + '@typescript-eslint/no-floating-promises': 'off', + + '@typescript-eslint/no-redundant-type-constituents': 'off', + + '@typescript-eslint/no-unnecessary-condition': 'off', + + '@typescript-eslint/no-unnecessary-type-conversion': 'off', + + '@typescript-eslint/no-unsafe-argument': 'off', + + '@typescript-eslint/no-unsafe-assignment': 'off', + + '@typescript-eslint/no-unsafe-call': 'off', + + '@typescript-eslint/no-unsafe-type-assertion': 'off', + + '@typescript-eslint/restrict-plus-operands': 'off', + + '@typescript-eslint/no-unsafe-enum-comparison': 'off', + + '@typescript-eslint/no-unsafe-member-access': 'off', + + '@typescript-eslint/no-unsafe-return': 'off', + + '@typescript-eslint/prefer-nullish-coalescing': 'off', + + '@typescript-eslint/prefer-destructuring': 'off', + + '@typescript-eslint/prefer-readonly-parameter-types': 'off', + + '@typescript-eslint/require-array-sort-compare': 'off', + + '@typescript-eslint/restrict-template-expressions': 'off', + + '@typescript-eslint/strict-void-return': 'off', + + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', + + '@typescript-eslint/no-unnecessary-type-parameters': 'off', +}; + +const RULES_DUPLICATE_ESLINT = { + '@typescript-eslint/class-methods-use-this': 'off', + + '@typescript-eslint/default-param-last': 'off', + + '@typescript-eslint/init-declarations': 'off', + + '@typescript-eslint/max-params': 'off', + + '@typescript-eslint/no-array-constructor': 'off', + + '@typescript-eslint/no-dupe-class-members': 'off', + + '@typescript-eslint/no-empty-function': 'off', + + '@typescript-eslint/no-magic-numbers': 'off', + + '@typescript-eslint/no-loop-func': 'off', + + '@typescript-eslint/no-redeclare': 'off', + + '@typescript-eslint/no-restricted-imports': 'off', + + '@typescript-eslint/no-shadow': 'off', + + '@typescript-eslint/no-unused-expressions': 'off', + + '@typescript-eslint/no-use-before-define': 'off', + + '@typescript-eslint/no-useless-constructor': 'off', + + '@typescript-eslint/no-invalid-this': 'off', +}; + +export default { + ...rulesRunTs, + + ...RULES_DUPLICATE_ESLINT, + + '@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/class-literal-property-style': ['error', 'fields'], + + '@typescript-eslint/consistent-generic-constructors': [ + 'error', + 'constructor', + ], + + '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'], + + '@typescript-eslint/consistent-type-assertions': [ + 'error', + { + assertionStyle: 'as', + objectLiteralTypeAssertions: 'allow', + }, + ], + + '@typescript-eslint/consistent-type-definitions': ['error', 'type'], + + '@typescript-eslint/consistent-type-imports': [ + 'error', + { + prefer: 'type-imports', + fixStyle: 'separate-type-imports', + }, + ], + + '@typescript-eslint/member-ordering': 'error', + + '@typescript-eslint/method-signature-style': 'error', + + '@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-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-invalid-void-type': 'error', + + '@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-unused-private-class-members': 'error', + + '@typescript-eslint/parameter-properties': [ + 'error', + { allow: ['private', 'protected'] }, + ], + + '@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-unused-vars': [ + 'error', + { + args: 'after-used', + argsIgnorePattern: '[iI]gnored', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '[iI]gnored', + ignoreRestSiblings: false, + vars: 'all', + varsIgnorePattern: '[iI]gnored', + }, + ], + + '@typescript-eslint/no-useless-empty-export': '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/unified-signatures': 'error', + + '@typescript-eslint/array-type': [ + 'error', + { + default: 'generic', + readonly: 'generic', + }, + ], + + '@typescript-eslint/explicit-function-return-type': 'off', + + '@typescript-eslint/explicit-member-accessibility': [ + 'error', + { + overrides: { + constructors: 'no-public', + }, + }, + ], + + '@typescript-eslint/explicit-module-boundary-types': '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..16602b89 --- /dev/null +++ b/eslint-configs/eslint-config-seekingalpha-typescript/rules/typescript-eslint/oxlint-disabled.js @@ -0,0 +1,99 @@ +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/class-literal-property-style': '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/explicit-member-accessibility': 'off', + '@typescript-eslint/method-signature-style': '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-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-invalid-void-type': '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-unused-private-class-members': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/no-useless-empty-export': 'off', + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/parameter-properties': '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/consistent-type-assertions': '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-condition': '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/unified-signatures': 'off', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', +}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..813200c0 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,25 @@ +import baseConfig from 'eslint-config-seekingalpha-base/oxc.js'; +import nodeConfig from 'eslint-config-seekingalpha-node/oxc.js'; +import { defineConfig } from 'eslint/config'; + +export default defineConfig([ + { + linterOptions: { + reportUnusedDisableDirectives: 'error', + reportUnusedInlineConfigs: 'error', + }, + }, + { + languageOptions: { + sourceType: 'module', + }, + plugins: { + ...baseConfig.plugins, + ...nodeConfig.plugins, + }, + rules: { + ...baseConfig.rules, + ...nodeConfig.rules, + }, + }, +]); diff --git a/oxfmt.config.ts b/oxfmt.config.ts new file mode 100644 index 00000000..5cbd8a3d --- /dev/null +++ b/oxfmt.config.ts @@ -0,0 +1,44 @@ +import { defineConfig } from 'oxfmt'; + +export default defineConfig({ + arrowParens: 'always', + bracketSameLine: false, + bracketSpacing: true, + embeddedLanguageFormatting: 'auto', + endOfLine: 'lf', + htmlWhitespaceSensitivity: 'strict', + insertPragma: false, + jsxSingleQuote: false, + printWidth: 80, + proseWrap: 'preserve', + quoteProps: 'as-needed', + rangeStart: 0, + rangeEnd: null, + requirePragma: false, + semi: true, + singleAttributePerLine: true, + singleQuote: true, + trailingComma: 'all', + tabWidth: 2, + useTabs: false, + sortPackageJson: false, + ignorePatterns: [ + '.github', + '.gitignore', + '.gitattributes', + '.nvmrc', + 'log/', + 'tmp/', + ], + sortImports: { + groups: [ + 'builtin', + 'external', + 'internal', + 'value-parent', + ['value-index', 'value-sibling'], + 'style', + 'type', + ], + }, +}); diff --git a/oxlint.config.ts b/oxlint.config.ts new file mode 100644 index 00000000..10f4b620 --- /dev/null +++ b/oxlint.config.ts @@ -0,0 +1,25 @@ +import baseConfig from 'eslint-config-seekingalpha-base/oxlint-config.js'; +import nodeConfig from 'eslint-config-seekingalpha-node/oxlint-config.js'; +import { defineConfig } from 'oxlint'; + +export default defineConfig({ + extends: [baseConfig, nodeConfig], + env: { + builtin: true, + }, + rules: { + 'no-shadow': [ + 'error', + { + builtinGlobals: true, + hoist: 'all', + allow: ['config'], + ignoreFunctionTypeParameterNameValueShadow: true, + ignoreOnInitialization: false, + ignoreTypeValueShadow: true, + }, + ], + 'import/no-anonymous-default-export': 'off', + 'import/no-default-export': 'off', + }, +}); diff --git a/package.json b/package.json index b2670257..f7c67d51 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,19 @@ { "name": "seekingalpha-javascript-style", - "version": "2.5.0", + "version": "9.117.0", "description": "Set of linting rules, guides and best practices for best Javascript code", "main": "index.js", + "type": "module", + "engines": { + "node": ">= 24" + }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "lint": "eslint --ext .js ." + "oxlint": "oxlint --no-error-on-unmatched-pattern --report-unused-disable-directives", + "lint": "oxlint && TIMING=1 eslint .", + "prepare": "node .husky/install.js", + "oxfmt:check": "oxfmt --check --no-error-on-unmatched-pattern", + "oxfmt:write": "oxfmt --write --no-error-on-unmatched-pattern" }, "repository": { "type": "git", @@ -30,28 +38,24 @@ "url": "https://github.com/seekingalpha/javascript/issues" }, "homepage": "https://github.com/seekingalpha/javascript#readme", - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, "lint-staged": { + "*.{yml,yaml,md,mdx,html,json}": "oxfmt --write --no-error-on-unmatched-pattern", "*.js": [ - "eslint --ext .js", - "git add" + "oxfmt --write --no-error-on-unmatched-pattern", + "oxlint", + "eslint" ] }, "devDependencies": { - "eslint": "7.5.0", - "eslint-config-seekingalpha-base": "4.5.0", - "eslint-config-seekingalpha-node": "4.4.0", - "eslint-plugin-array-func": "3.1.7", - "eslint-plugin-import": "2.22.0", - "eslint-plugin-no-use-extend-native": "0.5.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-unicorn": "21.0.0", - "husky": "4.2.5", - "lint-staged": "10.2.11" + "eslint": "9.39.2", + "eslint-config-seekingalpha-base": "11.65.1", + "eslint-config-seekingalpha-node": "10.1.0", + "eslint-plugin-import": "2.32.0", + "eslint-plugin-n": "18.1.0", + "eslint-plugin-unicorn": "65.0.1", + "husky": "9.1.7", + "lint-staged": "17.0.7", + "oxfmt": "0.55.0", + "oxlint": "1.70.0" } }