diff --git a/.eslintrc.js b/.eslintrc.js index 4ceed4d3693..7757f21bd2b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,8 +6,7 @@ * Internally, ESLint is using the eslint.config.js file to lint itself. * This file is needed too, because: * - * 1. There are tests that expect .eslintrc.js to be present to actually run. - * 2. ESLint VS Code extension expects eslintrc config files to be + * 1. ESLint VS Code extension expects eslintrc config files to be * present to work correctly. * * Once we no longer need to support both eslintrc and flat config, we will @@ -63,21 +62,11 @@ module.exports = { "internal-rules" ], extends: [ - "eslint" + "eslint/eslintrc" ], parserOptions: { ecmaVersion: 2021 }, - - /* - * it fixes eslint-plugin-jsdoc's reports: "Invalid JSDoc tag name "template" jsdoc/check-tag-names" - * refs: https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names - */ - settings: { - jsdoc: { - mode: "typescript" - } - }, rules: { "internal-rules/multiline-comment-style": "error" }, @@ -96,9 +85,6 @@ module.exports = { "plugin:eslint-plugin/rules-recommended" ], rules: { - "eslint-plugin/no-missing-message-ids": "error", - "eslint-plugin/no-unused-message-ids": "error", - "eslint-plugin/prefer-message-ids": "error", "eslint-plugin/prefer-placeholders": "error", "eslint-plugin/prefer-replace-text": "error", "eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"], @@ -119,7 +105,6 @@ module.exports = { "plugin:eslint-plugin/tests-recommended" ], rules: { - "eslint-plugin/prefer-output-null": "error", "eslint-plugin/test-case-property-ordering": "error", "eslint-plugin/test-case-shorthand-strings": "error" } diff --git a/.github/ISSUE_TEMPLATE/new-rule.yml b/.github/ISSUE_TEMPLATE/new-rule.yml index 9ef139fbb23..4c4463466ed 100644 --- a/.github/ISSUE_TEMPLATE/new-rule.yml +++ b/.github/ISSUE_TEMPLATE/new-rule.yml @@ -26,7 +26,6 @@ body: options: - Warns about a potential problem - Suggests an alternate way of doing something - - Enforces a formatting/stylistic preference validations: required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/rule-change.yml b/.github/ISSUE_TEMPLATE/rule-change.yml index 86758cba555..2706a1180ca 100644 --- a/.github/ISSUE_TEMPLATE/rule-change.yml +++ b/.github/ISSUE_TEMPLATE/rule-change.yml @@ -15,7 +15,7 @@ body: required: true - type: dropdown attributes: - label: What change to do you want to make? + label: What change do you want to make? options: - Generate more warnings - Generate fewer warnings diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000000..8163f03867c --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,42 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + ":approveMajorUpdates", + ":semanticCommitScopeDisabled" + ], + "ignorePresets": [":semanticPrefixFixDepsChoreOthers"], + "labels": ["dependencies"], + + // Wait well over npm's three day window for any new package as a precaution against malicious publishes + // https://docs.npmjs.com/policies/unpublish/#packages-published-less-than-72-hours-ago + "minimumReleaseAge": "7 days", + + "packageRules": [ + { + "description": "Use the deps:actions label for github-action manager updates (this means Renovate's github-action manager).", + "addLabels": ["deps:actions"], + "matchManagers": ["github-actions"] + }, + { + "description": "Use the deps:npm label for npm manager packages (this means Renovate's npm manager).", + "addLabels": ["deps:npm"], + "matchManagers": ["npm"] + }, + { + "description": "Group Babel packages into a single PR.", + "groupName": "babel", + "matchPackagePrefixes": ["@babel", "babel-"] + }, + { + "description": "Group wdio packages into a single PR.", + "groupName": "wdio", + "matchPackagePrefixes": ["@wdio"] + }, + { + "description": "Group metascraper packages into a single PR.", + "groupName": "metascraper", + "matchPackagePrefixes": ["metascraper"] + } + ] +} diff --git a/.github/workflows/add-to-triage.yml b/.github/workflows/add-to-triage.yml deleted file mode 100644 index 83297dcab33..00000000000 --- a/.github/workflows/add-to-triage.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Add to Triage - -on: - issues: - types: - - opened - -jobs: - add-to-project: - name: Add issue to project - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v0.5.0 - with: - project-url: https://github.com/orgs/eslint/projects/3 - github-token: ${{ secrets.PROJECT_BOT_TOKEN }} - labeled: "triage:no" - label-operator: NOT diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27dae4c1262..4dbe1532dff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,8 @@ jobs: name: Verify Files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 'lts/*' - name: Install Packages @@ -33,6 +33,8 @@ jobs: run: npm run lint:scss - name: Lint Docs JS Files run: node Makefile lintDocsJS + - name: Check Rule Examples + run: node Makefile checkRuleExamples - name: Build Docs Website working-directory: docs run: npm run build @@ -45,7 +47,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [20.x, 19.x, 18.x, 17.x, 16.x, 14.x, 12.x, "12.22.0"] + node: ["21.2.0", 20.x, 19.x, 18.x, 17.x, 16.x, 14.x, 12.x, "12.22.0"] include: - os: windows-latest node: "lts/*" @@ -53,8 +55,8 @@ jobs: node: "lts/*" runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - name: Install Packages @@ -68,13 +70,19 @@ jobs: name: Browser Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '16' - name: Install Packages run: npm install - name: Test - run: node Makefile karma + run: node Makefile wdio - name: Fuzz Test run: node Makefile fuzz + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: logs + path: | + wdio-logs/*.log diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e2995e66d40..637f06e2e51 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index e6399920b51..5e3fb97c48d 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }} - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install npm packages run: npm install diff --git a/.gitignore b/.gitignore index 075a4d740c7..148181e0776 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ test.js coverage/ build/ +logs +wdio-logs npm-debug.log yarn-error.log .pnpm-debug.log diff --git a/CHANGELOG.md b/CHANGELOG.md index a103b11c6e5..f8b0969f950 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,302 @@ +v8.55.0 - December 1, 2023 + +* [`eb8950c`](https://github.com/eslint/eslint/commit/eb8950c3b811c9163b9aae23af8b6266ad98b295) chore: upgrade @eslint/js@8.55.0 (#17811) (Milos Djermanovic) +* [`93df384`](https://github.com/eslint/eslint/commit/93df3849a7a25ebe0502000bf0bfb80a6613a5ae) chore: package.json update for @eslint/js release (Jenkins) +* [`fe4b954`](https://github.com/eslint/eslint/commit/fe4b9545a83e9aca7ba4bb77bc9c868d57de777f) chore: upgrade @eslint/eslintrc@2.1.4 (#17799) (Milos Djermanovic) +* [`8c9e6c1`](https://github.com/eslint/eslint/commit/8c9e6c100a6eb69da292463293b3b48cff911a01) feat: importNamePattern option in no-restricted-imports (#17721) (Tanuj Kanti) +* [`83ece2a`](https://github.com/eslint/eslint/commit/83ece2afc2dc6c49efe82678663fe4cba590c0e5) docs: fix typo `--rules` -> `--rule` (#17806) (OKURA Masafumi) +* [`bd8911d`](https://github.com/eslint/eslint/commit/bd8911db85c7a1127543c9212c8cea47a5cb687d) ci: pin Node.js 21.2.0 (#17809) (Milos Djermanovic) +* [`b29a16b`](https://github.com/eslint/eslint/commit/b29a16b22f234f6134475efb6c7be5ac946556ee) chore: fix several `cli` tests to run in the intended flat config mode (#17797) (Milos Djermanovic) +* [`fffca5c`](https://github.com/eslint/eslint/commit/fffca5c362bcd205dbf79d1bb52834f8a98fc6bd) docs: remove "Open in Playground" buttons for removed rules (#17791) (Francesco Trotta) +* [`a6d9442`](https://github.com/eslint/eslint/commit/a6d9442a9ab34d5d19f78d8c8fd0767a1237bfe3) docs: fix correct/incorrect examples of rules (#17789) (Tanuj Kanti) +* [`383e999`](https://github.com/eslint/eslint/commit/383e99928d7ce649ec9030c9856b03fbac0c3501) docs: update and fix examples for `no-unused-vars` (#17788) (Tanuj Kanti) +* [`5a8efd5`](https://github.com/eslint/eslint/commit/5a8efd5b7ad13eb320a1f468d1d4ab3c8ab99214) docs: add specific stylistic rule for each deprecated rule (#17778) (Etienne) +* [`de165c1`](https://github.com/eslint/eslint/commit/de165c108203c6703516ac651f5b4cac5b241804) chore: remove unused config-extends fixtures (#17781) (Milos Djermanovic) +* [`d4304b8`](https://github.com/eslint/eslint/commit/d4304b8b66eac870ffbf4840d84add8a123b25fc) chore: remove formatting/stylistic rules from new rule templates (#17780) (Francesco Trotta) +* [`21024fe`](https://github.com/eslint/eslint/commit/21024fe2029420b413bed11d23761c87e9a02a1a) chore: check rule examples for syntax errors (#17718) (Francesco Trotta) + +v8.54.0 - November 17, 2023 + +* [`d644de9`](https://github.com/eslint/eslint/commit/d644de9a4b593b565617303a095bc9aa69e7b768) chore: upgrade @eslint/js@8.54.0 (#17773) (Milos Djermanovic) +* [`1e6e314`](https://github.com/eslint/eslint/commit/1e6e31415cc429a3a9fc64b2ec03df0e0ec0c91b) chore: package.json update for @eslint/js release (Jenkins) +* [`98926e6`](https://github.com/eslint/eslint/commit/98926e6e7323e5dd12a9f016cb558144296665af) fix: Ensure that extra data is not accidentally stored in the cache file (#17760) (Milos Djermanovic) +* [`a7a883b`](https://github.com/eslint/eslint/commit/a7a883bd6ba4f140b60cbbb2be5b53d750f6c8db) feat: for-direction rule add check for condition in reverse order (#17755) (Angelo Annunziata) +* [`1452dc9`](https://github.com/eslint/eslint/commit/1452dc9f12c45c05d7c569f737221f0d988ecef1) feat: Add suggestions to no-console (#17680) (Joel Mathew Koshy) +* [`6fb8805`](https://github.com/eslint/eslint/commit/6fb8805310afe7476d6c404f172177a6d15fcf11) chore: Fixed grammar in issue_templates/rule_change (#17770) (Joel Mathew Koshy) +* [`becfdd3`](https://github.com/eslint/eslint/commit/becfdd39b25d795e56c9a13eb3e77af6b9c86e8a) docs: Make clear when rules are removed (#17728) (Nicholas C. Zakas) +* [`e8cf9f6`](https://github.com/eslint/eslint/commit/e8cf9f6a524332293f8b2c90a2db4a532e47d919) fix: Make dark scroll bar in dark theme (#17753) (Pavel) +* [`85db724`](https://github.com/eslint/eslint/commit/85db7243ddb8706ed60ab64a7ddf604d0d7de493) chore: upgrade `markdownlint` to 0.31.1 (#17754) (Nitin Kumar) +* [`21ebf8a`](https://github.com/eslint/eslint/commit/21ebf8a811be9f4b009cf70a10be5062d4fdc736) feat: update `no-array-constructor` rule (#17711) (Francesco Trotta) +* [`05d6e99`](https://github.com/eslint/eslint/commit/05d6e99153ed6d94eb30f46c57609371918a41f3) docs: update "Submit a Pull Request" page (#17712) (Francesco Trotta) +* [`eb2279e`](https://github.com/eslint/eslint/commit/eb2279e5148cee8fdea7dae614f4f8af7a2d06c3) docs: display info about deprecated rules (#17749) (Percy Ma) +* [`6d470d2`](https://github.com/eslint/eslint/commit/6d470d2e74535761bd56dcb1c021b463ef9e8a9c) chore: update dependency recast to ^0.23.0 (#17736) (renovate[bot]) +* [`b7121b5`](https://github.com/eslint/eslint/commit/b7121b590d578c9c9b38ee481313317f30e54817) chore: update dependency markdownlint-cli to ^0.37.0 (#17735) (renovate[bot]) +* [`633b9a1`](https://github.com/eslint/eslint/commit/633b9a19752b6a22ab4d6c824f27a75ac0e4151b) chore: update dependency regenerator-runtime to ^0.14.0 (#17739) (renovate[bot]) +* [`acac16f`](https://github.com/eslint/eslint/commit/acac16fdf8540f7ba86cf637e3c1b253bd35a268) chore: update dependency vite-plugin-commonjs to ^0.10.0 (#17740) (renovate[bot]) +* [`ba8ca7e`](https://github.com/eslint/eslint/commit/ba8ca7e3debcba68ee7015b9221cf5acd7870206) chore: add .github/renovate.json5 (#17567) (Josh Goldberg ✨) +* [`3cbeaad`](https://github.com/eslint/eslint/commit/3cbeaad7b943c153937ce34365cec2c406f2b98b) fix: Use `cwd` constructor option as config `basePath` in Linter (#17705) (Milos Djermanovic) +* [`d245326`](https://github.com/eslint/eslint/commit/d24532601e64714ac5d08507e05aa5c14ecd1d5a) docs: Correct working in migrating plugin docs (#17722) (Filip Tammergård) +* [`5454c22`](https://github.com/eslint/eslint/commit/5454c22b24f39be2dac7f28cfcfdb6c753faaf4e) Revert "chore: remove metascraper (#17707)" (#17708) (Milos Djermanovic) + +v8.53.0 - November 3, 2023 + +* [`ba4d4d5`](https://github.com/eslint/eslint/commit/ba4d4d567a82554250dd8c7933322824e6a73944) chore: remove metascraper (#17707) (Milos Djermanovic) +* [`0d07338`](https://github.com/eslint/eslint/commit/0d0733882944b4849d71a40723c251213698cef9) chore: Update dependencies (#17706) (Milos Djermanovic) +* [`93256a3`](https://github.com/eslint/eslint/commit/93256a32e312f3f4e5c532762df71bdc06bded20) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`ab8c60d`](https://github.com/eslint/eslint/commit/ab8c60d4f859cec787b5a12f7271b40e666235f5) docs: change position of return to top button (#17688) (Tanuj Kanti) +* [`528e1c0`](https://github.com/eslint/eslint/commit/528e1c00dc2aa8636e5b706c4270dc655cfa17e3) feat: Deprecate formatting rules (#17696) (Nicholas C. Zakas) +* [`485ec7d`](https://github.com/eslint/eslint/commit/485ec7d08ed2040c292f52bf9b9152f6c8ef4809) test: fix ESLint tests for caching (#17699) (Milos Djermanovic) +* [`c0b11dd`](https://github.com/eslint/eslint/commit/c0b11ddb9f8aacc64c3933b9f278939aa7bea481) feat: Add suggestions for no-prototype-builtins (#17677) (Yonathan Randolph) +* [`4fc44c0`](https://github.com/eslint/eslint/commit/4fc44c0b8c5dca466bffdfe01dfd80794d7762b7) docs: update twitter icon to new X icon (#17687) (Tanuj Kanti) +* [`1ad6257`](https://github.com/eslint/eslint/commit/1ad6257744d63281235fcc33288394b1d69b34ce) fix: ensure that exit code for fatal errors is not overwritten (#17683) (Milos Djermanovic) +* [`4164b2c`](https://github.com/eslint/eslint/commit/4164b2ceec89726b18ea0b0e34fab05735d55a09) docs: Update README (GitHub Actions Bot) +* [`8651895`](https://github.com/eslint/eslint/commit/8651895ca7ae15e13d74c8be67d9eebd63a7ce1f) docs: Fix tabs in rule examples (#17653) (Francesco Trotta) +* [`3aec1c5`](https://github.com/eslint/eslint/commit/3aec1c55ba2c6d2833e1c0afe0a58f0cc6bbc0a4) docs: explained rule fixers and suggestions (#17657) (Josh Goldberg ✨) +* [`db06a7f`](https://github.com/eslint/eslint/commit/db06a7ff7992a74368f03d1f21beb00df0407021) ci: bump actions/setup-node from 3 to 4 (#17676) (dependabot[bot]) +* [`b329ea7`](https://github.com/eslint/eslint/commit/b329ea748dff45f11c7e218208244dc24fcb5c8f) fix: add `;` after JSX nodes in `no-object-constructor` autofix (#17672) (Francesco Trotta) +* [`994596b`](https://github.com/eslint/eslint/commit/994596b07f5ff20a615a4be1ea03e5fd59cdb84b) ci: run tests in Node.js 21 (#17673) (Francesco Trotta) + +v8.52.0 - October 20, 2023 + +* [`6d1f0c2`](https://github.com/eslint/eslint/commit/6d1f0c2da0309c06c21149b8d71a8f439a70d7e8) chore: upgrade @eslint/js@8.52.0 (#17671) (Milos Djermanovic) +* [`d63d4fe`](https://github.com/eslint/eslint/commit/d63d4fe0942e6747ab60e758aa36076f43041a30) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`476d58a`](https://github.com/eslint/eslint/commit/476d58a584d5d2db003c4c22ffee90e63566164d) docs: Add note about invalid CLI flags when using flat config. (#17664) (Nicholas C. Zakas) +* [`5de9637`](https://github.com/eslint/eslint/commit/5de9637fc925729a83d5a5e9e868a41792a184e3) fix: Ensure shared references in rule configs are separated (#17666) (Nicholas C. Zakas) +* [`f30cefe`](https://github.com/eslint/eslint/commit/f30cefee6bda2789ede18e1664b84c2638ea1bb5) test: fix FlatESLint tests for caching (#17658) (Milos Djermanovic) +* [`ef650cb`](https://github.com/eslint/eslint/commit/ef650cb612510bcfa1379c1f0af56dd563b3a705) test: update tests for no-promise-executor-return (#17661) (Milos Djermanovic) +* [`70648ee`](https://github.com/eslint/eslint/commit/70648ee49c07f7b533d09f6bf8a5291e5a5a8601) feat: report-unused-disable-directive to report unused eslint-enable (#17611) (Yosuke Ota) +* [`dcfe573`](https://github.com/eslint/eslint/commit/dcfe5739c374c9d7ed21f14027870ec0fd453661) fix: add preceding semicolon in suggestions of `no-object-constructor` (#17649) (Francesco Trotta) +* [`660ed3a`](https://github.com/eslint/eslint/commit/660ed3afd128ad529234a855345629982caf1bc7) docs: Plugin flat config migration guide (#17640) (Nicholas C. Zakas) +* [`a58aa20`](https://github.com/eslint/eslint/commit/a58aa200fccedae7e2e9b6129246f2cedab14f8d) docs: fix examples for several rules (#17645) (Milos Djermanovic) +* [`179929b`](https://github.com/eslint/eslint/commit/179929bd46892f18f2aef0c159d5cc361cb69987) docs: Remove trailing newline from the code of Playground links (#17641) (Francesco Trotta) +* [`f8e5c30`](https://github.com/eslint/eslint/commit/f8e5c30636450d4a8baf51f0e227685e6d77ac64) docs: Update README (GitHub Actions Bot) +* [`b7ef2f3`](https://github.com/eslint/eslint/commit/b7ef2f34fe12b68a366e1b4bf5f64d7332c6e72e) docs: Enable pretty code formatter output (#17635) (Nicholas C. Zakas) +* [`0bcb9a8`](https://github.com/eslint/eslint/commit/0bcb9a8db608a3d0bd2645f99e0707b9a9bbaaf0) docs: Fix syntax errors in rule examples (#17633) (Francesco Trotta) +* [`61b9083`](https://github.com/eslint/eslint/commit/61b90839633ef300ac7707a651f65f532e65f42d) docs: Make no-continue example code work (#17643) (Zhongyuan Zhou) +* [`9fafe45`](https://github.com/eslint/eslint/commit/9fafe450c31ed9b6bdd9dcd6c115255943b8c1c2) docs: upgrade to 11ty 2.0 (#17632) (Percy Ma) +* [`ff8e4bf`](https://github.com/eslint/eslint/commit/ff8e4bf327b5c92b0623b0fc5f8f101954f785db) docs: Update README (GitHub Actions Bot) +* [`fab249a`](https://github.com/eslint/eslint/commit/fab249ae6addac2ee18cd81cee80916010bb469e) docs: Update README (GitHub Actions Bot) +* [`392305b`](https://github.com/eslint/eslint/commit/392305bf4797e3ebc696dfca48bd874741fca845) docs: Update `no-irregular-whitespace` and fix examples (#17626) (Francesco Trotta) +* [`6b8acfb`](https://github.com/eslint/eslint/commit/6b8acfb770589f3941df41c3910d3b8ffc3e1e45) docs: Add real whitespace to `no-trailing-spaces` examples (#17630) (Francesco Trotta) +* [`1000187`](https://github.com/eslint/eslint/commit/1000187e00949332babcee4d37d46c96a6a554a8) docs: Fix examples in `unicode-bom` (#17631) (Francesco Trotta) +* [`000290c`](https://github.com/eslint/eslint/commit/000290c4c923cc1473e21b4bdbdc0c42765ef7dd) docs: Update README (GitHub Actions Bot) + +v8.51.0 - October 6, 2023 + +* [`1ef39ea`](https://github.com/eslint/eslint/commit/1ef39ea5b884453be717ebc929155d7eb584dcbf) chore: upgrade @eslint/js@8.51.0 (#17624) (Milos Djermanovic) +* [`f8c7403`](https://github.com/eslint/eslint/commit/f8c7403255c11e99c402860aef3c0179f2b16628) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`f976b2f`](https://github.com/eslint/eslint/commit/f976b2f7bfe7cc78bb649f8b37e90fd519ff3bcc) fix: make rule severity case-sensitive in flat config (#17619) (Milos Djermanovic) +* [`0edfe36`](https://github.com/eslint/eslint/commit/0edfe369aa5bd80a98053022bb4c6b1ea0155f44) fix: Ensure crash error messages are not duplicated (#17584) (Nicholas C. Zakas) +* [`ee5be81`](https://github.com/eslint/eslint/commit/ee5be81fa3c4fe801c2f653854f098ed6a84dcef) docs: default to `sourceType: "module"` in rule examples (#17615) (Francesco Trotta) +* [`dd79abc`](https://github.com/eslint/eslint/commit/dd79abc0c1857b1d765acc312c0d6518e40d31c9) fix: `eslint-disable` to be able to parse quoted rule names (#17612) (Yosuke Ota) +* [`d2f6801`](https://github.com/eslint/eslint/commit/d2f68019b8882278877801c5ef2f74d55e2a10c1) fix: Ensure correct code path for && followed by ?? (#17618) (Nicholas C. Zakas) +* [`2665552`](https://github.com/eslint/eslint/commit/2665552ba0057e8603f9fbece0fd236f189f5cf3) test: fix flat config linter tests to use Linter in flat config mode (#17616) (Milos Djermanovic) +* [`1aa26df`](https://github.com/eslint/eslint/commit/1aa26df9fbcfdf5b895743c6d2d3a216479544b1) docs: Add more examples for multiline-ternary (#17610) (George Ashiotis) +* [`47d0b44`](https://github.com/eslint/eslint/commit/47d0b446964f44d70b9457ecc368e721e1dc7c11) docs: Update README (GitHub Actions Bot) +* [`dbf831e`](https://github.com/eslint/eslint/commit/dbf831e31f8eea0bc94df96cd33255579324b66e) docs: use generated og image (#17601) (Percy Ma) +* [`0a9c433`](https://github.com/eslint/eslint/commit/0a9c43339a4adef24ef83034d0b078dd279cc977) feat: Add `--no-warn-ignored` CLI option for flat config (#17569) (Domantas Petrauskas) +* [`1866da5`](https://github.com/eslint/eslint/commit/1866da5e1d931787256ecb825a803cac5835b71c) docs: Update README (GitHub Actions Bot) +* [`7b77bcc`](https://github.com/eslint/eslint/commit/7b77bccbb51bd36b2d20fea61bc782545c4029b3) chore: Refactor CodePathState (#17510) (Nicholas C. Zakas) +* [`977e67e`](https://github.com/eslint/eslint/commit/977e67ec274a05cb7391665b5e3453e7f72f72b2) feat: logical-assignment-operators to report expressions with 3 operands (#17600) (Yosuke Ota) +* [`bc77c9a`](https://github.com/eslint/eslint/commit/bc77c9af12539f350ef19e30611a153a5b869c6b) chore: Document and refactor ForkContext (#17566) (Nicholas C. Zakas) +* [`24e1f14`](https://github.com/eslint/eslint/commit/24e1f140ec68659e55c1ace0d7500addb135a2b4) chore: Refactor and document CodePath (#17558) (Nicholas C. Zakas) + +v8.50.0 - September 22, 2023 + +* [`f8a8a2d`](https://github.com/eslint/eslint/commit/f8a8a2d6b45c82f94a574623759b6e3d2af193f3) chore: upgrade @eslint/js@8.50.0 (#17599) (Milos Djermanovic) +* [`38ada6d`](https://github.com/eslint/eslint/commit/38ada6df8f4a0313b7d0739b28f0af6b4897b8ce) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`27d5a9e`](https://github.com/eslint/eslint/commit/27d5a9e57ad347982a68fcd0e75eafee42d344f0) feat: add suggestions to array-callback-return (#17590) (Tanuj Kanti) +* [`f9082ff`](https://github.com/eslint/eslint/commit/f9082ff3f3956a0a5a7d7659de63640a21c4de0f) feat: flat-rule-tester make sure default config always matches (#17585) (fnx) +* [`83914ad`](https://github.com/eslint/eslint/commit/83914adbfd5fce7d11b33d095ba6d6a39be0dbbc) feat: Implement SourceCode#applyInlineConfig() (#17351) (Nicholas C. Zakas) +* [`cc4d26b`](https://github.com/eslint/eslint/commit/cc4d26b5a59d510f2c878e973fd245e8eff27c2a) fix: Ensure deprecated context.parserServices warns (#17593) (Nicholas C. Zakas) +* [`1ea4cfb`](https://github.com/eslint/eslint/commit/1ea4cfb585dcb52ac3cb1522a32f25cfe507121b) fix: Ensure all RuleTester tests all deprecated context methods (#17587) (Nicholas C. Zakas) +* [`1800537`](https://github.com/eslint/eslint/commit/180053759c6cf05a326c710353b4717fbf289ee0) docs: Fix and standardize JSX code examples (#17591) (Francesco Trotta) +* [`22a5582`](https://github.com/eslint/eslint/commit/22a558228ff98f478fa308c9ecde361acc4caf20) feat: add rule `no-object-constructor`, deprecate `no-new-object` (#17576) (Francesco Trotta) +* [`48a44a7`](https://github.com/eslint/eslint/commit/48a44a73ac456739bdee348bbaf1840d2b1e4830) docs: Add correct/incorrect tags to `prefer-arrow-callback` (#17589) (Francesco Trotta) +* [`aa1b657`](https://github.com/eslint/eslint/commit/aa1b657a9febcd03e9298c03ae2888762795e322) fix: wrong suggestion and message in `no-misleading-character-class` (#17571) (Yosuke Ota) +* [`20893d4`](https://github.com/eslint/eslint/commit/20893d48b9012f2b61bbbfeac8bee70d68d90e5e) docs: fix incorrect tag's place (#17575) (Tanuj Kanti) +* [`85a3d9e`](https://github.com/eslint/eslint/commit/85a3d9e967b19cb4a0189746499d81ef2f93e14e) feat: allowVoid option in array-callback-return (#17564) (Tanuj Kanti) +* [`bd7a71f`](https://github.com/eslint/eslint/commit/bd7a71fd6b7efb0445393304e2d48c5c06d46a45) docs: Update README (GitHub Actions Bot) + +v8.49.0 - September 8, 2023 + +* [`b7621c3`](https://github.com/eslint/eslint/commit/b7621c3b16cf7d5539f05336a827e1b32d95e6ac) chore: remove browser test from `npm test` (#17550) (Milos Djermanovic) +* [`cac45d0`](https://github.com/eslint/eslint/commit/cac45d04b890b0700dd8908927300608adad05fe) chore: upgrade @eslint/js@8.49.0 (#17549) (Milos Djermanovic) +* [`cd39508`](https://github.com/eslint/eslint/commit/cd395082bffcb4b68efa09226d7c682cef56179e) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`ecfb54f`](https://github.com/eslint/eslint/commit/ecfb54ff4cdd18f28b4f9b78f0a78fb4cf80f1b8) docs: Update README (GitHub Actions Bot) +* [`da09f4e`](https://github.com/eslint/eslint/commit/da09f4e641141f585ef611c6e9d63d4331054706) feat: Implement onUnreachableCodePathStart/End (#17511) (Nicholas C. Zakas) +* [`de86b3b`](https://github.com/eslint/eslint/commit/de86b3b2e58edd5826200c23255d8325abe375e1) docs: update `no-promise-executor-return` examples (#17529) (Nitin Kumar) +* [`203a971`](https://github.com/eslint/eslint/commit/203a971c0abc3a95ae02ff74104a01e569707060) ci: bump actions/checkout from 3 to 4 (#17530) (dependabot[bot]) +* [`32b2327`](https://github.com/eslint/eslint/commit/32b2327aafdd3b911fabab69ed75c9ff97658c60) feat: Emit deprecation warnings in RuleTester (#17527) (Nicholas C. Zakas) +* [`acb7df3`](https://github.com/eslint/eslint/commit/acb7df35b9a7485f26bc6b3e1f9083d1c585dce9) feat: add new `enforce` option to `lines-between-class-members` (#17462) (Nitin Kumar) +* [`032c4b1`](https://github.com/eslint/eslint/commit/032c4b1476a7b8cfd917a66772d2221950ea87eb) docs: add typescript template (#17500) (James) +* [`cd7da5c`](https://github.com/eslint/eslint/commit/cd7da5cc3154f86f7ca45fb58929d27a7af359ed) docs: Update README (GitHub Actions Bot) +* [`a40fa50`](https://github.com/eslint/eslint/commit/a40fa509922b36bb986eb1be9394591f84f62d9e) chore: use eslint-plugin-jsdoc's flat config (#17516) (Milos Djermanovic) +* [`926a286`](https://github.com/eslint/eslint/commit/926a28684282aeec37680bbc52a66973b8055f54) test: replace Karma with Webdriver.IO (#17126) (Christian Bromann) +* [`f591d2c`](https://github.com/eslint/eslint/commit/f591d2c88bf15af72e3a207b34fa872b4b90464b) chore: Upgrade config-array (#17512) (Nicholas C. Zakas) + +v8.48.0 - August 25, 2023 + +* [`8dd3cec`](https://github.com/eslint/eslint/commit/8dd3cec90c97ed97d243a83b87ad4ea9e6b4781a) chore: upgrade @eslint/js@8.48.0 (#17501) (Milos Djermanovic) +* [`6d0496e`](https://github.com/eslint/eslint/commit/6d0496e9476fb2210fba0a3d541df8c052ecf73a) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`7a51d77`](https://github.com/eslint/eslint/commit/7a51d77c0a066e461ff288568fdfee0e9539a2b5) docs: no-param-reassign mention strict mode (#17494) (Stephen Hardy) +* [`9cd7ac2`](https://github.com/eslint/eslint/commit/9cd7ac2fdb6b1d71a9fb1b8297a478cafacbdafd) docs: add `fetch` script to package.json conventions (#17459) (Nitin Kumar) +* [`7234f6a`](https://github.com/eslint/eslint/commit/7234f6a706a209aa2d79259110328752e9ae3928) fix: update RuleTester JSDoc and deprecations (#17496) (Jonas Berlin) +* [`1fbb3b0`](https://github.com/eslint/eslint/commit/1fbb3b0b477c814c0d179564fe495f4c50a451e9) feat: correct update direction in `for-direction` (#17483) (Francesco Trotta) +* [`9d4216d`](https://github.com/eslint/eslint/commit/9d4216d638d39844decffac33ee3d5a47413c80a) chore: Refactor and document CodePathSegment (#17474) (Nicholas C. Zakas) +* [`cab21e6`](https://github.com/eslint/eslint/commit/cab21e64a8f79779c641178f825945958667c6e4) docs: advice for inline disabling of rules (#17458) (Ashish Yadav) +* [`056499d`](https://github.com/eslint/eslint/commit/056499de31a139dbc965d18652b0b520e11b408d) docs: fix example of flat config from plugin (#17482) (Francesco Trotta) +* [`d73fbf2`](https://github.com/eslint/eslint/commit/d73fbf2228631d6c468cd24710e2579fe6cb70fd) feat: rule tester do not create empty valid or invalid test suites (#17475) (fnx) +* [`ee2f718`](https://github.com/eslint/eslint/commit/ee2f718188d32e9888b1932fe6b9bd2a62c529a4) feat: Allow `void` in rule `no-promise-executor-return` (#17282) (nopeless) +* [`9e9edf9`](https://github.com/eslint/eslint/commit/9e9edf93ecfa0658e8b79e71bc98530ade150081) docs: update documentation URL in error message (#17465) (Nitin Kumar) + +v8.47.0 - August 11, 2023 + +* [`bf69aa6`](https://github.com/eslint/eslint/commit/bf69aa6408f5403a88d8c9b71b0e58232b1ea833) chore: Update dependencies (#17456) (Nicholas C. Zakas) +* [`0e45760`](https://github.com/eslint/eslint/commit/0e4576012ab938b880e6f27641bff55fb4313d20) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`631648e`](https://github.com/eslint/eslint/commit/631648ee0b51a8951ce576ccd4430e09c9c8bcae) fix: do not report on shadowed constructors in `no-new-wrappers` (#17447) (Francesco Trotta) +* [`757bfe1`](https://github.com/eslint/eslint/commit/757bfe1c35b5ddab7042d388f8d21e834875fff5) chore: Remove add-to-triage (#17450) (Nicholas C. Zakas) +* [`b066640`](https://github.com/eslint/eslint/commit/b066640b7040ec30f740dcc803511244fe19473b) chore: standardize npm script names (#17431) (Nitin Kumar) +* [`a766a48`](https://github.com/eslint/eslint/commit/a766a48030d4359db76523d5b413d6332130e485) docs: document lack of config file names (#17442) (James) +* [`a1635d6`](https://github.com/eslint/eslint/commit/a1635d6198a8baf6571b3351e098e5ac960be887) docs: Update README (GitHub Actions Bot) +* [`6b2410f`](https://github.com/eslint/eslint/commit/6b2410f911dd2e3d915c879041c6e257d41a2f4e) chore: Update add-to-triage.yml (#17444) (Nicholas C. Zakas) +* [`47a0859`](https://github.com/eslint/eslint/commit/47a08597966651975126dd6726939cd34f13b80e) docs: update `require-unicode-regexp.md` as following up #17402 (#17441) (SUZUKI Sosuke) +* [`53d7508`](https://github.com/eslint/eslint/commit/53d750800b1c0c1f8c29393c488bb3167bb1d2a5) feat: update regex for methods with `thisArg` (#17439) (Francesco Trotta) +* [`fcdc85d`](https://github.com/eslint/eslint/commit/fcdc85d3a6bc14970c3349cc8d6f3a47eca172a3) docs: Update README (GitHub Actions Bot) +* [`2a92b6c`](https://github.com/eslint/eslint/commit/2a92b6cc9520a27255520369206556e9841a3af8) docs: update with "Specifying Parser Options" (#17435) (Cheol-Won) +* [`d743ed3`](https://github.com/eslint/eslint/commit/d743ed3c06c62a639da0389ad27907b324ea1715) docs: add metadata for parser/processor (#17438) (Huáng Jùnliàng) +* [`224376c`](https://github.com/eslint/eslint/commit/224376cd99a08394291a9584ad9c1ea1283673c6) docs: Update README (GitHub Actions Bot) +* [`a41a8e4`](https://github.com/eslint/eslint/commit/a41a8e4a7da14726d6fce71a023f12101fd52fdb) docs: update script names in README (#17432) (Nitin Kumar) + +v8.46.0 - July 28, 2023 + +* [`d1eb7e4`](https://github.com/eslint/eslint/commit/d1eb7e46e954c64af8d7d13d087b3a18f43e6d72) chore: Update ecosystem dependencies (#17427) (Nicholas C. Zakas) +* [`fab9e97`](https://github.com/eslint/eslint/commit/fab9e97ef9dff40e98a5b3b97bdd3b0ff5439d46) chore: package.json update for eslint-config-eslint release (ESLint Jenkins) +* [`6246711`](https://github.com/eslint/eslint/commit/6246711e0650d03afe044c36acde048ed2d39ee3) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`8a93438`](https://github.com/eslint/eslint/commit/8a9343871f7dade19d910ca8e2a4177bfca28b64) feat: `require-unicode-regexp` support `v` flag (#17402) (SUZUKI Sosuke) +* [`4d474e3`](https://github.com/eslint/eslint/commit/4d474e351ba6ce0242f18e55c27cb3ae17b84f63) docs: update with TypeScript info (#17423) (James) +* [`091f44e`](https://github.com/eslint/eslint/commit/091f44e4c72007edb2ac6d4db4eafa5501e41e94) docs: File extension named processor deprecation (#17362) (Matt Wilkinson) +* [`1a2f966`](https://github.com/eslint/eslint/commit/1a2f966fabe35103141d2f936180d2f1a72154db) feat: `no-useless-escape` support `v` flag (#17420) (Yosuke Ota) +* [`0aa0bc3`](https://github.com/eslint/eslint/commit/0aa0bc365a5425440c8e86c96104d0053a51b602) chore: Add PRs to triage project (#17421) (Nicholas C. Zakas) +* [`ee68d1d`](https://github.com/eslint/eslint/commit/ee68d1d9630892d99ae0d8dabe2f9f8d3b1338be) feat: `no-empty-character-class` support `v` flag (#17419) (Milos Djermanovic) +* [`853d32b`](https://github.com/eslint/eslint/commit/853d32baa8934c08b59a738470b72522e1505f6f) feat: deprecate no-return-await (#17417) (Carlos Lopez) +* [`d4f02e4`](https://github.com/eslint/eslint/commit/d4f02e4bf1b9ae4e1fc8f2bc4e4851ae3c36a127) feat: `no-control-regex` support `v` flag (#17405) (Yosuke Ota) +* [`9254a6c`](https://github.com/eslint/eslint/commit/9254a6cea845dfaf2f3f52f718cb9b071853aa09) docs: Update README (GitHub Actions Bot) +* [`2a35f3e`](https://github.com/eslint/eslint/commit/2a35f3e6ed27deafbebba48b6aec570d3abf9974) feat: `prefer-named-capture-group` support `v` flag (#17409) (Yosuke Ota) +* [`8ca8b50`](https://github.com/eslint/eslint/commit/8ca8b50b0425b3bad34a9505bc3095168e2f59d8) feat: Better error message for flat config plugins (#17399) (Nicholas C. Zakas) +* [`6d6dc51`](https://github.com/eslint/eslint/commit/6d6dc5141f535728029eef8735854a421bc08eba) docs: fix overlapping of `open in playground` button (#17403) (Tanuj Kanti) +* [`509f753`](https://github.com/eslint/eslint/commit/509f75395035822280245772e2a95732a0dde0e1) feat: `no-misleading-character-class` support `v` flag (#17406) (Yosuke Ota) +* [`3caf514`](https://github.com/eslint/eslint/commit/3caf51487decdf93a4b17765a2af2a51c337e974) feat: `no-regex-spaces` support `v` flag (#17407) (Yosuke Ota) +* [`b7fad2b`](https://github.com/eslint/eslint/commit/b7fad2b52f23667628cf209663795a721c88d0ba) feat: `prefer-regex-literals` support `v` flag (#17410) (Yosuke Ota) +* [`a6a3ad4`](https://github.com/eslint/eslint/commit/a6a3ad4ae438ea7fc3a1d97cd2555f6534b565f1) feat: `no-useless-backreference` support `v` flag (#17408) (Yosuke Ota) +* [`94954a7`](https://github.com/eslint/eslint/commit/94954a715448d5794f2892bf212fe986b43228ed) feat: `no-invalid-regexp` support `v` flag (#17404) (Yosuke Ota) +* [`7fc3a2c`](https://github.com/eslint/eslint/commit/7fc3a2ce68979a2c2a6fc779e647b3004ab6f4ac) docs: Add private class features info to no-underscore-dangle (#17386) (Matt Wilkinson) +* [`da73e58`](https://github.com/eslint/eslint/commit/da73e583e1703a420551d8fa8f7c70b56dc88dd5) docs: Migrating `eslint-env` configuration comments (#17390) (Francesco Trotta) +* [`10e9cfa`](https://github.com/eslint/eslint/commit/10e9cfa01ac043961f2c476198848f0ca5e8bbb0) Merge pull request from GHSA-qwh7-v8hg-w8rh (leo-centurion) +* [`1af6eac`](https://github.com/eslint/eslint/commit/1af6eac5727080c809e37c07dc729b44ef24483c) feat: adds option for allowing empty object patterns as parameter (#17365) (Tanuj Kanti) +* [`9803c7c`](https://github.com/eslint/eslint/commit/9803c7c04078f0672d8a480fd39cf3bbef8017e6) fix: FlatESLint#getRulesMetaForResults shouldn't throw on unknown rules (#17393) (Milos Djermanovic) +* [`80dffed`](https://github.com/eslint/eslint/commit/80dffed4c81dcc71fb72bc187aff2f87d141a6ed) docs: fix Ignoring Files section in config migration guide (#17392) (Milos Djermanovic) +* [`8a9abb7`](https://github.com/eslint/eslint/commit/8a9abb7cf424bd49d45c09345dc45ae95f29cc9d) docs: Update README (GitHub Actions Bot) +* [`cf03104`](https://github.com/eslint/eslint/commit/cf03104b278fea59ef46e09f667110f5eaaf95e3) feat: Improve config error messages (#17385) (Nicholas C. Zakas) +* [`42faa17`](https://github.com/eslint/eslint/commit/42faa17b1c93f801b14bea2840d1d528e25c7211) fix: Update no-loop-func to not overlap with no-undef (#17358) (Matt Wilkinson) +* [`7e9be4b`](https://github.com/eslint/eslint/commit/7e9be4bd7331d0e8e8e0af0b075a2f6d28d1bea3) docs: Update README (GitHub Actions Bot) +* [`0b0bbe0`](https://github.com/eslint/eslint/commit/0b0bbe07d4fb0870f3916e975b8ec6978f838077) docs: Update README (GitHub Actions Bot) + +v8.45.0 - July 14, 2023 + +* [`68f63d7`](https://github.com/eslint/eslint/commit/68f63d76ce785fab4f42b76f1599026eea379bf7) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`89f3225`](https://github.com/eslint/eslint/commit/89f3225108c66425e4132f76db6c1ab13aac98d7) docs: add playground links to correct and incorrect code blocks (#17306) (Josh Goldberg ✨) +* [`f8892b5`](https://github.com/eslint/eslint/commit/f8892b52920b8967f9e7bec23c75b74e03977d6b) docs: Expand rule option schema docs (#17198) (Matt Wilkinson) +* [`8bcbf11`](https://github.com/eslint/eslint/commit/8bcbf11b6050418262ffa8e0ca37f365ae92e7ce) docs: Config Migration Guide (#17230) (Ben Perlmutter) +* [`bb30908`](https://github.com/eslint/eslint/commit/bb3090897166dbfd2931a43a70e2a5c1f3fa0a07) docs: Update README (GitHub Actions Bot) +* [`b79b6fb`](https://github.com/eslint/eslint/commit/b79b6fb64473969b426d086b484d2e29594a5e9a) fix: Fix suggestion message in `no-useless-escape` (#17339) (Francesco Trotta) +* [`84d243b`](https://github.com/eslint/eslint/commit/84d243b245b01b667f0752b592e8bda02a9aa2b1) docs: Update README (GitHub Actions Bot) +* [`5ca9b4d`](https://github.com/eslint/eslint/commit/5ca9b4d29f747e9cf5c9055e85c93b3b605d57fc) chore: update eslint-config-eslint exports (#17336) (Milos Djermanovic) +* [`b762632`](https://github.com/eslint/eslint/commit/b762632298f20c4f81e7d01ab850c3f5e3874637) docs: Update README (GitHub Actions Bot) +* [`7bf2e86`](https://github.com/eslint/eslint/commit/7bf2e86022c9e95db4ca1472fddfa2ea4edd1870) chore: remove unused dependencies (#17352) (Percy Ma) +* [`c6f8cd0`](https://github.com/eslint/eslint/commit/c6f8cd0d62e4a3c314c6860ff367490bbd05325a) chore: Remove `defaultIgnores` from FlatESLint private members (#17349) (Francesco Trotta) +* [`cdd063c`](https://github.com/eslint/eslint/commit/cdd063c388bbfe1781d7a864a832f03a2c1cc277) feat: Expose LegacyESLint in unsupported API (#17341) (Nicholas C. Zakas) +* [`c667055`](https://github.com/eslint/eslint/commit/c667055fb9da8ebac3a99f6e5a8b5565cc86af8e) fix: provide unique `fix` and `fix.range` objects in lint messages (#17332) (Milos Djermanovic) +* [`138c096`](https://github.com/eslint/eslint/commit/138c096bc9468b553dbafc0e573c6522a17a7922) docs: add more prefer-destructuring examples with array destructuring (#17330) (Milos Djermanovic) +* [`0052374`](https://github.com/eslint/eslint/commit/0052374035672efe9129343fc00ee51a4c288ff3) chore: move jsdoc settings to eslint-config-eslint (#17338) (唯然) +* [`d34abe5`](https://github.com/eslint/eslint/commit/d34abe59eb23932dcbc79757d7932d08ee8b20e5) feat: fix indent rule for else-if (#17318) (Milos Djermanovic) +* [`1fc50a8`](https://github.com/eslint/eslint/commit/1fc50a89753346f4f4c786ffd20ac4cf185bb036) docs: `max-len` rule `code` and `tabWidth` as positional arguments (#17331) (Jesús Leganés-Combarro) + +v8.44.0 - June 30, 2023 + +* [`49e46ed`](https://github.com/eslint/eslint/commit/49e46edf3c8dc71d691a97fc33b63ed80ae0db0c) chore: upgrade @eslint/js@8.44.0 (#17329) (Milos Djermanovic) +* [`a1cb642`](https://github.com/eslint/eslint/commit/a1cb6421f9d185901cd99e5f696e912226ef6632) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`1766771`](https://github.com/eslint/eslint/commit/176677180a4a1209fc192771521c9192e1f67578) feat: add `es2023` and `es2024` environments (#17328) (Milos Djermanovic) +* [`4c50400`](https://github.com/eslint/eslint/commit/4c5040022639ae804c15b366afc6e64982bd8ae3) feat: add `ecmaVersion: 2024`, regexp `v` flag parsing (#17324) (Milos Djermanovic) +* [`4d411e4`](https://github.com/eslint/eslint/commit/4d411e4c7063274d6d346f1b7ee46f7575d0bbd2) feat: add ternaryOperandBinaryExpressions option to no-extra-parens rule (#17270) (Percy Ma) +* [`840a264`](https://github.com/eslint/eslint/commit/840a26462bbf6c27c52c01b85ee2018062157951) test: More test cases for no-case-declarations (#17315) (Elian Cordoba) +* [`e6e74f9`](https://github.com/eslint/eslint/commit/e6e74f9eef0448129dd4775628aba554a2d8c8c9) chore: package.json update for eslint-config-eslint release (ESLint Jenkins) +* [`eb3d794`](https://github.com/eslint/eslint/commit/eb3d7946e1e9f70254008744dba2397aaa730114) chore: upgrade semver@7.5.3 (#17323) (Ziyad El Abid) +* [`a36bcb6`](https://github.com/eslint/eslint/commit/a36bcb67f26be42c794797d0cc9948b9cfd4ff71) fix: no-unused-vars false positive with logical assignment operators (#17320) (Gweesin Chan) +* [`c8b1f4d`](https://github.com/eslint/eslint/commit/c8b1f4d61a256727755d561bf53f889b6cd712e0) feat: Move `parserServices` to `SourceCode` (#17311) (Milos Djermanovic) +* [`cf88439`](https://github.com/eslint/eslint/commit/cf884390ad8071d88eae05df9321100f1770363d) chore: upgrade optionator@0.9.3 (#17319) (Milos Djermanovic) +* [`7620b89`](https://github.com/eslint/eslint/commit/7620b891e81c234f30f9dbcceb64a05fd0dde65e) fix: Remove `no-unused-labels` autofix before potential directives (#17314) (Francesco Trotta) +* [`ef6e24e`](https://github.com/eslint/eslint/commit/ef6e24e42670f321d996948623846d9caaedac99) feat: treat unknown nodes as having the lowest precedence (#17302) (Brad Zacher) +* [`9718a97`](https://github.com/eslint/eslint/commit/9718a9781d69d2c40b68c631aed97700b32c0082) refactor: remove unnecessary code in `flat-eslint.js` (#17308) (Milos Djermanovic) +* [`1866e1d`](https://github.com/eslint/eslint/commit/1866e1df6175e4ba0ae4a0d88dc3c956bb310035) feat: allow flat config files to export a Promise (#17301) (Milos Djermanovic) +* [`f82e56e`](https://github.com/eslint/eslint/commit/f82e56e9acfb9562ece76441472d5657d7d5e296) perf: various performance improvements (#17135) (moonlightaria) +* [`da81e66`](https://github.com/eslint/eslint/commit/da81e66e22b4f3d3fe292cf70c388753304deaad) chore: update eslint-plugin-jsdoc to 46.2.5 (#17245) (唯然) +* [`526e911`](https://github.com/eslint/eslint/commit/526e91106e6fe101578e9478a9d7f4844d4f72ac) docs: resubmit pr 17115 doc changes (#17291) (唯然) +* [`b991640`](https://github.com/eslint/eslint/commit/b991640176d5dce4750f7cc71c56cd6f284c882f) chore: switch eslint-config-eslint to the flat format (#17247) (唯然) +* [`391ed38`](https://github.com/eslint/eslint/commit/391ed38b09bd1a3abe85db65b8fcda980ab3d6f4) fix: Remove `no-extra-semi` autofix before potential directives (#17297) (Francesco Trotta) +* [`e1314bf`](https://github.com/eslint/eslint/commit/e1314bf85a52bb0d05b1c9ca3b4c1732bae22172) docs: Integration section and tutorial (#17132) (Ben Perlmutter) +* [`19a8c5d`](https://github.com/eslint/eslint/commit/19a8c5d84596a9f7f2aa428c1696ba86daf854e6) docs: Update README (GitHub Actions Bot) + +v8.43.0 - June 16, 2023 + +* [`78350f6`](https://github.com/eslint/eslint/commit/78350f63045c82b7990bb7bfe5080c5ad5e1c3f5) chore: upgrade @eslint/js@8.43.0 (#17295) (Milos Djermanovic) +* [`8b855ea`](https://github.com/eslint/eslint/commit/8b855ea058992d5446d1d6dc6394ee683c3200a0) docs: resubmit pr17061 doc changes (#17292) (唯然) +* [`62bf759`](https://github.com/eslint/eslint/commit/62bf759124811b013ad7906c2536deb8b39c31a8) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`14581ff`](https://github.com/eslint/eslint/commit/14581ff15aaee5a55c46bbf4983818ddc8dd7cb1) feat: directive prologue detection and autofix condition in `quotes` (#17284) (Francesco Trotta) +* [`372722e`](https://github.com/eslint/eslint/commit/372722eac32ca9e3f31cf0d0bc10317c6f153369) docs: resubmit pr17012 doc changes (#17293) (唯然) +* [`67e7af3`](https://github.com/eslint/eslint/commit/67e7af3fdbdb4648b747dfd669be4decfe24086a) docs: resubmit custom-rules doc changes (#17294) (唯然) +* [`5338b56`](https://github.com/eslint/eslint/commit/5338b56fda7f47d16bdb23514f1e95b24de7b92f) fix: normalize `cwd` passed to `ESLint`/`FlatESLint` constructor (#17277) (Milos Djermanovic) +* [`9e3d77c`](https://github.com/eslint/eslint/commit/9e3d77cba65d0e38e07996e57961fb04f30d9303) docs: Resubmit Fix formatting in Custom Rules docs (#17281) (Milos Djermanovic) +* [`503647a`](https://github.com/eslint/eslint/commit/503647a0b94ca8c776d7e7e8c54c8b1d32904467) docs: Resubmit markVariableAsUsed docs (#17280) (Nicholas C. Zakas) +* [`54383e6`](https://github.com/eslint/eslint/commit/54383e69b092ef537d59a1f7799a85b1412f4e59) fix: Remove `no-extra-parens` autofix for potential directives (#17022) (Francesco Trotta) +* [`e0cf0d8`](https://github.com/eslint/eslint/commit/e0cf0d86d985ed2b2f901dd9aab5ccd2fff062ad) docs: Custom rule & plugin tutorial (#17024) (Ben Perlmutter) +* [`8e51ea9`](https://github.com/eslint/eslint/commit/8e51ea943c2fcd05bd8917cfa89e36b91209c7cd) docs: resubmit `no-new` rule documentation (#17264) (Nitin Kumar) +* [`1b217f8`](https://github.com/eslint/eslint/commit/1b217f8de15961fd3c80389621080132f517a0fb) docs: resubmit `Custom Processors` documentation (#17265) (Nitin Kumar) +* [`428fc76`](https://github.com/eslint/eslint/commit/428fc76806dea1ac82484d628261a5385f928e6a) docs: resubmit `Create Plugins` documentation (#17268) (Nitin Kumar) +* [`bdca88c`](https://github.com/eslint/eslint/commit/bdca88cf4f8b7888cb72197bfe9c1d90b490a0dd) docs: resubmit `Configuration Files` documentation (#17267) (Nitin Kumar) +* [`f5c01f2`](https://github.com/eslint/eslint/commit/f5c01f281ad288b1a0ebddbf579230ae11587c6c) docs: resubmit `Manage Issues` documentation (#17266) (Nitin Kumar) +* [`b199295`](https://github.com/eslint/eslint/commit/b1992954591a3f4d8417013f52739b5fef4e0cd7) docs: Resubmit custom rules update docs (#17273) (Ben Perlmutter) +* [`e50fac3`](https://github.com/eslint/eslint/commit/e50fac3f8f998f729e3080e256066db3a7827c67) feat: add declaration loc to message in block-scoped-var (#17252) (Milos Djermanovic) +* [`0e9980c`](https://github.com/eslint/eslint/commit/0e9980c3a8a1e554fdb377305c0ebe9e94a354c9) docs: add new `omitLastInOneLineClassBody` option to the `semi` rule (#17263) (Nitin Kumar) +* [`cb2560f`](https://github.com/eslint/eslint/commit/cb2560f7a393e74b761faa9adad938fb1deb947d) docs: Resubmit getScope/getDeclaredVariables docs (#17262) (Nicholas C. Zakas) +* [`85d2b30`](https://github.com/eslint/eslint/commit/85d2b30bc318c1355e52ebb21c56cca32f0ab198) docs: explain how to include predefined globals (#17261) (Marcus Wyatt) +* [`de4d3c1`](https://github.com/eslint/eslint/commit/de4d3c14c30a88795b9075d59827d3fe63a42c5e) docs: update flat config default ignore patterns (#17258) (Milos Djermanovic) +* [`3912f3a`](https://github.com/eslint/eslint/commit/3912f3a225c12bfb5ce9b7ba26c2b5301e6275bd) docs: Improve `ignores` documentation (#17239) (Francesco Trotta) +* [`35e11d3`](https://github.com/eslint/eslint/commit/35e11d3248e00b711fd652836edc900f22af0ebd) docs: fix typos and missing info (#17257) (Ed Lucas) +* [`e0a2448`](https://github.com/eslint/eslint/commit/e0a2448e0c0ef354e69998858846630a3fce8ebe) chore: docs package.license ISC => MIT (#17254) (唯然) +* [`0bc257c`](https://github.com/eslint/eslint/commit/0bc257c290b12fcda85cb61b40d55fc2be0f938c) docs: Clarify `no-div-regex` rule docs (#17051) (#17255) (Francesco Trotta) +* [`1b7faf0`](https://github.com/eslint/eslint/commit/1b7faf0702b1af86b6a0ddafc37cf45d60f5d4d8) feat: add `skipJSXText` option to `no-irregular-whitespace` rule (#17182) (Azat S) +* [`788d836`](https://github.com/eslint/eslint/commit/788d83629a3790a7db6f52dcf0b4bddf51c6d063) docs: add references to MIT License (#17248) (Milos Djermanovic) +* [`58aab6b`](https://github.com/eslint/eslint/commit/58aab6b6c09996875418aefeeb0fd76c50caef7a) docs: Update README (GitHub Actions Bot) +* [`6a0196c`](https://github.com/eslint/eslint/commit/6a0196c51310630a0ff96a1e8d7f257c2c7adda9) chore: use eslint-plugin-eslint-plugin flat configs (#17204) (Milos Djermanovic) +* [`030a827`](https://github.com/eslint/eslint/commit/030a82737f51563f9a7b4985fc91b6d8eab54fce) Revert "feat: docs license (#17010)" (#17231) (唯然) +* [`3ef5814`](https://github.com/eslint/eslint/commit/3ef58140550cf8ff34af35fc4d9a1f9a124fe0e6) docs: Revert all changes after the license change (#17227) (Milos Djermanovic) +* [`03fc4aa`](https://github.com/eslint/eslint/commit/03fc4aa847bd0445e7b3ea81bcc9523b1847facc) docs: Update README (GitHub Actions Bot) + +v8.42.0 - June 2, 2023 + +* [`6ca5b7c`](https://github.com/eslint/eslint/commit/6ca5b7ca3bac9e10c6cfee4cdc78446e94eb7607) chore: upgrade @eslint/js@8.42.0 (#17236) (Milos Djermanovic) +* [`67fc5e7`](https://github.com/eslint/eslint/commit/67fc5e730e4dfc372dea11e15d3f5165bc812491) chore: package.json update for @eslint/js release (ESLint Jenkins) +* [`0892412`](https://github.com/eslint/eslint/commit/0892412556b2ba6c3d1b85152dafe47a3f4cba72) refactor: remove `Identifier` listener in no-irregular-whitespace (#17235) (Milos Djermanovic) +* [`a589636`](https://github.com/eslint/eslint/commit/a5896360c3faa1e7d1fe81a9907a434b8b8f6b60) fix: Config with `ignores` and without `files` should not always apply (#17181) (Milos Djermanovic) +* [`01d7142`](https://github.com/eslint/eslint/commit/01d7142642c87241135699571e8010f5e8fcda4f) docs: Update README (GitHub Actions Bot) +* [`f67d298`](https://github.com/eslint/eslint/commit/f67d2984c3c3f26497842a04d5166707587c1fca) test: Add `FlatESLint` tests with missing config files (#17164) (Milos Djermanovic) +* [`e5182b7`](https://github.com/eslint/eslint/commit/e5182b723ff82bb3b55c50c06d64626055414b31) docs: Update README (GitHub Actions Bot) +* [`c4fad17`](https://github.com/eslint/eslint/commit/c4fad173c7149dbcd25695c19c68663102b9ec6b) fix: Correct ignore message for "node_modules" subfolders (#17217) (Francesco Trotta) +* [`5b68d51`](https://github.com/eslint/eslint/commit/5b68d51e3e6bd003d6cf74d3434f7165691b4f4d) chore: Fix `fixedsize` attribute in code path analysis DOT debug output (#17202) (Milos Djermanovic) +* [`b8448ff`](https://github.com/eslint/eslint/commit/b8448ff1ae1adf26a81dea07f340caa5b5c2f257) feat: correct no-useless-return behaviour in try statements (#16996) (Nitin Kumar) +* [`37432f2`](https://github.com/eslint/eslint/commit/37432f27dc15817d66cf42377792197dc2aeb8b2) chore: update descriptions in key-spacing tests (#17195) (Milos Djermanovic) + v8.41.0 - May 19, 2023 * [`f43216a`](https://github.com/eslint/eslint/commit/f43216a8c77ab6cf1d0823978e8c728786b4cba7) chore: upgrade @eslint/js@8.41.0 (#17200) (Milos Djermanovic) diff --git a/Makefile.js b/Makefile.js index 717cc785946..692168ad7dc 100644 --- a/Makefile.js +++ b/Makefile.js @@ -16,7 +16,6 @@ const checker = require("npm-license"), glob = require("glob"), marked = require("marked"), matter = require("gray-matter"), - markdownlint = require("markdownlint"), os = require("os"), path = require("path"), semver = require("semver"), @@ -214,9 +213,11 @@ function generateRuleIndexPage() { }; if (rule.meta.deprecated) { - ruleTypesData.deprecated.rules.push({ + ruleTypesData.deprecated.push({ name: basename, - replacedBy: rule.meta.replacedBy || [] + replacedBy: rule.meta.replacedBy || [], + fixable: !!rule.meta.fixable, + hasSuggestions: !!rule.meta.hasSuggestions }); } else { const output = { @@ -226,22 +227,18 @@ function generateRuleIndexPage() { fixable: !!rule.meta.fixable, hasSuggestions: !!rule.meta.hasSuggestions }, - ruleType = ruleTypesData.types.find(c => c.name === rule.meta.type); + ruleType = ruleTypesData.types[rule.meta.type]; - if (!ruleType.rules) { - ruleType.rules = []; - } - - ruleType.rules.push(output); + ruleType.push(output); } }); - // `.rules` will be `undefined` if all rules in category are deprecated. - ruleTypesData.types = ruleTypesData.types.filter(ruleType => !!ruleType.rules); + ruleTypesData.types = Object.fromEntries( + Object.entries(ruleTypesData.types).filter(([, value]) => value && value.length > 0) + ); JSON.stringify(ruleTypesData, null, 4).to(docsSiteOutputFile); JSON.stringify(meta, null, 4).to(docsSiteMetaOutputFile); - } /** @@ -435,6 +432,7 @@ function getFirstVersionOfDeletion(filePath) { * @private */ function lintMarkdown(files) { + const markdownlint = require("markdownlint"); const config = yaml.load(fs.readFileSync(path.join(__dirname, "./.markdownlint.yml"), "utf8")), result = markdownlint.sync({ files, @@ -628,12 +626,10 @@ target.mocha = () => { } }; -target.karma = () => { +target.wdio = () => { echo("Running unit tests on browsers"); - target.webpack("production"); - - const lastReturn = exec(`${getBinFile("karma")} start karma.conf.js`); + const lastReturn = exec(`${getBinFile("wdio")} run wdio.conf.js`); if (lastReturn.code !== 0) { exit(1); @@ -643,7 +639,9 @@ target.karma = () => { target.test = function() { target.checkRuleFiles(); target.mocha(); - target.karma(); + + // target.wdio(); // Temporarily disabled due to problems on Jenkins + target.fuzz({ amount: 150, fuzzBrokenAutofixes: false }); target.checkLicenses(); }; @@ -830,7 +828,7 @@ target.checkRuleFiles = function() { // check deprecated if (ruleDef.meta.deprecated && !hasDeprecatedInfo()) { - console.error(`Missing deprecated information in ${basename} rule code or README.md. Please write @deprecated tag in code or 「This rule was deprecated in ESLint ...」 in README.md.`); + console.error(`Missing deprecated information in ${basename} rule code or README.md. Please write @deprecated tag in code and「This rule was deprecated in ESLint ...」 in README.md.`); errors++; } @@ -869,6 +867,17 @@ target.checkRuleFiles = function() { }; +target.checkRuleExamples = function() { + const { execFileSync } = require("child_process"); + + // We don't need the stack trace of execFileSync if the command fails. + try { + execFileSync(process.execPath, ["tools/check-rule-examples.js", "docs/src/rules/*.md"], { stdio: "inherit" }); + } catch { + exit(1); + } +}; + target.checkLicenses = function() { /** diff --git a/README.md b/README.md index 50602564541..5379c319491 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [confi ### What ECMAScript versions does ESLint support? -ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021 and 2022. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/latest/use/configure). +ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, and 2023. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/latest/use/configure). ### What about experimental features? @@ -249,6 +249,16 @@ Bryan Mishkin
Francesco Trotta + + +
+Yosuke Ota +
+ + +
+Tanuj Kanti +
### Website Team @@ -283,8 +293,8 @@ The following companies, organizations, and individuals support ESLint's ongoing

Platinum Sponsors

Chrome Frameworks Fund Automattic

Gold Sponsors

Salesforce Airbnb

Silver Sponsors

-

Sentry Liftoff American Express

Bronze Sponsors

-

Ilmaiset Pitkävetovihjeet PayDay Say ThemeIsle Nx (by Nrwl) Anagram Solver Icons8: free icons, photos, illustrations, and music Discord Transloadit Ignition HeroCoders QuickBooks Tool hub

+

Liftoff American Express

Bronze Sponsors

+

ThemeIsle Anagram Solver Icons8 Discord Transloadit Ignition HeroCoders

## Technology Sponsors diff --git a/bin/eslint.js b/bin/eslint.js index 7094ac77bc4..eeb4647e70b 100755 --- a/bin/eslint.js +++ b/bin/eslint.js @@ -92,6 +92,19 @@ function getErrorMessage(error) { return util.format("%o", error); } +/** + * Tracks error messages that are shown to the user so we only ever show the + * same message once. + * @type {Set} + */ +const displayedErrors = new Set(); + +/** + * Tracks whether an unexpected error was caught + * @type {boolean} + */ +let hadFatalError = false; + /** * Catch and report unexpected error. * @param {any} error The thrown error object. @@ -99,16 +112,20 @@ function getErrorMessage(error) { */ function onFatalError(error) { process.exitCode = 2; + hadFatalError = true; const { version } = require("../package.json"); - const message = getErrorMessage(error); - - console.error(` + const message = ` Oops! Something went wrong! :( ESLint: ${version} -${message}`); +${getErrorMessage(error)}`; + + if (!displayedErrors.has(message)) { + console.error(message); + displayedErrors.add(message); + } } //------------------------------------------------------------------------------ @@ -132,9 +149,25 @@ ${message}`); } // Otherwise, call the CLI. - process.exitCode = await require("../lib/cli").execute( + const exitCode = await require("../lib/cli").execute( process.argv, process.argv.includes("--stdin") ? await readStdin() : null, true ); + + /* + * If an uncaught exception or unhandled rejection was detected in the meantime, + * keep the fatal exit code 2 that is already assigned to `process.exitCode`. + * Without this condition, exit code 2 (unsuccessful execution) could be overwritten with + * 1 (successful execution, lint problems found) or even 0 (successful execution, no lint problems found). + * This ensures that unexpected errors that seemingly don't affect the success + * of the execution will still cause a non-zero exit code, as it's a common + * practice and the default behavior of Node.js to exit with non-zero + * in case of an uncaught exception or unhandled rejection. + * + * Otherwise, assign the exit code returned from CLI. + */ + if (!hadFatalError) { + process.exitCode = exitCode; + } }()).catch(onFatalError); diff --git a/conf/globals.js b/conf/globals.js index 6018b7af15c..58710e05bc6 100644 --- a/conf/globals.js +++ b/conf/globals.js @@ -128,6 +128,10 @@ const es2023 = { ...es2022 }; +const es2024 = { + ...es2023 +}; + //----------------------------------------------------------------------------- // Exports @@ -145,5 +149,6 @@ module.exports = { es2020, es2021, es2022, - es2023 + es2023, + es2024 }; diff --git a/conf/rule-type-list.json b/conf/rule-type-list.json index d5823acc898..6ca730f34f0 100644 --- a/conf/rule-type-list.json +++ b/conf/rule-type-list.json @@ -1,36 +1,28 @@ { - "types": [ - { "name": "problem", "displayName": "Possible Problems", "description": "These rules relate to possible logic errors in code:" }, - { "name": "suggestion", "displayName": "Suggestions", "description": "These rules suggest alternate ways of doing things:" }, - { "name": "layout", "displayName": "Layout & Formatting", "description": "These rules care about how the code looks rather than how it executes:" } - ], - "deprecated": { - "name": "Deprecated", - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", - "rules": [] + "types": { + "problem": [], + "suggestion": [], + "layout": [] }, - "removed": { - "name": "Removed", - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", - "rules": [ - { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, - { "removed": "global-strict", "replacedBy": ["strict"] }, - { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] }, - { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] }, - { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] }, - { "removed": "no-empty-label", "replacedBy": ["no-labels"] }, - { "removed": "no-extra-strict", "replacedBy": ["strict"] }, - { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] }, - { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] }, - { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] }, - { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] }, - { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] }, - { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] }, - { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] }, - { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] } - ] - } + "deprecated": [], + "removed": [ + { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, + { "removed": "global-strict", "replacedBy": ["strict"] }, + { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] }, + { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] }, + { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] }, + { "removed": "no-empty-label", "replacedBy": ["no-labels"] }, + { "removed": "no-extra-strict", "replacedBy": ["strict"] }, + { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] }, + { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] }, + { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] }, + { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] }, + { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] }, + { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] }, + { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] }, + { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] }, + { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] }, + { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] }, + { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] } + ] } diff --git a/docs/.eleventy.js b/docs/.eleventy.js index 1bd1de1af2f..01b9c96aaba 100644 --- a/docs/.eleventy.js +++ b/docs/.eleventy.js @@ -14,6 +14,8 @@ const { highlighter, lineNumberPlugin } = require("./src/_plugins/md-syntax-high const { DateTime } = require("luxon"); +const markdownIt = require("markdown-it"); +const markdownItRuleExample = require("./tools/markdown-it-rule-example"); module.exports = function(eleventyConfig) { @@ -54,6 +56,7 @@ module.exports = function(eleventyConfig) { eleventyConfig.addGlobalData("GIT_BRANCH", process.env.BRANCH); eleventyConfig.addGlobalData("HEAD", process.env.BRANCH === "main"); eleventyConfig.addGlobalData("NOINDEX", process.env.BRANCH !== "latest"); + eleventyConfig.addGlobalData("PATH_PREFIX", pathPrefix); eleventyConfig.addDataExtension("yml", contents => yaml.load(contents)); //------------------------------------------------------------------------------ @@ -112,7 +115,7 @@ module.exports = function(eleventyConfig) { * Source: https://github.com/11ty/eleventy/issues/658 */ eleventyConfig.addFilter("markdown", value => { - const markdown = require("markdown-it")({ + const markdown = markdownIt({ html: true }); @@ -179,14 +182,55 @@ module.exports = function(eleventyConfig) { `.trim(); } - const markdownIt = require("markdown-it"); + /** + * Encodes text in the base 64 format used in playground URL params. + * @param {string} text Text to be encoded to base 64. + * @see https://github.com/eslint/eslint.org/blob/1b2f2aabeac2955a076d61788da8a0008bca6fb6/src/playground/utils/unicode.js + * @returns {string} The base 64 encoded equivalent of the text. + */ + function encodeToBase64(text) { + /* global btoa -- It does exist, and is what the playground uses. */ + return btoa(unescape(encodeURIComponent(text))); + } + + // markdown-it plugin options for playground-linked code blocks in rule examples. + const ruleExampleOptions = markdownItRuleExample({ + open({ type, code, parserOptions, env }) { + const isRuleRemoved = !Object.prototype.hasOwnProperty.call(env.rules_meta, env.title); + + if (isRuleRemoved) { + return `
`; + } + + // See https://github.com/eslint/eslint.org/blob/ac38ab41f99b89a8798d374f74e2cce01171be8b/src/playground/App.js#L44 + const state = encodeToBase64( + JSON.stringify({ + options: { parserOptions }, + text: code + }) + ); + const prefix = process.env.CONTEXT && process.env.CONTEXT !== "deploy-preview" + ? "" + : "https://eslint.org"; + + return ` +
+ + Open in Playground + + `.trim(); + }, + close() { + return "
"; + } + }); + const md = markdownIt({ html: true, linkify: true, typographer: true, highlight: (str, lang) => highlighter(md, str, lang) }) .use(markdownItAnchor, { slugify: s => slug(s) }) .use(markdownItContainer, "img-container", {}) - .use(markdownItContainer, "correct", {}) - .use(markdownItContainer, "incorrect", {}) + .use(markdownItContainer, "rule-example", ruleExampleOptions) .use(markdownItContainer, "warning", { render(tokens, idx) { return generateAlertMarkup("warning", tokens, idx); @@ -437,25 +481,6 @@ module.exports = function(eleventyConfig) { // Settings //------------------------------------------------------------------------------ - /* - * When we run `eleventy --serve`, Eleventy 1.x uses browser-sync to serve the content. - * By default, browser-sync (more precisely, underlying serve-static) will not serve - * `foo/bar.html` when we request `foo/bar`. Thus, we need to rewrite URLs to append `.html` - * so that pretty links without `.html` can work in a local development environment. - * - * There's no need to rewrite URLs that end with `/`, because that already works well - * (server will return the content of `index.html` in the directory). - * URLs with a file extension, like main.css, main.js, sitemap.xml, etc. should not be rewritten - */ - eleventyConfig.setBrowserSyncConfig({ - middleware(req, res, next) { - if (!/(?:\.[a-zA-Z][^/]*|\/)$/u.test(req.url)) { - req.url += ".html"; - } - return next(); - } - }); - /* * Generate the sitemap only in certain contexts to prevent unwanted discovery of sitemaps that * contain URLs we'd prefer not to appear in search results (URLs in sitemaps are considered important). @@ -475,14 +500,12 @@ module.exports = function(eleventyConfig) { eleventyConfig.ignores.add("src/static/sitemap.njk"); // ... then don't generate the sitemap. } - return { passthroughFileCopy: true, pathPrefix, markdownTemplateEngine: "njk", - dataTemplateEngine: "njk", htmlTemplateEngine: "njk", dir: { diff --git a/docs/README.md b/docs/README.md index dbf3c02e8f4..026430cc0d2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,21 +25,21 @@ Once the script finishes building the documentation site, you can visit it at To update the links data file, run this from the root folder (not the `docs` folder): ```shell -npm run docs:update-links +npm run build:docs:update-links ``` To lint JS files, run this from the root folder (not the `docs` folder): ```shell -npm run lint:docsjs +npm run lint:docs:js ``` To autofix JS files, run this from the root folder (not the `docs` folder): ```shell -npm run fix:docsjs +npm run lint:fix:docs:js ``` ## License -© OpenJS Foundation and ESLint contributors, [www.openjsf.org](https://www.openjsf.org/). Content licensed under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). +© OpenJS Foundation and ESLint contributors, [www.openjsf.org](https://www.openjsf.org/). Content licensed under [MIT License](https://github.com/eslint/eslint/blob/main/LICENSE). diff --git a/docs/_examples/custom-rule-tutorial-code/.gitignore b/docs/_examples/custom-rule-tutorial-code/.gitignore new file mode 100644 index 00000000000..b512c09d476 --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/docs/_examples/custom-rule-tutorial-code/enforce-foo-bar.js b/docs/_examples/custom-rule-tutorial-code/enforce-foo-bar.js new file mode 100644 index 00000000000..5f3e677f638 --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/enforce-foo-bar.js @@ -0,0 +1,57 @@ +/** + * @fileoverview Rule to enforce that `const foo` is assigned "bar". + * @author Ben Perlmutter + */ + +"use strict"; + +// The enforce-foo-bar rule definition +module.exports = { + meta: { + type: "problem", + docs: { + description: "Enforce that a variable named `foo` can only be assigned a value of 'bar'." + }, + fixable: "code", + schema: [] + }, + create(context) { + return { + + // Performs action in the function on every variable declarator + VariableDeclarator(node) { + + // Check if a `const` variable declaration + if (node.parent.kind === "const") { + + // Check if variable name is `foo` + if (node.id.type === "Identifier" && node.id.name === "foo") { + + // Check if value of variable is "bar" + if (node.init && node.init.type === "Literal" && node.init.value !== "bar") { + + /* + * Report error to ESLint. Error message uses + * a message placeholder to include the incorrect value + * in the error message. + * Also includes a `fix(fixer)` function that replaces + * any values assigned to `const foo` with "bar". + */ + context.report({ + node, + message: 'Value other than "bar" assigned to `const foo`. Unexpected value: {{ notBar }}.', + data: { + notBar: node.init.value + }, + fix(fixer) { + return fixer.replaceText(node.init, '"bar"'); + } + }); + } + } + } + } + }; + } +}; + diff --git a/docs/_examples/custom-rule-tutorial-code/enforce-foo-bar.test.js b/docs/_examples/custom-rule-tutorial-code/enforce-foo-bar.test.js new file mode 100644 index 00000000000..d5f9c40334d --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/enforce-foo-bar.test.js @@ -0,0 +1,34 @@ +/** + * @fileoverview Tests for enforce-foo-bar.js rule. + * @author Ben Perlmutter +*/ +"use strict"; + +const {RuleTester} = require("eslint"); +const fooBarRule = require("./enforce-foo-bar"); + +const ruleTester = new RuleTester({ + // Must use at least ecmaVersion 2015 because + // that's when `const` variable were introduced. + parserOptions: { ecmaVersion: 2015 } +}); + +// Throws error if the tests in ruleTester.run() do not pass +ruleTester.run( + "enforce-foo-bar", // rule name + fooBarRule, // rule code + { // checks + // 'valid' checks cases that should pass + valid: [{ + code: "const foo = 'bar';", + }], + // 'invalid' checks cases that should not pass + invalid: [{ + code: "const foo = 'baz';", + output: 'const foo = "bar";', + errors: 1, + }], + } +); + +console.log("All tests passed!"); \ No newline at end of file diff --git a/docs/_examples/custom-rule-tutorial-code/eslint-plugin-example.js b/docs/_examples/custom-rule-tutorial-code/eslint-plugin-example.js new file mode 100644 index 00000000000..1a32ca4db0a --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/eslint-plugin-example.js @@ -0,0 +1,9 @@ +/** + * @fileoverview Example an ESLint plugin with a custom rule. + * @author Ben Perlmutter +*/ +"use strict"; + +const fooBarRule = require("./enforce-foo-bar"); +const plugin = { rules: { "enforce-foo-bar": fooBarRule } }; +module.exports = plugin; diff --git a/docs/_examples/custom-rule-tutorial-code/eslint.config.js b/docs/_examples/custom-rule-tutorial-code/eslint.config.js new file mode 100644 index 00000000000..cf08f1ee57c --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/eslint.config.js @@ -0,0 +1,23 @@ +/** + * @fileoverview Example ESLint config file that uses the custom rule from this tutorial. + * @author Ben Perlmutter +*/ +"use strict"; + +// Import the ESLint plugin +const eslintPluginExample = require("./eslint-plugin-example"); + +module.exports = [ + { + files: ["**/*.js"], + languageOptions: { + sourceType: "commonjs", + ecmaVersion: "latest", + }, + // Using the eslint-plugin-example plugin defined locally + plugins: {"example": eslintPluginExample}, + rules: { + "example/enforce-foo-bar": "error", + }, + } +] diff --git a/docs/_examples/custom-rule-tutorial-code/example.js b/docs/_examples/custom-rule-tutorial-code/example.js new file mode 100644 index 00000000000..0d6da91d49e --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/example.js @@ -0,0 +1,22 @@ +/** + * @fileoverview Example of a file that will fail the custom rule in this tutorial. + * @author Ben Perlmutter +*/ +"use strict"; + +/* eslint-disable no-unused-vars -- Disable other rule causing problem for this file */ + +// To see the error in the terminal, run the following command: +// npx eslint example.js + +// To fix the error, run the following command: +// npx eslint example.js --fix + +function correctFooBar() { + const foo = "bar"; +} + +function incorrectFoo(){ + const foo = "baz"; // Problem! +} + diff --git a/docs/_examples/custom-rule-tutorial-code/package.json b/docs/_examples/custom-rule-tutorial-code/package.json new file mode 100644 index 00000000000..0578c79496c --- /dev/null +++ b/docs/_examples/custom-rule-tutorial-code/package.json @@ -0,0 +1,22 @@ +{ + "name": "eslint-plugin-example", + "version": "1.0.0", + "description": "ESLint plugin for enforce-foo-bar rule.", + "main": "eslint-plugin-example.js", + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin" + ], + "peerDependencies": { + "eslint": ">=8.0.0" + }, + "scripts": { + "test": "node enforce-foo-bar.test.js" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "eslint": "^8.36.0" + } +} \ No newline at end of file diff --git a/docs/_examples/integration-tutorial-code/.gitignore b/docs/_examples/integration-tutorial-code/.gitignore new file mode 100644 index 00000000000..28f1ba7565f --- /dev/null +++ b/docs/_examples/integration-tutorial-code/.gitignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store \ No newline at end of file diff --git a/docs/_examples/integration-tutorial-code/example-eslint-integration.js b/docs/_examples/integration-tutorial-code/example-eslint-integration.js new file mode 100644 index 00000000000..f36b4e46e76 --- /dev/null +++ b/docs/_examples/integration-tutorial-code/example-eslint-integration.js @@ -0,0 +1,62 @@ +/** + * @fileoverview An example of how to integrate ESLint into your own tool + * @author Ben Perlmutter + */ + +const { ESLint } = require("eslint"); + +// Create an instance of ESLint with the configuration passed to the function +function createESLintInstance(overrideConfig){ + return new ESLint({ useEslintrc: false, overrideConfig: overrideConfig, fix: true }); +} + +// Lint the specified files and return the error results +async function lintAndFix(eslint, filePaths) { + const results = await eslint.lintFiles(filePaths); + + // Apply automatic fixes and output fixed code + await ESLint.outputFixes(results); + + return results; +} + +// Log results to console if there are any problems +function outputLintingResults(results) { + // Identify the number of problems found + const problems = results.reduce((acc, result) => acc + result.errorCount + result.warningCount, 0); + + if (problems > 0) { + console.log("Linting errors found!"); + console.log(results); + } else { + console.log("No linting errors found."); + } + return results; +} + +// Put previous functions all together +async function lintFiles(filePaths) { + + // The ESLint configuration. Alternatively, you could load the configuration + // from a .eslintrc file or just use the default config. + const overrideConfig = { + env: { + es6: true, + node: true, + }, + parserOptions: { + ecmaVersion: 2018, + }, + rules: { + "no-console": "error", + "no-unused-vars": "warn", + }, + }; + + const eslint = createESLintInstance(overrideConfig); + const results = await lintAndFix(eslint, filePaths); + return outputLintingResults(results); +} + +// Export integration +module.exports = { lintFiles } \ No newline at end of file diff --git a/docs/_examples/integration-tutorial-code/example-eslint-integration.test.js b/docs/_examples/integration-tutorial-code/example-eslint-integration.test.js new file mode 100644 index 00000000000..5db9aead60a --- /dev/null +++ b/docs/_examples/integration-tutorial-code/example-eslint-integration.test.js @@ -0,0 +1,27 @@ +/** + * @fileoverview Test ESLint integration example code + * @author Ben Perlmutter + */ + +const { lintFiles } = require("./example-eslint-integration"); + +async function testExampleEslintIntegration(){ + const filePaths = ["sample-data/test-file.js"]; + const lintResults = await lintFiles(filePaths); + + // Test cases + if(lintResults[0].messages.length !== 6){ + throw new Error("Expected 6 linting problems, got " + lintResults[0].messages.length); + } + const messageRuleIds = new Set() + lintResults[0].messages.forEach(msg => messageRuleIds.add(msg.ruleId)); + if(messageRuleIds.size !== 2){ + throw new Error("Expected 2 linting rule, got " + messageRuleIds.size); + } + if(!messageRuleIds.has("no-console")){ + throw new Error("Expected linting rule 'no-console', got " + messageRuleIds); + } + console.log("All tests passed!"); +} + +testExampleEslintIntegration() \ No newline at end of file diff --git a/docs/_examples/integration-tutorial-code/package.json b/docs/_examples/integration-tutorial-code/package.json new file mode 100644 index 00000000000..df00d7382f1 --- /dev/null +++ b/docs/_examples/integration-tutorial-code/package.json @@ -0,0 +1,15 @@ +{ + "name": "_integration-tutorial-code", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "node example-eslint-integration.test.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "eslint": "^8.39.0" + } +} diff --git a/docs/_examples/integration-tutorial-code/sample-data/test-file.js b/docs/_examples/integration-tutorial-code/sample-data/test-file.js new file mode 100644 index 00000000000..425375f8f8a --- /dev/null +++ b/docs/_examples/integration-tutorial-code/sample-data/test-file.js @@ -0,0 +1,29 @@ +/** + * @fileoverview Example data to lint using ESLint. This file contains a variety of errors. + * @author Ben Perlmutter + */ + +// Unused variable 'y' (no-unused-vars from configured rules) +const y = 20; + +function add(a, b) { + // Unexpected console statement (no-console from configured rules) + console.log('Adding two numbers'); + return a + b; +} + +// 'result' is assigned a value but never used (no-unused-vars from configured rules) +const result = add(x, 5); + +if (x > 5) { + // Unexpected console statement (no-console from configured rules) + console.log('x is greater than 5'); +} else { + // Unexpected console statement (no-console from configured rules) + console.log('x is not greater than 5'); +} + +// 'subtract' is defined but never used (no-unused-vars from configured rules) +function subtract(a, b) { + return a - b; +} diff --git a/docs/package.json b/docs/package.json index 7be17b97436..c79c756bf18 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,33 +1,33 @@ { "name": "docs-eslint", "private": true, - "version": "8.41.0", + "version": "8.55.0", "description": "", "main": "index.js", "keywords": [], "author": "", - "license": "ISC", + "license": "MIT", "files": [], "scripts": { - "images": "imagemin '_site/assets/images' --out-dir='_site/assets/images'", - "watch:postcss": "postcss src/assets/css -d src/assets/css --watch --poll", - "watch:sass": "sass --watch --poll src/assets/scss:src/assets/css --no-source-map", - "watch:eleventy": "eleventy --serve --port=2023", + "build": "npm-run-all build:sass build:postcss build:website build:minify-images", "build:postcss": "postcss src/assets/css -d src/assets/css", + "build:postcss:watch": "postcss src/assets/css -d src/assets/css --watch --poll", "build:sass": "sass src/assets/scss:src/assets/css --no-source-map", - "build:eleventy": "npx @11ty/eleventy", - "start": "npm-run-all build:sass build:postcss --parallel watch:*", - "build": "npm-run-all build:sass build:postcss build:eleventy images", - "lint:scss": "stylelint \"**/*.{scss,html}\"", + "build:sass:watch": "sass --watch --poll src/assets/scss:src/assets/css --no-source-map", + "build:website": "npx @11ty/eleventy", + "build:website:watch": "eleventy --serve --port=2023", "lint:links": "cross-env NODE_OPTIONS=--max-old-space-size=4096 node tools/validate-links.js", - "lint:fix:scss": "npm run lint:scss -- --fix" + "lint:scss": "stylelint \"**/*.{scss,html}\"", + "lint:fix:scss": "npm run lint:scss -- --fix", + "build:minify-images": "imagemin '_site/assets/images' --out-dir='_site/assets/images'", + "start": "npm-run-all build:sass build:postcss --parallel *:*:watch" }, "devDependencies": { - "@11ty/eleventy": "^1.0.1", - "@11ty/eleventy-img": "^1.0.0", - "@11ty/eleventy-navigation": "^0.3.2", + "@11ty/eleventy": "^2.0.1", + "@11ty/eleventy-img": "^3.1.1", + "@11ty/eleventy-navigation": "^0.3.5", "@11ty/eleventy-plugin-rss": "^1.1.1", - "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.2", + "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@munter/tap-render": "^0.2.0", "@types/markdown-it": "^12.2.3", "algoliasearch": "^4.12.1", diff --git a/docs/src/_data/further_reading_links.json b/docs/src/_data/further_reading_links.json index 120dd37032f..a33ce6c0b3b 100644 --- a/docs/src/_data/further_reading_links.json +++ b/docs/src/_data/further_reading_links.json @@ -719,5 +719,33 @@ "logo": "https://tc39.es/ecma262/img/favicon.ico", "title": "ECMAScript® 2023 Language Specification", "description": null + }, + "https://v8.dev/blog/fast-async": { + "domain": "v8.dev", + "url": "https://v8.dev/blog/fast-async", + "logo": "https://v8.dev/favicon.ico", + "title": "Faster async functions and promises · V8", + "description": "Faster and easier-to-debug async functions and promises are coming to V8 v7.2 / Chrome 72." + }, + "https://github.com/tc39/proposal-regexp-v-flag": { + "domain": "github.com", + "url": "https://github.com/tc39/proposal-regexp-v-flag", + "logo": "https://github.com/fluidicon.png", + "title": "GitHub - tc39/proposal-regexp-v-flag: UTS18 set notation in regular expressions", + "description": "UTS18 set notation in regular expressions. Contribute to tc39/proposal-regexp-v-flag development by creating an account on GitHub." + }, + "https://v8.dev/features/regexp-v-flag": { + "domain": "v8.dev", + "url": "https://v8.dev/features/regexp-v-flag", + "logo": "https://v8.dev/favicon.ico", + "title": "RegExp v flag with set notation and properties of strings · V8", + "description": "The new RegExp `v` flag enables `unicodeSets` mode, unlocking support for extended character classes, including Unicode properties of strings, set notation, and improved case-insensitive matching." + }, + "https://codepoints.net/U+1680": { + "domain": "codepoints.net", + "url": "https://codepoints.net/U+1680", + "logo": "https://codepoints.net/favicon.ico", + "title": "U+1680 OGHAM SPACE MARK:   – Unicode – Codepoints", + "description": " , codepoint U+1680 OGHAM SPACE MARK in Unicode, is located in the block “Ogham”. It belongs to the Ogham script and is a Space Separator." } } \ No newline at end of file diff --git a/docs/src/_data/rule_versions.json b/docs/src/_data/rule_versions.json index 3e0b0ad761d..14e6d858ac0 100644 --- a/docs/src/_data/rule_versions.json +++ b/docs/src/_data/rule_versions.json @@ -307,7 +307,8 @@ "yoda": "0.7.1", "logical-assignment-operators": "8.24.0", "no-empty-static-block": "8.27.0", - "no-new-native-nonconstructor": "8.27.0" + "no-new-native-nonconstructor": "8.27.0", + "no-object-constructor": "8.50.0" }, "removed": { "generator-star": "1.0.0-rc-1", diff --git a/docs/src/_data/rules.json b/docs/src/_data/rules.json index 45caaa9f031..3fe9ddcc3d5 100644 --- a/docs/src/_data/rules.json +++ b/docs/src/_data/rules.json @@ -1,2126 +1,2089 @@ { - "types": [ - { - "name": "problem", - "displayName": "Possible Problems", - "description": "These rules relate to possible logic errors in code:", - "rules": [ - { - "name": "array-callback-return", - "description": "Enforce `return` statements in callbacks of array methods", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "constructor-super", - "description": "Require `super()` calls in constructors", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "for-direction", - "description": "Enforce \"for\" loop update clause moving the counter in the right direction", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "getter-return", - "description": "Enforce `return` statements in getters", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-async-promise-executor", - "description": "Disallow using an async function as a Promise executor", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-await-in-loop", - "description": "Disallow `await` inside of loops", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-class-assign", - "description": "Disallow reassigning class members", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-compare-neg-zero", - "description": "Disallow comparing against -0", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-cond-assign", - "description": "Disallow assignment operators in conditional expressions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-const-assign", - "description": "Disallow reassigning `const` variables", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-constant-binary-expression", - "description": "Disallow expressions where the operation doesn't affect the value", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-constant-condition", - "description": "Disallow constant expressions in conditions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-constructor-return", - "description": "Disallow returning value from constructor", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-control-regex", - "description": "Disallow control characters in regular expressions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-debugger", - "description": "Disallow the use of `debugger`", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-dupe-args", - "description": "Disallow duplicate arguments in `function` definitions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-dupe-class-members", - "description": "Disallow duplicate class members", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-dupe-else-if", - "description": "Disallow duplicate conditions in if-else-if chains", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-dupe-keys", - "description": "Disallow duplicate keys in object literals", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-duplicate-case", - "description": "Disallow duplicate case labels", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-duplicate-imports", - "description": "Disallow duplicate module imports", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-empty-character-class", - "description": "Disallow empty character classes in regular expressions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-empty-pattern", - "description": "Disallow empty destructuring patterns", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-ex-assign", - "description": "Disallow reassigning exceptions in `catch` clauses", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-fallthrough", - "description": "Disallow fallthrough of `case` statements", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-func-assign", - "description": "Disallow reassigning `function` declarations", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-import-assign", - "description": "Disallow assigning to imported bindings", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-inner-declarations", - "description": "Disallow variable or `function` declarations in nested blocks", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-invalid-regexp", - "description": "Disallow invalid regular expression strings in `RegExp` constructors", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-irregular-whitespace", - "description": "Disallow irregular whitespace", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-loss-of-precision", - "description": "Disallow literal numbers that lose precision", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-misleading-character-class", - "description": "Disallow characters which are made with multiple code points in character class syntax", - "recommended": true, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "no-new-native-nonconstructor", - "description": "Disallow `new` operators with global non-constructor functions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-new-symbol", - "description": "Disallow `new` operators with the `Symbol` object", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-obj-calls", - "description": "Disallow calling global object properties as functions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-promise-executor-return", - "description": "Disallow returning values from Promise executor functions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-prototype-builtins", - "description": "Disallow calling some `Object.prototype` methods directly on objects", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-self-assign", - "description": "Disallow assignments where both sides are exactly the same", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-self-compare", - "description": "Disallow comparisons where both sides are exactly the same", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-setter-return", - "description": "Disallow returning values from setters", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-sparse-arrays", - "description": "Disallow sparse arrays", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-template-curly-in-string", - "description": "Disallow template literal placeholder syntax in regular strings", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-this-before-super", - "description": "Disallow `this`/`super` before calling `super()` in constructors", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-undef", - "description": "Disallow the use of undeclared variables unless mentioned in `/*global */` comments", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unexpected-multiline", - "description": "Disallow confusing multiline expressions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unmodified-loop-condition", - "description": "Disallow unmodified loop conditions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unreachable", - "description": "Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unreachable-loop", - "description": "Disallow loops with a body that allows only one iteration", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unsafe-finally", - "description": "Disallow control flow statements in `finally` blocks", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unsafe-negation", - "description": "Disallow negating the left operand of relational operators", - "recommended": true, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "no-unsafe-optional-chaining", - "description": "Disallow use of optional chaining in contexts where the `undefined` value is not allowed", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unused-private-class-members", - "description": "Disallow unused private class members", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unused-vars", - "description": "Disallow unused variables", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-use-before-define", - "description": "Disallow the use of variables before they are defined", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-useless-backreference", - "description": "Disallow useless backreferences in regular expressions", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "require-atomic-updates", - "description": "Disallow assignments that can lead to race conditions due to usage of `await` or `yield`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "use-isnan", - "description": "Require calls to `isNaN()` when checking for `NaN`", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "valid-typeof", - "description": "Enforce comparing `typeof` expressions against valid strings", - "recommended": true, - "fixable": false, - "hasSuggestions": true - } - ] - }, - { - "name": "suggestion", - "displayName": "Suggestions", - "description": "These rules suggest alternate ways of doing things:", - "rules": [ - { - "name": "accessor-pairs", - "description": "Enforce getter and setter pairs in objects and classes", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "arrow-body-style", - "description": "Require braces around arrow function bodies", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "block-scoped-var", - "description": "Enforce the use of variables within the scope they are defined", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "camelcase", - "description": "Enforce camelcase naming convention", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "capitalized-comments", - "description": "Enforce or disallow capitalization of the first letter of a comment", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "class-methods-use-this", - "description": "Enforce that class methods utilize `this`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "complexity", - "description": "Enforce a maximum cyclomatic complexity allowed in a program", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "consistent-return", - "description": "Require `return` statements to either always or never specify values", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "consistent-this", - "description": "Enforce consistent naming when capturing the current execution context", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "curly", - "description": "Enforce consistent brace style for all control statements", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "default-case", - "description": "Require `default` cases in `switch` statements", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "default-case-last", - "description": "Enforce default clauses in switch statements to be last", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "default-param-last", - "description": "Enforce default parameters to be last", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "dot-notation", - "description": "Enforce dot notation whenever possible", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "eqeqeq", - "description": "Require the use of `===` and `!==`", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "func-name-matching", - "description": "Require function names to match the name of the variable or property to which they are assigned", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "func-names", - "description": "Require or disallow named `function` expressions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "func-style", - "description": "Enforce the consistent use of either `function` declarations or expressions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "grouped-accessor-pairs", - "description": "Require grouped accessor pairs in object literals and classes", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "guard-for-in", - "description": "Require `for-in` loops to include an `if` statement", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "id-denylist", - "description": "Disallow specified identifiers", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "id-length", - "description": "Enforce minimum and maximum identifier lengths", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "id-match", - "description": "Require identifiers to match a specified regular expression", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "init-declarations", - "description": "Require or disallow initialization in variable declarations", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "logical-assignment-operators", - "description": "Require or disallow logical assignment operator shorthand", - "recommended": false, - "fixable": true, - "hasSuggestions": true - }, - { - "name": "max-classes-per-file", - "description": "Enforce a maximum number of classes per file", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-depth", - "description": "Enforce a maximum depth that blocks can be nested", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-lines", - "description": "Enforce a maximum number of lines per file", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-lines-per-function", - "description": "Enforce a maximum number of lines of code in a function", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-nested-callbacks", - "description": "Enforce a maximum depth that callbacks can be nested", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-params", - "description": "Enforce a maximum number of parameters in function definitions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-statements", - "description": "Enforce a maximum number of statements allowed in function blocks", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "multiline-comment-style", - "description": "Enforce a particular style for multiline comments", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "new-cap", - "description": "Require constructor names to begin with a capital letter", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-alert", - "description": "Disallow the use of `alert`, `confirm`, and `prompt`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-array-constructor", - "description": "Disallow `Array` constructors", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-bitwise", - "description": "Disallow bitwise operators", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-caller", - "description": "Disallow the use of `arguments.caller` or `arguments.callee`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-case-declarations", - "description": "Disallow lexical declarations in case clauses", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-confusing-arrow", - "description": "Disallow arrow functions where they could be confused with comparisons", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-console", - "description": "Disallow the use of `console`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-continue", - "description": "Disallow `continue` statements", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-delete-var", - "description": "Disallow deleting variables", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-div-regex", - "description": "Disallow equal signs explicitly at the beginning of regular expressions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-else-return", - "description": "Disallow `else` blocks after `return` statements in `if` statements", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-empty", - "description": "Disallow empty block statements", - "recommended": true, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "no-empty-function", - "description": "Disallow empty functions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-empty-static-block", - "description": "Disallow empty static blocks", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-eq-null", - "description": "Disallow `null` comparisons without type-checking operators", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-eval", - "description": "Disallow the use of `eval()`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-extend-native", - "description": "Disallow extending native types", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-extra-bind", - "description": "Disallow unnecessary calls to `.bind()`", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-extra-boolean-cast", - "description": "Disallow unnecessary boolean casts", - "recommended": true, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-extra-label", - "description": "Disallow unnecessary labels", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-extra-semi", - "description": "Disallow unnecessary semicolons", - "recommended": true, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-floating-decimal", - "description": "Disallow leading or trailing decimal points in numeric literals", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-global-assign", - "description": "Disallow assignments to native objects or read-only global variables", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-implicit-coercion", - "description": "Disallow shorthand type conversions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-implicit-globals", - "description": "Disallow declarations in the global scope", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-implied-eval", - "description": "Disallow the use of `eval()`-like methods", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-inline-comments", - "description": "Disallow inline comments after code", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-invalid-this", - "description": "Disallow use of `this` in contexts where the value of `this` is `undefined`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-iterator", - "description": "Disallow the use of the `__iterator__` property", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-label-var", - "description": "Disallow labels that share a name with a variable", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-labels", - "description": "Disallow labeled statements", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-lone-blocks", - "description": "Disallow unnecessary nested blocks", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-lonely-if", - "description": "Disallow `if` statements as the only statement in `else` blocks", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-loop-func", - "description": "Disallow function declarations that contain unsafe references inside loop statements", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-magic-numbers", - "description": "Disallow magic numbers", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-mixed-operators", - "description": "Disallow mixed binary operators", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-multi-assign", - "description": "Disallow use of chained assignment expressions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-multi-str", - "description": "Disallow multiline strings", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-negated-condition", - "description": "Disallow negated conditions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-nested-ternary", - "description": "Disallow nested ternary expressions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-new", - "description": "Disallow `new` operators outside of assignments or comparisons", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-new-func", - "description": "Disallow `new` operators with the `Function` object", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-new-object", - "description": "Disallow `Object` constructors", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-new-wrappers", - "description": "Disallow `new` operators with the `String`, `Number`, and `Boolean` objects", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-nonoctal-decimal-escape", - "description": "Disallow `\\8` and `\\9` escape sequences in string literals", - "recommended": true, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "no-octal", - "description": "Disallow octal literals", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-octal-escape", - "description": "Disallow octal escape sequences in string literals", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-param-reassign", - "description": "Disallow reassigning `function` parameters", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-plusplus", - "description": "Disallow the unary operators `++` and `--`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-proto", - "description": "Disallow the use of the `__proto__` property", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-redeclare", - "description": "Disallow variable redeclaration", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-regex-spaces", - "description": "Disallow multiple spaces in regular expressions", - "recommended": true, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-restricted-exports", - "description": "Disallow specified names in exports", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-restricted-globals", - "description": "Disallow specified global variables", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-restricted-imports", - "description": "Disallow specified modules when loaded by `import`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-restricted-properties", - "description": "Disallow certain properties on certain objects", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-restricted-syntax", - "description": "Disallow specified syntax", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-return-assign", - "description": "Disallow assignment operators in `return` statements", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-return-await", - "description": "Disallow unnecessary `return await`", - "recommended": false, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "no-script-url", - "description": "Disallow `javascript:` urls", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-sequences", - "description": "Disallow comma operators", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-shadow", - "description": "Disallow variable declarations from shadowing variables declared in the outer scope", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-shadow-restricted-names", - "description": "Disallow identifiers from shadowing restricted names", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-ternary", - "description": "Disallow ternary operators", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-throw-literal", - "description": "Disallow throwing literals as exceptions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-undef-init", - "description": "Disallow initializing variables to `undefined`", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-undefined", - "description": "Disallow the use of `undefined` as an identifier", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-underscore-dangle", - "description": "Disallow dangling underscores in identifiers", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unneeded-ternary", - "description": "Disallow ternary operators when simpler alternatives exist", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-unused-expressions", - "description": "Disallow unused expressions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-unused-labels", - "description": "Disallow unused labels", - "recommended": true, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-useless-call", - "description": "Disallow unnecessary calls to `.call()` and `.apply()`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-useless-catch", - "description": "Disallow unnecessary `catch` clauses", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-useless-computed-key", - "description": "Disallow unnecessary computed property keys in objects and classes", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-useless-concat", - "description": "Disallow unnecessary concatenation of literals or template literals", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-useless-constructor", - "description": "Disallow unnecessary constructors", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-useless-escape", - "description": "Disallow unnecessary escape characters", - "recommended": true, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "no-useless-rename", - "description": "Disallow renaming import, export, and destructured assignments to the same name", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-useless-return", - "description": "Disallow redundant return statements", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-var", - "description": "Require `let` or `const` instead of `var`", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-void", - "description": "Disallow `void` operators", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-warning-comments", - "description": "Disallow specified warning terms in comments", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-with", - "description": "Disallow `with` statements", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "object-shorthand", - "description": "Require or disallow method and property shorthand syntax for object literals", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "one-var", - "description": "Enforce variables to be declared either together or separately in functions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "one-var-declaration-per-line", - "description": "Require or disallow newlines around variable declarations", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "operator-assignment", - "description": "Require or disallow assignment operator shorthand where possible", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-arrow-callback", - "description": "Require using arrow functions for callbacks", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-const", - "description": "Require `const` declarations for variables that are never reassigned after declared", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-destructuring", - "description": "Require destructuring from arrays and/or objects", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-exponentiation-operator", - "description": "Disallow the use of `Math.pow` in favor of the `**` operator", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-named-capture-group", - "description": "Enforce using named capture group in regular expression", - "recommended": false, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "prefer-numeric-literals", - "description": "Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-object-has-own", - "description": "Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-object-spread", - "description": "Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "prefer-promise-reject-errors", - "description": "Require using Error objects as Promise rejection reasons", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "prefer-regex-literals", - "description": "Disallow use of the `RegExp` constructor in favor of regular expression literals", - "recommended": false, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "prefer-rest-params", - "description": "Require rest parameters instead of `arguments`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "prefer-spread", - "description": "Require spread operators instead of `.apply()`", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "prefer-template", - "description": "Require template literals instead of string concatenation", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "quote-props", - "description": "Require quotes around object literal property names", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "radix", - "description": "Enforce the consistent use of the radix argument when using `parseInt()`", - "recommended": false, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "require-await", - "description": "Disallow async functions which have no `await` expression", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "require-unicode-regexp", - "description": "Enforce the use of `u` flag on RegExp", - "recommended": false, - "fixable": false, - "hasSuggestions": true - }, - { - "name": "require-yield", - "description": "Require generator functions to contain `yield`", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "sort-imports", - "description": "Enforce sorted import declarations within modules", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "sort-keys", - "description": "Require object keys to be sorted", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "sort-vars", - "description": "Require variables within the same declaration block to be sorted", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "spaced-comment", - "description": "Enforce consistent spacing after the `//` or `/*` in a comment", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "strict", - "description": "Require or disallow strict mode directives", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "symbol-description", - "description": "Require symbol descriptions", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "vars-on-top", - "description": "Require `var` declarations be placed at the top of their containing scope", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "yoda", - "description": "Require or disallow \"Yoda\" conditions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - } - ] - }, - { - "name": "layout", - "displayName": "Layout & Formatting", - "description": "These rules care about how the code looks rather than how it executes:", - "rules": [ - { - "name": "array-bracket-newline", - "description": "Enforce linebreaks after opening and before closing array brackets", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "array-bracket-spacing", - "description": "Enforce consistent spacing inside array brackets", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "array-element-newline", - "description": "Enforce line breaks after each array element", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "arrow-parens", - "description": "Require parentheses around arrow function arguments", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "arrow-spacing", - "description": "Enforce consistent spacing before and after the arrow in arrow functions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "block-spacing", - "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "brace-style", - "description": "Enforce consistent brace style for blocks", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "comma-dangle", - "description": "Require or disallow trailing commas", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "comma-spacing", - "description": "Enforce consistent spacing before and after commas", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "comma-style", - "description": "Enforce consistent comma style", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "computed-property-spacing", - "description": "Enforce consistent spacing inside computed property brackets", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "dot-location", - "description": "Enforce consistent newlines before and after dots", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "eol-last", - "description": "Require or disallow newline at the end of files", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "func-call-spacing", - "description": "Require or disallow spacing between function identifiers and their invocations", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "function-call-argument-newline", - "description": "Enforce line breaks between arguments of a function call", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "function-paren-newline", - "description": "Enforce consistent line breaks inside function parentheses", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "generator-star-spacing", - "description": "Enforce consistent spacing around `*` operators in generator functions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "implicit-arrow-linebreak", - "description": "Enforce the location of arrow function bodies", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "indent", - "description": "Enforce consistent indentation", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "jsx-quotes", - "description": "Enforce the consistent use of either double or single quotes in JSX attributes", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "key-spacing", - "description": "Enforce consistent spacing between keys and values in object literal properties", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "keyword-spacing", - "description": "Enforce consistent spacing before and after keywords", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "line-comment-position", - "description": "Enforce position of line comments", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "linebreak-style", - "description": "Enforce consistent linebreak style", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "lines-around-comment", - "description": "Require empty lines around comments", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "lines-between-class-members", - "description": "Require or disallow an empty line between class members", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "max-len", - "description": "Enforce a maximum line length", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "max-statements-per-line", - "description": "Enforce a maximum number of statements allowed per line", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "multiline-ternary", - "description": "Enforce newlines between operands of ternary expressions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "new-parens", - "description": "Enforce or disallow parentheses when invoking a constructor with no arguments", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "newline-per-chained-call", - "description": "Require a newline after each call in a method chain", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-extra-parens", - "description": "Disallow unnecessary parentheses", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-mixed-spaces-and-tabs", - "description": "Disallow mixed spaces and tabs for indentation", - "recommended": true, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-multi-spaces", - "description": "Disallow multiple spaces", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-multiple-empty-lines", - "description": "Disallow multiple empty lines", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-tabs", - "description": "Disallow all tabs", - "recommended": false, - "fixable": false, - "hasSuggestions": false - }, - { - "name": "no-trailing-spaces", - "description": "Disallow trailing whitespace at the end of lines", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "no-whitespace-before-property", - "description": "Disallow whitespace before properties", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "nonblock-statement-body-position", - "description": "Enforce the location of single-line statements", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "object-curly-newline", - "description": "Enforce consistent line breaks after opening and before closing braces", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "object-curly-spacing", - "description": "Enforce consistent spacing inside braces", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "object-property-newline", - "description": "Enforce placing object properties on separate lines", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "operator-linebreak", - "description": "Enforce consistent linebreak style for operators", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "padded-blocks", - "description": "Require or disallow padding within blocks", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "padding-line-between-statements", - "description": "Require or disallow padding lines between statements", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "quotes", - "description": "Enforce the consistent use of either backticks, double, or single quotes", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "rest-spread-spacing", - "description": "Enforce spacing between rest and spread operators and their expressions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "semi", - "description": "Require or disallow semicolons instead of ASI", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "semi-spacing", - "description": "Enforce consistent spacing before and after semicolons", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "semi-style", - "description": "Enforce location of semicolons", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "space-before-blocks", - "description": "Enforce consistent spacing before blocks", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "space-before-function-paren", - "description": "Enforce consistent spacing before `function` definition opening parenthesis", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "space-in-parens", - "description": "Enforce consistent spacing inside parentheses", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "space-infix-ops", - "description": "Require spacing around infix operators", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "space-unary-ops", - "description": "Enforce consistent spacing before or after unary operators", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "switch-colon-spacing", - "description": "Enforce spacing around colons of switch statements", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "template-curly-spacing", - "description": "Require or disallow spacing around embedded expressions of template strings", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "template-tag-spacing", - "description": "Require or disallow spacing between template tags and their literals", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "unicode-bom", - "description": "Require or disallow Unicode byte order mark (BOM)", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "wrap-iife", - "description": "Require parentheses around immediate `function` invocations", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "wrap-regex", - "description": "Require parenthesis around regex literals", - "recommended": false, - "fixable": true, - "hasSuggestions": false - }, - { - "name": "yield-star-spacing", - "description": "Require or disallow spacing around the `*` in `yield*` expressions", - "recommended": false, - "fixable": true, - "hasSuggestions": false - } - ] - } - ], - "deprecated": { - "name": "Deprecated", - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", - "rules": [ + "types": { + "problem": [ + { + "name": "array-callback-return", + "description": "Enforce `return` statements in callbacks of array methods", + "recommended": false, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "constructor-super", + "description": "Require `super()` calls in constructors", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "for-direction", + "description": "Enforce \"for\" loop update clause moving the counter in the right direction", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "getter-return", + "description": "Enforce `return` statements in getters", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-async-promise-executor", + "description": "Disallow using an async function as a Promise executor", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-await-in-loop", + "description": "Disallow `await` inside of loops", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-class-assign", + "description": "Disallow reassigning class members", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-compare-neg-zero", + "description": "Disallow comparing against -0", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-cond-assign", + "description": "Disallow assignment operators in conditional expressions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-const-assign", + "description": "Disallow reassigning `const` variables", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-constant-binary-expression", + "description": "Disallow expressions where the operation doesn't affect the value", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-constant-condition", + "description": "Disallow constant expressions in conditions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-constructor-return", + "description": "Disallow returning value from constructor", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-control-regex", + "description": "Disallow control characters in regular expressions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-debugger", + "description": "Disallow the use of `debugger`", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-dupe-args", + "description": "Disallow duplicate arguments in `function` definitions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-dupe-class-members", + "description": "Disallow duplicate class members", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-dupe-else-if", + "description": "Disallow duplicate conditions in if-else-if chains", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-dupe-keys", + "description": "Disallow duplicate keys in object literals", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-duplicate-case", + "description": "Disallow duplicate case labels", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-duplicate-imports", + "description": "Disallow duplicate module imports", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-empty-character-class", + "description": "Disallow empty character classes in regular expressions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-empty-pattern", + "description": "Disallow empty destructuring patterns", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-ex-assign", + "description": "Disallow reassigning exceptions in `catch` clauses", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-fallthrough", + "description": "Disallow fallthrough of `case` statements", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-func-assign", + "description": "Disallow reassigning `function` declarations", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-import-assign", + "description": "Disallow assigning to imported bindings", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-inner-declarations", + "description": "Disallow variable or `function` declarations in nested blocks", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-invalid-regexp", + "description": "Disallow invalid regular expression strings in `RegExp` constructors", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-irregular-whitespace", + "description": "Disallow irregular whitespace", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-loss-of-precision", + "description": "Disallow literal numbers that lose precision", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-misleading-character-class", + "description": "Disallow characters which are made with multiple code points in character class syntax", + "recommended": true, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-new-native-nonconstructor", + "description": "Disallow `new` operators with global non-constructor functions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-new-symbol", + "description": "Disallow `new` operators with the `Symbol` object", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-obj-calls", + "description": "Disallow calling global object properties as functions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-promise-executor-return", + "description": "Disallow returning values from Promise executor functions", + "recommended": false, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-prototype-builtins", + "description": "Disallow calling some `Object.prototype` methods directly on objects", + "recommended": true, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-self-assign", + "description": "Disallow assignments where both sides are exactly the same", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-self-compare", + "description": "Disallow comparisons where both sides are exactly the same", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-setter-return", + "description": "Disallow returning values from setters", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-sparse-arrays", + "description": "Disallow sparse arrays", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-template-curly-in-string", + "description": "Disallow template literal placeholder syntax in regular strings", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-this-before-super", + "description": "Disallow `this`/`super` before calling `super()` in constructors", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-undef", + "description": "Disallow the use of undeclared variables unless mentioned in `/*global */` comments", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unexpected-multiline", + "description": "Disallow confusing multiline expressions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unmodified-loop-condition", + "description": "Disallow unmodified loop conditions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unreachable", + "description": "Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unreachable-loop", + "description": "Disallow loops with a body that allows only one iteration", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unsafe-finally", + "description": "Disallow control flow statements in `finally` blocks", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unsafe-negation", + "description": "Disallow negating the left operand of relational operators", + "recommended": true, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-unsafe-optional-chaining", + "description": "Disallow use of optional chaining in contexts where the `undefined` value is not allowed", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unused-private-class-members", + "description": "Disallow unused private class members", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-unused-vars", + "description": "Disallow unused variables", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-use-before-define", + "description": "Disallow the use of variables before they are defined", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-useless-backreference", + "description": "Disallow useless backreferences in regular expressions", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "require-atomic-updates", + "description": "Disallow assignments that can lead to race conditions due to usage of `await` or `yield`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "use-isnan", + "description": "Require calls to `isNaN()` when checking for `NaN`", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "valid-typeof", + "description": "Enforce comparing `typeof` expressions against valid strings", + "recommended": true, + "fixable": false, + "hasSuggestions": true + } + ], + "suggestion": [ + { + "name": "accessor-pairs", + "description": "Enforce getter and setter pairs in objects and classes", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "arrow-body-style", + "description": "Require braces around arrow function bodies", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "block-scoped-var", + "description": "Enforce the use of variables within the scope they are defined", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "camelcase", + "description": "Enforce camelcase naming convention", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "capitalized-comments", + "description": "Enforce or disallow capitalization of the first letter of a comment", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "class-methods-use-this", + "description": "Enforce that class methods utilize `this`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "complexity", + "description": "Enforce a maximum cyclomatic complexity allowed in a program", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "consistent-return", + "description": "Require `return` statements to either always or never specify values", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "consistent-this", + "description": "Enforce consistent naming when capturing the current execution context", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "curly", + "description": "Enforce consistent brace style for all control statements", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "default-case", + "description": "Require `default` cases in `switch` statements", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "default-case-last", + "description": "Enforce default clauses in switch statements to be last", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "default-param-last", + "description": "Enforce default parameters to be last", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "dot-notation", + "description": "Enforce dot notation whenever possible", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "eqeqeq", + "description": "Require the use of `===` and `!==`", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "func-name-matching", + "description": "Require function names to match the name of the variable or property to which they are assigned", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "func-names", + "description": "Require or disallow named `function` expressions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "func-style", + "description": "Enforce the consistent use of either `function` declarations or expressions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "grouped-accessor-pairs", + "description": "Require grouped accessor pairs in object literals and classes", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "guard-for-in", + "description": "Require `for-in` loops to include an `if` statement", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "id-denylist", + "description": "Disallow specified identifiers", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "id-length", + "description": "Enforce minimum and maximum identifier lengths", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "id-match", + "description": "Require identifiers to match a specified regular expression", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "init-declarations", + "description": "Require or disallow initialization in variable declarations", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "logical-assignment-operators", + "description": "Require or disallow logical assignment operator shorthand", + "recommended": false, + "fixable": true, + "hasSuggestions": true + }, + { + "name": "max-classes-per-file", + "description": "Enforce a maximum number of classes per file", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-depth", + "description": "Enforce a maximum depth that blocks can be nested", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-lines", + "description": "Enforce a maximum number of lines per file", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-lines-per-function", + "description": "Enforce a maximum number of lines of code in a function", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-nested-callbacks", + "description": "Enforce a maximum depth that callbacks can be nested", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-params", + "description": "Enforce a maximum number of parameters in function definitions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-statements", + "description": "Enforce a maximum number of statements allowed in function blocks", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "multiline-comment-style", + "description": "Enforce a particular style for multiline comments", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "new-cap", + "description": "Require constructor names to begin with a capital letter", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-alert", + "description": "Disallow the use of `alert`, `confirm`, and `prompt`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-array-constructor", + "description": "Disallow `Array` constructors", + "recommended": false, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-bitwise", + "description": "Disallow bitwise operators", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-caller", + "description": "Disallow the use of `arguments.caller` or `arguments.callee`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-case-declarations", + "description": "Disallow lexical declarations in case clauses", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-console", + "description": "Disallow the use of `console`", + "recommended": false, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-continue", + "description": "Disallow `continue` statements", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-delete-var", + "description": "Disallow deleting variables", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-div-regex", + "description": "Disallow equal signs explicitly at the beginning of regular expressions", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-else-return", + "description": "Disallow `else` blocks after `return` statements in `if` statements", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-empty", + "description": "Disallow empty block statements", + "recommended": true, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-empty-function", + "description": "Disallow empty functions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-empty-static-block", + "description": "Disallow empty static blocks", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-eq-null", + "description": "Disallow `null` comparisons without type-checking operators", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-eval", + "description": "Disallow the use of `eval()`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-extend-native", + "description": "Disallow extending native types", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-extra-bind", + "description": "Disallow unnecessary calls to `.bind()`", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-extra-boolean-cast", + "description": "Disallow unnecessary boolean casts", + "recommended": true, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-extra-label", + "description": "Disallow unnecessary labels", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-global-assign", + "description": "Disallow assignments to native objects or read-only global variables", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-implicit-coercion", + "description": "Disallow shorthand type conversions", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-implicit-globals", + "description": "Disallow declarations in the global scope", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-implied-eval", + "description": "Disallow the use of `eval()`-like methods", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-inline-comments", + "description": "Disallow inline comments after code", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-invalid-this", + "description": "Disallow use of `this` in contexts where the value of `this` is `undefined`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-iterator", + "description": "Disallow the use of the `__iterator__` property", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-label-var", + "description": "Disallow labels that share a name with a variable", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-labels", + "description": "Disallow labeled statements", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-lone-blocks", + "description": "Disallow unnecessary nested blocks", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-lonely-if", + "description": "Disallow `if` statements as the only statement in `else` blocks", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-loop-func", + "description": "Disallow function declarations that contain unsafe references inside loop statements", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-magic-numbers", + "description": "Disallow magic numbers", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-multi-assign", + "description": "Disallow use of chained assignment expressions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-multi-str", + "description": "Disallow multiline strings", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-negated-condition", + "description": "Disallow negated conditions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-nested-ternary", + "description": "Disallow nested ternary expressions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-new", + "description": "Disallow `new` operators outside of assignments or comparisons", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-new-func", + "description": "Disallow `new` operators with the `Function` object", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-new-wrappers", + "description": "Disallow `new` operators with the `String`, `Number`, and `Boolean` objects", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-nonoctal-decimal-escape", + "description": "Disallow `\\8` and `\\9` escape sequences in string literals", + "recommended": true, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-object-constructor", + "description": "Disallow calls to the `Object` constructor without an argument", + "recommended": false, + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-octal", + "description": "Disallow octal literals", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-octal-escape", + "description": "Disallow octal escape sequences in string literals", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-param-reassign", + "description": "Disallow reassigning `function` parameters", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-plusplus", + "description": "Disallow the unary operators `++` and `--`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-proto", + "description": "Disallow the use of the `__proto__` property", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-redeclare", + "description": "Disallow variable redeclaration", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-regex-spaces", + "description": "Disallow multiple spaces in regular expressions", + "recommended": true, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-restricted-exports", + "description": "Disallow specified names in exports", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-restricted-globals", + "description": "Disallow specified global variables", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-restricted-imports", + "description": "Disallow specified modules when loaded by `import`", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-restricted-properties", + "description": "Disallow certain properties on certain objects", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-restricted-syntax", + "description": "Disallow specified syntax", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-return-assign", + "description": "Disallow assignment operators in `return` statements", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-script-url", + "description": "Disallow `javascript:` urls", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-sequences", + "description": "Disallow comma operators", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-shadow", + "description": "Disallow variable declarations from shadowing variables declared in the outer scope", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-shadow-restricted-names", + "description": "Disallow identifiers from shadowing restricted names", + "recommended": true, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-ternary", + "description": "Disallow ternary operators", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-throw-literal", + "description": "Disallow throwing literals as exceptions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, { - "name": "callback-return", - "replacedBy": [] + "name": "no-undef-init", + "description": "Disallow initializing variables to `undefined`", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "global-require", - "replacedBy": [] + "name": "no-undefined", + "description": "Disallow the use of `undefined` as an identifier", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "handle-callback-err", - "replacedBy": [] + "name": "no-underscore-dangle", + "description": "Disallow dangling underscores in identifiers", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "id-blacklist", - "replacedBy": [ - "id-denylist" - ] + "name": "no-unneeded-ternary", + "description": "Disallow ternary operators when simpler alternatives exist", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "indent-legacy", - "replacedBy": [ - "indent" - ] + "name": "no-unused-expressions", + "description": "Disallow unused expressions", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "lines-around-directive", - "replacedBy": [ - "padding-line-between-statements" - ] + "name": "no-unused-labels", + "description": "Disallow unused labels", + "recommended": true, + "fixable": true, + "hasSuggestions": false }, { - "name": "newline-after-var", - "replacedBy": [ - "padding-line-between-statements" - ] + "name": "no-useless-call", + "description": "Disallow unnecessary calls to `.call()` and `.apply()`", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "newline-before-return", - "replacedBy": [ - "padding-line-between-statements" - ] + "name": "no-useless-catch", + "description": "Disallow unnecessary `catch` clauses", + "recommended": true, + "fixable": false, + "hasSuggestions": false }, { - "name": "no-buffer-constructor", - "replacedBy": [] + "name": "no-useless-computed-key", + "description": "Disallow unnecessary computed property keys in objects and classes", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "no-catch-shadow", - "replacedBy": [ - "no-shadow" - ] + "name": "no-useless-concat", + "description": "Disallow unnecessary concatenation of literals or template literals", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "no-mixed-requires", - "replacedBy": [] + "name": "no-useless-constructor", + "description": "Disallow unnecessary constructors", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "no-native-reassign", - "replacedBy": [ - "no-global-assign" - ] + "name": "no-useless-escape", + "description": "Disallow unnecessary escape characters", + "recommended": true, + "fixable": false, + "hasSuggestions": true }, { - "name": "no-negated-in-lhs", - "replacedBy": [ - "no-unsafe-negation" - ] + "name": "no-useless-rename", + "description": "Disallow renaming import, export, and destructured assignments to the same name", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "no-new-require", - "replacedBy": [] + "name": "no-useless-return", + "description": "Disallow redundant return statements", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "no-path-concat", - "replacedBy": [] + "name": "no-var", + "description": "Require `let` or `const` instead of `var`", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "no-process-env", - "replacedBy": [] + "name": "no-void", + "description": "Disallow `void` operators", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "no-process-exit", - "replacedBy": [] + "name": "no-warning-comments", + "description": "Disallow specified warning terms in comments", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "name": "no-restricted-modules", - "replacedBy": [] + "name": "no-with", + "description": "Disallow `with` statements", + "recommended": true, + "fixable": false, + "hasSuggestions": false }, { - "name": "no-spaced-func", - "replacedBy": [ - "func-call-spacing" - ] + "name": "object-shorthand", + "description": "Require or disallow method and property shorthand syntax for object literals", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "no-sync", - "replacedBy": [] + "name": "one-var", + "description": "Enforce variables to be declared either together or separately in functions", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "prefer-reflect", - "replacedBy": [] + "name": "operator-assignment", + "description": "Require or disallow assignment operator shorthand where possible", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "require-jsdoc", - "replacedBy": [] + "name": "prefer-arrow-callback", + "description": "Require using arrow functions for callbacks", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "name": "valid-jsdoc", - "replacedBy": [] - } - ] - }, - "removed": { - "name": "Removed", - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", - "rules": [ + "name": "prefer-const", + "description": "Require `const` declarations for variables that are never reassigned after declared", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "prefer-destructuring", + "description": "Require destructuring from arrays and/or objects", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "prefer-exponentiation-operator", + "description": "Disallow the use of `Math.pow` in favor of the `**` operator", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, { - "removed": "generator-star", - "replacedBy": [ - "generator-star-spacing" - ] + "name": "prefer-named-capture-group", + "description": "Enforce using named capture group in regular expression", + "recommended": false, + "fixable": false, + "hasSuggestions": true }, { - "removed": "global-strict", - "replacedBy": [ - "strict" - ] + "name": "prefer-numeric-literals", + "description": "Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "removed": "no-arrow-condition", - "replacedBy": [ - "no-confusing-arrow", - "no-constant-condition" - ] + "name": "prefer-object-has-own", + "description": "Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "removed": "no-comma-dangle", - "replacedBy": [ - "comma-dangle" - ] + "name": "prefer-object-spread", + "description": "Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "removed": "no-empty-class", - "replacedBy": [ - "no-empty-character-class" - ] + "name": "prefer-promise-reject-errors", + "description": "Require using Error objects as Promise rejection reasons", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "removed": "no-empty-label", - "replacedBy": [ - "no-labels" - ] + "name": "prefer-regex-literals", + "description": "Disallow use of the `RegExp` constructor in favor of regular expression literals", + "recommended": false, + "fixable": false, + "hasSuggestions": true }, { - "removed": "no-extra-strict", - "replacedBy": [ - "strict" - ] + "name": "prefer-rest-params", + "description": "Require rest parameters instead of `arguments`", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "removed": "no-reserved-keys", - "replacedBy": [ - "quote-props" - ] + "name": "prefer-spread", + "description": "Require spread operators instead of `.apply()`", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "removed": "no-space-before-semi", - "replacedBy": [ - "semi-spacing" - ] + "name": "prefer-template", + "description": "Require template literals instead of string concatenation", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "removed": "no-wrap-func", - "replacedBy": [ - "no-extra-parens" - ] + "name": "radix", + "description": "Enforce the consistent use of the radix argument when using `parseInt()`", + "recommended": false, + "fixable": false, + "hasSuggestions": true }, { - "removed": "space-after-function-name", - "replacedBy": [ - "space-before-function-paren" - ] + "name": "require-await", + "description": "Disallow async functions which have no `await` expression", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "removed": "space-after-keywords", - "replacedBy": [ - "keyword-spacing" - ] + "name": "require-unicode-regexp", + "description": "Enforce the use of `u` or `v` flag on RegExp", + "recommended": false, + "fixable": false, + "hasSuggestions": true }, { - "removed": "space-before-function-parentheses", - "replacedBy": [ - "space-before-function-paren" - ] + "name": "require-yield", + "description": "Require generator functions to contain `yield`", + "recommended": true, + "fixable": false, + "hasSuggestions": false }, { - "removed": "space-before-keywords", - "replacedBy": [ - "keyword-spacing" - ] + "name": "sort-imports", + "description": "Enforce sorted import declarations within modules", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "removed": "space-in-brackets", - "replacedBy": [ - "object-curly-spacing", - "array-bracket-spacing" - ] + "name": "sort-keys", + "description": "Require object keys to be sorted", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "removed": "space-return-throw-case", - "replacedBy": [ - "keyword-spacing" - ] + "name": "sort-vars", + "description": "Require variables within the same declaration block to be sorted", + "recommended": false, + "fixable": true, + "hasSuggestions": false }, { - "removed": "space-unary-word-ops", - "replacedBy": [ - "space-unary-ops" - ] + "name": "strict", + "description": "Require or disallow strict mode directives", + "recommended": false, + "fixable": true, + "hasSuggestions": false + }, + { + "name": "symbol-description", + "description": "Require symbol descriptions", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "vars-on-top", + "description": "Require `var` declarations be placed at the top of their containing scope", + "recommended": false, + "fixable": false, + "hasSuggestions": false + }, + { + "name": "yoda", + "description": "Require or disallow \"Yoda\" conditions", + "recommended": false, + "fixable": true, + "hasSuggestions": false + } + ], + "layout": [ + { + "name": "line-comment-position", + "description": "Enforce position of line comments", + "recommended": false, + "fixable": false, + "hasSuggestions": false }, { - "removed": "spaced-line-comment", - "replacedBy": [ - "spaced-comment" - ] + "name": "unicode-bom", + "description": "Require or disallow Unicode byte order mark (BOM)", + "recommended": false, + "fixable": true, + "hasSuggestions": false } ] - } + }, + "deprecated": [ + { + "name": "array-bracket-newline", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "array-bracket-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "array-element-newline", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "arrow-parens", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "arrow-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "block-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "brace-style", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "callback-return", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "comma-dangle", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "comma-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "comma-style", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "computed-property-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "dot-location", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "eol-last", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "func-call-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "function-call-argument-newline", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "function-paren-newline", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "generator-star-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "global-require", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "handle-callback-err", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "id-blacklist", + "replacedBy": [ + "id-denylist" + ], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "implicit-arrow-linebreak", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "indent", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "indent-legacy", + "replacedBy": [ + "indent" + ], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "jsx-quotes", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "key-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "keyword-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "linebreak-style", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "lines-around-comment", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "lines-around-directive", + "replacedBy": [ + "padding-line-between-statements" + ], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "lines-between-class-members", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "max-len", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "max-statements-per-line", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "multiline-ternary", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "new-parens", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "newline-after-var", + "replacedBy": [ + "padding-line-between-statements" + ], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "newline-before-return", + "replacedBy": [ + "padding-line-between-statements" + ], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "newline-per-chained-call", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-buffer-constructor", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-catch-shadow", + "replacedBy": [ + "no-shadow" + ], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-confusing-arrow", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-extra-parens", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-extra-semi", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-floating-decimal", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-mixed-operators", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-mixed-requires", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-mixed-spaces-and-tabs", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-multi-spaces", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-multiple-empty-lines", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-native-reassign", + "replacedBy": [ + "no-global-assign" + ], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-negated-in-lhs", + "replacedBy": [ + "no-unsafe-negation" + ], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-new-object", + "replacedBy": [ + "no-object-constructor" + ], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-new-require", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-path-concat", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-process-env", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-process-exit", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-restricted-modules", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-return-await", + "replacedBy": [], + "fixable": false, + "hasSuggestions": true + }, + { + "name": "no-spaced-func", + "replacedBy": [ + "func-call-spacing" + ], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-sync", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-tabs", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "no-trailing-spaces", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "no-whitespace-before-property", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "nonblock-statement-body-position", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "object-curly-newline", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "object-curly-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "object-property-newline", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "one-var-declaration-per-line", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "operator-linebreak", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "padded-blocks", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "padding-line-between-statements", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "prefer-reflect", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "quote-props", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "quotes", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "require-jsdoc", + "replacedBy": [], + "fixable": false, + "hasSuggestions": false + }, + { + "name": "rest-spread-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "semi", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "semi-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "semi-style", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "space-before-blocks", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "space-before-function-paren", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "space-in-parens", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "space-infix-ops", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "space-unary-ops", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "spaced-comment", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "switch-colon-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "template-curly-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "template-tag-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "valid-jsdoc", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "wrap-iife", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "wrap-regex", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + }, + { + "name": "yield-star-spacing", + "replacedBy": [], + "fixable": true, + "hasSuggestions": false + } + ], + "removed": [ + { + "removed": "generator-star", + "replacedBy": [ + "generator-star-spacing" + ] + }, + { + "removed": "global-strict", + "replacedBy": [ + "strict" + ] + }, + { + "removed": "no-arrow-condition", + "replacedBy": [ + "no-confusing-arrow", + "no-constant-condition" + ] + }, + { + "removed": "no-comma-dangle", + "replacedBy": [ + "comma-dangle" + ] + }, + { + "removed": "no-empty-class", + "replacedBy": [ + "no-empty-character-class" + ] + }, + { + "removed": "no-empty-label", + "replacedBy": [ + "no-labels" + ] + }, + { + "removed": "no-extra-strict", + "replacedBy": [ + "strict" + ] + }, + { + "removed": "no-reserved-keys", + "replacedBy": [ + "quote-props" + ] + }, + { + "removed": "no-space-before-semi", + "replacedBy": [ + "semi-spacing" + ] + }, + { + "removed": "no-wrap-func", + "replacedBy": [ + "no-extra-parens" + ] + }, + { + "removed": "space-after-function-name", + "replacedBy": [ + "space-before-function-paren" + ] + }, + { + "removed": "space-after-keywords", + "replacedBy": [ + "keyword-spacing" + ] + }, + { + "removed": "space-before-function-parentheses", + "replacedBy": [ + "space-before-function-paren" + ] + }, + { + "removed": "space-before-keywords", + "replacedBy": [ + "keyword-spacing" + ] + }, + { + "removed": "space-in-brackets", + "replacedBy": [ + "object-curly-spacing", + "array-bracket-spacing" + ] + }, + { + "removed": "space-return-throw-case", + "replacedBy": [ + "keyword-spacing" + ] + }, + { + "removed": "space-unary-word-ops", + "replacedBy": [ + "space-unary-ops" + ] + }, + { + "removed": "spaced-line-comment", + "replacedBy": [ + "spaced-comment" + ] + } + ] } \ No newline at end of file diff --git a/docs/src/_data/rules_categories.js b/docs/src/_data/rules_categories.js new file mode 100644 index 00000000000..46856958f22 --- /dev/null +++ b/docs/src/_data/rules_categories.js @@ -0,0 +1,26 @@ +module.exports = eleventy => { + const PATH_PREFIX = eleventy.PATH_PREFIX; + + return { + problem: { + displayName: "Possible Problems", + description: "These rules relate to possible logic errors in code:" + }, + suggestion: { + displayName: "Suggestions", + description: "These rules suggest alternate ways of doing things:" + }, + layout: { + displayName: "Layout & Formatting", + description: "These rules care about how the code looks rather than how it executes:" + }, + deprecated: { + displayName: "Deprecated", + description: `These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:` + }, + removed: { + displayName: "Removed", + description: `These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:` + } + } +}; diff --git a/docs/src/_data/rules_meta.json b/docs/src/_data/rules_meta.json index 6d9fb3d5a22..06db19be509 100644 --- a/docs/src/_data/rules_meta.json +++ b/docs/src/_data/rules_meta.json @@ -8,6 +8,8 @@ } }, "array-bracket-newline": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce linebreaks after opening and before closing array brackets", @@ -17,6 +19,8 @@ "fixable": "whitespace" }, "array-bracket-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing inside array brackets", @@ -31,9 +35,12 @@ "description": "Enforce `return` statements in callbacks of array methods", "recommended": false, "url": "https://eslint.org/docs/latest/rules/array-callback-return" - } + }, + "hasSuggestions": true }, "array-element-newline": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce line breaks after each array element", @@ -52,6 +59,8 @@ "fixable": "code" }, "arrow-parens": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require parentheses around arrow function arguments", @@ -61,6 +70,8 @@ "fixable": "code" }, "arrow-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before and after the arrow in arrow functions", @@ -78,6 +89,8 @@ } }, "block-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block", @@ -87,6 +100,8 @@ "fixable": "whitespace" }, "brace-style": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent brace style for blocks", @@ -131,6 +146,8 @@ } }, "comma-dangle": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow trailing commas", @@ -140,6 +157,8 @@ "fixable": "code" }, "comma-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before and after commas", @@ -149,6 +168,8 @@ "fixable": "whitespace" }, "comma-style": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent comma style", @@ -166,6 +187,8 @@ } }, "computed-property-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing inside computed property brackets", @@ -232,6 +255,8 @@ } }, "dot-location": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent newlines before and after dots", @@ -250,6 +275,8 @@ "fixable": "code" }, "eol-last": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow newline at the end of files", @@ -277,6 +304,8 @@ "fixable": null }, "func-call-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow spacing between function identifiers and their invocations", @@ -310,6 +339,8 @@ } }, "function-call-argument-newline": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce line breaks between arguments of a function call", @@ -319,6 +350,8 @@ "fixable": "whitespace" }, "function-paren-newline": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent line breaks inside function parentheses", @@ -328,6 +361,8 @@ "fixable": "whitespace" }, "generator-star-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing around `*` operators in generator functions", @@ -418,6 +453,8 @@ } }, "implicit-arrow-linebreak": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce the location of arrow function bodies", @@ -427,6 +464,8 @@ "fixable": "whitespace" }, "indent": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent indentation", @@ -457,6 +496,8 @@ } }, "jsx-quotes": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce the consistent use of either double or single quotes in JSX attributes", @@ -466,6 +507,8 @@ "fixable": "whitespace" }, "key-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing between keys and values in object literal properties", @@ -475,6 +518,8 @@ "fixable": "whitespace" }, "keyword-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before and after keywords", @@ -492,6 +537,8 @@ } }, "linebreak-style": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent linebreak style", @@ -501,6 +548,8 @@ "fixable": "whitespace" }, "lines-around-comment": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require empty lines around comments", @@ -523,6 +572,8 @@ ] }, "lines-between-class-members": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow an empty line between class members", @@ -558,6 +609,8 @@ } }, "max-len": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce a maximum line length", @@ -606,6 +659,8 @@ } }, "max-statements-per-line": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce a maximum number of statements allowed per line", @@ -623,6 +678,8 @@ "fixable": "whitespace" }, "multiline-ternary": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce newlines between operands of ternary expressions", @@ -640,6 +697,8 @@ } }, "new-parens": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce or disallow parentheses when invoking a constructor with no arguments", @@ -675,6 +734,8 @@ ] }, "newline-per-chained-call": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require a newline after each call in a method chain", @@ -697,7 +758,8 @@ "description": "Disallow `Array` constructors", "recommended": false, "url": "https://eslint.org/docs/latest/rules/no-array-constructor" - } + }, + "hasSuggestions": true }, "no-async-promise-executor": { "type": "problem", @@ -788,6 +850,8 @@ } }, "no-confusing-arrow": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Disallow arrow functions where they could be confused with comparisons", @@ -802,7 +866,8 @@ "description": "Disallow the use of `console`", "recommended": false, "url": "https://eslint.org/docs/latest/rules/no-console" - } + }, + "hasSuggestions": true }, "no-const-assign": { "type": "problem", @@ -1037,6 +1102,8 @@ "fixable": "code" }, "no-extra-parens": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow unnecessary parentheses", @@ -1046,6 +1113,8 @@ "fixable": "code" }, "no-extra-semi": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Disallow unnecessary semicolons", @@ -1063,6 +1132,8 @@ } }, "no-floating-decimal": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Disallow leading or trailing decimal points in numeric literals", @@ -1235,6 +1306,8 @@ "hasSuggestions": true }, "no-mixed-operators": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Disallow mixed binary operators", @@ -1253,6 +1326,8 @@ } }, "no-mixed-spaces-and-tabs": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow mixed spaces and tabs for indentation", @@ -1269,6 +1344,8 @@ } }, "no-multi-spaces": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow multiple spaces", @@ -1286,6 +1363,8 @@ } }, "no-multiple-empty-lines": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow multiple empty lines", @@ -1364,7 +1443,11 @@ "description": "Disallow `Object` constructors", "recommended": false, "url": "https://eslint.org/docs/latest/rules/no-new-object" - } + }, + "deprecated": true, + "replacedBy": [ + "no-object-constructor" + ] }, "no-new-require": { "deprecated": true, @@ -1409,6 +1492,15 @@ "url": "https://eslint.org/docs/latest/rules/no-obj-calls" } }, + "no-object-constructor": { + "type": "suggestion", + "docs": { + "description": "Disallow calls to the `Object` constructor without an argument", + "recommended": false, + "url": "https://eslint.org/docs/latest/rules/no-object-constructor" + }, + "hasSuggestions": true + }, "no-octal": { "type": "suggestion", "docs": { @@ -1477,7 +1569,8 @@ "description": "Disallow returning values from Promise executor functions", "recommended": false, "url": "https://eslint.org/docs/latest/rules/no-promise-executor-return" - } + }, + "hasSuggestions": true }, "no-proto": { "type": "suggestion", @@ -1493,7 +1586,8 @@ "description": "Disallow calling some `Object.prototype` methods directly on objects", "recommended": true, "url": "https://eslint.org/docs/latest/rules/no-prototype-builtins" - } + }, + "hasSuggestions": true }, "no-redeclare": { "type": "suggestion", @@ -1578,7 +1672,9 @@ "recommended": false, "url": "https://eslint.org/docs/latest/rules/no-return-await" }, - "fixable": null + "fixable": null, + "deprecated": true, + "replacedBy": [] }, "no-script-url": { "type": "suggestion", @@ -1668,6 +1764,8 @@ } }, "no-tabs": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow all tabs", @@ -1708,6 +1806,8 @@ } }, "no-trailing-spaces": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow trailing whitespace at the end of lines", @@ -1960,6 +2060,8 @@ } }, "no-whitespace-before-property": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Disallow whitespace before properties", @@ -1977,6 +2079,8 @@ } }, "nonblock-statement-body-position": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce the location of single-line statements", @@ -1986,6 +2090,8 @@ "fixable": "whitespace" }, "object-curly-newline": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent line breaks after opening and before closing braces", @@ -1995,6 +2101,8 @@ "fixable": "whitespace" }, "object-curly-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing inside braces", @@ -2004,6 +2112,8 @@ "fixable": "whitespace" }, "object-property-newline": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce placing object properties on separate lines", @@ -2031,6 +2141,8 @@ "fixable": "code" }, "one-var-declaration-per-line": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Require or disallow newlines around variable declarations", @@ -2049,6 +2161,8 @@ "fixable": "code" }, "operator-linebreak": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent linebreak style for operators", @@ -2058,6 +2172,8 @@ "fixable": "code" }, "padded-blocks": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow padding within blocks", @@ -2067,6 +2183,8 @@ "fixable": "whitespace" }, "padding-line-between-statements": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow padding lines between statements", @@ -2202,6 +2320,8 @@ "fixable": "code" }, "quote-props": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Require quotes around object literal property names", @@ -2211,6 +2331,8 @@ "fixable": "code" }, "quotes": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce the consistent use of either backticks, double, or single quotes", @@ -2258,7 +2380,7 @@ "require-unicode-regexp": { "type": "suggestion", "docs": { - "description": "Enforce the use of `u` flag on RegExp", + "description": "Enforce the use of `u` or `v` flag on RegExp", "recommended": false, "url": "https://eslint.org/docs/latest/rules/require-unicode-regexp" }, @@ -2273,6 +2395,8 @@ } }, "rest-spread-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce spacing between rest and spread operators and their expressions", @@ -2282,6 +2406,8 @@ "fixable": "whitespace" }, "semi": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow semicolons instead of ASI", @@ -2291,6 +2417,8 @@ "fixable": "code" }, "semi-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before and after semicolons", @@ -2300,6 +2428,8 @@ "fixable": "whitespace" }, "semi-style": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce location of semicolons", @@ -2335,6 +2465,8 @@ "fixable": "code" }, "space-before-blocks": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before blocks", @@ -2344,6 +2476,8 @@ "fixable": "whitespace" }, "space-before-function-paren": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before `function` definition opening parenthesis", @@ -2353,6 +2487,8 @@ "fixable": "whitespace" }, "space-in-parens": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing inside parentheses", @@ -2362,6 +2498,8 @@ "fixable": "whitespace" }, "space-infix-ops": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require spacing around infix operators", @@ -2371,6 +2509,8 @@ "fixable": "whitespace" }, "space-unary-ops": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce consistent spacing before or after unary operators", @@ -2380,6 +2520,8 @@ "fixable": "whitespace" }, "spaced-comment": { + "deprecated": true, + "replacedBy": [], "type": "suggestion", "docs": { "description": "Enforce consistent spacing after the `//` or `/*` in a comment", @@ -2398,6 +2540,8 @@ "fixable": "code" }, "switch-colon-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Enforce spacing around colons of switch statements", @@ -2416,6 +2560,8 @@ "fixable": null }, "template-curly-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow spacing around embedded expressions of template strings", @@ -2425,6 +2571,8 @@ "fixable": "whitespace" }, "template-tag-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow spacing between template tags and their literals", @@ -2479,6 +2627,8 @@ } }, "wrap-iife": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require parentheses around immediate `function` invocations", @@ -2488,6 +2638,8 @@ "fixable": "code" }, "wrap-regex": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require parenthesis around regex literals", @@ -2497,6 +2649,8 @@ "fixable": "code" }, "yield-star-spacing": { + "deprecated": true, + "replacedBy": [], "type": "layout", "docs": { "description": "Require or disallow spacing around the `*` in `yield*` expressions", diff --git a/docs/src/_data/sites/en.yml b/docs/src/_data/sites/en.yml index ccd87ad37bd..532630be810 100644 --- a/docs/src/_data/sites/en.yml +++ b/docs/src/_data/sites/en.yml @@ -87,7 +87,7 @@ footer: language: Language latest: Latest copyright: > - © OpenJS Foundation and ESLint contributors, www.openjsf.org. Content licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. + © OpenJS Foundation and ESLint contributors, www.openjsf.org. Content licensed under MIT License. links: open_jsf: The OpenJS Foundation terms: Terms of Use diff --git a/docs/src/_data/sites/zh-hans.yml b/docs/src/_data/sites/zh-hans.yml index efa9474b89d..421401535d0 100644 --- a/docs/src/_data/sites/zh-hans.yml +++ b/docs/src/_data/sites/zh-hans.yml @@ -47,7 +47,7 @@ shared: #------------------------------------------------------------------------------ # Navigation #------------------------------------------------------------------------------ - + navigation: - text: 团队 link: team @@ -85,7 +85,7 @@ footer: language: 语言 latest: 最新 copyright: > - © OpenJS Foundation and ESLint contributors, www.openjsf.org. Content licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. + © OpenJS Foundation and ESLint contributors, www.openjsf.org. Content licensed under MIT License. links: open_jsf: OpenJS 基金会 terms: 使用条款 diff --git a/docs/src/_includes/components/rule-categories.macro.html b/docs/src/_includes/components/rule-categories.macro.html index 193f6def64e..f38d371049e 100644 --- a/docs/src/_includes/components/rule-categories.macro.html +++ b/docs/src/_includes/components/rule-categories.macro.html @@ -21,7 +21,7 @@
💡 hasSuggestions

- Some problems reported by this rule are manually fixable by editor suggestions + Some problems reported by this rule are manually fixable by editor suggestions

{%- endif -%} diff --git a/docs/src/_includes/components/rule.macro.html b/docs/src/_includes/components/rule.macro.html index e4cf876d0d9..cd5d61b0386 100644 --- a/docs/src/_includes/components/rule.macro.html +++ b/docs/src/_includes/components/rule.macro.html @@ -26,22 +26,24 @@

{{ params.description }}

{%- endif -%}
+ {%- if params.removed == undefined -%}
Categories: - {%- if (params.deprecated) or (params.removed) -%} + {%- if params.deprecated -%}

{%- else -%} -

+

{%- endif -%} -

+

-

+

+ {%- endif -%} {%- endmacro -%} diff --git a/docs/src/_includes/components/social-icons.html b/docs/src/_includes/components/social-icons.html index bb025af5b13..6f2b887e949 100644 --- a/docs/src/_includes/components/social-icons.html +++ b/docs/src/_includes/components/social-icons.html @@ -3,11 +3,8 @@