diff --git a/.eslintignore b/.eslintignore index b8414c9c832..905f2a39ddf 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,7 @@ /build/** /coverage/** /docs/** +!/docs/.eleventy.js /jsdoc/** /templates/** /tests/bench/** diff --git a/.eslintrc.js b/.eslintrc.js index b94ed9db89a..d4e2587afa6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -46,8 +46,7 @@ module.exports = { "internal-rules" ], extends: [ - "eslint", - "plugin:eslint-plugin/recommended" + "eslint" ], parserOptions: { ecmaVersion: 2021 @@ -63,21 +62,29 @@ module.exports = { } }, rules: { - "eslint-plugin/prefer-message-ids": "error", - "eslint-plugin/prefer-output-null": "error", - "eslint-plugin/prefer-placeholders": "error", - "eslint-plugin/prefer-replace-text": "error", - "eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"], - "eslint-plugin/require-meta-docs-description": "error", - "eslint-plugin/test-case-property-ordering": "error", - "eslint-plugin/test-case-shorthand-strings": "error", "internal-rules/multiline-comment-style": "error" }, overrides: [ + { + files: ["tools/*.js"], + rules: { + "no-console": "off" + } + }, { files: ["lib/rules/*", "tools/internal-rules/*"], excludedFiles: ["index.js"], + extends: [ + "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].*\\.$"], + "eslint-plugin/require-meta-docs-description": ["error", { pattern: "^(Enforce|Require|Disallow)" }], "internal-rules/no-invalid-meta": "error" } }, @@ -88,6 +95,17 @@ module.exports = { "eslint-plugin/require-meta-docs-url": ["error", { pattern: "https://eslint.org/docs/rules/{{name}}" }] } }, + { + files: ["tests/lib/rules/*", "tests/tools/internal-rules/*"], + extends: [ + "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" + } + }, { files: ["tests/**/*"], env: { mocha: true }, @@ -104,7 +122,7 @@ module.exports = { files: ["lib/*"], excludedFiles: ["lib/unsupported-api.js"], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns() ]] } @@ -112,7 +130,7 @@ module.exports = { { files: [INTERNAL_FILES.CLI_ENGINE_PATTERN], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns(INTERNAL_FILES.CLI_ENGINE_PATTERN) ]] } @@ -120,7 +138,7 @@ module.exports = { { files: [INTERNAL_FILES.LINTER_PATTERN], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns(INTERNAL_FILES.LINTER_PATTERN), "fs", resolveAbsolutePath("lib/cli-engine/index.js"), @@ -131,7 +149,7 @@ module.exports = { { files: [INTERNAL_FILES.RULES_PATTERN], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns(INTERNAL_FILES.RULES_PATTERN), "fs", resolveAbsolutePath("lib/cli-engine/index.js"), @@ -144,7 +162,7 @@ module.exports = { { files: ["lib/shared/**/*"], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns(), resolveAbsolutePath("lib/cli-engine/index.js"), resolveAbsolutePath("lib/linter/index.js"), @@ -156,7 +174,7 @@ module.exports = { { files: [INTERNAL_FILES.SOURCE_CODE_PATTERN], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns(INTERNAL_FILES.SOURCE_CODE_PATTERN), "fs", resolveAbsolutePath("lib/cli-engine/index.js"), @@ -169,7 +187,7 @@ module.exports = { { files: [INTERNAL_FILES.RULE_TESTER_PATTERN], rules: { - "node/no-restricted-require": ["error", [ + "n/no-restricted-require": ["error", [ ...createInternalFilesPatterns(INTERNAL_FILES.RULE_TESTER_PATTERN), resolveAbsolutePath("lib/cli-engine/index.js") ]] diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..5ace4600a1f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bbaacfca60..9401ec54924 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: pull_request: branches: [main] +permissions: + contents: read + jobs: verify_files: name: Verify Files @@ -22,6 +25,11 @@ jobs: run: node Makefile checkRuleFiles - name: Check Licenses run: node Makefile checkLicenses + - name: Install Docs Packages + working-directory: docs + run: npm install + - name: Lint Docs JS Files + run: node Makefile lintDocsJS test_on_node: name: Test diff --git a/.gitignore b/.gitignore index f1fee6a299c..075a4d740c7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ tmp/ debug/ .idea jsdoc/ -versions.json +/versions.json *.iml .eslintcache .cache @@ -28,5 +28,6 @@ yarn.lock package-lock.json pnpm-lock.yaml -# Docs site output +# Docs site _site +/docs/src/assets/css diff --git a/.markdownlint.yml b/.markdownlint.yml index 084bb03701e..79c1f0fbecf 100644 --- a/.markdownlint.yml +++ b/.markdownlint.yml @@ -15,4 +15,5 @@ MD029: false # Ordered list item prefix MD030: false # Spaces after list markers MD033: false # Allow inline HTML MD041: false # First line in file should be a top level header -MD046: false # Code block style +MD046: # Code block style + style: fenced diff --git a/CHANGELOG.md b/CHANGELOG.md index 86b06562105..dc3435a7583 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,131 @@ +v8.21.0 - August 1, 2022 + +* [`7b43ea1`](https://github.com/eslint/eslint/commit/7b43ea14a8af5fc3dbac38fa9d5bc71741328c16) feat: Implement FlatESLint (#16149) (Nicholas C. Zakas) +* [`8892511`](https://github.com/eslint/eslint/commit/889251194867b1f394c571a5982249329fa44cfd) chore: Upgrade to Espree 9.3.3 (#16173) (Brandon Mills) +* [`92bf49a`](https://github.com/eslint/eslint/commit/92bf49a4b39dde728fbc6d348e62c7009e21cf7d) feat: improve the key width calculation in `key-spacing` rule (#16154) (Nitin Kumar) +* [`c461542`](https://github.com/eslint/eslint/commit/c4615421cb4825e2ad22e275ec9439756d56299c) feat: add new `allowLineSeparatedGroups` option to the `sort-keys` rule (#16138) (Nitin Kumar) +* [`1cdcbca`](https://github.com/eslint/eslint/commit/1cdcbca8a961a057a9db40df412f249545befe2b) feat: add deprecation warnings for legacy API in `RuleTester` (#16063) (Nitin Kumar) +* [`0396775`](https://github.com/eslint/eslint/commit/03967755270ae28eec651281c50b6990d3983f48) fix: lines-around-comment apply `allowBlockStart` for switch statements (#16153) (Nitin Kumar) +* [`2aadc93`](https://github.com/eslint/eslint/commit/2aadc93272f1ab7f40246c6b18c4056660f2b3a2) docs: add anchors to headings inside docs content (#16134) (Strek) +* [`1233bee`](https://github.com/eslint/eslint/commit/1233beea3938fc4234c8f75917776832226fc3c8) chore: switch to eslint-plugin-node's maintained fork (#16150) (唯然) +* [`97b95c0`](https://github.com/eslint/eslint/commit/97b95c068d5b35fae68ca919257b61430271ac76) chore: upgrade puppeteer v13 (#16151) (唯然) + +v8.20.0 - July 16, 2022 + +* [`bbf8df4`](https://github.com/eslint/eslint/commit/bbf8df41c901d41753ca4f3f0baf021944782597) chore: Mark autogenerated release blog post as draft (#16130) (Nicholas C. Zakas) +* [`845c4f4`](https://github.com/eslint/eslint/commit/845c4f40274ccb3727c624db44c7a23aafa71318) docs: Add website team details (#16115) (Nicholas C. Zakas) +* [`5a0dfdb`](https://github.com/eslint/eslint/commit/5a0dfdb9938ffdcea52047466bac11ea983f4b29) docs: Link to blog post in no-constant-binary-expression (#16112) (Jordan Eldredge) +* [`bc692a9`](https://github.com/eslint/eslint/commit/bc692a9bf5c664c646ce386eff44eb706c231127) docs: remove install command (#16084) (Strek) +* [`30be0ed`](https://github.com/eslint/eslint/commit/30be0ed4d84dd436e6c2e345e264c10b2bd37308) fix: no-warning-comments rule escapes special RegEx characters in terms (#16090) (Lachlan Hunt) +* [`ca83178`](https://github.com/eslint/eslint/commit/ca83178b18cd5d649bd52a20aef8f8b3f48d3085) feat: catch preprocess errors (#16105) (JounQin) +* [`49ca3f0`](https://github.com/eslint/eslint/commit/49ca3f090425e06fdf6e66bcf2415508c46671e1) docs: don't show toc when content not found (#16095) (Amaresh S M) +* [`ba19e3f`](https://github.com/eslint/eslint/commit/ba19e3f80a32ceae82e0ed6c0acf16061d8370da) docs: enhance 404 page UI (#16097) (Amaresh S M) +* [`bfe5e88`](https://github.com/eslint/eslint/commit/bfe5e884098874bb512609bcd94a5e5ed797839d) fix: ignore spacing before `]` and `}` in comma-spacing (#16113) (Milos Djermanovic) +* [`a75d3b4`](https://github.com/eslint/eslint/commit/a75d3b47b84f59c080c0c8301ae859fa64aa0f0f) docs: remove unused meta.docs.category field in working-with-rules page (#16109) (Brandon Scott) +* [`cdc0206`](https://github.com/eslint/eslint/commit/cdc020639022dd931863460273de61f4ed4ce0f8) docs: add formatters page edit link (#16094) (Amaresh S M) +* [`4d1ed22`](https://github.com/eslint/eslint/commit/4d1ed22dede531108c8a7899d513f64f0662c135) docs: preselect default theme (#16098) (Strek) +* [`4b79612`](https://github.com/eslint/eslint/commit/4b79612f0bdf860142401033f32fe9a5b8cd7d03) docs: add missing correct/incorrect containers (#16087) (Milos Djermanovic) +* [`09f6acb`](https://github.com/eslint/eslint/commit/09f6acbf2136e3084a3174607ab29a48d5d519b0) docs: fix UI bug on rules index and details pages (#16082) (Deepshika S) +* [`f5db264`](https://github.com/eslint/eslint/commit/f5db264931fd6259e064b5cf24b4233f5aaa4c7d) docs: remove remaining duplicate rule descriptions (#16093) (Milos Djermanovic) +* [`32a6b2a`](https://github.com/eslint/eslint/commit/32a6b2a5caae8fa3734dfbdb9640bb4963fc5f4f) docs: Add scroll behaviour smooth (#16056) (Amaresh S M) +* [`eee4306`](https://github.com/eslint/eslint/commit/eee43067f635c0ec3b61e416f47849029d12268d) chore: update internal lint dependencies (#16088) (Bryan Mishkin) +* [`9615a42`](https://github.com/eslint/eslint/commit/9615a42c9f065188024423a28b603cb93dad18d4) chore: update formatter examples template to avoid markdown lint error (#16085) (Milos Djermanovic) +* [`62541ed`](https://github.com/eslint/eslint/commit/62541edf5843ff8e01f14f870701d5df0b2c1cb5) chore: fix markdown linting error (#16083) (唯然) + +v8.19.0 - July 1, 2022 + +* [`7023628`](https://github.com/eslint/eslint/commit/7023628eb3af1bcc0151afab2bf617217fae51b1) feat: add importNames support for patterns in no-restricted-imports (#16059) (Brandon Scott) +* [`472c368`](https://github.com/eslint/eslint/commit/472c3681364833f697d726abc3c33fbe2663eeb7) feat: fix handling of blockless `with` statements in indent rule (#16068) (Milos Djermanovic) +* [`fc81848`](https://github.com/eslint/eslint/commit/fc81848238ee0f6ff93615875ea4b8e95dc09249) fix: throw helpful exception when rule has wrong return type (#16075) (Bryan Mishkin) +* [`e884933`](https://github.com/eslint/eslint/commit/e88493395b3be2b08e14e9b84d20d2733f78582c) chore: use `github-slugger` for markdown anchors (#16067) (Strek) +* [`02e9cb0`](https://github.com/eslint/eslint/commit/02e9cb01e7663af3a3fd16725afc7d71e73b9eed) chore: revamp carbon ad style (#16078) (Amaresh S M) +* [`3ae0574`](https://github.com/eslint/eslint/commit/3ae0574fc78c4a2b406625e4792cb2859cb9bcb1) docs: Remove duplicate rule descriptions (#16052) (Amaresh S M) +* [`b6aee95`](https://github.com/eslint/eslint/commit/b6aee9591ecc2e2f5738ab8bef20faac1e05b5c3) chore: remove unwanted comments from rules markdown (#16054) (Strek) +* [`f50cf43`](https://github.com/eslint/eslint/commit/f50cf436aaa5dff1273f4753dd3fc6782f95a045) docs: Add base href to each page to fix relative URLs (#16046) (Nicholas C. Zakas) +* [`6840940`](https://github.com/eslint/eslint/commit/6840940a766d671831d5cee0e3c0e2f4e642632a) chore: correctly use .markdownlintignore in Makefile (#16060) (Bryan Mishkin) +* [`ae4b449`](https://github.com/eslint/eslint/commit/ae4b449719d496fd611903d596341ec4c1d81c16) docs: make logo link clickable on small width screens (#16058) (Milos Djermanovic) +* [`280f898`](https://github.com/eslint/eslint/commit/280f898bff9b809327e4c94cea3632ba95af4485) docs: use only fenced code blocks (#16044) (Milos Djermanovic) +* [`f5d63b9`](https://github.com/eslint/eslint/commit/f5d63b9e15d9f325ef4953b683cb67133b05e9ea) docs: add listener only if element exists (#16045) (Amaresh S M) +* [`8b639cc`](https://github.com/eslint/eslint/commit/8b639ccb2fb0f0a7d7aaee1f1fc2881a237de95d) docs: add missing migrating-to-8.0.0 in the user guide (#16048) (唯然) +* [`b8e68c1`](https://github.com/eslint/eslint/commit/b8e68c1f7e2b8fa5c108216f74dcd3100aa33b0f) docs: Update release process (#16036) (Nicholas C. Zakas) +* [`48904fb`](https://github.com/eslint/eslint/commit/48904fb00fc5001e534034e2e513ca99f3ada35e) chore: add missing images (#16017) (Amaresh S M) +* [`910f741`](https://github.com/eslint/eslint/commit/910f741885a18b7744d4125e98e554312bc873eb) chore: add architecture to nav (#16039) (Strek) +* [`9bb24c1`](https://github.com/eslint/eslint/commit/9bb24c1deb7ab6743080520d11aefe9c6b8b8f2d) chore: add correct incorrect in all rules doc (#16021) (Deepshika S) +* [`5a96af8`](https://github.com/eslint/eslint/commit/5a96af853dcbe29c9f125a63528f3fec9fc0aae8) chore: prepare versions data file (#16035) (Nicholas C. Zakas) +* [`50afe6f`](https://github.com/eslint/eslint/commit/50afe6fe8c92a1d5d52415e149d52e1e129c3cc7) chore: Included githubactions in the dependabot config (#15985) (Naveen) +* [`6d0cb11`](https://github.com/eslint/eslint/commit/6d0cb11c6d134896d8920c9bf3cc3e492f0eb8e2) docs: remove table of contents from markdown text (#15999) (Nitin Kumar) +* [`473411e`](https://github.com/eslint/eslint/commit/473411e61d46c2bbac70e9a66d434d477851d98a) chore: add deploy workflow for playground (#16034) (Milos Djermanovic) +* [`a30b66c`](https://github.com/eslint/eslint/commit/a30b66c030bf45864784c0550276267e5a146697) chore: fix print style (#16025) (Amaresh S M) +* [`f4dad59`](https://github.com/eslint/eslint/commit/f4dad59e5c7e966291d6f8c1456a465ae5629061) chore: add noindex meta tag (#16016) (Milos Djermanovic) +* [`db387a8`](https://github.com/eslint/eslint/commit/db387a87b23c398ed691ba35bdf3b6aa7dcfe750) chore: fix sitemap (#16026) (Milos Djermanovic) +* [`285fbc5`](https://github.com/eslint/eslint/commit/285fbc5e6a92c50e1195f252675b599ecd929b9d) chore: remove TOC from printable (#16020) (Strek) +* [`8e84c21`](https://github.com/eslint/eslint/commit/8e84c2148cc2d25a7076e73233ae41bc1a000a53) chore: remove ligatures from fonts (#16019) (Strek) + +v8.18.0 - June 17, 2022 + +* [`f6e2e63`](https://github.com/eslint/eslint/commit/f6e2e632fa3710cfa467b15350b08dea6e0e3dfc) chore: fix 'replaced by' rule list (#16007) (Milos Djermanovic) +* [`ed49f15`](https://github.com/eslint/eslint/commit/ed49f15fad96060501927ca27ebda1a4c736ed04) build: remove unwanted parallel and image-min for dev server (#15986) (Strek) +* [`4871047`](https://github.com/eslint/eslint/commit/4871047dbd0c5ef5e4089425a85ac85dcd9cf263) docs: Update analytics, canonical URL, ads (#15996) (Nicholas C. Zakas) +* [`d94dc84`](https://github.com/eslint/eslint/commit/d94dc84ae76a36b4ee9268c40d8536d2f5b1c63c) chore: remove unused deprecation warnings (#15994) (Francesco Trotta) +* [`a6273b8`](https://github.com/eslint/eslint/commit/a6273b83b103c463937936ef2404575758a7baa4) feat: account for rule creation time in performance reports (#15982) (Nitin Kumar) +* [`cddad14`](https://github.com/eslint/eslint/commit/cddad1495fbc1750c26330f7aadc6647e2eebac3) docs: Add correct/incorrect containers (#15998) (Nicholas C. Zakas) +* [`b04bc6f`](https://github.com/eslint/eslint/commit/b04bc6f1d558d9ad5eb57383a779fec5a170b3d3) docs: Add rules meta info to rule pages (#15902) (Nicholas C. Zakas) +* [`f364d47`](https://github.com/eslint/eslint/commit/f364d47013d146cdea42b27a7b24d105223f5ffe) fix: Make no-unused-vars treat for..of loops same as for..in loops (#15868) (Alex Bass) +* [`1324f10`](https://github.com/eslint/eslint/commit/1324f10ac58d3685fdb656a4fc9d1e5c9d035e42) docs: unify the wording referring to optional exception (#15893) (Abdelrahman Elkady) +* [`cdcf11e`](https://github.com/eslint/eslint/commit/cdcf11e457a2455bd8875d78651fec55dd148139) chore: fix versions link (#15995) (Milos Djermanovic) +* [`d2a8715`](https://github.com/eslint/eslint/commit/d2a871543a12143fa0ecea13d7508021fd019031) chore: add trailing slash to `pathPrefix` (#15993) (Milos Djermanovic) +* [`58a1bf0`](https://github.com/eslint/eslint/commit/58a1bf0de33adb1d54c8051090f01984daa08c86) chore: tweak URL rewriting for local previews (#15992) (Milos Djermanovic) +* [`ad54d02`](https://github.com/eslint/eslint/commit/ad54d0246797cdd849948e7a5d31571c498af7aa) docs: add missing trailing slash to some internal links (#15991) (Milos Djermanovic) +* [`80404d2`](https://github.com/eslint/eslint/commit/80404d28f040df49706ba2c1e954aee945711aa9) chore: remove docs deploy workflow (#15984) (Nicholas C. Zakas) +* [`df7768e`](https://github.com/eslint/eslint/commit/df7768e16a5ab55da97749bb89ff19f98ce0cc6c) docs: Switch to version-relative URLs (#15978) (Nicholas C. Zakas) +* [`71bc750`](https://github.com/eslint/eslint/commit/71bc75012b1377d3c7e57deea0ad06f99c4c65bf) chore: Set permissions for GitHub actions (#15971) (Naveen) +* [`90ff647`](https://github.com/eslint/eslint/commit/90ff64742ede6ef29018cb967fc4f20d7b85b592) chore: avoid generating subdirectories for each page on new docs site (#15967) (Milos Djermanovic) +* [`21d6479`](https://github.com/eslint/eslint/commit/21d647904dc30f9484b22acdd9243a6d0ecfba38) docs: change some absolute links to relative (#15970) (Milos Djermanovic) +* [`f31216a`](https://github.com/eslint/eslint/commit/f31216a90a6204ed1fd56547772376a10f5d3ebb) docs: Update README team and sponsors (ESLint Jenkins) + +v8.17.0 - June 3, 2022 + +* [`b915018`](https://github.com/eslint/eslint/commit/b9150186bcc0f2732a69ab0ebd83a9b2fb2e6552) docs: Update website UI to latest (#15944) (Nicholas C. Zakas) +* [`55319e1`](https://github.com/eslint/eslint/commit/55319e133f0862a008db3557d7350f154f2c784f) feat: fix indent bug with semicolon-first style (#15951) (Milos Djermanovic) +* [`f6d7920`](https://github.com/eslint/eslint/commit/f6d79209821241c8e03c183b5844a024da0efe8a) feat: add `allowNamedExports` option to no-use-before-define (#15953) (Milos Djermanovic) +* [`f0bb609`](https://github.com/eslint/eslint/commit/f0bb6099668f54ae6f444126b90dbb1146248146) docs: Update Exponentiation operator MDN link (#15960) (Pranjal Jain) +* [`da694b9`](https://github.com/eslint/eslint/commit/da694b9d7cb0247541bcabbf943d1289e0e30167) chore: avoid theme flashes (#15927) (Strek) +* [`baa0153`](https://github.com/eslint/eslint/commit/baa01530469ec233fb60380a0960c1550f9d9a45) docs: Use correct past tense "left" instead of "leaved" (#15950) (Frederik Braun) +* [`f836743`](https://github.com/eslint/eslint/commit/f836743e95cb8ad3bdd4e88687dbe2f16bfade62) chore: Use build hook for docs deploy (#15945) (Nicholas C. Zakas) +* [`ce035e5`](https://github.com/eslint/eslint/commit/ce035e5fac632ba8d4f1860f92465f22d6b44d42) test: cleanup typos (#15937) (Nick Schonning) +* [`1351a9b`](https://github.com/eslint/eslint/commit/1351a9b875aa32a8961a68457dde03ede9ef7c78) docs: Add Resources section to rule pages (#15901) (Nicholas C. Zakas) +* [`68cf0fb`](https://github.com/eslint/eslint/commit/68cf0fb7f645da5d992a5e749fc6c1311d30e75a) docs: cleanup typos (#15936) (Nick Schonning) +* [`54c0953`](https://github.com/eslint/eslint/commit/54c09530c778eb4076d89777165d59db96c9acb5) fix: cleanup typos (#15939) (Nick Schonning) +* [`845a7af`](https://github.com/eslint/eslint/commit/845a7af90ce03b383c8f09654ac049fc161dbb9f) fix: typo ocatal -> octal (#15940) (Nick Schonning) +* [`10249ad`](https://github.com/eslint/eslint/commit/10249ad1a961463b6b347be71c074951ab8e2652) chore: use addEventListener instead of addListener (#15923) (Amaresh S M) +* [`5f5c1fb`](https://github.com/eslint/eslint/commit/5f5c1fb1083573ea511d0dae7913651db0dca772) chore: lint eleventy config file (#15904) (Milos Djermanovic) +* [`8513d37`](https://github.com/eslint/eslint/commit/8513d37c725509c9e9ec1dbbc431f20d32632cf3) chore: update Rule typedefs (#15915) (Milos Djermanovic) +* [`13b62ae`](https://github.com/eslint/eslint/commit/13b62aeb710a68e5d838a4d3847c487af1ba9520) docs: use-dart-sass instead of node-sass (#15912) (Deepshika S) +* [`c81c5d6`](https://github.com/eslint/eslint/commit/c81c5d6ef1ba5808cca95ab965a162802af9b7cc) docs: add social media links (#15920) (Deepshika S) +* [`0d6a50b`](https://github.com/eslint/eslint/commit/0d6a50b41f2fe444fd222463adad48473eaf9b7d) docs: fix openjs link (#15917) (Amaresh S M) +* [`54910f5`](https://github.com/eslint/eslint/commit/54910f5a3bf6615f8ac03d33fd26fc1fa6dea21f) docs: display version in mobile view (#15909) (Amaresh S M) +* [`55534f1`](https://github.com/eslint/eslint/commit/55534f1a7040fad94bb5726759fbb9acb60d1c24) test: ensure no-restricted-imports works with NodeJS imports (#15907) (Nick Mazuk) + +v8.16.0 - May 20, 2022 + +* [`1768d0d`](https://github.com/eslint/eslint/commit/1768d0de58e10046ed3e54f0fa52be48ba41f12b) chore: upgrade @eslint/eslintrc@1.3.0 (#15903) (Milos Djermanovic) +* [`050d5f4`](https://github.com/eslint/eslint/commit/050d5f4e0456ae9a9d769f4306bc0d60058b0898) docs: Static further reading links (#15890) (Nicholas C. Zakas) +* [`cab0c22`](https://github.com/eslint/eslint/commit/cab0c2287e12561d869dfcfcd1c4e14c9d6d70d5) feat: add Unicode flag suggestion in no-misleading-character-class (#15867) (Milos Djermanovic) +* [`c686e4c`](https://github.com/eslint/eslint/commit/c686e4c4a04525118f5585fd76bdba59dddf3a97) chore: Add deploy workflow for docs site (#15894) (Nicholas C. Zakas) +* [`38ae956`](https://github.com/eslint/eslint/commit/38ae9564a41e1d38adad55976565d85c5c981e1d) feat: check Unicode code point escapes in no-control-regex (#15862) (Milos Djermanovic) +* [`36287c0`](https://github.com/eslint/eslint/commit/36287c00d56596fbb2672cfe3f9b9dd24b2926da) docs: fix absolute paths in related rules shortcode to work from /docs (#15892) (Milos Djermanovic) +* [`90b6990`](https://github.com/eslint/eslint/commit/90b69901efd265fd11425540928793f1387095cc) docs: fix absolute links in rule macro to work from /docs (#15891) (Milos Djermanovic) +* [`f437249`](https://github.com/eslint/eslint/commit/f437249a3bedb47155d33ac753b821ae31b814fa) docs: Adjust docs site path prefix (#15889) (Nicholas C. Zakas) +* [`6e16025`](https://github.com/eslint/eslint/commit/6e16025e8fbffa0e1d0c977cb4b6eae30a502d9b) docs: update 'Related Rules' and 'Further Reading' in remaining rules (#15884) (Milos Djermanovic) +* [`c7894cd`](https://github.com/eslint/eslint/commit/c7894cd433319e09b10a80b260a5398dac0d5dab) chore: enable some rules from eslint-plugin-unicorn internally (#15878) (Bryan Mishkin) +* [`ea65cb5`](https://github.com/eslint/eslint/commit/ea65cb5435162ad29559d175e68f5b6d97e6cdcc) chore: upgrade eslint-plugin-eslint-plugin@^4.2.0 (#15882) (唯然) +* [`cc29c69`](https://github.com/eslint/eslint/commit/cc29c696a08430fcbf202482306b8c3dbccc0257) chore: Upgrade official GitHub actions to latest versions (#15880) (Darius Dzien) +* [`5891c75`](https://github.com/eslint/eslint/commit/5891c7533f500110129fdea7b9b63c8a409da0bd) chore: Refactor rule docs format (#15869) (Nicholas C. Zakas) +* [`ee69cd3`](https://github.com/eslint/eslint/commit/ee69cd30b3551b3adebfd959a44a9a149221946a) feat: Update global variables (#15871) (Sébastien Règne) +* [`1d39f69`](https://github.com/eslint/eslint/commit/1d39f698a22e2995bbfcf90b6dafd196a173092a) docs: remove confusing examples for no-mixed-operators (#15875) (Milos Djermanovic) +* [`3071d76`](https://github.com/eslint/eslint/commit/3071d76772c002bd7b03053be5be54da52c01242) docs: Fix some grammar issues (#15837) (byodian) +* [`3f09aab`](https://github.com/eslint/eslint/commit/3f09aab709980ca974b721de474be2dd183409a2) fix: function-paren-newline crash on "new new Foo();" (#15850) (coderaiser) + v8.15.0 - May 6, 2022 * [`1ba6a92`](https://github.com/eslint/eslint/commit/1ba6a926eedcfe725900ed95cf029cff02d0355a) chore: upgrade @eslint/eslintrc@1.2.3 (#15847) (Milos Djermanovic) diff --git a/Makefile.js b/Makefile.js index de786148c65..a9c527df557 100644 --- a/Makefile.js +++ b/Makefile.js @@ -12,7 +12,6 @@ const checker = require("npm-license"), ReleaseOps = require("eslint-release"), - dateformat = require("dateformat"), fs = require("fs"), glob = require("glob"), marked = require("marked"), @@ -23,6 +22,7 @@ const checker = require("npm-license"), ejs = require("ejs"), loadPerf = require("load-perf"), yaml = require("js-yaml"), + ignore = require("ignore"), { CLIEngine } = require("./lib/cli-engine"), builtinRules = require("./lib/rules/index"); @@ -33,7 +33,7 @@ require("shelljs/make"); * @see https://github.com/shelljs/shelljs/blob/124d3349af42cb794ae8f78fc9b0b538109f7ca7/make.js#L4 * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/3aa2d09b6408380598cfb802743b07e1edb725f3/types/shelljs/make.d.ts#L8-L11 */ -const { cat, cd, cp, echo, exec, exit, find, ls, mkdir, pwd, rm, test } = require("shelljs"); +const { cat, cd, echo, exec, exit, find, ls, mkdir, pwd, test } = require("shelljs"); //------------------------------------------------------------------------------ // Settings @@ -60,8 +60,10 @@ const NODE = "node ", // intentional extra space TEMP_DIR = "./tmp/", DEBUG_DIR = "./debug/", BUILD_DIR = "build", - DOCS_DIR = "../website/docs", - SITE_DIR = "../website/", + SITE_DIR = "../eslint.org", + DOCS_DIR = "./docs", + DOCS_SRC_DIR = path.join(DOCS_DIR, "src"), + DOCS_DATA_DIR = path.join(DOCS_SRC_DIR, "_data"), PERF_TMP_DIR = path.join(TEMP_DIR, "eslint", "performance"), // Utilities - intentional extra space at the end of each string @@ -71,8 +73,8 @@ const NODE = "node ", // intentional extra space // Files RULE_FILES = glob.sync("lib/rules/*.js").filter(filePath => path.basename(filePath) !== "index.js"), JSON_FILES = find("conf/").filter(fileType("json")), - MARKDOWNLINT_IGNORED_FILES = fs.readFileSync(path.join(__dirname, ".markdownlintignore"), "utf-8").split("\n"), - MARKDOWN_FILES_ARRAY = find("docs/").concat(ls(".")).filter(fileType("md")).filter(file => !MARKDOWNLINT_IGNORED_FILES.includes(file)), + MARKDOWNLINT_IGNORE_INSTANCE = ignore().add(fs.readFileSync(path.join(__dirname, ".markdownlintignore"), "utf-8")), + MARKDOWN_FILES_ARRAY = MARKDOWNLINT_IGNORE_INSTANCE.filter(find("docs/").concat(ls(".")).filter(fileType("md"))), TEST_FILES = "\"tests/{bin,conf,lib,tools}/**/*.js\"", PERF_ESLINTRC = path.join(PERF_TMP_DIR, "eslintrc.yml"), PERF_MULTIFILES_TARGET_DIR = path.join(PERF_TMP_DIR, "eslint"), @@ -144,10 +146,10 @@ function generateBlogPost(releaseInfo, prereleaseMajorVersion) { now = new Date(), month = now.getMonth() + 1, day = now.getDate(), - filename = `../website/_posts/${now.getFullYear()}-${ + filename = path.join(SITE_DIR, `src/content/blog/${now.getFullYear()}-${ month < 10 ? `0${month}` : month}-${ day < 10 ? `0${day}` : day}-eslint-v${ - releaseInfo.version}-released.md`; + releaseInfo.version}-released.md`); output.to(filename); } @@ -155,21 +157,16 @@ function generateBlogPost(releaseInfo, prereleaseMajorVersion) { /** * Generates a doc page with formatter result examples * @param {Object} formatterInfo Linting results from each formatter - * @param {string} [prereleaseVersion] The version used for a prerelease. This - * changes where the output is stored. * @returns {void} */ -function generateFormatterExamples(formatterInfo, prereleaseVersion) { +function generateFormatterExamples(formatterInfo) { const output = ejs.render(cat("./templates/formatter-examples.md.ejs"), formatterInfo); - let filename = "../website/docs/user-guide/formatters/index.md", - htmlFilename = "../website/docs/user-guide/formatters/html-formatter-example.html"; - - if (prereleaseVersion) { - filename = filename.replace("/docs", `/docs/${prereleaseVersion}`); - htmlFilename = htmlFilename.replace("/docs", `/docs/${prereleaseVersion}`); - if (!test("-d", path.dirname(filename))) { - mkdir(path.dirname(filename)); - } + const outputDir = path.join(DOCS_SRC_DIR, "user-guide/formatters/"), + filename = path.join(outputDir, "index.md"), + htmlFilename = path.join(outputDir, "html-formatter-example.html"); + + if (!test("-d", outputDir)) { + mkdir(outputDir); } output.to(filename); @@ -181,10 +178,13 @@ function generateFormatterExamples(formatterInfo, prereleaseVersion) { * @returns {void} */ function generateRuleIndexPage() { - const outputFile = "../website/_data/rules.yml", + const docsSiteOutputFile = path.join(DOCS_DATA_DIR, "rules.json"), + docsSiteMetaOutputFile = path.join(DOCS_DATA_DIR, "rules_meta.json"), ruleTypes = "conf/rule-type-list.json", ruleTypesData = JSON.parse(cat(path.resolve(ruleTypes))); + const meta = {}; + RULE_FILES .map(filename => [filename, path.basename(filename, ".js")]) .sort((a, b) => a[1].localeCompare(b[1])) @@ -193,6 +193,20 @@ function generateRuleIndexPage() { const basename = pair[1]; const rule = require(path.resolve(filename)); + /* + * Eleventy interprets the {{ }} in messages as being variables, + * which can cause an error if there's syntax it doesn't expect. + * Because we don't use this info in the website anyway, it's safer + * to just remove it. + * + * Also removing the schema because we don't need it. + */ + meta[basename] = { + ...rule.meta, + schema: void 0, + messages: void 0 + }; + if (rule.meta.deprecated) { ruleTypesData.deprecated.rules.push({ name: basename, @@ -219,9 +233,9 @@ function generateRuleIndexPage() { // `.rules` will be `undefined` if all rules in category are deprecated. ruleTypesData.types = ruleTypesData.types.filter(ruleType => !!ruleType.rules); - const output = yaml.dump(ruleTypesData, { sortKeys: true }); + JSON.stringify(ruleTypesData, null, 4).to(docsSiteOutputFile); + JSON.stringify(meta, null, 4).to(docsSiteMetaOutputFile); - output.to(outputFile); } /** @@ -235,18 +249,14 @@ function commitSiteToGit(tag) { cd(SITE_DIR); exec("git add -A ."); - exec(`git commit -m "Autogenerated new docs and demo at ${dateformat(new Date())}"`); - - if (tag) { - exec(`git tag ${tag}`); - } - - exec("git fetch origin && git rebase origin/master"); + exec(`git commit -m "Added release blog post for ${tag}"`); + exec(`git tag ${tag}`); + exec("git fetch origin && git rebase origin/main"); cd(currentDir); } /** - * Publishes the changes in an adjacent `website` repository to the remote. The + * Publishes the changes in an adjacent `eslint.org` repository to the remote. The * site should already have local commits (e.g. from running `commitSiteToGit`). * @returns {void} */ @@ -254,7 +264,7 @@ function publishSite() { const currentDir = pwd(); cd(SITE_DIR); - exec("git push origin master --tags"); + exec("git push origin HEAD --tags"); cd(currentDir); } @@ -271,6 +281,10 @@ function generateRelease() { target.gensite(); generateBlogPost(releaseInfo); commitSiteToGit(`v${releaseInfo.version}`); + + echo("Updating commit with docs data"); + exec("git add docs/ && git commit --amend --no-edit"); + exec(`git tag -a -f v${releaseInfo.version} -m ${releaseInfo.version}`); } /** @@ -318,6 +332,10 @@ function generatePrerelease(prereleaseId) { */ function publishRelease() { ReleaseOps.publishRelease(); + + // push to latest branch to trigger docs deploy + exec("git push origin HEAD:latest -f"); + publishSite(); } @@ -482,8 +500,17 @@ target.lint = function([fix = false] = []) { let errors = 0, lastReturn; + /* + * In order to successfully lint JavaScript files in the `docs` directory, dependencies declared in `docs/package.json` + * would have to be installed in `docs/node_modules`. In particular, eslint-plugin-node rules examine `docs/node_modules` + * when analyzing `require()` calls from CJS modules in the `docs` directory. Since our release process does not run `npm install` + * in the `docs` directory, linting would fail and break the release. Also, working on the main `eslint` package does not require + * installing dependencies declared in `docs/package.json`, so most contributors will not have `docs/node_modules` locally. + * Therefore, we add `--ignore-pattern docs` to exclude linting the `docs` directory from this command. + * There is a separate command `target.lintDocsJS` for linting JavaScript files in the `docs` directory. + */ echo("Validating JavaScript files"); - lastReturn = exec(`${ESLINT}${fix ? "--fix" : ""} .`); + lastReturn = exec(`${ESLINT}${fix ? "--fix" : ""} . --ignore-pattern docs`); if (lastReturn.code !== 0) { errors++; } @@ -502,6 +529,21 @@ target.lint = function([fix = false] = []) { } }; +target.lintDocsJS = function([fix = false] = []) { + let errors = 0; + + echo("Validating JavaScript files in the docs directory"); + const lastReturn = exec(`${ESLINT}${fix ? "--fix" : ""} docs`); + + if (lastReturn.code !== 0) { + errors++; + } + + if (errors) { + exit(1); + } +}; + target.fuzz = function({ amount = 1000, fuzzBrokenAutofixes = false } = {}) { const fuzzerRunner = require("./tools/fuzzer-runner"); const fuzzResults = fuzzerRunner.run({ amount, fuzzBrokenAutofixes }); @@ -583,60 +625,14 @@ target.test = function() { target.checkLicenses(); }; -target.gensite = function(prereleaseVersion) { - echo("Generating eslint.org"); - - let docFiles = [ - "/rules/", - "/user-guide/", - "/maintainer-guide/", - "/developer-guide/", - "/about/" - ]; - - // append version - if (prereleaseVersion) { - docFiles = docFiles.map(docFile => `/${prereleaseVersion}${docFile}`); - } - - // 1. create temp and build directory - echo("> Creating a temporary directory (Step 1)"); - if (!test("-d", TEMP_DIR)) { - mkdir(TEMP_DIR); - } +target.gensite = function() { + echo("Generating documentation"); - // 2. remove old files from the site - echo("> Removing old files (Step 2)"); - docFiles.forEach(filePath => { - const fullPath = path.join(DOCS_DIR, filePath), - htmlFullPath = fullPath.replace(".md", ".html"); + const DOCS_RULES_DIR = path.join(DOCS_SRC_DIR, "rules"); + const RULE_VERSIONS_FILE = path.join(DOCS_SRC_DIR, "_data/rule_versions.json"); - if (test("-f", fullPath)) { - rm("-rf", fullPath); - - if (filePath.includes(".md") && test("-f", htmlFullPath)) { - rm("-rf", htmlFullPath); - } - } - }); - - // 3. Copy docs folder to a temporary directory - echo("> Copying the docs folder (Step 3)"); - docFiles.forEach(filePath => { - const pathToCopy = path.join("docs/src", filePath, "*"), - tempPath = path.join(TEMP_DIR, filePath); - - if (!test("-d", tempPath)) { - mkdir(tempPath); - } - - cp("-rf", pathToCopy, tempPath); - }); - - // special case (for now) - rm("-rf", path.join(TEMP_DIR, "pages")); - - let versions = test("-f", "./versions.json") ? JSON.parse(cat("./versions.json")) : {}; + // Set up rule version information + let versions = test("-f", RULE_VERSIONS_FILE) ? JSON.parse(cat(RULE_VERSIONS_FILE)) : {}; if (!versions.added) { versions = { @@ -645,119 +641,45 @@ target.gensite = function(prereleaseVersion) { }; } - const { Linter } = require("."); - const rules = new Linter().getRules(); - - const RECOMMENDED_TEXT = "\n\n(recommended) The `\"extends\": \"eslint:recommended\"` property in a configuration file enables this rule."; - const FIXABLE_TEXT = "\n\n(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule."; - const HAS_SUGGESTIONS_TEXT = "\n\n(hasSuggestions) Some problems reported by this rule are manually fixable by editor [suggestions](../developer-guide/working-with-rules#providing-suggestions)."; + // 1. Update rule meta data by checking rule docs - important to catch removed rules + echo("> Updating rule version meta data (Step 1)"); + const ruleDocsFiles = find(DOCS_RULES_DIR); - // 4. Loop through all files in temporary directory - process.stdout.write("> Updating files (Steps 4-9): 0/... - ...\r"); - const tempFiles = find(TEMP_DIR); - const length = tempFiles.length; - - tempFiles.forEach((filename, i) => { + ruleDocsFiles.forEach((filename, i) => { if (test("-f", filename) && path.extname(filename) === ".md") { - const rulesUrl = "https://github.com/eslint/eslint/tree/HEAD/lib/rules/", - testsUrl = "https://github.com/eslint/eslint/tree/HEAD/tests/lib/rules/", - docsUrl = "https://github.com/eslint/eslint/tree/HEAD/docs/src/rules/", - baseName = path.basename(filename), - sourceBaseName = `${path.basename(filename, ".md")}.js`, - sourcePath = path.join("lib/rules", sourceBaseName), - ruleName = path.basename(filename, ".md"), - filePath = path.posix.join("docs", path.relative("tmp", filename)); - let text = cat(filename); - - process.stdout.write(`> Updating files (Steps 4-9): ${i}/${length} - ${filePath + " ".repeat(30)}\r`); - - // 5. Prepend page title and layout variables at the top of rules - if (path.dirname(filename).includes("rules")) { - - // Find out if the rule requires a special docs portion (e.g. if it is recommended and/or fixable) - const rule = rules.get(ruleName); - const isRecommended = rule && rule.meta.docs.recommended; - const isFixable = rule && rule.meta.fixable; - const hasSuggestions = rule && rule.meta.hasSuggestions; + echo(`> Updating rule version meta data (Step 1: ${i + 1}/${ruleDocsFiles.length}): ${filename}`); - text = text.replace("", isFixable ? FIXABLE_TEXT : "") - .replace("", hasSuggestions ? HAS_SUGGESTIONS_TEXT : "") - .replace("", isRecommended ? RECOMMENDED_TEXT : ""); + const baseName = path.basename(filename, ".md"), + sourceBaseName = `${baseName}.js`, + sourcePath = path.join("lib/rules", sourceBaseName); + if (!versions.added[baseName]) { + versions.added[baseName] = getFirstVersionOfFile(sourcePath); } - // 6. Remove .md extension for relative links and change README to empty string - text = text.replace(/\((?!https?:\/\/)([^)]*?)\.md(.*?)\)/gu, "($1$2)").replace("README.html", ""); - - // 7. Check if there's a trailing white line at the end of the file, if there isn't one, add it - if (!/\n$/u.test(text)) { - text = `${text}\n`; - } - - // 8. Append first version of ESLint rule was added at. - if (filename.includes("rules/")) { - if (!versions.added[baseName]) { - versions.added[baseName] = getFirstVersionOfFile(sourcePath); - } - const added = versions.added[baseName]; - - if (!versions.removed[baseName] && !test("-f", sourcePath)) { - versions.removed[baseName] = getFirstVersionOfDeletion(sourcePath); - } - const removed = versions.removed[baseName]; - - text += "\n## Version\n\n"; - text += removed - ? `This rule was introduced in ESLint ${added} and removed in ${removed}.\n` - : `This rule was introduced in ESLint ${added}.\n`; - - text += "\n## Resources\n\n"; - if (!removed) { - text += `* [Rule source](${rulesUrl}${sourceBaseName})\n`; - text += `* [Test source](${testsUrl}${sourceBaseName})\n`; - } - text += `* [Documentation source](${docsUrl}${baseName})\n`; + if (!versions.removed[baseName] && !test("-f", sourcePath)) { + versions.removed[baseName] = getFirstVersionOfDeletion(sourcePath); } - // 9. Update content of the file with changes - text.to(filename.replace("README.md", "index.md")); } }); - JSON.stringify(versions).to("./versions.json"); - echo(`> Updating files (Steps 4-9)${" ".repeat(50)}`); - - // 10. Copy temporary directory to site's docs folder - echo("> Copying the temporary directory into the site's docs folder (Step 10)"); - let outputDir = DOCS_DIR; - - if (prereleaseVersion) { - outputDir += `/${prereleaseVersion}`; - if (!test("-d", outputDir)) { - mkdir(outputDir); - } - } - cp("-rf", `${TEMP_DIR}*`, outputDir); - // 11. Generate rules index page - if (prereleaseVersion) { - echo("> Skipping generating rules index page because this is a prerelease (Step 11)"); - } else { - echo("> Generating the rules index page (Step 11)"); - generateRuleIndexPage(); - } + JSON.stringify(versions, null, 4).to(RULE_VERSIONS_FILE); - // 12. Delete temporary directory - echo("> Removing the temporary directory (Step 12)"); - rm("-rf", TEMP_DIR); + // 2. Generate rules index page meta data + echo("> Generating the rules index page (Step 2)"); + generateRuleIndexPage(); - // 13. Create Example Formatter Output Page - echo("> Creating the formatter examples (Step 14)"); - generateFormatterExamples(getFormatterResults(), prereleaseVersion); + // 3. Create Example Formatter Output Page + echo("> Creating the formatter examples (Step 3)"); + generateFormatterExamples(getFormatterResults()); - echo("Done generating eslint.org"); + echo("Done generating documentation"); }; +target.generateRuleIndexPage = generateRuleIndexPage; + target.webpack = function(mode = "none") { exec(`${getBinFile("webpack")} --mode=${mode} --output-path=${BUILD_DIR}`); }; diff --git a/README.md b/README.md index c21b6eaa7ac..309db3dc849 100644 --- a/README.md +++ b/README.md @@ -45,21 +45,15 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J Prerequisites: [Node.js](https://nodejs.org/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) -You can install ESLint using npm: +You can install and configure ESLint using this command: -```sh -npm install eslint --save-dev -``` - -You should then set up a configuration file: - -```sh +```shell npm init @eslint/config ``` After that, you can run ESLint on any file or directory like this: -```sh +```shell ./node_modules/.bin/eslint yourfile.js ``` @@ -261,11 +255,6 @@ Brett Zamir Bryan Mishkin - -
-Toru Nagashima -
-
Sara Soueidan @@ -297,9 +286,9 @@ The following companies, organizations, and individuals support ESLint's ongoing

Platinum Sponsors

Automattic

Gold Sponsors

-

Salesforce Airbnb American Express Substack

Silver Sponsors

+

Salesforce Airbnb American Express

Silver Sponsors

Liftoff

Bronze Sponsors

-

launchdarkly Nx (by Nrwl) Anagram Solver VPS Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Ignition

+

launchdarkly Nx (by Nrwl) Anagram Solver VPS Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Ignition HeroCoders

## Technology Sponsors diff --git a/bin/eslint.js b/bin/eslint.js index d00a870c089..0f76fc92e1f 100755 --- a/bin/eslint.js +++ b/bin/eslint.js @@ -69,7 +69,7 @@ function getErrorMessage(error) { // Lazy loading because this is used only if an error happened. const util = require("util"); - // Foolproof -- thirdparty module might throw non-object. + // Foolproof -- third-party module might throw non-object. if (typeof error !== "object" || error === null) { return String(error); } diff --git a/docs/.eleventy.js b/docs/.eleventy.js index b9e27c8fd7b..b3e302646c2 100644 --- a/docs/.eleventy.js +++ b/docs/.eleventy.js @@ -1,141 +1,242 @@ +"use strict"; + const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); const pluginRss = require("@11ty/eleventy-plugin-rss"); -const pluginTOC = require('eleventy-plugin-nesting-toc'); -const slugify = require("slugify"); -const markdownIt = require("markdown-it"); -const markdownItAnchor = require('markdown-it-anchor'); +const pluginTOC = require("eleventy-plugin-nesting-toc"); +const markdownItAnchor = require("markdown-it-anchor"); +const markdownItContainer = require("markdown-it-container"); const Image = require("@11ty/eleventy-img"); -const metascraper = require('metascraper')([ - require('metascraper-image')(), - require('metascraper-logo')(), - require('metascraper-logo-favicon')(), - require('metascraper-publisher')(), - require('metascraper-title')(), - require('metascraper-description')(), - require('metascraper-url')() -]); -const got = require('got'); -const path = require('path'); +const path = require("path"); +const { slug } = require("github-slugger"); +const yaml = require("js-yaml"); const { DateTime } = require("luxon"); module.exports = function(eleventyConfig) { - let now = new Date(); - /***************************************************************************************** - * Filters - * ***************************************************************************************/ - eleventyConfig.addFilter("limitTo", function(arr, limit) { - return arr.slice(0, limit); - }); + /* + * The docs stored in the eslint repo are loaded through eslint.org at + * at /docs/head to show the most recent version of the documentation + * based on the HEAD commit. This gives users a preview of what's coming + * in the next release. This is the way that the site works locally so + * it's easier to see if URLs are broken. + * + * When a release is published, HEAD is pushed to the "latest" branch. + * Netlify deploys that branch as well, and in that case, we want the + * docs to be loaded from /docs/latest on eslint.org. + * + * The path prefix is turned off for deploy previews so we can properly + * see changes before deployed. + */ + + let pathPrefix = "/docs/head/"; + + if (process.env.CONTEXT === "deploy-preview") { + pathPrefix = "/"; + } else if (process.env.BRANCH === "latest") { + pathPrefix = "/docs/latest/"; + } - eleventyConfig.addFilter('jsonify', function(variable) { - return JSON.stringify(variable); - }); + //------------------------------------------------------------------------------ + // Data + //------------------------------------------------------------------------------ + + // Load site-specific data + const siteName = process.env.ESLINT_SITE_NAME || "en"; + + eleventyConfig.addGlobalData("site_name", siteName); + eleventyConfig.addGlobalData("GIT_BRANCH", process.env.BRANCH); + eleventyConfig.addGlobalData("NOINDEX", process.env.BRANCH !== "latest"); + eleventyConfig.addDataExtension("yml", contents => yaml.load(contents)); + + //------------------------------------------------------------------------------ + // Filters + //------------------------------------------------------------------------------ + + eleventyConfig.addFilter("limitTo", (arr, limit) => arr.slice(0, limit)); + + eleventyConfig.addFilter("jsonify", variable => JSON.stringify(variable)); - eleventyConfig.addFilter('slugify', function(str) { + /** + * Takes in a string and converts to a slug + * @param {string} text text to be converted into slug + * @returns {string} slug to be used as anchors + */ + function slugify(text) { + return slug(text.replace(/[<>()[\]{}]/gu, "")) + // eslint-disable-next-line no-control-regex -- used regex from https://github.com/eslint/archive-website/blob/master/_11ty/plugins/markdown-plugins.js#L37 + .replace(/[^\u{00}-\u{FF}]/gu, ""); + } + + eleventyConfig.addFilter("slugify", str => { if (!str) { - return; + return ""; } - return slugify(str, { - lower: true, - strict: true, - remove: /["]/g, - }); + return slugify(str); }); - eleventyConfig.addFilter('URIencode', function(str) { + eleventyConfig.addFilter("URIencode", str => { if (!str) { - return; + return ""; } return encodeURI(str); }); /* order collection by the order specified in the front matter */ - eleventyConfig.addFilter("sortByPageOrder", function(values) { - return values.slice().sort((a, b) => a.data.order - b.data.order); - }); + eleventyConfig.addFilter("sortByPageOrder", values => values.slice().sort((a, b) => a.data.order - b.data.order)); - eleventyConfig.addFilter("readableDate", (dateObj) => { - //turn it into a JS Date string - date = new Date(dateObj); - //pass it to luxon for formatting - return DateTime.fromJSDate(date).toFormat('dd MMM, yyyy'); - }); + eleventyConfig.addFilter("readableDate", dateObj => { - eleventyConfig.addFilter("blogPermalinkDate", (dateObj) => { - //turn it into a JS Date string - date = new Date(dateObj); - //pass it to luxon for formatting - return DateTime.fromJSDate(dateObj).toFormat('yyyy/MM'); - }); + // turn it into a JS Date string + const date = new Date(dateObj); - eleventyConfig.addFilter("readableDateFromISO", (ISODate) => { - return DateTime.fromISO(ISODate).toUTC().toLocaleString(DateTime.DATE_FULL); + // pass it to luxon for formatting + return DateTime.fromJSDate(date).toFormat("dd MMM, yyyy"); }); - eleventyConfig.addFilter('dollars', value => { - return new Intl.NumberFormat("en-US", { - style: "currency", - currency: "USD" - }).format(value); + eleventyConfig.addFilter("blogPermalinkDate", dateObj => { + + // turn it into a JS Date string + const date = new Date(dateObj); + + // pass it to luxon for formatting + return DateTime.fromJSDate(date).toFormat("yyyy/MM"); }); - // parse markdown from includes, used for author bios - // Source: https://github.com/11ty/eleventy/issues/658 - eleventyConfig.addFilter('markdown', function(value) { - let markdown = require('markdown-it')({ + eleventyConfig.addFilter("readableDateFromISO", ISODate => DateTime.fromISO(ISODate).toUTC().toLocaleString(DateTime.DATE_FULL)); + + eleventyConfig.addFilter("dollars", value => new Intl.NumberFormat("en-US", { + style: "currency", + currency: "USD" + }).format(value)); + + /* + * parse markdown from includes, used for author bios + * Source: https://github.com/11ty/eleventy/issues/658 + */ + eleventyConfig.addFilter("markdown", value => { + const markdown = require("markdown-it")({ html: true }); + return markdown.render(value); }); - /***************************************************************************************** - * Plugins - * ***************************************************************************************/ + /* + * Removes `.html` suffix from the given url. + * `page.url` will include the `.html` suffix for all documents + * except for those written as `index.html` (their `page.url` ends with a `/`). + */ + eleventyConfig.addFilter("prettyURL", url => { + if (url.endsWith(".html")) { + return url.slice(0, -".html".length); + } + + return url; + }); + + //------------------------------------------------------------------------------ + // Plugins + //------------------------------------------------------------------------------ + eleventyConfig.addPlugin(eleventyNavigationPlugin); eleventyConfig.addPlugin(syntaxHighlight, { - alwaysWrapLineHighlights: true, + alwaysWrapLineHighlights: true }); eleventyConfig.addPlugin(pluginRss); eleventyConfig.addPlugin(pluginTOC, { - tags: ['h2', 'h3', 'h4'], - wrapper: 'nav', // Element to put around the root `ol` - wrapperClass: 'c-toc', // Class for the element around the root `ol` - headingText: '', // Optional text to show in heading above the wrapper element - headingTag: 'h2' // Heading tag when showing heading above the wrapper element + tags: ["h2", "h3", "h4"], + wrapper: "nav", // Element to put around the root `ol` + wrapperClass: "c-toc", // Class for the element around the root `ol` + headingText: "", // Optional text to show in heading above the wrapper element + headingTag: "h2" // Heading tag when showing heading above the wrapper element }); - // add IDs to the headers - const markdownIt = require('markdown-it'); + + /** @typedef {import("markdown-it/lib/token")} MarkdownItToken A MarkdownIt token. */ + + /** + * Generates HTML markup for an inline alert. + * @param {"warning"|"tip"|"important"} type The type of alert to create. + * @param {Array} tokens Array of MarkdownIt tokens to use. + * @param {number} index The index of the current token in the tokens array. + * @returns {string} The markup for the alert. + */ + function generateAlertMarkup(type, tokens, index) { + if (tokens[index].nesting === 1) { + return ` + + `.trim(); + } + + const markdownIt = require("markdown-it"); + eleventyConfig.setLibrary("md", - markdownIt({ - html: true, - linkify: true, - typographer: true, - - }).use(markdownItAnchor, {}).disable('code') - ); - - /********************************************************************** - * Shortcodes - * ********************************************************************/ - eleventyConfig.addNunjucksAsyncShortcode("link", async function(link) { - const { body: html, url } = await got(link); - const metadata = await metascraper({ html, url }); - const the_url = (new URL(link)); // same as url - const domain = the_url.hostname; + markdownIt({ html: true, linkify: true, typographer: true }) + .use(markdownItAnchor, { + slugify + }) + .use(markdownItContainer, "correct", {}) + .use(markdownItContainer, "incorrect", {}) + .use(markdownItContainer, "warning", { + render(tokens, idx) { + return generateAlertMarkup("warning", tokens, idx); + } + }) + .use(markdownItContainer, "tip", { + render(tokens, idx) { + return generateAlertMarkup("tip", tokens, idx); + } + }) + .use(markdownItContainer, "important", { + render(tokens, idx) { + return generateAlertMarkup("important", tokens, idx); + } + }) + .disable("code")); + + //------------------------------------------------------------------------------ + // Shortcodes + //------------------------------------------------------------------------------ + + eleventyConfig.addNunjucksShortcode("link", function(url) { + + // eslint-disable-next-line no-invalid-this -- Eleventy API + const urlData = this.ctx.further_reading_links[url]; + + if (!urlData) { + throw new Error(`Data missing for ${url}`); + } + + const { + domain, + title, + logo + } = urlData; return `
- Avatar image for ${domain} + Avatar image for ${domain}
@@ -144,51 +245,46 @@ module.exports = function(eleventyConfig) {
`; }); - eleventyConfig.addShortcode("fixable", function() { - return ` + eleventyConfig.addShortcode("fixable", () => `
🛠 Fixable

if some problems reported by the rule are automatically fixable by the --fix command line option

-
`; - }); + `); - eleventyConfig.addShortcode("recommended", function() { - return ` + eleventyConfig.addShortcode("recommended", () => `
Recommended

if the "extends": "eslint:recommended" property in a configuration file enables the rule.

-
`; - }); + `); - eleventyConfig.addShortcode("hasSuggestions", function() { - return ` + eleventyConfig.addShortcode("hasSuggestions", () => `
💡 hasSuggestions

if some problems reported by the rule are manually fixable by editor suggestions

-
`; - }); + `); - eleventyConfig.addShortcode("related_rules", function(arr) { - let rules = arr, - items = ""; + eleventyConfig.addShortcode("related_rules", arr => { + const rules = arr; + let items = ""; - rules.forEach(function(rule) { - let list_item = ``; - items += list_item; - }) + + items += listItem; + }); return ` `; }); - eleventyConfig.addShortcode("important", function(text, url) { - return ` + eleventyConfig.addShortcode("important", (text, url) => `
${text}
Learn more
- `; - }); + `); - eleventyConfig.addShortcode("warning", function(text, url) { - return ` + eleventyConfig.addShortcode("warning", (text, url) => `
${text}
Learn more
- `; - }); + `); - eleventyConfig.addShortcode("tip", function(text, url) { - return ` + eleventyConfig.addShortcode("tip", (text, url) => `
${text}
Learn more
- `; - }); + `); eleventyConfig.addWatchTarget("./src/assets/"); - - - /***************************************************************************************** - * File PassThroughs - * ***************************************************************************************/ + //------------------------------------------------------------------------------ + // File PassThroughs + //------------------------------------------------------------------------------ eleventyConfig.addPassthroughCopy({ "./src/static": "/" }); - eleventyConfig.addPassthroughCopy('./src/assets/'); + eleventyConfig.addPassthroughCopy("./src/assets/"); eleventyConfig.addPassthroughCopy({ - './src/content/**/*.png': "/assets/images" + "./src/content/**/*.png": "/assets/images" }); eleventyConfig.addPassthroughCopy({ - './src/content/**/*.jpg': "/assets/images" + "./src/content/**/*.jpg": "/assets/images" }); eleventyConfig.addPassthroughCopy({ - './src/content/**/*.jpeg': "/assets/images" + "./src/content/**/*.jpeg": "/assets/images" }); eleventyConfig.addPassthroughCopy({ - './src/content/**/*.svg': "/assets/images" + "./src/content/**/*.svg": "/assets/images" }); eleventyConfig.addPassthroughCopy({ - './src/content/**/*.mp4': "/assets/videos" + "./src/content/**/*.mp4": "/assets/videos" }); eleventyConfig.addPassthroughCopy({ - './src/content/**/*.pdf': "/assets/documents" + "./src/content/**/*.pdf": "/assets/documents" }); eleventyConfig.addPassthroughCopy({ - './node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js': "/assets/js/algoliasearch.js" + "./node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js": "/assets/js/algoliasearch.js" }); - /***************************************************************************************** - * Collections - * ***************************************************************************************/ + //------------------------------------------------------------------------------ + // Collections + //------------------------------------------------------------------------------ - eleventyConfig.addCollection("docs", function(collection) { - return collection.getFilteredByGlob("./src/**/**/*.md"); - }); + eleventyConfig.addCollection("docs", collection => collection.getFilteredByGlob("./src/**/**/*.md")); - eleventyConfig.addCollection("library", function(collection) { - return collection.getFilteredByGlob("./src/library/**/*.md"); - }); + eleventyConfig.addCollection("library", collection => collection.getFilteredByGlob("./src/library/**/*.md")); - // START, eleventy-img - function imageShortcode(src, alt, cls, sizes = "(max-width: 768px) 100vw, 50vw") { - const source = src; - // console.log(`Generating image(s) from: ${src}`) - let options = { + // START, eleventy-img (https://www.11ty.dev/docs/plugins/image/) + /* eslint-disable-next-line jsdoc/require-jsdoc + -- + This shortcode is currently unused. If we are going to use it, add JSDoc + and describe what exactly is this doing. + */ + function imageShortcode(source, alt, cls, sizes = "(max-width: 768px) 100vw, 50vw") { + const options = { widths: [600, 900, 1500], formats: ["webp", "jpeg"], urlPath: "/assets/images/", outputDir: "./_site/assets/images/", - filenameFormat: function(id, src, width, format, options) { - const extension = path.extname(src) - const name = path.basename(src, extension) - return `${name}-${width}w.${format}` + filenameFormat(id, src, width, format) { + const extension = path.extname(src); + const name = path.basename(src, extension); + + return `${name}-${width}w.${format}`; } - } + }; + /** + * Resolves source + * @returns {string} URL or a local file path + */ function getSRC() { - if (source.indexOf("http://") == 0 || source.indexOf("https://") == 0) { + if (source.startsWith("http://") || source.startsWith("https://")) { return source; - } else { - // for convenience, you only need to use the image's name in the shortcode, - // and this will handle appending the full path to it - src = path.join('./src/assets/images/', source); - return src; } + + /* + * for convenience, you only need to use the image's name in the shortcode, + * and this will handle appending the full path to it + */ + return path.join("./src/assets/images/", source); } - var fullSrc = getSRC(); + const fullSrc = getSRC(); + + // generate images - Image(fullSrc, options) + Image(fullSrc, options); // eslint-disable-line new-cap -- `Image` is a function - let imageAttributes = { + const imageAttributes = { alt, class: cls, sizes, loading: "lazy", - decoding: "async", - } + decoding: "async" + }; + // get metadata - metadata = Image.statsSync(fullSrc, options) - return Image.generateHTML(metadata, imageAttributes) + const metadata = Image.statsSync(fullSrc, options); + + return Image.generateHTML(metadata, imageAttributes); } - eleventyConfig.addShortcode("image", imageShortcode) + eleventyConfig.addShortcode("image", imageShortcode); + // END, eleventy-img + //------------------------------------------------------------------------------ + // 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). + * In particular, we don't want to deploy https://eslint.org/docs/head/sitemap.xml + * We want to generate the sitemap for: + * - Local previews + * - Netlify deploy previews + * - Netlify production deploy of the `latest` branch (https://eslint.org/docs/latest/sitemap.xml) + * + * Netlify always sets `CONTEXT` environment variable. If it isn't set, we assume this is a local build. + */ + if ( + process.env.CONTEXT && // if this is a build on Netlify ... + process.env.CONTEXT !== "deploy-preview" && // ... and not for a deploy preview ... + process.env.BRANCH !== "latest" // .. and not of the `latest` branch ... + ) { + eleventyConfig.ignores.add("src/static/sitemap.njk"); // ... then don't generate the sitemap. + } + return { passthroughFileCopy: true, - markdownTemplateEngine: 'njk', - dataTemplateEngine: 'njk', - htmlTemplateEngine: 'njk', + pathPrefix, + + markdownTemplateEngine: "njk", + dataTemplateEngine: "njk", + htmlTemplateEngine: "njk", dir: { input: "src", diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000000..ee5f64e100e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,27 @@ +# ESLint Documentation + +## Run Locally + +```shell +npm start +``` + +## Scripts + +To update the links data file, run this from the root folder (not the `docs` folder): + +```shell +npm run docs:update-links +``` + +To lint JS files, run this from the root folder (not the `docs` folder): + +```shell +npm run lint:docsjs +``` + +To autofix JS files, run this from the root folder (not the `docs` folder): + +```shell +npm run fix:docsjs +``` diff --git a/docs/package.json b/docs/package.json index da93197437c..558d41f97a9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,19 +1,21 @@ { - "name": "foundation", + "name": "docs-eslint", + "private": true, "version": "1.0.0", "description": "", "main": "index.js", "keywords": [], "author": "", "license": "ISC", + "files": [], "scripts": { "images": "imagemin '_site/assets/images' --out-dir='_site/assets/images'", - "watch:sass": "node-sass --watch src/assets/scss -o src/assets/css", + "watch:sass": "sass --watch --poll src/assets/scss:src/assets/css", "watch:eleventy": "eleventy --serve --port=2023", - "build:sass": "node-sass src/assets/scss -o src/assets/css", + "build:sass": "sass --style=compressed src/assets/scss:src/assets/css --no-source-map", "build:eleventy": "npx @11ty/eleventy", - "start": "npm-run-all build:sass --parallel watch:* --parallel images", - "build": "npm-run-all build:sass --parallel build:* --parallel images" + "start": "npm-run-all build:sass --parallel watch:*", + "build": "npm-run-all build:sass build:eleventy images" }, "devDependencies": { "@11ty/eleventy": "^1.0.1", @@ -21,30 +23,26 @@ "@11ty/eleventy-navigation": "^0.3.2", "@11ty/eleventy-plugin-rss": "^1.1.1", "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.2", + "@types/markdown-it": "^12.2.3", "algoliasearch": "^4.12.1", "dom-parser": "^0.1.6", "eleventy-plugin-nesting-toc": "^1.3.0", "eleventy-plugin-page-assets": "^0.3.0", "eleventy-plugin-reading-time": "^0.0.1", + "github-slugger": "^1.4.0", "imagemin": "^8.0.1", "imagemin-cli": "^7.0.0", + "js-yaml": "^3.14.1", + "luxon": "^2.4.0", "markdown-it": "^12.2.0", "markdown-it-anchor": "^8.1.2", - "node-sass": "^6.0.1", + "markdown-it-container": "^3.0.0", + "netlify-cli": "^10.3.1", "npm-run-all": "^4.1.5", "rimraf": "^3.0.2", - "sass": "^1.38.0", - "slugify": "^1.6.3" + "sass": "^1.52.1" }, - "dependencies": { - "got": "^11.8.3", - "metascraper": "^5.25.7", - "metascraper-description": "^5.25.7", - "metascraper-image": "^5.25.7", - "metascraper-logo": "^5.25.7", - "metascraper-logo-favicon": "^5.25.7", - "metascraper-publisher": "^5.25.7", - "metascraper-title": "^5.25.7", - "metascraper-url": "^5.25.7" + "engines": { + "node": ">=14.0.0" } } diff --git a/docs/src/_data/further_reading_links.json b/docs/src/_data/further_reading_links.json new file mode 100644 index 00000000000..dc81f7f1640 --- /dev/null +++ b/docs/src/_data/further_reading_links.json @@ -0,0 +1,702 @@ +{ + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "setter - JavaScript | MDN", + "description": "The set syntax binds an object property to a function to be called when there is an attempt to set that property." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "getter - JavaScript | MDN", + "description": "The get syntax binds an object property to a function that will be called when that property is looked up." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Working with objects - JavaScript | MDN", + "description": "JavaScript is designed on a simple object-based paradigm. An object is a collection of properties, and a property is an association between a name (or key) and a value. A property’s value can be a function, in which case the property is known as a method. In addition to objects that are predefined i…" + }, + "https://github.com/airbnb/javascript#arrows--one-arg-parens": { + "domain": "github.com", + "url": "https://github.com/airbnb/javascript#arrows--one-arg-parens", + "logo": "https://github.com/fluidicon.png", + "title": "GitHub - airbnb/javascript: JavaScript Style Guide", + "description": "JavaScript Style Guide. Contribute to airbnb/javascript development by creating an account on GitHub." + }, + "https://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html": { + "domain": "www.adequatelygood.com", + "url": "https://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html", + "logo": "https://www.adequatelygood.com/favicon.ico", + "title": "JavaScript Scoping and Hoisting", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var#var_hoisting": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var#var_hoisting", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "var - JavaScript | MDN", + "description": "The var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value." + }, + "https://en.wikipedia.org/wiki/Indent_style": { + "domain": "en.wikipedia.org", + "url": "https://en.wikipedia.org/wiki/Indent_style", + "logo": "https://en.wikipedia.org/static/apple-touch/wikipedia.png", + "title": "Indentation style - Wikipedia", + "description": null + }, + "https://github.com/maxogden/art-of-node#callbacks": { + "domain": "github.com", + "url": "https://github.com/maxogden/art-of-node#callbacks", + "logo": "https://github.com/fluidicon.png", + "title": "GitHub - maxogden/art-of-node: a short introduction to node.js", + "description": ":snowflake: a short introduction to node.js. Contribute to maxogden/art-of-node development by creating an account on GitHub." + }, + "https://web.archive.org/web/20171224042620/https://docs.nodejitsu.com/articles/errors/what-are-the-error-conventions/": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20171224042620/https://docs.nodejitsu.com/articles/errors/what-are-the-error-conventions/", + "logo": "https://archive.org/favicon.ico", + "title": "What are the error conventions? - docs.nodejitsu.com", + "description": "docs.nodejitsu.com is a growing collection of how-to articles for node.js, written by the community and curated by Nodejitsu and friends. These articles range from basic to advanced, and provide relevant code samples and insights into the design and philosophy of node itself." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Classes - JavaScript | MDN", + "description": "Classes are a template for creating objects. They encapsulate data with code to work on that data. Classes in JS are built on prototypes but also have some syntax and semantics that are not shared with ES5 class-like semantics." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "static - JavaScript | MDN", + "description": "The static keyword defines a static method or property for a class, or a class static initialization block (see the link for more information about this usage). Neither static methods nor static properties can be called on instances of the class. Instead, they’re called on the class itself." + }, + "https://www.crockford.com/code.html": { + "domain": "www.crockford.com", + "url": "https://www.crockford.com/code.html", + "logo": "https://www.crockford.com/favicon.png", + "title": "Code Conventions for the JavaScript Programming Language", + "description": null + }, + "https://dojotoolkit.org/reference-guide/1.9/developer/styleguide.html": { + "domain": "dojotoolkit.org", + "url": "https://dojotoolkit.org/reference-guide/1.9/developer/styleguide.html", + "logo": "https://dojotoolkit.org/images/favicons/apple-touch-icon-152x152.png", + "title": "Dojo Style Guide — The Dojo Toolkit - Reference Guide", + "description": null + }, + "https://gist.github.com/isaacs/357981": { + "domain": "gist.github.com", + "url": "https://gist.github.com/isaacs/357981", + "logo": "https://gist.github.com/fluidicon.png", + "title": "A better coding convention for lists and object literals in JavaScript", + "description": "A better coding convention for lists and object literals in JavaScript - comma-first-var.js" + }, + "https://en.wikipedia.org/wiki/Cyclomatic_complexity": { + "domain": "en.wikipedia.org", + "url": "https://en.wikipedia.org/wiki/Cyclomatic_complexity", + "logo": "https://en.wikipedia.org/static/apple-touch/wikipedia.png", + "title": "Cyclomatic complexity - Wikipedia", + "description": null + }, + "https://ariya.io/2012/12/complexity-analysis-of-javascript-code": { + "domain": "ariya.io", + "url": "https://ariya.io/2012/12/complexity-analysis-of-javascript-code", + "logo": "https://ariya.io/favicon.ico", + "title": "Complexity Analysis of JavaScript Code", + "description": "Nobody likes to read complex code, especially if it’s someone’s else code. A preventive approach to block any complex code entering the application is by watching its complexity carefully." + }, + "https://craftsmanshipforsoftware.com/2015/05/25/complexity-for-javascript/": { + "domain": "craftsmanshipforsoftware.com", + "url": "https://craftsmanshipforsoftware.com/2015/05/25/complexity-for-javascript/", + "logo": "https://s0.wp.com/i/webclip.png", + "title": "Complexity for JavaScript", + "description": "The control of complexity control presents the core problem of software development. The huge variety of decisions a developer faces on a day-to-day basis cry for methods of controlling and contain…" + }, + "https://web.archive.org/web/20160808115119/http://jscomplexity.org/complexity": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20160808115119/http://jscomplexity.org/complexity", + "logo": "https://archive.org/favicon.ico", + "title": "About complexity | JSComplexity.org", + "description": "A discussion of software complexity metrics and how they are calculated." + }, + "https://github.com/eslint/eslint/issues/4808#issuecomment-167795140": { + "domain": "github.com", + "url": "https://github.com/eslint/eslint/issues/4808#issuecomment-167795140", + "logo": "https://github.com/fluidicon.png", + "title": "Complexity has no default · Issue #4808 · eslint/eslint", + "description": "Enabling the complexity rule with only a severity has no effect. We have tried to give sane defaults to all rules, and I think this should be no exception. I don't know what a good number would..." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "switch - JavaScript | MDN", + "description": "The switch statement evaluates an expression, matching the expression’s value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case." + }, + "https://web.archive.org/web/20201112040809/http://markdaggett.com/blog/2013/02/15/functions-explained/": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20201112040809/http://markdaggett.com/blog/2013/02/15/functions-explained/", + "logo": "https://web.archive.org/web/20201112040809im_/http://markdaggett.com/favicon.ico", + "title": "Functions Explained - Mark Daggett’s Blog", + "description": "A Deep Dive into JavaScript Functions\nBased on my readership I have to assume most of you are familiar with JavaScript already. Therefore, it may …" + }, + "https://2ality.com/2015/09/function-names-es6.html": { + "domain": "2ality.com", + "url": "https://2ality.com/2015/09/function-names-es6.html", + "logo": "https://2ality.com/img/favicon.png", + "title": "The names of functions in ES6", + "description": null + }, + "https://leanpub.com/understandinges6/read/#leanpub-auto-generators": { + "domain": "leanpub.com", + "url": "https://leanpub.com/understandinges6/read/#leanpub-auto-generators", + "logo": "https://leanpub.com/understandinges6/read/favicons/mstile-310x310.png", + "title": "Read Understanding ECMAScript 6 | Leanpub", + "description": null + }, + "https://leanpub.com/understandinges6/read/#leanpub-auto-accessor-properties": { + "domain": "leanpub.com", + "url": "https://leanpub.com/understandinges6/read/#leanpub-auto-accessor-properties", + "logo": "https://leanpub.com/understandinges6/read/favicons/mstile-310x310.png", + "title": "Read Understanding ECMAScript 6 | Leanpub", + "description": null + }, + "https://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/": { + "domain": "javascriptweblog.wordpress.com", + "url": "https://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/", + "logo": "https://s1.wp.com/i/favicon.ico", + "title": "Exploring JavaScript for-in loops", + "description": "The for-in loop is the only cross-browser technique for iterating the properties of generic objects. There’s a bunch of literature about the dangers of using for-in to iterate arrays and when…" + }, + "https://2ality.com/2012/01/objects-as-maps.html": { + "domain": "2ality.com", + "url": "https://2ality.com/2012/01/objects-as-maps.html", + "logo": "https://2ality.com/img/favicon.png", + "title": "The pitfalls of using objects as maps in JavaScript", + "description": null + }, + "https://web.archive.org/web/20160725154648/http://www.mind2b.com/component/content/article/24-software-module-size-and-file-size": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20160725154648/http://www.mind2b.com/component/content/article/24-software-module-size-and-file-size", + "logo": "https://archive.org/favicon.ico", + "title": "Software Module size and file size", + "description": null + }, + "http://book.mixu.net/node/ch7.html": { + "domain": "book.mixu.net", + "url": "http://book.mixu.net/node/ch7.html", + "logo": null, + "title": "7. Control flow - Mixu’s Node book", + "description": null + }, + "https://web.archive.org/web/20220104141150/https://howtonode.org/control-flow": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20220104141150/https://howtonode.org/control-flow", + "logo": "https://web.archive.org/web/20220104141150im_/https://howtonode.org/favicon.ico", + "title": "Control Flow in Node - How To Node - NodeJS", + "description": "Learn the zen of coding in NodeJS." + }, + "https://web.archive.org/web/20220127215850/https://howtonode.org/control-flow-part-ii": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20220127215850/https://howtonode.org/control-flow-part-ii", + "logo": "https://web.archive.org/web/20220127215850im_/https://howtonode.org/favicon.ico", + "title": "Control Flow in Node Part II - How To Node - NodeJS", + "description": "Learn the zen of coding in NodeJS." + }, + "https://nodejs.org/api/buffer.html": { + "domain": "nodejs.org", + "url": "https://nodejs.org/api/buffer.html", + "logo": "https://nodejs.org/favicon.ico", + "title": "Buffer | Node.js v18.2.0 Documentation", + "description": null + }, + "https://github.com/ChALkeR/notes/blob/master/Lets-fix-Buffer-API.md": { + "domain": "github.com", + "url": "https://github.com/ChALkeR/notes/blob/master/Lets-fix-Buffer-API.md", + "logo": "https://github.com/fluidicon.png", + "title": "notes/Lets-fix-Buffer-API.md at master · ChALkeR/notes", + "description": "Some public notes. Contribute to ChALkeR/notes development by creating an account on GitHub." + }, + "https://github.com/nodejs/node/issues/4660": { + "domain": "github.com", + "url": "https://github.com/nodejs/node/issues/4660", + "logo": "https://github.com/fluidicon.png", + "title": "Buffer(number) is unsafe · Issue #4660 · nodejs/node", + "description": "tl;dr This issue proposes: Change new Buffer(number) to return safe, zeroed-out memory Create a new API for creating uninitialized Buffers, Buffer.alloc(number) Update: Jan 15, 2016 Upon further co..." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "debugger - JavaScript | MDN", + "description": "The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect." + }, + "https://ericlippert.com/2003/11/01/eval-is-evil-part-one/": { + "domain": "ericlippert.com", + "url": "https://ericlippert.com/2003/11/01/eval-is-evil-part-one/", + "logo": "https://s1.wp.com/i/favicon.ico", + "title": "Eval is evil, part one", + "description": "The eval method — which takes a string containing JScript code, compiles it and runs it — is probably the most powerful and most misused method in JScript. There are a few scenarios in …" + }, + "https://javascriptweblog.wordpress.com/2010/04/19/how-evil-is-eval/": { + "domain": "javascriptweblog.wordpress.com", + "url": "https://javascriptweblog.wordpress.com/2010/04/19/how-evil-is-eval/", + "logo": "https://s1.wp.com/i/favicon.ico", + "title": "How evil is eval?", + "description": "“eval is Evil: The eval function is the most misused feature of JavaScript. Avoid it” Douglas Crockford in JavaScript: The Good Parts I like The Good Parts. It’s essential reading…" + }, + "https://bocoup.com/blog/the-catch-with-try-catch": { + "domain": "bocoup.com", + "url": "https://bocoup.com/blog/the-catch-with-try-catch", + "logo": "https://static3.bocoup.com/assets/2015/10/06163533/favicon.png", + "title": "The", + "description": "I’ve recently been working on an update to JavaScript Debug, which has me doing a lot of cross-browser testing, and I noticed a few “interesting quirks” with try…catch in Internet Explorer 6-8 that I couldn’t find documented anywhere." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Function.prototype.bind() - JavaScript | MDN", + "description": "The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called." + }, + "https://www.smashingmagazine.com/2014/01/understanding-javascript-function-prototype-bind/": { + "domain": "www.smashingmagazine.com", + "url": "https://www.smashingmagazine.com/2014/01/understanding-javascript-function-prototype-bind/", + "logo": "https://www.smashingmagazine.com/images/favicon/apple-touch-icon.png", + "title": "Understanding JavaScript Bind () — Smashing Magazine", + "description": "Function binding is probably your least concern when beginning with JavaScript, but when you realize that you need a solution to the problem of how to keep the context of “this” within another function, then you might not realize that what you actually need is Function.prototype.bind()." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Operator precedence - JavaScript | MDN", + "description": "Operator precedence determines how operators are parsed concerning each other. Operators with higher precedence become the operands of operators with lower precedence." + }, + "https://es5.github.io/#C": { + "domain": "es5.github.io", + "url": "https://es5.github.io/#C", + "logo": "https://es5.github.io/favicon.ico", + "title": "Annotated ES5", + "description": null + }, + "https://benalman.com/news/2010/11/immediately-invoked-function-expression/": { + "domain": "benalman.com", + "url": "https://benalman.com/news/2010/11/immediately-invoked-function-expression/", + "logo": "https://benalman.com/favicon.ico", + "title": "Ben Alman » Immediately-Invoked Function Expression (IIFE)", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Undeclared_var": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Undeclared_var", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "ReferenceError: assignment to undeclared variable “x” - JavaScript | MDN", + "description": "The JavaScript strict mode-only exception “Assignment to undeclared variable” occurs when the value has been assigned to an undeclared variable." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "let - JavaScript | MDN", + "description": "The let statement declares a block-scoped local variable, optionally initializing it to a value." + }, + "https://es5.github.io/#x7.8.5": { + "domain": "es5.github.io", + "url": "https://es5.github.io/#x7.8.5", + "logo": "https://es5.github.io/favicon.ico", + "title": "Annotated ES5", + "description": null + }, + "https://es5.github.io/#x7.2": { + "domain": "es5.github.io", + "url": "https://es5.github.io/#x7.2", + "logo": "https://es5.github.io/favicon.ico", + "title": "Annotated ES5", + "description": null + }, + "https://web.archive.org/web/20200414142829/http://timelessrepo.com/json-isnt-a-javascript-subset": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20200414142829/http://timelessrepo.com/json-isnt-a-javascript-subset", + "logo": "https://archive.org/favicon.ico", + "title": "JSON: The JavaScript subset that isn’t - Timeless", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Iterators and generators - JavaScript | MDN", + "description": "Iterators and Generators bring the concept of iteration directly into the core language and provide a mechanism for customizing the behavior of for...of loops." + }, + "https://kangax.github.io/es5-compat-table/es6/#Iterators": { + "domain": "kangax.github.io", + "url": "https://kangax.github.io/es5-compat-table/es6/#Iterators", + "logo": "https://github.io/favicon.ico", + "title": null, + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features#Object_methods": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features#Object_methods", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Deprecated and obsolete features - JavaScript | MDN", + "description": "This page lists features of JavaScript that are deprecated (that is, still available but planned for removal) and obsolete (that is, no longer usable)." + }, + "https://www.emacswiki.org/emacs/SmartTabs": { + "domain": "www.emacswiki.org", + "url": "https://www.emacswiki.org/emacs/SmartTabs", + "logo": "https://www.emacswiki.org/favicon.ico", + "title": "EmacsWiki: Smart Tabs", + "description": null + }, + "https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects": { + "domain": "www.ecma-international.org", + "url": "https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects", + "logo": "https://www.ecma-international.org/ecma-262/6.0/favicon.ico", + "title": "ECMAScript 2015 Language Specification – ECMA-262 6th Edition", + "description": null + }, + "https://www.inkling.com/read/javascript-definitive-guide-david-flanagan-6th/chapter-3/wrapper-objects": { + "domain": "www.inkling.com", + "url": "https://www.inkling.com/read/javascript-definitive-guide-david-flanagan-6th/chapter-3/wrapper-objects", + "logo": "https://inklingstatic.a.ssl.fastly.net/static_assets/20220214.223700z.8c5796a9.docker/images/favicon.ico", + "title": "Unsupported Browser", + "description": null + }, + "https://tc39.es/ecma262/#prod-annexB-NonOctalDecimalEscapeSequence": { + "domain": "tc39.es", + "url": "https://tc39.es/ecma262/#prod-annexB-NonOctalDecimalEscapeSequence", + "logo": "https://tc39.es/ecma262/img/favicon.ico", + "title": "ECMAScript® 2023 Language Specification", + "description": null + }, + "https://es5.github.io/#x15.8": { + "domain": "es5.github.io", + "url": "https://es5.github.io/#x15.8", + "logo": "https://es5.github.io/favicon.ico", + "title": "Annotated ES5", + "description": null + }, + "https://spin.atomicobject.com/2011/04/10/javascript-don-t-reassign-your-function-arguments/": { + "domain": "spin.atomicobject.com", + "url": "https://spin.atomicobject.com/2011/04/10/javascript-don-t-reassign-your-function-arguments/", + "logo": "https://spin.atomicobject.com/wp-content/themes/spin/images/favicon.ico", + "title": "JavaScript: Don’t Reassign Your Function Arguments", + "description": "The point of this post is to raise awareness that reassigning the value of an argument variable mutates the arguments object." + }, + "https://stackoverflow.com/questions/5869216/how-to-store-node-js-deployment-settings-configuration-files": { + "domain": "stackoverflow.com", + "url": "https://stackoverflow.com/questions/5869216/how-to-store-node-js-deployment-settings-configuration-files", + "logo": "https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a", + "title": "How to store Node.js deployment settings/configuration files?", + "description": "I have been working on a few Node apps, and I’ve been looking for a good pattern of storing deployment-related settings. In the Django world (where I come from), the common practise would be to hav..." + }, + "https://blog.benhall.me.uk/2012/02/storing-application-config-data-in/": { + "domain": "blog.benhall.me.uk", + "url": "https://blog.benhall.me.uk/2012/02/storing-application-config-data-in/", + "logo": null, + "title": "Storing Node.js application config data – Ben Hall’s Blog", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Promise - JavaScript | MDN", + "description": "The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value." + }, + "https://johnresig.com/blog/objectgetprototypeof/": { + "domain": "johnresig.com", + "url": "https://johnresig.com/blog/objectgetprototypeof/", + "logo": "https://johnresig.com/wp-content/uploads/2017/04/cropped-jeresig-2016.1024-270x270.jpg", + "title": "John Resig - Object.getPrototypeOf", + "description": null + }, + "https://kangax.github.io/compat-table/es5/#Reserved_words_as_property_names": { + "domain": "kangax.github.io", + "url": "https://kangax.github.io/compat-table/es5/#Reserved_words_as_property_names", + "logo": "https://kangax.github.io/compat-table/favicon.ico", + "title": "ECMAScript 5 compatibility table", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "async function - JavaScript | MDN", + "description": "An async function is a function declared with the async keyword, and the await keyword is permitted within it. The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains." + }, + "https://jakearchibald.com/2017/await-vs-return-vs-return-await/": { + "domain": "jakearchibald.com", + "url": "https://jakearchibald.com/2017/await-vs-return-vs-return-await/", + "logo": "https://jakearchibald.com/c/favicon-67801369.png", + "title": "await vs return vs return await", + "description": null + }, + "https://stackoverflow.com/questions/13497971/what-is-the-matter-with-script-targeted-urls": { + "domain": "stackoverflow.com", + "url": "https://stackoverflow.com/questions/13497971/what-is-the-matter-with-script-targeted-urls", + "logo": "https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a", + "title": "What is the matter with script-targeted URLs?", + "description": "I’m using JSHint, and it got the following error: Script URL. Which I noticed that happened because on this particular line there is a string containing a javascript:... URL. I know that JSHint" + }, + "https://es5.github.io/#x15.1.1": { + "domain": "es5.github.io", + "url": "https://es5.github.io/#x15.1.1", + "logo": "https://es5.github.io/favicon.ico", + "title": "Annotated ES5", + "description": null + }, + "https://en.wikipedia.org/wiki/Variable_shadowing": { + "domain": "en.wikipedia.org", + "url": "https://en.wikipedia.org/wiki/Variable_shadowing", + "logo": "https://en.wikipedia.org/static/apple-touch/wikipedia.png", + "title": "Variable shadowing - Wikipedia", + "description": null + }, + "https://www.nczonline.net/blog/2007/09/09/inconsistent-array-literals/": { + "domain": "www.nczonline.net", + "url": "https://www.nczonline.net/blog/2007/09/09/inconsistent-array-literals/", + "logo": "https://www.nczonline.net/images/favicon.png", + "title": "Inconsistent array literals", + "description": "Back at the Rich Web Experience, I helped lead a “birds of a feather” group discussion on JavaScript. In that discussion, someone called me a JavaScript expert. I quickly explained that I don’t..." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "undefined - JavaScript | MDN", + "description": "The global undefined property represents the primitive value undefined. It is one of JavaScript’s primitive types." + }, + "https://javascriptweblog.wordpress.com/2010/08/16/understanding-undefined-and-preventing-referenceerrors/": { + "domain": "javascriptweblog.wordpress.com", + "url": "https://javascriptweblog.wordpress.com/2010/08/16/understanding-undefined-and-preventing-referenceerrors/", + "logo": "https://s1.wp.com/i/favicon.ico", + "title": "Understanding JavaScript’s ‘undefined’", + "description": "Compared to other languages, JavaScript’s concept of undefined is a little confusing. In particular, trying to understand ReferenceErrors (“x is not defined”) and how best to code…" + }, + "https://es5.github.io/#x15.1.1.3": { + "domain": "es5.github.io", + "url": "https://es5.github.io/#x15.1.1.3", + "logo": "https://es5.github.io/favicon.ico", + "title": "Annotated ES5", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Regular expressions - JavaScript | MDN", + "description": "Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec() and test() methods of RegExp, and with the match(), matchAll(), replace(), replaceAll(), search(), and split() methods of S…" + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "void operator - JavaScript | MDN", + "description": "The void operator evaluates the given expression and then returns undefined." + }, + "https://oreilly.com/javascript/excerpts/javascript-good-parts/bad-parts.html": { + "domain": "oreilly.com", + "url": "https://oreilly.com/javascript/excerpts/javascript-good-parts/bad-parts.html", + "logo": "https://www.oreilly.com/favicon.ico", + "title": "O’Reilly Media - Technology and Business Training", + "description": "Gain technology and business knowledge and hone your skills with learning resources created and curated by O’Reilly’s experts: live online training, video, books, our platform has content from 200+ of the world’s best publishers." + }, + "https://web.archive.org/web/20200717110117/https://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20200717110117/https://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/", + "logo": "https://web.archive.org/web/20200717110117im_/https://yuiblog.com/favicon.ico", + "title": "with Statement Considered Harmful", + "description": null + }, + "https://jscs-dev.github.io/rule/requireNewlineBeforeSingleStatementsInIf": { + "domain": "jscs-dev.github.io", + "url": "https://jscs-dev.github.io/rule/requireNewlineBeforeSingleStatementsInIf", + "logo": "https://jscs-dev.github.io/favicon.ico", + "title": "JSCS", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Object initializer - JavaScript | MDN", + "description": "Objects can be initialized using new Object(), Object.create(), or using the literal notation (initializer notation). An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({})." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Arrow function expressions - JavaScript | MDN", + "description": "An arrow function expression is a compact alternative to a traditional function expression, but is limited and can’t be used in all situations." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Destructuring assignment - JavaScript | MDN", + "description": "The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables." + }, + "https://2ality.com/2015/01/es6-destructuring.html": { + "domain": "2ality.com", + "url": "https://2ality.com/2015/01/es6-destructuring.html", + "logo": "https://2ality.com/img/favicon.png", + "title": "Destructuring and parameter handling in ECMAScript 6", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Exponentiation": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Exponentiation", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Expressions and operators - JavaScript | MDN", + "description": "This chapter documents all the JavaScript language operators, expressions and keywords." + }, + "https://bugs.chromium.org/p/v8/issues/detail?id=5848": { + "domain": "bugs.chromium.org", + "url": "https://bugs.chromium.org/p/v8/issues/detail?id=5848", + "logo": "https://bugs.chromium.org/static/images/monorail.ico", + "title": "5848 - v8 - V8 JavaScript Engine - Monorail", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Object.hasOwn() - JavaScript | MDN", + "description": "The Object.hasOwn() static method returns true if the specified object has the indicated property as its own property. If the property is inherited, or does not exist, the method returns false." + }, + "http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-rejected-with-a-non-error": { + "domain": "bluebirdjs.com", + "url": "http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-rejected-with-a-non-error", + "logo": "//bluebirdjs.com/img/favicon.png", + "title": "Warning Explanations | bluebird", + "description": "Bluebird is a fully featured JavaScript promises library with unmatched performance." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "RegExp - JavaScript | MDN", + "description": "The RegExp object is used for matching text with a pattern." + }, + "https://mathiasbynens.be/notes/javascript-properties": { + "domain": "mathiasbynens.be", + "url": "https://mathiasbynens.be/notes/javascript-properties", + "logo": "https://mathiasbynens.be/favicon.ico", + "title": "Unquoted property names / object keys in JavaScript · Mathias Bynens", + "description": null + }, + "https://davidwalsh.name/parseint-radix": { + "domain": "davidwalsh.name", + "url": "https://davidwalsh.name/parseint-radix", + "logo": "https://davidwalsh.name/wp-content/themes/punky/images/favicon-144.png", + "title": "parseInt Radix", + "description": "The radix is important if you’re need to guarantee accuracy with variable input (basic number, binary, etc.). For best results, always use a radix of 10!" + }, + "https://github.com/tc39/proposal-object-rest-spread": { + "domain": "github.com", + "url": "https://github.com/tc39/proposal-object-rest-spread", + "logo": "https://github.com/fluidicon.png", + "title": "GitHub - tc39/proposal-object-rest-spread: Rest/Spread Properties for ECMAScript", + "description": "Rest/Spread Properties for ECMAScript. Contribute to tc39/proposal-object-rest-spread development by creating an account on GitHub." + }, + "https://blog.izs.me/2010/12/an-open-letter-to-javascript-leaders-regarding/": { + "domain": "blog.izs.me", + "url": "https://blog.izs.me/2010/12/an-open-letter-to-javascript-leaders-regarding/", + "logo": "https://blog.izs.me/favicon.ico", + "title": "An Open Letter to JavaScript Leaders Regarding Semicolons", + "description": "Writing and Stuff from Isaac Z. Schlueter" + }, + "https://web.archive.org/web/20200420230322/http://inimino.org/~inimino/blog/javascript_semicolons": { + "domain": "web.archive.org", + "url": "https://web.archive.org/web/20200420230322/http://inimino.org/~inimino/blog/javascript_semicolons", + "logo": "https://archive.org/favicon.ico", + "title": "JavaScript Semicolon Insertion", + "description": null + }, + "https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-description": { + "domain": "www.ecma-international.org", + "url": "https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-description", + "logo": "https://www.ecma-international.org/ecma-262/6.0/favicon.ico", + "title": "ECMAScript 2015 Language Specification – ECMA-262 6th Edition", + "description": null + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Template literals (Template strings) - JavaScript | MDN", + "description": "Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, for string interpolation with embedded expressions, and for special constructs called tagged templates." + }, + "https://exploringjs.com/es6/ch_template-literals.html#_examples-of-using-tagged-template-literals": { + "domain": "exploringjs.com", + "url": "https://exploringjs.com/es6/ch_template-literals.html#_examples-of-using-tagged-template-literals", + "logo": "https://exploringjs.com/es6/images/favicon-128.png", + "title": "8. Template literals", + "description": null + }, + "https://jsdoc.app": { + "domain": "jsdoc.app", + "url": "https://jsdoc.app", + "logo": null, + "title": "Use JSDoc: Index", + "description": "Official documentation for JSDoc 3." + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "typeof - JavaScript | MDN", + "description": "The typeof operator returns a string indicating the type of the unevaluated operand." + }, + "https://danhough.com/blog/single-var-pattern-rant/": { + "domain": "danhough.com", + "url": "https://danhough.com/blog/single-var-pattern-rant/", + "logo": "https://danhough.com/img/meta/apple-touch-icon-152x152.png", + "title": "A criticism of the Single Var Pattern in JavaScript, and a simple alternative — Dan Hough", + "description": "Dan Hough is a software developer & consultant, a writer and public speaker." + }, + "https://benalman.com/news/2012/05/multiple-var-statements-javascript/": { + "domain": "benalman.com", + "url": "https://benalman.com/news/2012/05/multiple-var-statements-javascript/", + "logo": "https://benalman.com/favicon.ico", + "title": "Ben Alman » Multiple var statements in JavaScript, not superfluous", + "description": null + }, + "https://en.wikipedia.org/wiki/Yoda_conditions": { + "domain": "en.wikipedia.org", + "url": "https://en.wikipedia.org/wiki/Yoda_conditions", + "logo": "https://en.wikipedia.org/static/apple-touch/wikipedia.png", + "title": "Yoda conditions - Wikipedia", + "description": null + }, + "http://thomas.tuerke.net/on/design/?with=1249091668#msg1146181680": { + "domain": "thomas.tuerke.net", + "url": "http://thomas.tuerke.net/on/design/?with=1249091668#msg1146181680", + "logo": "//thomas.tuerke.net/images/tmtlogo.ico", + "title": "Coding in Style", + "description": "Thomas M. Tuerke topical weblog" + }, + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation": { + "domain": "developer.mozilla.org", + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation", + "logo": "https://developer.mozilla.org/favicon-48x48.cbbd161b.png", + "title": "Exponentiation (**) - JavaScript | MDN", + "description": "The exponentiation operator (**) returns the result of raising the first operand to the power of the second operand. It is equivalent to Math.pow, except it also accepts BigInts as operands." + }, + "https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/": { + "domain": "eslint.org", + "url": "https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/", + "logo": "https://eslint.org/apple-touch-icon.png", + "title": "Interesting bugs caught by no-constant-binary-expression - ESLint - Pluggable JavaScript Linter", + "description": "A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease." + } +} \ No newline at end of file diff --git a/docs/src/_data/languages.json b/docs/src/_data/languages.json index 17221f1526c..529a9e3f2a2 100644 --- a/docs/src/_data/languages.json +++ b/docs/src/_data/languages.json @@ -8,7 +8,7 @@ { "flag": "🇯🇵", "code": "jp", - "name": "Japenese – 日本語", + "name": "Japanese - 日本語", "url": "https://jp.eslint.org" }, { diff --git a/docs/src/_data/links.json b/docs/src/_data/links.json new file mode 100644 index 00000000000..d9b29733216 --- /dev/null +++ b/docs/src/_data/links.json @@ -0,0 +1,22 @@ +{ + "github": "https://github.com/eslint/eslint", + "twitter": "https://twitter.com/geteslint", + "chat": "https://eslint.org/chat", + "group": "https://groups.google.com/group/eslint", + + "blog": "/blog", + "docs": "/docs/latest/", + "playground": "/play", + "getStarted": "/docs/latest/user-guide/getting-started", + "sponsors": "/sponsors", + "branding": "/branding", + "store": "https://eslint.threadless.com", + "team": "/team", + + "configuring": "https://eslint.org/docs/user-guide/configuring/", + "fixProblems": "https://eslint.org/docs/user-guide/command-line-interface#fixing-problems", + + "donate": "/donate", + "openCollective": "https://opencollective.com/eslint", + "githubSponsors": "https://github.com/sponsors/eslint" +} diff --git a/docs/src/_data/rule_versions.json b/docs/src/_data/rule_versions.json new file mode 100644 index 00000000000..98463d4bb6d --- /dev/null +++ b/docs/src/_data/rule_versions.json @@ -0,0 +1,329 @@ +{ + "added": { + "accessor-pairs": "0.22.0", + "array-bracket-newline": "4.0.0-alpha.1", + "array-bracket-spacing": "0.24.0", + "array-callback-return": "2.0.0-alpha-1", + "array-element-newline": "4.0.0-rc.0", + "arrow-body-style": "1.8.0", + "arrow-parens": "1.0.0-rc-1", + "arrow-spacing": "1.0.0-rc-1", + "block-scoped-var": "0.1.0", + "block-spacing": "1.2.0", + "brace-style": "0.0.7", + "callback-return": "1.0.0-rc-1", + "camelcase": "0.0.2", + "capitalized-comments": "3.11.0", + "class-methods-use-this": "3.4.0", + "comma-dangle": "0.16.0", + "comma-spacing": "0.9.0", + "comma-style": "0.9.0", + "complexity": "0.0.9", + "computed-property-spacing": "0.23.0", + "consistent-return": "0.4.0", + "consistent-this": "0.0.9", + "constructor-super": "0.24.0", + "curly": "0.0.2", + "default-case-last": "7.0.0-alpha.0", + "default-case": "0.6.0", + "default-param-last": "6.4.0", + "dot-location": "0.21.0", + "dot-notation": "0.0.7", + "eol-last": "0.7.1", + "eqeqeq": "0.0.2", + "for-direction": "4.0.0-beta.0", + "func-call-spacing": "3.3.0", + "func-name-matching": "3.8.0", + "func-names": "0.4.0", + "func-style": "0.2.0", + "function-call-argument-newline": "6.2.0", + "function-paren-newline": "4.6.0", + "generator-star-spacing": "0.17.0", + "generator-star": "0.12.0", + "getter-return": "4.2.0", + "global-require": "1.4.0", + "global-strict": "0.8.0", + "grouped-accessor-pairs": "6.7.0", + "guard-for-in": "0.0.6", + "handle-callback-err": "0.4.5", + "id-blacklist": "2.0.0-beta.2", + "id-denylist": "7.4.0", + "id-length": "1.0.0", + "id-match": "1.0.0", + "implicit-arrow-linebreak": "4.12.0", + "indent-legacy": "4.0.0-alpha.0", + "indent": "0.14.0", + "init-declarations": "1.0.0-rc-1", + "jsx-quotes": "1.4.0", + "key-spacing": "0.9.0", + "keyword-spacing": "2.0.0-beta.1", + "line-comment-position": "3.5.0", + "linebreak-style": "0.21.0", + "lines-around-comment": "0.22.0", + "lines-around-directive": "3.5.0", + "lines-between-class-members": "4.9.0", + "max-classes-per-file": "5.0.0-alpha.3", + "max-depth": "0.0.9", + "max-len": "0.0.9", + "max-lines-per-function": "5.0.0", + "max-lines": "2.12.0", + "max-nested-callbacks": "0.2.0", + "max-params": "0.0.9", + "max-statements-per-line": "2.5.0", + "max-statements": "0.0.9", + "multiline-comment-style": "4.10.0", + "multiline-ternary": "3.1.0", + "new-cap": "0.0.3-0", + "new-parens": "0.0.6", + "newline-after-var": "0.18.0", + "newline-before-return": "2.3.0", + "newline-per-chained-call": "2.0.0-rc.0", + "no-alert": "0.0.5", + "no-array-constructor": "0.4.0", + "no-arrow-condition": "1.8.0", + "no-async-promise-executor": "5.3.0", + "no-await-in-loop": "3.12.0", + "no-bitwise": "0.0.2", + "no-buffer-constructor": "4.0.0-alpha.0", + "no-caller": "0.0.6", + "no-case-declarations": "1.9.0", + "no-catch-shadow": "0.0.9", + "no-class-assign": "1.0.0-rc-1", + "no-comma-dangle": "0.0.9", + "no-compare-neg-zero": "3.17.0", + "no-cond-assign": "0.0.9", + "no-confusing-arrow": "2.0.0-alpha-2", + "no-console": "0.0.2", + "no-const-assign": "1.0.0-rc-1", + "no-constant-binary-expression": "8.14.0", + "no-constant-condition": "0.4.1", + "no-constructor-return": "6.7.0", + "no-continue": "0.19.0", + "no-control-regex": "0.1.0", + "no-debugger": "0.0.2", + "no-delete-var": "0.0.9", + "no-div-regex": "0.1.0", + "no-dupe-args": "0.16.0", + "no-dupe-class-members": "1.2.0", + "no-dupe-else-if": "6.7.0", + "no-dupe-keys": "0.0.9", + "no-duplicate-case": "0.17.0", + "no-duplicate-imports": "2.5.0", + "no-else-return": "0.0.9", + "no-empty-character-class": "0.22.0", + "no-empty-class": "0.0.9", + "no-empty-function": "2.0.0", + "no-empty-label": "0.0.9", + "no-empty-pattern": "1.7.0", + "no-empty": "0.0.2", + "no-eq-null": "0.0.9", + "no-eval": "0.0.2", + "no-ex-assign": "0.0.9", + "no-extend-native": "0.1.4", + "no-extra-bind": "0.8.0", + "no-extra-boolean-cast": "0.4.0", + "no-extra-label": "2.0.0-rc.0", + "no-extra-parens": "0.1.4", + "no-extra-semi": "0.0.9", + "no-extra-strict": "0.3.0", + "no-fallthrough": "0.0.7", + "no-floating-decimal": "0.0.6", + "no-func-assign": "0.0.9", + "no-global-assign": "3.3.0", + "no-implicit-coercion": "1.0.0-rc-2", + "no-implicit-globals": "2.0.0-alpha-1", + "no-implied-eval": "0.0.7", + "no-import-assign": "6.4.0", + "no-inline-comments": "0.10.0", + "no-inner-declarations": "0.6.0", + "no-invalid-regexp": "0.1.4", + "no-invalid-this": "1.0.0-rc-2", + "no-irregular-whitespace": "0.9.0", + "no-iterator": "0.0.9", + "no-label-var": "0.0.9", + "no-labels": "0.4.0", + "no-lone-blocks": "0.4.0", + "no-lonely-if": "0.6.0", + "no-loop-func": "0.0.9", + "no-loss-of-precision": "7.1.0", + "no-magic-numbers": "1.7.0", + "no-misleading-character-class": "5.3.0", + "no-mixed-operators": "2.12.0", + "no-mixed-requires": "0.0.9", + "no-mixed-spaces-and-tabs": "0.7.1", + "no-multi-assign": "3.14.0", + "no-multi-spaces": "0.9.0", + "no-multi-str": "0.0.9", + "no-multiple-empty-lines": "0.9.0", + "no-native-reassign": "0.0.9", + "no-negated-condition": "1.6.0", + "no-negated-in-lhs": "0.1.2", + "no-nested-ternary": "0.2.0", + "no-new-func": "0.0.7", + "no-new-object": "0.0.9", + "no-new-require": "0.6.0", + "no-new-symbol": "2.0.0-beta.1", + "no-new-wrappers": "0.0.6", + "no-new": "0.0.7", + "no-nonoctal-decimal-escape": "7.14.0", + "no-obj-calls": "0.0.9", + "no-octal-escape": "0.0.9", + "no-octal": "0.0.6", + "no-param-reassign": "0.18.0", + "no-path-concat": "0.4.0", + "no-plusplus": "0.0.9", + "no-process-env": "0.9.0", + "no-process-exit": "0.4.0", + "no-promise-executor-return": "7.3.0", + "no-proto": "0.0.9", + "no-prototype-builtins": "2.11.0", + "no-redeclare": "0.0.9", + "no-regex-spaces": "0.4.0", + "no-reserved-keys": "0.8.0", + "no-restricted-exports": "7.0.0-alpha.0", + "no-restricted-globals": "2.3.0", + "no-restricted-imports": "2.0.0-alpha-1", + "no-restricted-modules": "0.6.0", + "no-restricted-properties": "3.5.0", + "no-restricted-syntax": "1.4.0", + "no-return-assign": "0.0.9", + "no-return-await": "3.10.0", + "no-script-url": "0.0.9", + "no-self-assign": "2.0.0-rc.0", + "no-self-compare": "0.0.9", + "no-sequences": "0.5.1", + "no-setter-return": "6.7.0", + "no-shadow-restricted-names": "0.1.4", + "no-shadow": "0.0.9", + "no-space-before-semi": "0.4.3", + "no-spaced-func": "0.1.2", + "no-sparse-arrays": "0.4.0", + "no-sync": "0.0.9", + "no-tabs": "3.2.0", + "no-template-curly-in-string": "3.3.0", + "no-ternary": "0.0.9", + "no-this-before-super": "0.24.0", + "no-throw-literal": "0.15.0", + "no-trailing-spaces": "0.7.1", + "no-undef-init": "0.0.6", + "no-undef": "0.0.9", + "no-undefined": "0.7.1", + "no-underscore-dangle": "0.0.9", + "no-unexpected-multiline": "0.24.0", + "no-unmodified-loop-condition": "2.0.0-alpha-2", + "no-unneeded-ternary": "0.21.0", + "no-unreachable-loop": "7.3.0", + "no-unreachable": "0.0.6", + "no-unsafe-finally": "2.9.0", + "no-unsafe-negation": "3.3.0", + "no-unsafe-optional-chaining": "7.15.0", + "no-unused-expressions": "0.1.0", + "no-unused-labels": "2.0.0-rc.0", + "no-unused-private-class-members": "8.1.0", + "no-unused-vars": "0.0.9", + "no-use-before-define": "0.0.9", + "no-useless-backreference": "7.0.0-alpha.0", + "no-useless-call": "1.0.0-rc-1", + "no-useless-catch": "5.11.0", + "no-useless-computed-key": "2.9.0", + "no-useless-concat": "1.3.0", + "no-useless-constructor": "2.0.0-beta.1", + "no-useless-escape": "2.5.0", + "no-useless-rename": "2.11.0", + "no-useless-return": "3.9.0", + "no-var": "0.12.0", + "no-void": "0.8.0", + "no-warning-comments": "0.4.4", + "no-whitespace-before-property": "2.0.0-beta.1", + "no-with": "0.0.2", + "no-wrap-func": "0.0.9", + "nonblock-statement-body-position": "3.17.0", + "object-curly-newline": "2.12.0", + "object-curly-spacing": "0.22.0", + "object-property-newline": "2.10.0", + "object-shorthand": "0.20.0", + "one-var-declaration-per-line": "2.0.0-beta.3", + "one-var": "0.0.9", + "operator-assignment": "0.10.0", + "operator-linebreak": "0.19.0", + "padded-blocks": "0.9.0", + "padding-line-between-statements": "4.0.0-beta.0", + "prefer-arrow-callback": "1.2.0", + "prefer-const": "0.23.0", + "prefer-destructuring": "3.13.0", + "prefer-exponentiation-operator": "6.7.0", + "prefer-named-capture-group": "5.15.0", + "prefer-numeric-literals": "3.5.0", + "prefer-object-has-own": "8.5.0", + "prefer-object-spread": "5.0.0-alpha.3", + "prefer-promise-reject-errors": "3.14.0", + "prefer-reflect": "1.0.0-rc-2", + "prefer-regex-literals": "6.4.0", + "prefer-rest-params": "2.0.0-alpha-1", + "prefer-spread": "1.0.0-rc-1", + "prefer-template": "1.2.0", + "quote-props": "0.0.6", + "quotes": "0.0.7", + "radix": "0.0.7", + "require-atomic-updates": "5.3.0", + "require-await": "3.11.0", + "require-jsdoc": "1.4.0", + "require-unicode-regexp": "5.3.0", + "require-yield": "1.0.0-rc-1", + "rest-spread-spacing": "2.12.0", + "semi-spacing": "0.16.0", + "semi-style": "4.0.0-beta.0", + "semi": "0.0.6", + "sort-imports": "2.0.0-beta.1", + "sort-keys": "3.3.0", + "sort-vars": "0.2.0", + "space-after-function-name": "0.11.0", + "space-after-keywords": "0.6.0", + "space-before-blocks": "0.9.0", + "space-before-function-paren": "0.18.0", + "space-before-function-parentheses": "0.15.0", + "space-before-keywords": "1.4.0", + "space-in-brackets": "0.4.1", + "space-in-parens": "0.8.0", + "space-infix-ops": "0.2.0", + "space-return-throw-case": "0.1.4", + "space-unary-ops": "0.10.0", + "space-unary-word-ops": "0.1.4", + "spaced-comment": "0.23.0", + "spaced-line-comment": "0.9.0", + "strict": "0.1.0", + "switch-colon-spacing": "4.0.0-beta.0", + "symbol-description": "3.4.0", + "template-curly-spacing": "2.0.0-rc.0", + "template-tag-spacing": "3.15.0", + "unicode-bom": "2.11.0", + "use-isnan": "0.0.6", + "valid-jsdoc": "0.4.0", + "valid-typeof": "0.5.0", + "vars-on-top": "0.8.0", + "wrap-iife": "0.0.9", + "wrap-regex": "0.1.0", + "yield-star-spacing": "2.0.0-alpha-1", + "yoda": "0.7.1" + }, + "removed": { + "generator-star": "1.0.0-rc-1", + "global-strict": "1.0.0-rc-1", + "no-arrow-condition": "2.0.0-beta.3", + "no-comma-dangle": "1.0.0-rc-1", + "no-empty-class": "1.0.0-rc-1", + "no-empty-label": "2.0.0-rc.0", + "no-extra-strict": "1.0.0-rc-1", + "no-reserved-keys": "1.0.0", + "no-space-before-semi": "1.0.0-rc-1", + "no-wrap-func": "1.0.0-rc-1", + "space-after-function-name": "1.0.0-rc-1", + "space-after-keywords": "2.0.0-beta.3", + "space-before-function-parentheses": "1.0.0-rc-1", + "space-before-keywords": "2.0.0-beta.3", + "space-in-brackets": "1.0.0-rc-1", + "space-return-throw-case": "2.0.0-beta.3", + "space-unary-word-ops": "0.10.0", + "spaced-line-comment": "1.0.0-rc-1" + } +} \ No newline at end of file diff --git a/docs/src/_data/rules.json b/docs/src/_data/rules.json index ce800095f3e..81e0500a9ea 100644 --- a/docs/src/_data/rules.json +++ b/docs/src/_data/rules.json @@ -1,2098 +1,2105 @@ { - "deprecated": { - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", - "name": "Deprecated", - "rules": [ - { - "name": "callback-return", - "replacedBy": [] - }, - { - "name": "global-require", - "replacedBy": [] - }, - { - "name": "handle-callback-err", - "replacedBy": [] - }, - { - "name": "id-blacklist", - "replacedBy": [ - "id-denylist" - ] - }, - { - "name": "indent-legacy", - "replacedBy": [ - "indent" - ] - }, - { - "name": "lines-around-directive", - "replacedBy": [ - "padding-line-between-statements" - ] - }, - { - "name": "newline-after-var", - "replacedBy": [ - "padding-line-between-statements" - ] - }, - { - "name": "newline-before-return", - "replacedBy": [ - "padding-line-between-statements" - ] - }, - { - "name": "no-buffer-constructor", - "replacedBy": [] - }, - { - "name": "no-catch-shadow", - "replacedBy": [ - "no-shadow" - ] - }, - { - "name": "no-mixed-requires", - "replacedBy": [] - }, - { - "name": "no-native-reassign", - "replacedBy": [ - "no-global-assign" - ] - }, - { - "name": "no-negated-in-lhs", - "replacedBy": [ - "no-unsafe-negation" - ] - }, - { - "name": "no-new-require", - "replacedBy": [] - }, - { - "name": "no-path-concat", - "replacedBy": [] - }, - { - "name": "no-process-env", - "replacedBy": [] - }, - { - "name": "no-process-exit", - "replacedBy": [] - }, - { - "name": "no-restricted-modules", - "replacedBy": [] - }, - { - "name": "no-spaced-func", - "replacedBy": [ - "func-call-spacing" - ] - }, - { - "name": "no-sync", - "replacedBy": [] - }, - { - "name": "prefer-reflect", - "replacedBy": [] - }, - { - "name": "require-jsdoc", - "replacedBy": [] - }, - { - "name": "valid-jsdoc", - "replacedBy": [] - } - ] - }, - "removed": { - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", - "name": "Removed", - "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" - ] - } - ] - }, - "types": [ - { - "description": "These rules relate to possible logic errors in code:", - "displayName": "Possible Problems", - "name": "problem", - "rules": [ - { - "description": "enforce `return` statements in callbacks of array methods", - "fixable": false, - "hasSuggestions": false, - "name": "array-callback-return", - "recommended": false - }, - { - "description": "require `super()` calls in constructors", - "fixable": false, - "hasSuggestions": false, - "name": "constructor-super", - "recommended": true - }, - { - "description": "enforce \"for\" loop update clause moving the counter in the right direction.", - "fixable": false, - "hasSuggestions": false, - "name": "for-direction", - "recommended": true - }, - { - "description": "enforce `return` statements in getters", - "fixable": false, - "hasSuggestions": false, - "name": "getter-return", - "recommended": true - }, - { - "description": "disallow using an async function as a Promise executor", - "fixable": false, - "hasSuggestions": false, - "name": "no-async-promise-executor", - "recommended": true - }, - { - "description": "disallow `await` inside of loops", - "fixable": false, - "hasSuggestions": false, - "name": "no-await-in-loop", - "recommended": false - }, - { - "description": "disallow reassigning class members", - "fixable": false, - "hasSuggestions": false, - "name": "no-class-assign", - "recommended": true - }, - { - "description": "disallow comparing against -0", - "fixable": false, - "hasSuggestions": false, - "name": "no-compare-neg-zero", - "recommended": true - }, - { - "description": "disallow assignment operators in conditional expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-cond-assign", - "recommended": true - }, - { - "description": "disallow reassigning `const` variables", - "fixable": false, - "hasSuggestions": false, - "name": "no-const-assign", - "recommended": true - }, - { - "description": "disallow constant expressions in conditions", - "fixable": false, - "hasSuggestions": false, - "name": "no-constant-condition", - "recommended": true - }, - { - "description": "disallow returning value from constructor", - "fixable": false, - "hasSuggestions": false, - "name": "no-constructor-return", - "recommended": false - }, - { - "description": "disallow control characters in regular expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-control-regex", - "recommended": true - }, - { - "description": "disallow the use of `debugger`", - "fixable": false, - "hasSuggestions": false, - "name": "no-debugger", - "recommended": true - }, - { - "description": "disallow duplicate arguments in `function` definitions", - "fixable": false, - "hasSuggestions": false, - "name": "no-dupe-args", - "recommended": true - }, - { - "description": "disallow duplicate class members", - "fixable": false, - "hasSuggestions": false, - "name": "no-dupe-class-members", - "recommended": true - }, - { - "description": "disallow duplicate conditions in if-else-if chains", - "fixable": false, - "hasSuggestions": false, - "name": "no-dupe-else-if", - "recommended": true - }, - { - "description": "disallow duplicate keys in object literals", - "fixable": false, - "hasSuggestions": false, - "name": "no-dupe-keys", - "recommended": true - }, - { - "description": "disallow duplicate case labels", - "fixable": false, - "hasSuggestions": false, - "name": "no-duplicate-case", - "recommended": true - }, - { - "description": "disallow duplicate module imports", - "fixable": false, - "hasSuggestions": false, - "name": "no-duplicate-imports", - "recommended": false - }, - { - "description": "disallow empty character classes in regular expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-empty-character-class", - "recommended": true - }, - { - "description": "disallow empty destructuring patterns", - "fixable": false, - "hasSuggestions": false, - "name": "no-empty-pattern", - "recommended": true - }, - { - "description": "disallow reassigning exceptions in `catch` clauses", - "fixable": false, - "hasSuggestions": false, - "name": "no-ex-assign", - "recommended": true - }, - { - "description": "disallow fallthrough of `case` statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-fallthrough", - "recommended": true - }, - { - "description": "disallow reassigning `function` declarations", - "fixable": false, - "hasSuggestions": false, - "name": "no-func-assign", - "recommended": true - }, - { - "description": "disallow assigning to imported bindings", - "fixable": false, - "hasSuggestions": false, - "name": "no-import-assign", - "recommended": true - }, - { - "description": "disallow variable or `function` declarations in nested blocks", - "fixable": false, - "hasSuggestions": false, - "name": "no-inner-declarations", - "recommended": true - }, - { - "description": "disallow invalid regular expression strings in `RegExp` constructors", - "fixable": false, - "hasSuggestions": false, - "name": "no-invalid-regexp", - "recommended": true - }, - { - "description": "disallow irregular whitespace", - "fixable": false, - "hasSuggestions": false, - "name": "no-irregular-whitespace", - "recommended": true - }, - { - "description": "disallow literal numbers that lose precision", - "fixable": false, - "hasSuggestions": false, - "name": "no-loss-of-precision", - "recommended": true - }, - { - "description": "disallow characters which are made with multiple code points in character class syntax", - "fixable": false, - "hasSuggestions": false, - "name": "no-misleading-character-class", - "recommended": true - }, - { - "description": "disallow `new` operators with the `Symbol` object", - "fixable": false, - "hasSuggestions": false, - "name": "no-new-symbol", - "recommended": true - }, - { - "description": "disallow calling global object properties as functions", - "fixable": false, - "hasSuggestions": false, - "name": "no-obj-calls", - "recommended": true - }, - { - "description": "disallow returning values from Promise executor functions", - "fixable": false, - "hasSuggestions": false, - "name": "no-promise-executor-return", - "recommended": false - }, - { - "description": "disallow calling some `Object.prototype` methods directly on objects", - "fixable": false, - "hasSuggestions": false, - "name": "no-prototype-builtins", - "recommended": true - }, - { - "description": "disallow assignments where both sides are exactly the same", - "fixable": false, - "hasSuggestions": false, - "name": "no-self-assign", - "recommended": true - }, - { - "description": "disallow comparisons where both sides are exactly the same", - "fixable": false, - "hasSuggestions": false, - "name": "no-self-compare", - "recommended": false - }, - { - "description": "disallow returning values from setters", - "fixable": false, - "hasSuggestions": false, - "name": "no-setter-return", - "recommended": true - }, - { - "description": "disallow sparse arrays", - "fixable": false, - "hasSuggestions": false, - "name": "no-sparse-arrays", - "recommended": true - }, - { - "description": "disallow template literal placeholder syntax in regular strings", - "fixable": false, - "hasSuggestions": false, - "name": "no-template-curly-in-string", - "recommended": false - }, - { - "description": "disallow `this`/`super` before calling `super()` in constructors", - "fixable": false, - "hasSuggestions": false, - "name": "no-this-before-super", - "recommended": true - }, - { - "description": "disallow the use of undeclared variables unless mentioned in `/*global */` comments", - "fixable": false, - "hasSuggestions": false, - "name": "no-undef", - "recommended": true - }, - { - "description": "disallow confusing multiline expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-unexpected-multiline", - "recommended": true - }, - { - "description": "disallow unmodified loop conditions", - "fixable": false, - "hasSuggestions": false, - "name": "no-unmodified-loop-condition", - "recommended": false - }, - { - "description": "disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-unreachable", - "recommended": true - }, - { - "description": "disallow loops with a body that allows only one iteration", - "fixable": false, - "hasSuggestions": false, - "name": "no-unreachable-loop", - "recommended": false - }, - { - "description": "disallow control flow statements in `finally` blocks", - "fixable": false, - "hasSuggestions": false, - "name": "no-unsafe-finally", - "recommended": true - }, - { - "description": "disallow negating the left operand of relational operators", - "fixable": false, - "hasSuggestions": true, - "name": "no-unsafe-negation", - "recommended": true - }, - { - "description": "disallow use of optional chaining in contexts where the `undefined` value is not allowed", - "fixable": false, - "hasSuggestions": false, - "name": "no-unsafe-optional-chaining", - "recommended": true - }, - { - "description": "disallow unused private class members", - "fixable": false, - "hasSuggestions": false, - "name": "no-unused-private-class-members", - "recommended": false - }, - { - "description": "disallow unused variables", - "fixable": false, - "hasSuggestions": false, - "name": "no-unused-vars", - "recommended": true - }, - { - "description": "disallow the use of variables before they are defined", - "fixable": false, - "hasSuggestions": false, - "name": "no-use-before-define", - "recommended": false - }, - { - "description": "disallow useless backreferences in regular expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-useless-backreference", - "recommended": true - }, - { - "description": "disallow assignments that can lead to race conditions due to usage of `await` or `yield`", - "fixable": false, - "hasSuggestions": false, - "name": "require-atomic-updates", - "recommended": false - }, - { - "description": "require calls to `isNaN()` when checking for `NaN`", - "fixable": false, - "hasSuggestions": false, - "name": "use-isnan", - "recommended": true - }, - { - "description": "enforce comparing `typeof` expressions against valid strings", - "fixable": false, - "hasSuggestions": false, - "name": "valid-typeof", - "recommended": true - } - ] - }, - { - "description": "These rules suggest alternate ways of doing things:", - "displayName": "Suggestions", - "name": "suggestion", - "rules": [ - { - "description": "enforce getter and setter pairs in objects and classes", - "fixable": false, - "hasSuggestions": false, - "name": "accessor-pairs", - "recommended": false - }, - { - "description": "require braces around arrow function bodies", - "fixable": true, - "hasSuggestions": false, - "name": "arrow-body-style", - "recommended": false - }, - { - "description": "enforce the use of variables within the scope they are defined", - "fixable": false, - "hasSuggestions": false, - "name": "block-scoped-var", - "recommended": false - }, - { - "description": "enforce camelcase naming convention", - "fixable": false, - "hasSuggestions": false, - "name": "camelcase", - "recommended": false - }, - { - "description": "enforce or disallow capitalization of the first letter of a comment", - "fixable": true, - "hasSuggestions": false, - "name": "capitalized-comments", - "recommended": false - }, - { - "description": "enforce that class methods utilize `this`", - "fixable": false, - "hasSuggestions": false, - "name": "class-methods-use-this", - "recommended": false - }, - { - "description": "enforce a maximum cyclomatic complexity allowed in a program", - "fixable": false, - "hasSuggestions": false, - "name": "complexity", - "recommended": false - }, - { - "description": "require `return` statements to either always or never specify values", - "fixable": false, - "hasSuggestions": false, - "name": "consistent-return", - "recommended": false - }, - { - "description": "enforce consistent naming when capturing the current execution context", - "fixable": false, - "hasSuggestions": false, - "name": "consistent-this", - "recommended": false - }, - { - "description": "enforce consistent brace style for all control statements", - "fixable": true, - "hasSuggestions": false, - "name": "curly", - "recommended": false - }, - { - "description": "require `default` cases in `switch` statements", - "fixable": false, - "hasSuggestions": false, - "name": "default-case", - "recommended": false - }, - { - "description": "enforce default clauses in switch statements to be last", - "fixable": false, - "hasSuggestions": false, - "name": "default-case-last", - "recommended": false - }, - { - "description": "enforce default parameters to be last", - "fixable": false, - "hasSuggestions": false, - "name": "default-param-last", - "recommended": false - }, - { - "description": "enforce dot notation whenever possible", - "fixable": true, - "hasSuggestions": false, - "name": "dot-notation", - "recommended": false - }, - { - "description": "require the use of `===` and `!==`", - "fixable": true, - "hasSuggestions": false, - "name": "eqeqeq", - "recommended": false - }, - { - "description": "require function names to match the name of the variable or property to which they are assigned", - "fixable": false, - "hasSuggestions": false, - "name": "func-name-matching", - "recommended": false - }, - { - "description": "require or disallow named `function` expressions", - "fixable": false, - "hasSuggestions": false, - "name": "func-names", - "recommended": false - }, - { - "description": "enforce the consistent use of either `function` declarations or expressions", - "fixable": false, - "hasSuggestions": false, - "name": "func-style", - "recommended": false - }, - { - "description": "require grouped accessor pairs in object literals and classes", - "fixable": false, - "hasSuggestions": false, - "name": "grouped-accessor-pairs", - "recommended": false - }, - { - "description": "require `for-in` loops to include an `if` statement", - "fixable": false, - "hasSuggestions": false, - "name": "guard-for-in", - "recommended": false - }, - { - "description": "disallow specified identifiers", - "fixable": false, - "hasSuggestions": false, - "name": "id-denylist", - "recommended": false - }, - { - "description": "enforce minimum and maximum identifier lengths", - "fixable": false, - "hasSuggestions": false, - "name": "id-length", - "recommended": false - }, - { - "description": "require identifiers to match a specified regular expression", - "fixable": false, - "hasSuggestions": false, - "name": "id-match", - "recommended": false - }, - { - "description": "require or disallow initialization in variable declarations", - "fixable": false, - "hasSuggestions": false, - "name": "init-declarations", - "recommended": false - }, - { - "description": "enforce a maximum number of classes per file", - "fixable": false, - "hasSuggestions": false, - "name": "max-classes-per-file", - "recommended": false - }, - { - "description": "enforce a maximum depth that blocks can be nested", - "fixable": false, - "hasSuggestions": false, - "name": "max-depth", - "recommended": false - }, - { - "description": "enforce a maximum number of lines per file", - "fixable": false, - "hasSuggestions": false, - "name": "max-lines", - "recommended": false - }, - { - "description": "enforce a maximum number of lines of code in a function", - "fixable": false, - "hasSuggestions": false, - "name": "max-lines-per-function", - "recommended": false - }, - { - "description": "enforce a maximum depth that callbacks can be nested", - "fixable": false, - "hasSuggestions": false, - "name": "max-nested-callbacks", - "recommended": false - }, - { - "description": "enforce a maximum number of parameters in function definitions", - "fixable": false, - "hasSuggestions": false, - "name": "max-params", - "recommended": false - }, - { - "description": "enforce a maximum number of statements allowed in function blocks", - "fixable": false, - "hasSuggestions": false, - "name": "max-statements", - "recommended": false - }, - { - "description": "enforce a particular style for multiline comments", - "fixable": true, - "hasSuggestions": false, - "name": "multiline-comment-style", - "recommended": false - }, - { - "description": "require constructor names to begin with a capital letter", - "fixable": false, - "hasSuggestions": false, - "name": "new-cap", - "recommended": false - }, - { - "description": "disallow the use of `alert`, `confirm`, and `prompt`", - "fixable": false, - "hasSuggestions": false, - "name": "no-alert", - "recommended": false - }, - { - "description": "disallow `Array` constructors", - "fixable": false, - "hasSuggestions": false, - "name": "no-array-constructor", - "recommended": false - }, - { - "description": "disallow bitwise operators", - "fixable": false, - "hasSuggestions": false, - "name": "no-bitwise", - "recommended": false - }, - { - "description": "disallow the use of `arguments.caller` or `arguments.callee`", - "fixable": false, - "hasSuggestions": false, - "name": "no-caller", - "recommended": false - }, - { - "description": "disallow lexical declarations in case clauses", - "fixable": false, - "hasSuggestions": false, - "name": "no-case-declarations", - "recommended": true - }, - { - "description": "disallow arrow functions where they could be confused with comparisons", - "fixable": true, - "hasSuggestions": false, - "name": "no-confusing-arrow", - "recommended": false - }, - { - "description": "disallow the use of `console`", - "fixable": false, - "hasSuggestions": false, - "name": "no-console", - "recommended": false - }, - { - "description": "disallow `continue` statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-continue", - "recommended": false - }, - { - "description": "disallow deleting variables", - "fixable": false, - "hasSuggestions": false, - "name": "no-delete-var", - "recommended": true - }, - { - "description": "disallow division operators explicitly at the beginning of regular expressions", - "fixable": true, - "hasSuggestions": false, - "name": "no-div-regex", - "recommended": false - }, - { - "description": "disallow `else` blocks after `return` statements in `if` statements", - "fixable": true, - "hasSuggestions": false, - "name": "no-else-return", - "recommended": false - }, - { - "description": "disallow empty block statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-empty", - "recommended": true - }, - { - "description": "disallow empty functions", - "fixable": false, - "hasSuggestions": false, - "name": "no-empty-function", - "recommended": false - }, - { - "description": "disallow `null` comparisons without type-checking operators", - "fixable": false, - "hasSuggestions": false, - "name": "no-eq-null", - "recommended": false - }, - { - "description": "disallow the use of `eval()`", - "fixable": false, - "hasSuggestions": false, - "name": "no-eval", - "recommended": false - }, - { - "description": "disallow extending native types", - "fixable": false, - "hasSuggestions": false, - "name": "no-extend-native", - "recommended": false - }, - { - "description": "disallow unnecessary calls to `.bind()`", - "fixable": true, - "hasSuggestions": false, - "name": "no-extra-bind", - "recommended": false - }, - { - "description": "disallow unnecessary boolean casts", - "fixable": true, - "hasSuggestions": false, - "name": "no-extra-boolean-cast", - "recommended": true - }, - { - "description": "disallow unnecessary labels", - "fixable": true, - "hasSuggestions": false, - "name": "no-extra-label", - "recommended": false - }, - { - "description": "disallow unnecessary semicolons", - "fixable": true, - "hasSuggestions": false, - "name": "no-extra-semi", - "recommended": true - }, - { - "description": "disallow leading or trailing decimal points in numeric literals", - "fixable": true, - "hasSuggestions": false, - "name": "no-floating-decimal", - "recommended": false - }, - { - "description": "disallow assignments to native objects or read-only global variables", - "fixable": false, - "hasSuggestions": false, - "name": "no-global-assign", - "recommended": true - }, - { - "description": "disallow shorthand type conversions", - "fixable": true, - "hasSuggestions": false, - "name": "no-implicit-coercion", - "recommended": false - }, - { - "description": "disallow declarations in the global scope", - "fixable": false, - "hasSuggestions": false, - "name": "no-implicit-globals", - "recommended": false - }, - { - "description": "disallow the use of `eval()`-like methods", - "fixable": false, - "hasSuggestions": false, - "name": "no-implied-eval", - "recommended": false - }, - { - "description": "disallow inline comments after code", - "fixable": false, - "hasSuggestions": false, - "name": "no-inline-comments", - "recommended": false - }, - { - "description": "disallow `this` keywords outside of classes or class-like objects", - "fixable": false, - "hasSuggestions": false, - "name": "no-invalid-this", - "recommended": false - }, - { - "description": "disallow the use of the `__iterator__` property", - "fixable": false, - "hasSuggestions": false, - "name": "no-iterator", - "recommended": false - }, - { - "description": "disallow labels that share a name with a variable", - "fixable": false, - "hasSuggestions": false, - "name": "no-label-var", - "recommended": false - }, - { - "description": "disallow labeled statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-labels", - "recommended": false - }, - { - "description": "disallow unnecessary nested blocks", - "fixable": false, - "hasSuggestions": false, - "name": "no-lone-blocks", - "recommended": false - }, - { - "description": "disallow `if` statements as the only statement in `else` blocks", - "fixable": true, - "hasSuggestions": false, - "name": "no-lonely-if", - "recommended": false - }, - { - "description": "disallow function declarations that contain unsafe references inside loop statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-loop-func", - "recommended": false - }, - { - "description": "disallow magic numbers", - "fixable": false, - "hasSuggestions": false, - "name": "no-magic-numbers", - "recommended": false - }, - { - "description": "disallow mixed binary operators", - "fixable": false, - "hasSuggestions": false, - "name": "no-mixed-operators", - "recommended": false - }, - { - "description": "disallow use of chained assignment expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-multi-assign", - "recommended": false - }, - { - "description": "disallow multiline strings", - "fixable": false, - "hasSuggestions": false, - "name": "no-multi-str", - "recommended": false - }, - { - "description": "disallow negated conditions", - "fixable": false, - "hasSuggestions": false, - "name": "no-negated-condition", - "recommended": false - }, - { - "description": "disallow nested ternary expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-nested-ternary", - "recommended": false - }, - { - "description": "disallow `new` operators outside of assignments or comparisons", - "fixable": false, - "hasSuggestions": false, - "name": "no-new", - "recommended": false - }, - { - "description": "disallow `new` operators with the `Function` object", - "fixable": false, - "hasSuggestions": false, - "name": "no-new-func", - "recommended": false - }, - { - "description": "disallow `Object` constructors", - "fixable": false, - "hasSuggestions": false, - "name": "no-new-object", - "recommended": false - }, - { - "description": "disallow `new` operators with the `String`, `Number`, and `Boolean` objects", - "fixable": false, - "hasSuggestions": false, - "name": "no-new-wrappers", - "recommended": false - }, - { - "description": "disallow `\\8` and `\\9` escape sequences in string literals", - "fixable": false, - "hasSuggestions": true, - "name": "no-nonoctal-decimal-escape", - "recommended": true - }, - { - "description": "disallow octal literals", - "fixable": false, - "hasSuggestions": false, - "name": "no-octal", - "recommended": true - }, - { - "description": "disallow octal escape sequences in string literals", - "fixable": false, - "hasSuggestions": false, - "name": "no-octal-escape", - "recommended": false - }, - { - "description": "disallow reassigning `function` parameters", - "fixable": false, - "hasSuggestions": false, - "name": "no-param-reassign", - "recommended": false - }, - { - "description": "disallow the unary operators `++` and `--`", - "fixable": false, - "hasSuggestions": false, - "name": "no-plusplus", - "recommended": false - }, - { - "description": "disallow the use of the `__proto__` property", - "fixable": false, - "hasSuggestions": false, - "name": "no-proto", - "recommended": false - }, - { - "description": "disallow variable redeclaration", - "fixable": false, - "hasSuggestions": false, - "name": "no-redeclare", - "recommended": true - }, - { - "description": "disallow multiple spaces in regular expressions", - "fixable": true, - "hasSuggestions": false, - "name": "no-regex-spaces", - "recommended": true - }, - { - "description": "disallow specified names in exports", - "fixable": false, - "hasSuggestions": false, - "name": "no-restricted-exports", - "recommended": false - }, - { - "description": "disallow specified global variables", - "fixable": false, - "hasSuggestions": false, - "name": "no-restricted-globals", - "recommended": false - }, - { - "description": "disallow specified modules when loaded by `import`", - "fixable": false, - "hasSuggestions": false, - "name": "no-restricted-imports", - "recommended": false - }, - { - "description": "disallow certain properties on certain objects", - "fixable": false, - "hasSuggestions": false, - "name": "no-restricted-properties", - "recommended": false - }, - { - "description": "disallow specified syntax", - "fixable": false, - "hasSuggestions": false, - "name": "no-restricted-syntax", - "recommended": false - }, - { - "description": "disallow assignment operators in `return` statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-return-assign", - "recommended": false - }, - { - "description": "disallow unnecessary `return await`", - "fixable": false, - "hasSuggestions": false, - "name": "no-return-await", - "recommended": false - }, - { - "description": "disallow `javascript:` urls", - "fixable": false, - "hasSuggestions": false, - "name": "no-script-url", - "recommended": false - }, - { - "description": "disallow comma operators", - "fixable": false, - "hasSuggestions": false, - "name": "no-sequences", - "recommended": false - }, - { - "description": "disallow variable declarations from shadowing variables declared in the outer scope", - "fixable": false, - "hasSuggestions": false, - "name": "no-shadow", - "recommended": false - }, - { - "description": "disallow identifiers from shadowing restricted names", - "fixable": false, - "hasSuggestions": false, - "name": "no-shadow-restricted-names", - "recommended": true - }, - { - "description": "disallow ternary operators", - "fixable": false, - "hasSuggestions": false, - "name": "no-ternary", - "recommended": false - }, - { - "description": "disallow throwing literals as exceptions", - "fixable": false, - "hasSuggestions": false, - "name": "no-throw-literal", - "recommended": false - }, - { - "description": "disallow initializing variables to `undefined`", - "fixable": true, - "hasSuggestions": false, - "name": "no-undef-init", - "recommended": false - }, - { - "description": "disallow the use of `undefined` as an identifier", - "fixable": false, - "hasSuggestions": false, - "name": "no-undefined", - "recommended": false - }, - { - "description": "disallow dangling underscores in identifiers", - "fixable": false, - "hasSuggestions": false, - "name": "no-underscore-dangle", - "recommended": false - }, - { - "description": "disallow ternary operators when simpler alternatives exist", - "fixable": true, - "hasSuggestions": false, - "name": "no-unneeded-ternary", - "recommended": false - }, - { - "description": "disallow unused expressions", - "fixable": false, - "hasSuggestions": false, - "name": "no-unused-expressions", - "recommended": false - }, - { - "description": "disallow unused labels", - "fixable": true, - "hasSuggestions": false, - "name": "no-unused-labels", - "recommended": true - }, - { - "description": "disallow unnecessary calls to `.call()` and `.apply()`", - "fixable": false, - "hasSuggestions": false, - "name": "no-useless-call", - "recommended": false - }, - { - "description": "disallow unnecessary `catch` clauses", - "fixable": false, - "hasSuggestions": false, - "name": "no-useless-catch", - "recommended": true - }, - { - "description": "disallow unnecessary computed property keys in objects and classes", - "fixable": true, - "hasSuggestions": false, - "name": "no-useless-computed-key", - "recommended": false - }, - { - "description": "disallow unnecessary concatenation of literals or template literals", - "fixable": false, - "hasSuggestions": false, - "name": "no-useless-concat", - "recommended": false - }, - { - "description": "disallow unnecessary constructors", - "fixable": false, - "hasSuggestions": false, - "name": "no-useless-constructor", - "recommended": false - }, - { - "description": "disallow unnecessary escape characters", - "fixable": false, - "hasSuggestions": true, - "name": "no-useless-escape", - "recommended": true - }, - { - "description": "disallow renaming import, export, and destructured assignments to the same name", - "fixable": true, - "hasSuggestions": false, - "name": "no-useless-rename", - "recommended": false - }, - { - "description": "disallow redundant return statements", - "fixable": true, - "hasSuggestions": false, - "name": "no-useless-return", - "recommended": false - }, - { - "description": "require `let` or `const` instead of `var`", - "fixable": true, - "hasSuggestions": false, - "name": "no-var", - "recommended": false - }, - { - "description": "disallow `void` operators", - "fixable": false, - "hasSuggestions": false, - "name": "no-void", - "recommended": false - }, - { - "description": "disallow specified warning terms in comments", - "fixable": false, - "hasSuggestions": false, - "name": "no-warning-comments", - "recommended": false - }, - { - "description": "disallow `with` statements", - "fixable": false, - "hasSuggestions": false, - "name": "no-with", - "recommended": true - }, - { - "description": "require or disallow method and property shorthand syntax for object literals", - "fixable": true, - "hasSuggestions": false, - "name": "object-shorthand", - "recommended": false - }, - { - "description": "enforce variables to be declared either together or separately in functions", - "fixable": true, - "hasSuggestions": false, - "name": "one-var", - "recommended": false - }, - { - "description": "require or disallow newlines around variable declarations", - "fixable": true, - "hasSuggestions": false, - "name": "one-var-declaration-per-line", - "recommended": false - }, - { - "description": "require or disallow assignment operator shorthand where possible", - "fixable": true, - "hasSuggestions": false, - "name": "operator-assignment", - "recommended": false - }, - { - "description": "require using arrow functions for callbacks", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-arrow-callback", - "recommended": false - }, - { - "description": "require `const` declarations for variables that are never reassigned after declared", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-const", - "recommended": false - }, - { - "description": "require destructuring from arrays and/or objects", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-destructuring", - "recommended": false - }, - { - "description": "disallow the use of `Math.pow` in favor of the `**` operator", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-exponentiation-operator", - "recommended": false - }, - { - "description": "enforce using named capture group in regular expression", - "fixable": false, - "hasSuggestions": false, - "name": "prefer-named-capture-group", - "recommended": false - }, - { - "description": "disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-numeric-literals", - "recommended": false - }, - { - "description": "disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-object-has-own", - "recommended": false - }, - { - "description": "disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-object-spread", - "recommended": false - }, - { - "description": "require using Error objects as Promise rejection reasons", - "fixable": false, - "hasSuggestions": false, - "name": "prefer-promise-reject-errors", - "recommended": false - }, - { - "description": "disallow use of the `RegExp` constructor in favor of regular expression literals", - "fixable": false, - "hasSuggestions": true, - "name": "prefer-regex-literals", - "recommended": false - }, - { - "description": "require rest parameters instead of `arguments`", - "fixable": false, - "hasSuggestions": false, - "name": "prefer-rest-params", - "recommended": false - }, - { - "description": "require spread operators instead of `.apply()`", - "fixable": false, - "hasSuggestions": false, - "name": "prefer-spread", - "recommended": false - }, - { - "description": "require template literals instead of string concatenation", - "fixable": true, - "hasSuggestions": false, - "name": "prefer-template", - "recommended": false - }, - { - "description": "require quotes around object literal property names", - "fixable": true, - "hasSuggestions": false, - "name": "quote-props", - "recommended": false - }, - { - "description": "enforce the consistent use of the radix argument when using `parseInt()`", - "fixable": false, - "hasSuggestions": true, - "name": "radix", - "recommended": false - }, - { - "description": "disallow async functions which have no `await` expression", - "fixable": false, - "hasSuggestions": false, - "name": "require-await", - "recommended": false - }, - { - "description": "enforce the use of `u` flag on RegExp", - "fixable": false, - "hasSuggestions": false, - "name": "require-unicode-regexp", - "recommended": false - }, - { - "description": "require generator functions to contain `yield`", - "fixable": false, - "hasSuggestions": false, - "name": "require-yield", - "recommended": true - }, - { - "description": "enforce sorted import declarations within modules", - "fixable": true, - "hasSuggestions": false, - "name": "sort-imports", - "recommended": false - }, - { - "description": "require object keys to be sorted", - "fixable": false, - "hasSuggestions": false, - "name": "sort-keys", - "recommended": false - }, - { - "description": "require variables within the same declaration block to be sorted", - "fixable": true, - "hasSuggestions": false, - "name": "sort-vars", - "recommended": false - }, - { - "description": "enforce consistent spacing after the `//` or `/*` in a comment", - "fixable": true, - "hasSuggestions": false, - "name": "spaced-comment", - "recommended": false - }, - { - "description": "require or disallow strict mode directives", - "fixable": true, - "hasSuggestions": false, - "name": "strict", - "recommended": false - }, - { - "description": "require symbol descriptions", - "fixable": false, - "hasSuggestions": false, - "name": "symbol-description", - "recommended": false - }, - { - "description": "require `var` declarations be placed at the top of their containing scope", - "fixable": false, - "hasSuggestions": false, - "name": "vars-on-top", - "recommended": false - }, - { - "description": "require or disallow \"Yoda\" conditions", - "fixable": true, - "hasSuggestions": false, - "name": "yoda", - "recommended": false + "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-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": "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 division operators 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": false + }, + { + "name": "no-empty-function", + "description": "Disallow empty functions", + "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": 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": "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": false + }, + { + "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": false + }, + { + "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": [ + { + "name": "callback-return", + "replacedBy": [] + }, + { + "name": "global-require", + "replacedBy": [] + }, + { + "name": "handle-callback-err", + "replacedBy": [] + }, + { + "name": "id-blacklist", + "replacedBy": [ + "id-denylist" + ] + }, + { + "name": "indent-legacy", + "replacedBy": [ + "indent" + ] + }, + { + "name": "lines-around-directive", + "replacedBy": [ + "padding-line-between-statements" + ] + }, + { + "name": "newline-after-var", + "replacedBy": [ + "padding-line-between-statements" + ] + }, + { + "name": "newline-before-return", + "replacedBy": [ + "padding-line-between-statements" + ] + }, + { + "name": "no-buffer-constructor", + "replacedBy": [] + }, + { + "name": "no-catch-shadow", + "replacedBy": [ + "no-shadow" + ] + }, + { + "name": "no-mixed-requires", + "replacedBy": [] + }, + { + "name": "no-native-reassign", + "replacedBy": [ + "no-global-assign" + ] + }, + { + "name": "no-negated-in-lhs", + "replacedBy": [ + "no-unsafe-negation" + ] + }, + { + "name": "no-new-require", + "replacedBy": [] + }, + { + "name": "no-path-concat", + "replacedBy": [] + }, + { + "name": "no-process-env", + "replacedBy": [] + }, + { + "name": "no-process-exit", + "replacedBy": [] + }, + { + "name": "no-restricted-modules", + "replacedBy": [] + }, + { + "name": "no-spaced-func", + "replacedBy": [ + "func-call-spacing" + ] + }, + { + "name": "no-sync", + "replacedBy": [] + }, + { + "name": "prefer-reflect", + "replacedBy": [] + }, + { + "name": "require-jsdoc", + "replacedBy": [] + }, + { + "name": "valid-jsdoc", + "replacedBy": [] + } + ] }, - { - "description": "These rules care about how the code looks rather than how it executes:", - "displayName": "Layout & Formatting", - "name": "layout", - "rules": [ - { - "description": "enforce linebreaks after opening and before closing array brackets", - "fixable": true, - "hasSuggestions": false, - "name": "array-bracket-newline", - "recommended": false - }, - { - "description": "enforce consistent spacing inside array brackets", - "fixable": true, - "hasSuggestions": false, - "name": "array-bracket-spacing", - "recommended": false - }, - { - "description": "enforce line breaks after each array element", - "fixable": true, - "hasSuggestions": false, - "name": "array-element-newline", - "recommended": false - }, - { - "description": "require parentheses around arrow function arguments", - "fixable": true, - "hasSuggestions": false, - "name": "arrow-parens", - "recommended": false - }, - { - "description": "enforce consistent spacing before and after the arrow in arrow functions", - "fixable": true, - "hasSuggestions": false, - "name": "arrow-spacing", - "recommended": false - }, - { - "description": "disallow or enforce spaces inside of blocks after opening block and before closing block", - "fixable": true, - "hasSuggestions": false, - "name": "block-spacing", - "recommended": false - }, - { - "description": "enforce consistent brace style for blocks", - "fixable": true, - "hasSuggestions": false, - "name": "brace-style", - "recommended": false - }, - { - "description": "require or disallow trailing commas", - "fixable": true, - "hasSuggestions": false, - "name": "comma-dangle", - "recommended": false - }, - { - "description": "enforce consistent spacing before and after commas", - "fixable": true, - "hasSuggestions": false, - "name": "comma-spacing", - "recommended": false - }, - { - "description": "enforce consistent comma style", - "fixable": true, - "hasSuggestions": false, - "name": "comma-style", - "recommended": false - }, - { - "description": "enforce consistent spacing inside computed property brackets", - "fixable": true, - "hasSuggestions": false, - "name": "computed-property-spacing", - "recommended": false - }, - { - "description": "enforce consistent newlines before and after dots", - "fixable": true, - "hasSuggestions": false, - "name": "dot-location", - "recommended": false - }, - { - "description": "require or disallow newline at the end of files", - "fixable": true, - "hasSuggestions": false, - "name": "eol-last", - "recommended": false - }, - { - "description": "require or disallow spacing between function identifiers and their invocations", - "fixable": true, - "hasSuggestions": false, - "name": "func-call-spacing", - "recommended": false - }, - { - "description": "enforce line breaks between arguments of a function call", - "fixable": true, - "hasSuggestions": false, - "name": "function-call-argument-newline", - "recommended": false - }, - { - "description": "enforce consistent line breaks inside function parentheses", - "fixable": true, - "hasSuggestions": false, - "name": "function-paren-newline", - "recommended": false - }, - { - "description": "enforce consistent spacing around `*` operators in generator functions", - "fixable": true, - "hasSuggestions": false, - "name": "generator-star-spacing", - "recommended": false - }, - { - "description": "enforce the location of arrow function bodies", - "fixable": true, - "hasSuggestions": false, - "name": "implicit-arrow-linebreak", - "recommended": false - }, - { - "description": "enforce consistent indentation", - "fixable": true, - "hasSuggestions": false, - "name": "indent", - "recommended": false - }, - { - "description": "enforce the consistent use of either double or single quotes in JSX attributes", - "fixable": true, - "hasSuggestions": false, - "name": "jsx-quotes", - "recommended": false - }, - { - "description": "enforce consistent spacing between keys and values in object literal properties", - "fixable": true, - "hasSuggestions": false, - "name": "key-spacing", - "recommended": false - }, - { - "description": "enforce consistent spacing before and after keywords", - "fixable": true, - "hasSuggestions": false, - "name": "keyword-spacing", - "recommended": false - }, - { - "description": "enforce position of line comments", - "fixable": false, - "hasSuggestions": false, - "name": "line-comment-position", - "recommended": false - }, - { - "description": "enforce consistent linebreak style", - "fixable": true, - "hasSuggestions": false, - "name": "linebreak-style", - "recommended": false - }, - { - "description": "require empty lines around comments", - "fixable": true, - "hasSuggestions": false, - "name": "lines-around-comment", - "recommended": false - }, - { - "description": "require or disallow an empty line between class members", - "fixable": true, - "hasSuggestions": false, - "name": "lines-between-class-members", - "recommended": false - }, - { - "description": "enforce a maximum line length", - "fixable": false, - "hasSuggestions": false, - "name": "max-len", - "recommended": false - }, - { - "description": "enforce a maximum number of statements allowed per line", - "fixable": false, - "hasSuggestions": false, - "name": "max-statements-per-line", - "recommended": false - }, - { - "description": "enforce newlines between operands of ternary expressions", - "fixable": true, - "hasSuggestions": false, - "name": "multiline-ternary", - "recommended": false - }, - { - "description": "enforce or disallow parentheses when invoking a constructor with no arguments", - "fixable": true, - "hasSuggestions": false, - "name": "new-parens", - "recommended": false - }, - { - "description": "require a newline after each call in a method chain", - "fixable": true, - "hasSuggestions": false, - "name": "newline-per-chained-call", - "recommended": false - }, - { - "description": "disallow unnecessary parentheses", - "fixable": true, - "hasSuggestions": false, - "name": "no-extra-parens", - "recommended": false - }, - { - "description": "disallow mixed spaces and tabs for indentation", - "fixable": false, - "hasSuggestions": false, - "name": "no-mixed-spaces-and-tabs", - "recommended": true - }, - { - "description": "disallow multiple spaces", - "fixable": true, - "hasSuggestions": false, - "name": "no-multi-spaces", - "recommended": false - }, - { - "description": "disallow multiple empty lines", - "fixable": true, - "hasSuggestions": false, - "name": "no-multiple-empty-lines", - "recommended": false - }, - { - "description": "disallow all tabs", - "fixable": false, - "hasSuggestions": false, - "name": "no-tabs", - "recommended": false - }, - { - "description": "disallow trailing whitespace at the end of lines", - "fixable": true, - "hasSuggestions": false, - "name": "no-trailing-spaces", - "recommended": false - }, - { - "description": "disallow whitespace before properties", - "fixable": true, - "hasSuggestions": false, - "name": "no-whitespace-before-property", - "recommended": false - }, - { - "description": "enforce the location of single-line statements", - "fixable": true, - "hasSuggestions": false, - "name": "nonblock-statement-body-position", - "recommended": false - }, - { - "description": "enforce consistent line breaks after opening and before closing braces", - "fixable": true, - "hasSuggestions": false, - "name": "object-curly-newline", - "recommended": false - }, - { - "description": "enforce consistent spacing inside braces", - "fixable": true, - "hasSuggestions": false, - "name": "object-curly-spacing", - "recommended": false - }, - { - "description": "enforce placing object properties on separate lines", - "fixable": true, - "hasSuggestions": false, - "name": "object-property-newline", - "recommended": false - }, - { - "description": "enforce consistent linebreak style for operators", - "fixable": true, - "hasSuggestions": false, - "name": "operator-linebreak", - "recommended": false - }, - { - "description": "require or disallow padding within blocks", - "fixable": true, - "hasSuggestions": false, - "name": "padded-blocks", - "recommended": false - }, - { - "description": "require or disallow padding lines between statements", - "fixable": true, - "hasSuggestions": false, - "name": "padding-line-between-statements", - "recommended": false - }, - { - "description": "enforce the consistent use of either backticks, double, or single quotes", - "fixable": true, - "hasSuggestions": false, - "name": "quotes", - "recommended": false - }, - { - "description": "enforce spacing between rest and spread operators and their expressions", - "fixable": true, - "hasSuggestions": false, - "name": "rest-spread-spacing", - "recommended": false - }, - { - "description": "require or disallow semicolons instead of ASI", - "fixable": true, - "hasSuggestions": false, - "name": "semi", - "recommended": false - }, - { - "description": "enforce consistent spacing before and after semicolons", - "fixable": true, - "hasSuggestions": false, - "name": "semi-spacing", - "recommended": false - }, - { - "description": "enforce location of semicolons", - "fixable": true, - "hasSuggestions": false, - "name": "semi-style", - "recommended": false - }, - { - "description": "enforce consistent spacing before blocks", - "fixable": true, - "hasSuggestions": false, - "name": "space-before-blocks", - "recommended": false - }, - { - "description": "enforce consistent spacing before `function` definition opening parenthesis", - "fixable": true, - "hasSuggestions": false, - "name": "space-before-function-paren", - "recommended": false - }, - { - "description": "enforce consistent spacing inside parentheses", - "fixable": true, - "hasSuggestions": false, - "name": "space-in-parens", - "recommended": false - }, - { - "description": "require spacing around infix operators", - "fixable": true, - "hasSuggestions": false, - "name": "space-infix-ops", - "recommended": false - }, - { - "description": "enforce consistent spacing before or after unary operators", - "fixable": true, - "hasSuggestions": false, - "name": "space-unary-ops", - "recommended": false - }, - { - "description": "enforce spacing around colons of switch statements", - "fixable": true, - "hasSuggestions": false, - "name": "switch-colon-spacing", - "recommended": false - }, - { - "description": "require or disallow spacing around embedded expressions of template strings", - "fixable": true, - "hasSuggestions": false, - "name": "template-curly-spacing", - "recommended": false - }, - { - "description": "require or disallow spacing between template tags and their literals", - "fixable": true, - "hasSuggestions": false, - "name": "template-tag-spacing", - "recommended": false - }, - { - "description": "require or disallow Unicode byte order mark (BOM)", - "fixable": true, - "hasSuggestions": false, - "name": "unicode-bom", - "recommended": false - }, - { - "description": "require parentheses around immediate `function` invocations", - "fixable": true, - "hasSuggestions": false, - "name": "wrap-iife", - "recommended": false - }, - { - "description": "require parenthesis around regex literals", - "fixable": true, - "hasSuggestions": false, - "name": "wrap-regex", - "recommended": false - }, - { - "description": "require or disallow spacing around the `*` in `yield*` expressions", - "fixable": true, - "hasSuggestions": false, - "name": "yield-star-spacing", - "recommended": false - } - ] + "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" + ] + } + ] } - ] -} +} \ No newline at end of file diff --git a/docs/src/_data/rules_meta.json b/docs/src/_data/rules_meta.json new file mode 100644 index 00000000000..56a986260b3 --- /dev/null +++ b/docs/src/_data/rules_meta.json @@ -0,0 +1,2487 @@ +{ + "accessor-pairs": { + "type": "suggestion", + "docs": { + "description": "Enforce getter and setter pairs in objects and classes", + "recommended": false, + "url": "https://eslint.org/docs/rules/accessor-pairs" + } + }, + "array-bracket-newline": { + "type": "layout", + "docs": { + "description": "Enforce linebreaks after opening and before closing array brackets", + "recommended": false, + "url": "https://eslint.org/docs/rules/array-bracket-newline" + }, + "fixable": "whitespace" + }, + "array-bracket-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing inside array brackets", + "recommended": false, + "url": "https://eslint.org/docs/rules/array-bracket-spacing" + }, + "fixable": "whitespace" + }, + "array-callback-return": { + "type": "problem", + "docs": { + "description": "Enforce `return` statements in callbacks of array methods", + "recommended": false, + "url": "https://eslint.org/docs/rules/array-callback-return" + } + }, + "array-element-newline": { + "type": "layout", + "docs": { + "description": "Enforce line breaks after each array element", + "recommended": false, + "url": "https://eslint.org/docs/rules/array-element-newline" + }, + "fixable": "whitespace" + }, + "arrow-body-style": { + "type": "suggestion", + "docs": { + "description": "Require braces around arrow function bodies", + "recommended": false, + "url": "https://eslint.org/docs/rules/arrow-body-style" + }, + "fixable": "code" + }, + "arrow-parens": { + "type": "layout", + "docs": { + "description": "Require parentheses around arrow function arguments", + "recommended": false, + "url": "https://eslint.org/docs/rules/arrow-parens" + }, + "fixable": "code" + }, + "arrow-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before and after the arrow in arrow functions", + "recommended": false, + "url": "https://eslint.org/docs/rules/arrow-spacing" + }, + "fixable": "whitespace" + }, + "block-scoped-var": { + "type": "suggestion", + "docs": { + "description": "Enforce the use of variables within the scope they are defined", + "recommended": false, + "url": "https://eslint.org/docs/rules/block-scoped-var" + } + }, + "block-spacing": { + "type": "layout", + "docs": { + "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block", + "recommended": false, + "url": "https://eslint.org/docs/rules/block-spacing" + }, + "fixable": "whitespace" + }, + "brace-style": { + "type": "layout", + "docs": { + "description": "Enforce consistent brace style for blocks", + "recommended": false, + "url": "https://eslint.org/docs/rules/brace-style" + }, + "fixable": "whitespace" + }, + "callback-return": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Require `return` statements after callbacks", + "recommended": false, + "url": "https://eslint.org/docs/rules/callback-return" + } + }, + "camelcase": { + "type": "suggestion", + "docs": { + "description": "Enforce camelcase naming convention", + "recommended": false, + "url": "https://eslint.org/docs/rules/camelcase" + } + }, + "capitalized-comments": { + "type": "suggestion", + "docs": { + "description": "Enforce or disallow capitalization of the first letter of a comment", + "recommended": false, + "url": "https://eslint.org/docs/rules/capitalized-comments" + }, + "fixable": "code" + }, + "class-methods-use-this": { + "type": "suggestion", + "docs": { + "description": "Enforce that class methods utilize `this`", + "recommended": false, + "url": "https://eslint.org/docs/rules/class-methods-use-this" + } + }, + "comma-dangle": { + "type": "layout", + "docs": { + "description": "Require or disallow trailing commas", + "recommended": false, + "url": "https://eslint.org/docs/rules/comma-dangle" + }, + "fixable": "code" + }, + "comma-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before and after commas", + "recommended": false, + "url": "https://eslint.org/docs/rules/comma-spacing" + }, + "fixable": "whitespace" + }, + "comma-style": { + "type": "layout", + "docs": { + "description": "Enforce consistent comma style", + "recommended": false, + "url": "https://eslint.org/docs/rules/comma-style" + }, + "fixable": "code" + }, + "complexity": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum cyclomatic complexity allowed in a program", + "recommended": false, + "url": "https://eslint.org/docs/rules/complexity" + } + }, + "computed-property-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing inside computed property brackets", + "recommended": false, + "url": "https://eslint.org/docs/rules/computed-property-spacing" + }, + "fixable": "whitespace" + }, + "consistent-return": { + "type": "suggestion", + "docs": { + "description": "Require `return` statements to either always or never specify values", + "recommended": false, + "url": "https://eslint.org/docs/rules/consistent-return" + } + }, + "consistent-this": { + "type": "suggestion", + "docs": { + "description": "Enforce consistent naming when capturing the current execution context", + "recommended": false, + "url": "https://eslint.org/docs/rules/consistent-this" + } + }, + "constructor-super": { + "type": "problem", + "docs": { + "description": "Require `super()` calls in constructors", + "recommended": true, + "url": "https://eslint.org/docs/rules/constructor-super" + } + }, + "curly": { + "type": "suggestion", + "docs": { + "description": "Enforce consistent brace style for all control statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/curly" + }, + "fixable": "code" + }, + "default-case": { + "type": "suggestion", + "docs": { + "description": "Require `default` cases in `switch` statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/default-case" + } + }, + "default-case-last": { + "type": "suggestion", + "docs": { + "description": "Enforce default clauses in switch statements to be last", + "recommended": false, + "url": "https://eslint.org/docs/rules/default-case-last" + } + }, + "default-param-last": { + "type": "suggestion", + "docs": { + "description": "Enforce default parameters to be last", + "recommended": false, + "url": "https://eslint.org/docs/rules/default-param-last" + } + }, + "dot-location": { + "type": "layout", + "docs": { + "description": "Enforce consistent newlines before and after dots", + "recommended": false, + "url": "https://eslint.org/docs/rules/dot-location" + }, + "fixable": "code" + }, + "dot-notation": { + "type": "suggestion", + "docs": { + "description": "Enforce dot notation whenever possible", + "recommended": false, + "url": "https://eslint.org/docs/rules/dot-notation" + }, + "fixable": "code" + }, + "eol-last": { + "type": "layout", + "docs": { + "description": "Require or disallow newline at the end of files", + "recommended": false, + "url": "https://eslint.org/docs/rules/eol-last" + }, + "fixable": "whitespace" + }, + "eqeqeq": { + "type": "suggestion", + "docs": { + "description": "Require the use of `===` and `!==`", + "recommended": false, + "url": "https://eslint.org/docs/rules/eqeqeq" + }, + "fixable": "code" + }, + "for-direction": { + "type": "problem", + "docs": { + "description": "Enforce \"for\" loop update clause moving the counter in the right direction.", + "recommended": true, + "url": "https://eslint.org/docs/rules/for-direction" + }, + "fixable": null + }, + "func-call-spacing": { + "type": "layout", + "docs": { + "description": "Require or disallow spacing between function identifiers and their invocations", + "recommended": false, + "url": "https://eslint.org/docs/rules/func-call-spacing" + }, + "fixable": "whitespace" + }, + "func-name-matching": { + "type": "suggestion", + "docs": { + "description": "Require function names to match the name of the variable or property to which they are assigned", + "recommended": false, + "url": "https://eslint.org/docs/rules/func-name-matching" + } + }, + "func-names": { + "type": "suggestion", + "docs": { + "description": "Require or disallow named `function` expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/func-names" + } + }, + "func-style": { + "type": "suggestion", + "docs": { + "description": "Enforce the consistent use of either `function` declarations or expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/func-style" + } + }, + "function-call-argument-newline": { + "type": "layout", + "docs": { + "description": "Enforce line breaks between arguments of a function call", + "recommended": false, + "url": "https://eslint.org/docs/rules/function-call-argument-newline" + }, + "fixable": "whitespace" + }, + "function-paren-newline": { + "type": "layout", + "docs": { + "description": "Enforce consistent line breaks inside function parentheses", + "recommended": false, + "url": "https://eslint.org/docs/rules/function-paren-newline" + }, + "fixable": "whitespace" + }, + "generator-star-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing around `*` operators in generator functions", + "recommended": false, + "url": "https://eslint.org/docs/rules/generator-star-spacing" + }, + "fixable": "whitespace" + }, + "getter-return": { + "type": "problem", + "docs": { + "description": "Enforce `return` statements in getters", + "recommended": true, + "url": "https://eslint.org/docs/rules/getter-return" + }, + "fixable": null + }, + "global-require": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Require `require()` calls to be placed at top-level module scope", + "recommended": false, + "url": "https://eslint.org/docs/rules/global-require" + } + }, + "grouped-accessor-pairs": { + "type": "suggestion", + "docs": { + "description": "Require grouped accessor pairs in object literals and classes", + "recommended": false, + "url": "https://eslint.org/docs/rules/grouped-accessor-pairs" + } + }, + "guard-for-in": { + "type": "suggestion", + "docs": { + "description": "Require `for-in` loops to include an `if` statement", + "recommended": false, + "url": "https://eslint.org/docs/rules/guard-for-in" + } + }, + "handle-callback-err": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Require error handling in callbacks", + "recommended": false, + "url": "https://eslint.org/docs/rules/handle-callback-err" + } + }, + "id-blacklist": { + "deprecated": true, + "replacedBy": [ + "id-denylist" + ], + "type": "suggestion", + "docs": { + "description": "Disallow specified identifiers", + "recommended": false, + "url": "https://eslint.org/docs/rules/id-blacklist" + } + }, + "id-denylist": { + "type": "suggestion", + "docs": { + "description": "Disallow specified identifiers", + "recommended": false, + "url": "https://eslint.org/docs/rules/id-denylist" + } + }, + "id-length": { + "type": "suggestion", + "docs": { + "description": "Enforce minimum and maximum identifier lengths", + "recommended": false, + "url": "https://eslint.org/docs/rules/id-length" + } + }, + "id-match": { + "type": "suggestion", + "docs": { + "description": "Require identifiers to match a specified regular expression", + "recommended": false, + "url": "https://eslint.org/docs/rules/id-match" + } + }, + "implicit-arrow-linebreak": { + "type": "layout", + "docs": { + "description": "Enforce the location of arrow function bodies", + "recommended": false, + "url": "https://eslint.org/docs/rules/implicit-arrow-linebreak" + }, + "fixable": "whitespace" + }, + "indent": { + "type": "layout", + "docs": { + "description": "Enforce consistent indentation", + "recommended": false, + "url": "https://eslint.org/docs/rules/indent" + }, + "fixable": "whitespace" + }, + "indent-legacy": { + "type": "layout", + "docs": { + "description": "Enforce consistent indentation", + "recommended": false, + "url": "https://eslint.org/docs/rules/indent-legacy" + }, + "deprecated": true, + "replacedBy": [ + "indent" + ], + "fixable": "whitespace" + }, + "init-declarations": { + "type": "suggestion", + "docs": { + "description": "Require or disallow initialization in variable declarations", + "recommended": false, + "url": "https://eslint.org/docs/rules/init-declarations" + } + }, + "jsx-quotes": { + "type": "layout", + "docs": { + "description": "Enforce the consistent use of either double or single quotes in JSX attributes", + "recommended": false, + "url": "https://eslint.org/docs/rules/jsx-quotes" + }, + "fixable": "whitespace" + }, + "key-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing between keys and values in object literal properties", + "recommended": false, + "url": "https://eslint.org/docs/rules/key-spacing" + }, + "fixable": "whitespace" + }, + "keyword-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before and after keywords", + "recommended": false, + "url": "https://eslint.org/docs/rules/keyword-spacing" + }, + "fixable": "whitespace" + }, + "line-comment-position": { + "type": "layout", + "docs": { + "description": "Enforce position of line comments", + "recommended": false, + "url": "https://eslint.org/docs/rules/line-comment-position" + } + }, + "linebreak-style": { + "type": "layout", + "docs": { + "description": "Enforce consistent linebreak style", + "recommended": false, + "url": "https://eslint.org/docs/rules/linebreak-style" + }, + "fixable": "whitespace" + }, + "lines-around-comment": { + "type": "layout", + "docs": { + "description": "Require empty lines around comments", + "recommended": false, + "url": "https://eslint.org/docs/rules/lines-around-comment" + }, + "fixable": "whitespace" + }, + "lines-around-directive": { + "type": "layout", + "docs": { + "description": "Require or disallow newlines around directives", + "recommended": false, + "url": "https://eslint.org/docs/rules/lines-around-directive" + }, + "fixable": "whitespace", + "deprecated": true, + "replacedBy": [ + "padding-line-between-statements" + ] + }, + "lines-between-class-members": { + "type": "layout", + "docs": { + "description": "Require or disallow an empty line between class members", + "recommended": false, + "url": "https://eslint.org/docs/rules/lines-between-class-members" + }, + "fixable": "whitespace" + }, + "max-classes-per-file": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum number of classes per file", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-classes-per-file" + } + }, + "max-depth": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum depth that blocks can be nested", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-depth" + } + }, + "max-len": { + "type": "layout", + "docs": { + "description": "Enforce a maximum line length", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-len" + } + }, + "max-lines": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum number of lines per file", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-lines" + } + }, + "max-lines-per-function": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum number of lines of code in a function", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-lines-per-function" + } + }, + "max-nested-callbacks": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum depth that callbacks can be nested", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-nested-callbacks" + } + }, + "max-params": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum number of parameters in function definitions", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-params" + } + }, + "max-statements": { + "type": "suggestion", + "docs": { + "description": "Enforce a maximum number of statements allowed in function blocks", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-statements" + } + }, + "max-statements-per-line": { + "type": "layout", + "docs": { + "description": "Enforce a maximum number of statements allowed per line", + "recommended": false, + "url": "https://eslint.org/docs/rules/max-statements-per-line" + } + }, + "multiline-comment-style": { + "type": "suggestion", + "docs": { + "description": "Enforce a particular style for multiline comments", + "recommended": false, + "url": "https://eslint.org/docs/rules/multiline-comment-style" + }, + "fixable": "whitespace" + }, + "multiline-ternary": { + "type": "layout", + "docs": { + "description": "Enforce newlines between operands of ternary expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/multiline-ternary" + }, + "fixable": "whitespace" + }, + "new-cap": { + "type": "suggestion", + "docs": { + "description": "Require constructor names to begin with a capital letter", + "recommended": false, + "url": "https://eslint.org/docs/rules/new-cap" + } + }, + "new-parens": { + "type": "layout", + "docs": { + "description": "Enforce or disallow parentheses when invoking a constructor with no arguments", + "recommended": false, + "url": "https://eslint.org/docs/rules/new-parens" + }, + "fixable": "code" + }, + "newline-after-var": { + "type": "layout", + "docs": { + "description": "Require or disallow an empty line after variable declarations", + "recommended": false, + "url": "https://eslint.org/docs/rules/newline-after-var" + }, + "fixable": "whitespace", + "deprecated": true, + "replacedBy": [ + "padding-line-between-statements" + ] + }, + "newline-before-return": { + "type": "layout", + "docs": { + "description": "Require an empty line before `return` statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/newline-before-return" + }, + "fixable": "whitespace", + "deprecated": true, + "replacedBy": [ + "padding-line-between-statements" + ] + }, + "newline-per-chained-call": { + "type": "layout", + "docs": { + "description": "Require a newline after each call in a method chain", + "recommended": false, + "url": "https://eslint.org/docs/rules/newline-per-chained-call" + }, + "fixable": "whitespace" + }, + "no-alert": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `alert`, `confirm`, and `prompt`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-alert" + } + }, + "no-array-constructor": { + "type": "suggestion", + "docs": { + "description": "Disallow `Array` constructors", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-array-constructor" + } + }, + "no-async-promise-executor": { + "type": "problem", + "docs": { + "description": "Disallow using an async function as a Promise executor", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-async-promise-executor" + }, + "fixable": null + }, + "no-await-in-loop": { + "type": "problem", + "docs": { + "description": "Disallow `await` inside of loops", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-await-in-loop" + } + }, + "no-bitwise": { + "type": "suggestion", + "docs": { + "description": "Disallow bitwise operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-bitwise" + } + }, + "no-buffer-constructor": { + "deprecated": true, + "replacedBy": [], + "type": "problem", + "docs": { + "description": "Disallow use of the `Buffer()` constructor", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-buffer-constructor" + } + }, + "no-caller": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `arguments.caller` or `arguments.callee`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-caller" + } + }, + "no-case-declarations": { + "type": "suggestion", + "docs": { + "description": "Disallow lexical declarations in case clauses", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-case-declarations" + } + }, + "no-catch-shadow": { + "type": "suggestion", + "docs": { + "description": "Disallow `catch` clause parameters from shadowing variables in the outer scope", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-catch-shadow" + }, + "replacedBy": [ + "no-shadow" + ], + "deprecated": true + }, + "no-class-assign": { + "type": "problem", + "docs": { + "description": "Disallow reassigning class members", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-class-assign" + } + }, + "no-compare-neg-zero": { + "type": "problem", + "docs": { + "description": "Disallow comparing against -0", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-compare-neg-zero" + }, + "fixable": null + }, + "no-cond-assign": { + "type": "problem", + "docs": { + "description": "Disallow assignment operators in conditional expressions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-cond-assign" + } + }, + "no-confusing-arrow": { + "type": "suggestion", + "docs": { + "description": "Disallow arrow functions where they could be confused with comparisons", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-confusing-arrow" + }, + "fixable": "code" + }, + "no-console": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `console`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-console" + } + }, + "no-const-assign": { + "type": "problem", + "docs": { + "description": "Disallow reassigning `const` variables", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-const-assign" + } + }, + "no-constant-binary-expression": { + "type": "problem", + "docs": { + "description": "Disallow expressions where the operation doesn't affect the value", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-constant-binary-expression" + } + }, + "no-constant-condition": { + "type": "problem", + "docs": { + "description": "Disallow constant expressions in conditions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-constant-condition" + } + }, + "no-constructor-return": { + "type": "problem", + "docs": { + "description": "Disallow returning value from constructor", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-constructor-return" + }, + "fixable": null + }, + "no-continue": { + "type": "suggestion", + "docs": { + "description": "Disallow `continue` statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-continue" + } + }, + "no-control-regex": { + "type": "problem", + "docs": { + "description": "Disallow control characters in regular expressions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-control-regex" + } + }, + "no-debugger": { + "type": "problem", + "docs": { + "description": "Disallow the use of `debugger`", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-debugger" + }, + "fixable": null + }, + "no-delete-var": { + "type": "suggestion", + "docs": { + "description": "Disallow deleting variables", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-delete-var" + } + }, + "no-div-regex": { + "type": "suggestion", + "docs": { + "description": "Disallow division operators explicitly at the beginning of regular expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-div-regex" + }, + "fixable": "code" + }, + "no-dupe-args": { + "type": "problem", + "docs": { + "description": "Disallow duplicate arguments in `function` definitions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-dupe-args" + } + }, + "no-dupe-class-members": { + "type": "problem", + "docs": { + "description": "Disallow duplicate class members", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-dupe-class-members" + } + }, + "no-dupe-else-if": { + "type": "problem", + "docs": { + "description": "Disallow duplicate conditions in if-else-if chains", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-dupe-else-if" + } + }, + "no-dupe-keys": { + "type": "problem", + "docs": { + "description": "Disallow duplicate keys in object literals", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-dupe-keys" + } + }, + "no-duplicate-case": { + "type": "problem", + "docs": { + "description": "Disallow duplicate case labels", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-duplicate-case" + } + }, + "no-duplicate-imports": { + "type": "problem", + "docs": { + "description": "Disallow duplicate module imports", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-duplicate-imports" + } + }, + "no-else-return": { + "type": "suggestion", + "docs": { + "description": "Disallow `else` blocks after `return` statements in `if` statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-else-return" + }, + "fixable": "code" + }, + "no-empty": { + "type": "suggestion", + "docs": { + "description": "Disallow empty block statements", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-empty" + } + }, + "no-empty-character-class": { + "type": "problem", + "docs": { + "description": "Disallow empty character classes in regular expressions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-empty-character-class" + } + }, + "no-empty-function": { + "type": "suggestion", + "docs": { + "description": "Disallow empty functions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-empty-function" + } + }, + "no-empty-pattern": { + "type": "problem", + "docs": { + "description": "Disallow empty destructuring patterns", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-empty-pattern" + } + }, + "no-eq-null": { + "type": "suggestion", + "docs": { + "description": "Disallow `null` comparisons without type-checking operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-eq-null" + } + }, + "no-eval": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `eval()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-eval" + } + }, + "no-ex-assign": { + "type": "problem", + "docs": { + "description": "Disallow reassigning exceptions in `catch` clauses", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-ex-assign" + } + }, + "no-extend-native": { + "type": "suggestion", + "docs": { + "description": "Disallow extending native types", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-extend-native" + } + }, + "no-extra-bind": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary calls to `.bind()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-extra-bind" + }, + "fixable": "code" + }, + "no-extra-boolean-cast": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary boolean casts", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-extra-boolean-cast" + }, + "fixable": "code" + }, + "no-extra-label": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary labels", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-extra-label" + }, + "fixable": "code" + }, + "no-extra-parens": { + "type": "layout", + "docs": { + "description": "Disallow unnecessary parentheses", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-extra-parens" + }, + "fixable": "code" + }, + "no-extra-semi": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary semicolons", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-extra-semi" + }, + "fixable": "code" + }, + "no-fallthrough": { + "type": "problem", + "docs": { + "description": "Disallow fallthrough of `case` statements", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-fallthrough" + } + }, + "no-floating-decimal": { + "type": "suggestion", + "docs": { + "description": "Disallow leading or trailing decimal points in numeric literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-floating-decimal" + }, + "fixable": "code" + }, + "no-func-assign": { + "type": "problem", + "docs": { + "description": "Disallow reassigning `function` declarations", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-func-assign" + } + }, + "no-global-assign": { + "type": "suggestion", + "docs": { + "description": "Disallow assignments to native objects or read-only global variables", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-global-assign" + } + }, + "no-implicit-coercion": { + "type": "suggestion", + "docs": { + "description": "Disallow shorthand type conversions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-implicit-coercion" + }, + "fixable": "code" + }, + "no-implicit-globals": { + "type": "suggestion", + "docs": { + "description": "Disallow declarations in the global scope", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-implicit-globals" + } + }, + "no-implied-eval": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `eval()`-like methods", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-implied-eval" + } + }, + "no-import-assign": { + "type": "problem", + "docs": { + "description": "Disallow assigning to imported bindings", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-import-assign" + } + }, + "no-inline-comments": { + "type": "suggestion", + "docs": { + "description": "Disallow inline comments after code", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-inline-comments" + } + }, + "no-inner-declarations": { + "type": "problem", + "docs": { + "description": "Disallow variable or `function` declarations in nested blocks", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-inner-declarations" + } + }, + "no-invalid-regexp": { + "type": "problem", + "docs": { + "description": "Disallow invalid regular expression strings in `RegExp` constructors", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-invalid-regexp" + } + }, + "no-invalid-this": { + "type": "suggestion", + "docs": { + "description": "Disallow use of `this` in contexts where the value of `this` is `undefined`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-invalid-this" + } + }, + "no-irregular-whitespace": { + "type": "problem", + "docs": { + "description": "Disallow irregular whitespace", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-irregular-whitespace" + } + }, + "no-iterator": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of the `__iterator__` property", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-iterator" + } + }, + "no-label-var": { + "type": "suggestion", + "docs": { + "description": "Disallow labels that share a name with a variable", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-label-var" + } + }, + "no-labels": { + "type": "suggestion", + "docs": { + "description": "Disallow labeled statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-labels" + } + }, + "no-lone-blocks": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary nested blocks", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-lone-blocks" + } + }, + "no-lonely-if": { + "type": "suggestion", + "docs": { + "description": "Disallow `if` statements as the only statement in `else` blocks", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-lonely-if" + }, + "fixable": "code" + }, + "no-loop-func": { + "type": "suggestion", + "docs": { + "description": "Disallow function declarations that contain unsafe references inside loop statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-loop-func" + } + }, + "no-loss-of-precision": { + "type": "problem", + "docs": { + "description": "Disallow literal numbers that lose precision", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-loss-of-precision" + } + }, + "no-magic-numbers": { + "type": "suggestion", + "docs": { + "description": "Disallow magic numbers", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-magic-numbers" + } + }, + "no-misleading-character-class": { + "type": "problem", + "docs": { + "description": "Disallow characters which are made with multiple code points in character class syntax", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-misleading-character-class" + }, + "hasSuggestions": true + }, + "no-mixed-operators": { + "type": "suggestion", + "docs": { + "description": "Disallow mixed binary operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-mixed-operators" + } + }, + "no-mixed-requires": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow `require` calls to be mixed with regular variable declarations", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-mixed-requires" + } + }, + "no-mixed-spaces-and-tabs": { + "type": "layout", + "docs": { + "description": "Disallow mixed spaces and tabs for indentation", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-mixed-spaces-and-tabs" + } + }, + "no-multi-assign": { + "type": "suggestion", + "docs": { + "description": "Disallow use of chained assignment expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-multi-assign" + } + }, + "no-multi-spaces": { + "type": "layout", + "docs": { + "description": "Disallow multiple spaces", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-multi-spaces" + }, + "fixable": "whitespace" + }, + "no-multi-str": { + "type": "suggestion", + "docs": { + "description": "Disallow multiline strings", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-multi-str" + } + }, + "no-multiple-empty-lines": { + "type": "layout", + "docs": { + "description": "Disallow multiple empty lines", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-multiple-empty-lines" + }, + "fixable": "whitespace" + }, + "no-native-reassign": { + "type": "suggestion", + "docs": { + "description": "Disallow assignments to native objects or read-only global variables", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-native-reassign" + }, + "deprecated": true, + "replacedBy": [ + "no-global-assign" + ] + }, + "no-negated-condition": { + "type": "suggestion", + "docs": { + "description": "Disallow negated conditions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-negated-condition" + } + }, + "no-negated-in-lhs": { + "type": "problem", + "docs": { + "description": "Disallow negating the left operand in `in` expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-negated-in-lhs" + }, + "replacedBy": [ + "no-unsafe-negation" + ], + "deprecated": true + }, + "no-nested-ternary": { + "type": "suggestion", + "docs": { + "description": "Disallow nested ternary expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-nested-ternary" + } + }, + "no-new": { + "type": "suggestion", + "docs": { + "description": "Disallow `new` operators outside of assignments or comparisons", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-new" + } + }, + "no-new-func": { + "type": "suggestion", + "docs": { + "description": "Disallow `new` operators with the `Function` object", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-new-func" + } + }, + "no-new-object": { + "type": "suggestion", + "docs": { + "description": "Disallow `Object` constructors", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-new-object" + } + }, + "no-new-require": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow `new` operators with calls to `require`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-new-require" + } + }, + "no-new-symbol": { + "type": "problem", + "docs": { + "description": "Disallow `new` operators with the `Symbol` object", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-new-symbol" + } + }, + "no-new-wrappers": { + "type": "suggestion", + "docs": { + "description": "Disallow `new` operators with the `String`, `Number`, and `Boolean` objects", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-new-wrappers" + } + }, + "no-nonoctal-decimal-escape": { + "type": "suggestion", + "docs": { + "description": "Disallow `\\8` and `\\9` escape sequences in string literals", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-nonoctal-decimal-escape" + }, + "hasSuggestions": true + }, + "no-obj-calls": { + "type": "problem", + "docs": { + "description": "Disallow calling global object properties as functions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-obj-calls" + } + }, + "no-octal": { + "type": "suggestion", + "docs": { + "description": "Disallow octal literals", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-octal" + } + }, + "no-octal-escape": { + "type": "suggestion", + "docs": { + "description": "Disallow octal escape sequences in string literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-octal-escape" + } + }, + "no-param-reassign": { + "type": "suggestion", + "docs": { + "description": "Disallow reassigning `function` parameters", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-param-reassign" + } + }, + "no-path-concat": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow string concatenation with `__dirname` and `__filename`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-path-concat" + } + }, + "no-plusplus": { + "type": "suggestion", + "docs": { + "description": "Disallow the unary operators `++` and `--`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-plusplus" + } + }, + "no-process-env": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow the use of `process.env`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-process-env" + } + }, + "no-process-exit": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow the use of `process.exit()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-process-exit" + } + }, + "no-promise-executor-return": { + "type": "problem", + "docs": { + "description": "Disallow returning values from Promise executor functions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-promise-executor-return" + } + }, + "no-proto": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of the `__proto__` property", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-proto" + } + }, + "no-prototype-builtins": { + "type": "problem", + "docs": { + "description": "Disallow calling some `Object.prototype` methods directly on objects", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-prototype-builtins" + } + }, + "no-redeclare": { + "type": "suggestion", + "docs": { + "description": "Disallow variable redeclaration", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-redeclare" + } + }, + "no-regex-spaces": { + "type": "suggestion", + "docs": { + "description": "Disallow multiple spaces in regular expressions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-regex-spaces" + }, + "fixable": "code" + }, + "no-restricted-exports": { + "type": "suggestion", + "docs": { + "description": "Disallow specified names in exports", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-restricted-exports" + } + }, + "no-restricted-globals": { + "type": "suggestion", + "docs": { + "description": "Disallow specified global variables", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-restricted-globals" + } + }, + "no-restricted-imports": { + "type": "suggestion", + "docs": { + "description": "Disallow specified modules when loaded by `import`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-restricted-imports" + } + }, + "no-restricted-modules": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow specified modules when loaded by `require`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-restricted-modules" + } + }, + "no-restricted-properties": { + "type": "suggestion", + "docs": { + "description": "Disallow certain properties on certain objects", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-restricted-properties" + } + }, + "no-restricted-syntax": { + "type": "suggestion", + "docs": { + "description": "Disallow specified syntax", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-restricted-syntax" + } + }, + "no-return-assign": { + "type": "suggestion", + "docs": { + "description": "Disallow assignment operators in `return` statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-return-assign" + } + }, + "no-return-await": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary `return await`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-return-await" + }, + "fixable": null + }, + "no-script-url": { + "type": "suggestion", + "docs": { + "description": "Disallow `javascript:` urls", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-script-url" + } + }, + "no-self-assign": { + "type": "problem", + "docs": { + "description": "Disallow assignments where both sides are exactly the same", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-self-assign" + } + }, + "no-self-compare": { + "type": "problem", + "docs": { + "description": "Disallow comparisons where both sides are exactly the same", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-self-compare" + } + }, + "no-sequences": { + "type": "suggestion", + "docs": { + "description": "Disallow comma operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-sequences" + } + }, + "no-setter-return": { + "type": "problem", + "docs": { + "description": "Disallow returning values from setters", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-setter-return" + } + }, + "no-shadow": { + "type": "suggestion", + "docs": { + "description": "Disallow variable declarations from shadowing variables declared in the outer scope", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-shadow" + } + }, + "no-shadow-restricted-names": { + "type": "suggestion", + "docs": { + "description": "Disallow identifiers from shadowing restricted names", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-shadow-restricted-names" + } + }, + "no-spaced-func": { + "type": "layout", + "docs": { + "description": "Disallow spacing between function identifiers and their applications (deprecated)", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-spaced-func" + }, + "deprecated": true, + "replacedBy": [ + "func-call-spacing" + ], + "fixable": "whitespace" + }, + "no-sparse-arrays": { + "type": "problem", + "docs": { + "description": "Disallow sparse arrays", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-sparse-arrays" + } + }, + "no-sync": { + "deprecated": true, + "replacedBy": [], + "type": "suggestion", + "docs": { + "description": "Disallow synchronous methods", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-sync" + } + }, + "no-tabs": { + "type": "layout", + "docs": { + "description": "Disallow all tabs", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-tabs" + } + }, + "no-template-curly-in-string": { + "type": "problem", + "docs": { + "description": "Disallow template literal placeholder syntax in regular strings", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-template-curly-in-string" + } + }, + "no-ternary": { + "type": "suggestion", + "docs": { + "description": "Disallow ternary operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-ternary" + } + }, + "no-this-before-super": { + "type": "problem", + "docs": { + "description": "Disallow `this`/`super` before calling `super()` in constructors", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-this-before-super" + } + }, + "no-throw-literal": { + "type": "suggestion", + "docs": { + "description": "Disallow throwing literals as exceptions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-throw-literal" + } + }, + "no-trailing-spaces": { + "type": "layout", + "docs": { + "description": "Disallow trailing whitespace at the end of lines", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-trailing-spaces" + }, + "fixable": "whitespace" + }, + "no-undef": { + "type": "problem", + "docs": { + "description": "Disallow the use of undeclared variables unless mentioned in `/*global */` comments", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-undef" + } + }, + "no-undef-init": { + "type": "suggestion", + "docs": { + "description": "Disallow initializing variables to `undefined`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-undef-init" + }, + "fixable": "code" + }, + "no-undefined": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `undefined` as an identifier", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-undefined" + } + }, + "no-underscore-dangle": { + "type": "suggestion", + "docs": { + "description": "Disallow dangling underscores in identifiers", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-underscore-dangle" + } + }, + "no-unexpected-multiline": { + "type": "problem", + "docs": { + "description": "Disallow confusing multiline expressions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unexpected-multiline" + } + }, + "no-unmodified-loop-condition": { + "type": "problem", + "docs": { + "description": "Disallow unmodified loop conditions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-unmodified-loop-condition" + } + }, + "no-unneeded-ternary": { + "type": "suggestion", + "docs": { + "description": "Disallow ternary operators when simpler alternatives exist", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-unneeded-ternary" + }, + "fixable": "code" + }, + "no-unreachable": { + "type": "problem", + "docs": { + "description": "Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unreachable" + } + }, + "no-unreachable-loop": { + "type": "problem", + "docs": { + "description": "Disallow loops with a body that allows only one iteration", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-unreachable-loop" + } + }, + "no-unsafe-finally": { + "type": "problem", + "docs": { + "description": "Disallow control flow statements in `finally` blocks", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unsafe-finally" + } + }, + "no-unsafe-negation": { + "type": "problem", + "docs": { + "description": "Disallow negating the left operand of relational operators", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unsafe-negation" + }, + "hasSuggestions": true, + "fixable": null + }, + "no-unsafe-optional-chaining": { + "type": "problem", + "docs": { + "description": "Disallow use of optional chaining in contexts where the `undefined` value is not allowed", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unsafe-optional-chaining" + }, + "fixable": null + }, + "no-unused-expressions": { + "type": "suggestion", + "docs": { + "description": "Disallow unused expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-unused-expressions" + } + }, + "no-unused-labels": { + "type": "suggestion", + "docs": { + "description": "Disallow unused labels", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unused-labels" + }, + "fixable": "code" + }, + "no-unused-private-class-members": { + "type": "problem", + "docs": { + "description": "Disallow unused private class members", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-unused-private-class-members" + } + }, + "no-unused-vars": { + "type": "problem", + "docs": { + "description": "Disallow unused variables", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-unused-vars" + } + }, + "no-use-before-define": { + "type": "problem", + "docs": { + "description": "Disallow the use of variables before they are defined", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-use-before-define" + } + }, + "no-useless-backreference": { + "type": "problem", + "docs": { + "description": "Disallow useless backreferences in regular expressions", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-useless-backreference" + } + }, + "no-useless-call": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary calls to `.call()` and `.apply()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-useless-call" + } + }, + "no-useless-catch": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary `catch` clauses", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-useless-catch" + } + }, + "no-useless-computed-key": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary computed property keys in objects and classes", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-useless-computed-key" + }, + "fixable": "code" + }, + "no-useless-concat": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary concatenation of literals or template literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-useless-concat" + } + }, + "no-useless-constructor": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary constructors", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-useless-constructor" + } + }, + "no-useless-escape": { + "type": "suggestion", + "docs": { + "description": "Disallow unnecessary escape characters", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-useless-escape" + }, + "hasSuggestions": true + }, + "no-useless-rename": { + "type": "suggestion", + "docs": { + "description": "Disallow renaming import, export, and destructured assignments to the same name", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-useless-rename" + }, + "fixable": "code" + }, + "no-useless-return": { + "type": "suggestion", + "docs": { + "description": "Disallow redundant return statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-useless-return" + }, + "fixable": "code" + }, + "no-var": { + "type": "suggestion", + "docs": { + "description": "Require `let` or `const` instead of `var`", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-var" + }, + "fixable": "code" + }, + "no-void": { + "type": "suggestion", + "docs": { + "description": "Disallow `void` operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-void" + } + }, + "no-warning-comments": { + "type": "suggestion", + "docs": { + "description": "Disallow specified warning terms in comments", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-warning-comments" + } + }, + "no-whitespace-before-property": { + "type": "layout", + "docs": { + "description": "Disallow whitespace before properties", + "recommended": false, + "url": "https://eslint.org/docs/rules/no-whitespace-before-property" + }, + "fixable": "whitespace" + }, + "no-with": { + "type": "suggestion", + "docs": { + "description": "Disallow `with` statements", + "recommended": true, + "url": "https://eslint.org/docs/rules/no-with" + } + }, + "nonblock-statement-body-position": { + "type": "layout", + "docs": { + "description": "Enforce the location of single-line statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/nonblock-statement-body-position" + }, + "fixable": "whitespace" + }, + "object-curly-newline": { + "type": "layout", + "docs": { + "description": "Enforce consistent line breaks after opening and before closing braces", + "recommended": false, + "url": "https://eslint.org/docs/rules/object-curly-newline" + }, + "fixable": "whitespace" + }, + "object-curly-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing inside braces", + "recommended": false, + "url": "https://eslint.org/docs/rules/object-curly-spacing" + }, + "fixable": "whitespace" + }, + "object-property-newline": { + "type": "layout", + "docs": { + "description": "Enforce placing object properties on separate lines", + "recommended": false, + "url": "https://eslint.org/docs/rules/object-property-newline" + }, + "fixable": "whitespace" + }, + "object-shorthand": { + "type": "suggestion", + "docs": { + "description": "Require or disallow method and property shorthand syntax for object literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/object-shorthand" + }, + "fixable": "code" + }, + "one-var": { + "type": "suggestion", + "docs": { + "description": "Enforce variables to be declared either together or separately in functions", + "recommended": false, + "url": "https://eslint.org/docs/rules/one-var" + }, + "fixable": "code" + }, + "one-var-declaration-per-line": { + "type": "suggestion", + "docs": { + "description": "Require or disallow newlines around variable declarations", + "recommended": false, + "url": "https://eslint.org/docs/rules/one-var-declaration-per-line" + }, + "fixable": "whitespace" + }, + "operator-assignment": { + "type": "suggestion", + "docs": { + "description": "Require or disallow assignment operator shorthand where possible", + "recommended": false, + "url": "https://eslint.org/docs/rules/operator-assignment" + }, + "fixable": "code" + }, + "operator-linebreak": { + "type": "layout", + "docs": { + "description": "Enforce consistent linebreak style for operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/operator-linebreak" + }, + "fixable": "code" + }, + "padded-blocks": { + "type": "layout", + "docs": { + "description": "Require or disallow padding within blocks", + "recommended": false, + "url": "https://eslint.org/docs/rules/padded-blocks" + }, + "fixable": "whitespace" + }, + "padding-line-between-statements": { + "type": "layout", + "docs": { + "description": "Require or disallow padding lines between statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/padding-line-between-statements" + }, + "fixable": "whitespace" + }, + "prefer-arrow-callback": { + "type": "suggestion", + "docs": { + "description": "Require using arrow functions for callbacks", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-arrow-callback" + }, + "fixable": "code" + }, + "prefer-const": { + "type": "suggestion", + "docs": { + "description": "Require `const` declarations for variables that are never reassigned after declared", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-const" + }, + "fixable": "code" + }, + "prefer-destructuring": { + "type": "suggestion", + "docs": { + "description": "Require destructuring from arrays and/or objects", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-destructuring" + }, + "fixable": "code" + }, + "prefer-exponentiation-operator": { + "type": "suggestion", + "docs": { + "description": "Disallow the use of `Math.pow` in favor of the `**` operator", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-exponentiation-operator" + }, + "fixable": "code" + }, + "prefer-named-capture-group": { + "type": "suggestion", + "docs": { + "description": "Enforce using named capture group in regular expression", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-named-capture-group" + } + }, + "prefer-numeric-literals": { + "type": "suggestion", + "docs": { + "description": "Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-numeric-literals" + }, + "fixable": "code" + }, + "prefer-object-has-own": { + "type": "suggestion", + "docs": { + "description": "Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-object-has-own" + }, + "fixable": "code" + }, + "prefer-object-spread": { + "type": "suggestion", + "docs": { + "description": "Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-object-spread" + }, + "fixable": "code" + }, + "prefer-promise-reject-errors": { + "type": "suggestion", + "docs": { + "description": "Require using Error objects as Promise rejection reasons", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-promise-reject-errors" + }, + "fixable": null + }, + "prefer-reflect": { + "type": "suggestion", + "docs": { + "description": "Require `Reflect` methods where applicable", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-reflect" + }, + "deprecated": true, + "replacedBy": [] + }, + "prefer-regex-literals": { + "type": "suggestion", + "docs": { + "description": "Disallow use of the `RegExp` constructor in favor of regular expression literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-regex-literals" + }, + "hasSuggestions": true + }, + "prefer-rest-params": { + "type": "suggestion", + "docs": { + "description": "Require rest parameters instead of `arguments`", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-rest-params" + } + }, + "prefer-spread": { + "type": "suggestion", + "docs": { + "description": "Require spread operators instead of `.apply()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-spread" + }, + "fixable": null + }, + "prefer-template": { + "type": "suggestion", + "docs": { + "description": "Require template literals instead of string concatenation", + "recommended": false, + "url": "https://eslint.org/docs/rules/prefer-template" + }, + "fixable": "code" + }, + "quote-props": { + "type": "suggestion", + "docs": { + "description": "Require quotes around object literal property names", + "recommended": false, + "url": "https://eslint.org/docs/rules/quote-props" + }, + "fixable": "code" + }, + "quotes": { + "type": "layout", + "docs": { + "description": "Enforce the consistent use of either backticks, double, or single quotes", + "recommended": false, + "url": "https://eslint.org/docs/rules/quotes" + }, + "fixable": "code" + }, + "radix": { + "type": "suggestion", + "docs": { + "description": "Enforce the consistent use of the radix argument when using `parseInt()`", + "recommended": false, + "url": "https://eslint.org/docs/rules/radix" + }, + "hasSuggestions": true + }, + "require-atomic-updates": { + "type": "problem", + "docs": { + "description": "Disallow assignments that can lead to race conditions due to usage of `await` or `yield`", + "recommended": false, + "url": "https://eslint.org/docs/rules/require-atomic-updates" + }, + "fixable": null + }, + "require-await": { + "type": "suggestion", + "docs": { + "description": "Disallow async functions which have no `await` expression", + "recommended": false, + "url": "https://eslint.org/docs/rules/require-await" + } + }, + "require-jsdoc": { + "type": "suggestion", + "docs": { + "description": "Require JSDoc comments", + "recommended": false, + "url": "https://eslint.org/docs/rules/require-jsdoc" + }, + "deprecated": true, + "replacedBy": [] + }, + "require-unicode-regexp": { + "type": "suggestion", + "docs": { + "description": "Enforce the use of `u` flag on RegExp", + "recommended": false, + "url": "https://eslint.org/docs/rules/require-unicode-regexp" + } + }, + "require-yield": { + "type": "suggestion", + "docs": { + "description": "Require generator functions to contain `yield`", + "recommended": true, + "url": "https://eslint.org/docs/rules/require-yield" + } + }, + "rest-spread-spacing": { + "type": "layout", + "docs": { + "description": "Enforce spacing between rest and spread operators and their expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/rest-spread-spacing" + }, + "fixable": "whitespace" + }, + "semi": { + "type": "layout", + "docs": { + "description": "Require or disallow semicolons instead of ASI", + "recommended": false, + "url": "https://eslint.org/docs/rules/semi" + }, + "fixable": "code" + }, + "semi-spacing": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before and after semicolons", + "recommended": false, + "url": "https://eslint.org/docs/rules/semi-spacing" + }, + "fixable": "whitespace" + }, + "semi-style": { + "type": "layout", + "docs": { + "description": "Enforce location of semicolons", + "recommended": false, + "url": "https://eslint.org/docs/rules/semi-style" + }, + "fixable": "whitespace" + }, + "sort-imports": { + "type": "suggestion", + "docs": { + "description": "Enforce sorted import declarations within modules", + "recommended": false, + "url": "https://eslint.org/docs/rules/sort-imports" + }, + "fixable": "code" + }, + "sort-keys": { + "type": "suggestion", + "docs": { + "description": "Require object keys to be sorted", + "recommended": false, + "url": "https://eslint.org/docs/rules/sort-keys" + } + }, + "sort-vars": { + "type": "suggestion", + "docs": { + "description": "Require variables within the same declaration block to be sorted", + "recommended": false, + "url": "https://eslint.org/docs/rules/sort-vars" + }, + "fixable": "code" + }, + "space-before-blocks": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before blocks", + "recommended": false, + "url": "https://eslint.org/docs/rules/space-before-blocks" + }, + "fixable": "whitespace" + }, + "space-before-function-paren": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before `function` definition opening parenthesis", + "recommended": false, + "url": "https://eslint.org/docs/rules/space-before-function-paren" + }, + "fixable": "whitespace" + }, + "space-in-parens": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing inside parentheses", + "recommended": false, + "url": "https://eslint.org/docs/rules/space-in-parens" + }, + "fixable": "whitespace" + }, + "space-infix-ops": { + "type": "layout", + "docs": { + "description": "Require spacing around infix operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/space-infix-ops" + }, + "fixable": "whitespace" + }, + "space-unary-ops": { + "type": "layout", + "docs": { + "description": "Enforce consistent spacing before or after unary operators", + "recommended": false, + "url": "https://eslint.org/docs/rules/space-unary-ops" + }, + "fixable": "whitespace" + }, + "spaced-comment": { + "type": "suggestion", + "docs": { + "description": "Enforce consistent spacing after the `//` or `/*` in a comment", + "recommended": false, + "url": "https://eslint.org/docs/rules/spaced-comment" + }, + "fixable": "whitespace" + }, + "strict": { + "type": "suggestion", + "docs": { + "description": "Require or disallow strict mode directives", + "recommended": false, + "url": "https://eslint.org/docs/rules/strict" + }, + "fixable": "code" + }, + "switch-colon-spacing": { + "type": "layout", + "docs": { + "description": "Enforce spacing around colons of switch statements", + "recommended": false, + "url": "https://eslint.org/docs/rules/switch-colon-spacing" + }, + "fixable": "whitespace" + }, + "symbol-description": { + "type": "suggestion", + "docs": { + "description": "Require symbol descriptions", + "recommended": false, + "url": "https://eslint.org/docs/rules/symbol-description" + }, + "fixable": null + }, + "template-curly-spacing": { + "type": "layout", + "docs": { + "description": "Require or disallow spacing around embedded expressions of template strings", + "recommended": false, + "url": "https://eslint.org/docs/rules/template-curly-spacing" + }, + "fixable": "whitespace" + }, + "template-tag-spacing": { + "type": "layout", + "docs": { + "description": "Require or disallow spacing between template tags and their literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/template-tag-spacing" + }, + "fixable": "whitespace" + }, + "unicode-bom": { + "type": "layout", + "docs": { + "description": "Require or disallow Unicode byte order mark (BOM)", + "recommended": false, + "url": "https://eslint.org/docs/rules/unicode-bom" + }, + "fixable": "whitespace" + }, + "use-isnan": { + "type": "problem", + "docs": { + "description": "Require calls to `isNaN()` when checking for `NaN`", + "recommended": true, + "url": "https://eslint.org/docs/rules/use-isnan" + } + }, + "valid-jsdoc": { + "type": "suggestion", + "docs": { + "description": "Enforce valid JSDoc comments", + "recommended": false, + "url": "https://eslint.org/docs/rules/valid-jsdoc" + }, + "fixable": "code", + "deprecated": true, + "replacedBy": [] + }, + "valid-typeof": { + "type": "problem", + "docs": { + "description": "Enforce comparing `typeof` expressions against valid strings", + "recommended": true, + "url": "https://eslint.org/docs/rules/valid-typeof" + }, + "hasSuggestions": true + }, + "vars-on-top": { + "type": "suggestion", + "docs": { + "description": "Require `var` declarations be placed at the top of their containing scope", + "recommended": false, + "url": "https://eslint.org/docs/rules/vars-on-top" + } + }, + "wrap-iife": { + "type": "layout", + "docs": { + "description": "Require parentheses around immediate `function` invocations", + "recommended": false, + "url": "https://eslint.org/docs/rules/wrap-iife" + }, + "fixable": "code" + }, + "wrap-regex": { + "type": "layout", + "docs": { + "description": "Require parenthesis around regex literals", + "recommended": false, + "url": "https://eslint.org/docs/rules/wrap-regex" + }, + "fixable": "code" + }, + "yield-star-spacing": { + "type": "layout", + "docs": { + "description": "Require or disallow spacing around the `*` in `yield*` expressions", + "recommended": false, + "url": "https://eslint.org/docs/rules/yield-star-spacing" + }, + "fixable": "whitespace" + }, + "yoda": { + "type": "suggestion", + "docs": { + "description": "Require or disallow \"Yoda\" conditions", + "recommended": false, + "url": "https://eslint.org/docs/rules/yoda" + }, + "fixable": "code" + } +} \ No newline at end of file diff --git a/docs/src/_data/site.js b/docs/src/_data/site.js new file mode 100644 index 00000000000..d0792694f48 --- /dev/null +++ b/docs/src/_data/site.js @@ -0,0 +1,26 @@ +/** + * @fileoverview Convenience helper for site data. + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const path = require("path"); +const fs = require("fs"); +const yaml = require("js-yaml"); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +module.exports = function(eleventy) { + + const siteName = eleventy.site_name; + const siteDataFile = path.resolve(__dirname, `sites/${siteName}.yml`); + + fs.statSync(siteDataFile); + + return yaml.load(fs.readFileSync(siteDataFile)); +} diff --git a/docs/src/_data/sites/en.yml b/docs/src/_data/sites/en.yml new file mode 100644 index 00000000000..c929da0c3c1 --- /dev/null +++ b/docs/src/_data/sites/en.yml @@ -0,0 +1,109 @@ +#------------------------------------------------------------------------------ +# English Site Details +# The documentation site that is hosted at eslint.org/docs +# Author: Nicholas C. Zakas +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# Global Settings +#------------------------------------------------------------------------------ + +language: + code: en + flag: 🇺🇸 + name: English (US) +locale: en-US +hostname: eslint.org + +#------------------------------------------------------------------------------ +# Analytics +#------------------------------------------------------------------------------ + +google_analytics: + code: "G-7DGPHY308T" + +#------------------------------------------------------------------------------ +# Ads +#------------------------------------------------------------------------------ + +carbon_ads: + serve: CESDV2QM + placement: eslintorg + +#------------------------------------------------------------------------------ +# Shared +#------------------------------------------------------------------------------ + +shared: + get_started: Get Started + become_a_sponsor: Become a Sponsor + eslint_logo_alt: ESLint logo + description: > + A pluggable and configurable linter tool for identifying and reporting on + patterns in JavaScript. Maintain your code quality with ease. + title_format: PAGE_TITLE - ESLint - Pluggable JavaScript Linter + skip_to_content: Skip to main content + donate: Donate + +#------------------------------------------------------------------------------ +# Navigation +#------------------------------------------------------------------------------ + +navigation: +- text: Team + link: team +- text: Blog + link: blog +- text: Docs + link: docs +- text: Store + link: store + target: _blank +- text: Playground + link: playground + +#------------------------------------------------------------------------------ +# Footer +#------------------------------------------------------------------------------ + +footer: + title: Ready to fix your JavaScript code? + description: Install from npm or start donating today. + secondary: Secondary + social_icons: + title: Social Media + twitter: Twitter + chat: Discord + mailing_list: Google Group + github: GitHub + theme_switcher: + title: Theme Switcher + light: Light + dark: Dark + language_switcher: + title: Language Switcher + description: Selecting a language will take you to the ESLint website in that language. + change_language: Change Language + language: Language + copyright: > + © OpenJS Foundation and ESLint contributors, www.openjsf.org + links: + open_jsf: The OpenJS Foundation + terms: Terms of Use + privacy: Privacy Policy + bylaws: OpenJS Foundation Bylaws + trademark: Trademark Policy + trademark_list: Trademark List + cookies: Cookie Policy + +#------------------------------------------------------------------------------ +# 404 Page +#------------------------------------------------------------------------------ + +404_page: + title: 404 error + subtitle: Page not found + description: Sorry, the page you are looking for doesn't exist or has been moved. + actions: + back_to_home: Back to homepage + browse_docs: Browse the docs diff --git a/docs/src/_data/versions.json b/docs/src/_data/versions.json new file mode 100644 index 00000000000..6e585d6ad5a --- /dev/null +++ b/docs/src/_data/versions.json @@ -0,0 +1,4 @@ +{ + "items": [ + ] +} diff --git a/docs/src/_includes/components/alert.macro.html b/docs/src/_includes/components/alert.macro.html index f07195a812f..91e3a94a8b8 100644 --- a/docs/src/_includes/components/alert.macro.html +++ b/docs/src/_includes/components/alert.macro.html @@ -1,5 +1,5 @@ {%- macro warning(params) -%} -
+
- - - + {%- endmacro -%} {%- macro important(params) -%} -
+
- - - + {%- endmacro -%} {%- macro tip(params) -%} -
+
- - - + {%- endmacro -%} diff --git a/docs/src/_includes/components/docs-index.html b/docs/src/_includes/components/docs-index.html index 90425816582..0cdbe7403d0 100644 --- a/docs/src/_includes/components/docs-index.html +++ b/docs/src/_includes/components/docs-index.html @@ -1,7 +1,7 @@ {% set navPages = collections.docs | eleventyNavigation %} {% macro renderNavListItem(entry) -%}
  • - {{ entry.title }} + {{ entry.title }} {%- if entry.children.length -%}