Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Mar 5, 2024
2 parents adb7972 + a451b32 commit 2b8659b
Show file tree
Hide file tree
Showing 76 changed files with 3,683 additions and 817 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
@@ -1,7 +1,7 @@
<!--
Thank you for contributing!
ESLint adheres to the [JS Foundation Code of Conduct](https://eslint.org/conduct).
ESLint adheres to the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
-->

#### Prerequisites checklist
Expand Down
29 changes: 29 additions & 0 deletions .github/labeler.yml
@@ -0,0 +1,29 @@
documentation:
- any:
- changed-files:
- all-globs-to-all-files: ['docs/**', '!lib/rules/**']

rule:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/rules/**']

cli:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/cli.js', 'lib/options.js', 'lib/cli-engine/**', 'lib/eslint/**']

core:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/{config,eslint,linter,rule-tester,source-code}/**', 'lib/api.js']

formatter:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/cli-engine/formatters/**']

"github actions":
- any:
- changed-files:
- any-glob-to-any-file: ['.github/workflows/**']
12 changes: 12 additions & 0 deletions .github/workflows/pr-labeler.yml
@@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on: pull_request_target
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
sync-labels: true
69 changes: 69 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,72 @@
v9.0.0-beta.1 - February 23, 2024

* [`32ffdd1`](https://github.com/eslint/eslint/commit/32ffdd181aa673ccc596f714d10a2f879ec622a7) chore: upgrade @eslint/[email protected] (#18146) (Milos Djermanovic)
* [`e41425b`](https://github.com/eslint/eslint/commit/e41425b5c3b4c885f2679a3663bd081911a8b570) chore: package.json update for @eslint/js release (Jenkins)
* [`bb3b9c6`](https://github.com/eslint/eslint/commit/bb3b9c68fe714bb8aa305be5f019a7a42f4374ee) chore: upgrade @eslint/[email protected] (#18145) (Milos Djermanovic)
* [`c9f2f33`](https://github.com/eslint/eslint/commit/c9f2f3343e7c197e5e962c68ef202d6a1646866e) build: changelog update for 8.57.0 (#18144) (Milos Djermanovic)
* [`5fe095c`](https://github.com/eslint/eslint/commit/5fe095cf718b063dc5e58089b0a6cbcd53da7925) docs: show v8.57.0 as latest version in dropdown (#18142) (Milos Djermanovic)
* [`0cb4914`](https://github.com/eslint/eslint/commit/0cb4914ef93cd572ba368d390b1cf0b93f578a9d) fix: validate options when comment with just severity enables rule (#18133) (Milos Djermanovic)
* [`7db5bb2`](https://github.com/eslint/eslint/commit/7db5bb270f95d1472de0bfed0e33ed5ab294942e) docs: Show prerelease version in dropdown (#18135) (Nicholas C. Zakas)
* [`e462524`](https://github.com/eslint/eslint/commit/e462524cc318ffacecd266e6fe1038945a0b02e9) chore: upgrade [email protected] (#18138) (Milos Djermanovic)
* [`8e13a6b`](https://github.com/eslint/eslint/commit/8e13a6beb587e624cc95ae16eefe503ad024b11b) chore: fix spelling mistake in README.md (#18128) (Will Eastcott)
* [`66f52e2`](https://github.com/eslint/eslint/commit/66f52e276c31487424bcf54e490c4ac7ef70f77f) chore: remove unused tools rule-types.json, update-rule-types.js (#18125) (Josh Goldberg ✨)
* [`bf0c7ef`](https://github.com/eslint/eslint/commit/bf0c7effdba51c48b929d06ce1965408a912dc77) ci: fix sync-labels value of pr-labeler (#18124) (Tanuj Kanti)
* [`cace6d0`](https://github.com/eslint/eslint/commit/cace6d0a3afa5c84b18abee4ef8c598125143461) ci: add PR labeler action (#18109) (Nitin Kumar)
* [`73a5f06`](https://github.com/eslint/eslint/commit/73a5f0641b43e169247b0000f44a366ee6bbc4f2) docs: Update README (GitHub Actions Bot)
* [`74124c2`](https://github.com/eslint/eslint/commit/74124c20287fac1995c3f4e553f0723c066f311d) feat: add suggestions to `use-isnan` in `indexOf` & `lastIndexOf` calls (#18063) (StyleShit)
* [`1a65d3e`](https://github.com/eslint/eslint/commit/1a65d3e4a6ee16e3f607d69b998a08c3fed505ca) chore: export `base` config from `eslint-config-eslint` (#18119) (Milos Djermanovic)
* [`f95cd27`](https://github.com/eslint/eslint/commit/f95cd27679eef228173e27e170429c9710c939b3) docs: Disallow multiple rule configuration comments in the same example (#18116) (Milos Djermanovic)
* [`9aa4df3`](https://github.com/eslint/eslint/commit/9aa4df3f4d85960eee72923f3b9bfc88e62f04fb) refactor: remove `globals` dependency (#18115) (Milos Djermanovic)
* [`d8068ec`](https://github.com/eslint/eslint/commit/d8068ec70fac050e900dc400510a4ad673e17633) docs: Update link for schema examples (#18112) (Svetlana)

v8.57.0 - February 23, 2024

* [`1813aec`](https://github.com/eslint/eslint/commit/1813aecc4660582b0678cf32ba466eb9674266c4) chore: upgrade @eslint/[email protected] (#18143) (Milos Djermanovic)
* [`5c356bb`](https://github.com/eslint/eslint/commit/5c356bb0c6f53c570224f8e9f02c4baca8fc6d2f) chore: package.json update for @eslint/js release (Jenkins)
* [`84922d0`](https://github.com/eslint/eslint/commit/84922d0bfa10689a34a447ab8e55975ff1c1c708) docs: Show prerelease version in dropdown (#18139) (Nicholas C. Zakas)
* [`1120b9b`](https://github.com/eslint/eslint/commit/1120b9b7b97f10f059d8b7ede19de2572f892366) feat: Add loadESLint() API method for v8 (#18098) (Nicholas C. Zakas)
* [`5b8c363`](https://github.com/eslint/eslint/commit/5b8c3636a3d7536535a6878eca0e5b773e4829d4) docs: Switch to Ethical Ads (#18117) (Milos Djermanovic)
* [`2196d97`](https://github.com/eslint/eslint/commit/2196d97094ba94d6d750828879a29538d1600de5) fix: handle absolute file paths in `FlatRuleTester` (#18064) (Nitin Kumar)
* [`f4a1fe2`](https://github.com/eslint/eslint/commit/f4a1fe2e45aa1089fe775290bf530de82f34bf16) test: add more tests for ignoring files and directories (#18068) (Nitin Kumar)
* [`69dd1d1`](https://github.com/eslint/eslint/commit/69dd1d1387b7b53617548d1f9f2c149f179e6e17) fix: Ensure config keys are printed for config errors (#18067) (Nitin Kumar)
* [`9852a31`](https://github.com/eslint/eslint/commit/9852a31edcf054bd5d15753ef18e2ad3216b1b71) fix: deep merge behavior in flat config (#18065) (Nitin Kumar)
* [`dca7d0f`](https://github.com/eslint/eslint/commit/dca7d0f1c262bc72310147bcefe1d04ecf60acbc) feat: Enable `eslint.config.mjs` and `eslint.config.cjs` (#18066) (Nitin Kumar)
* [`4c7e9b0`](https://github.com/eslint/eslint/commit/4c7e9b0b539ba879ac1799e81f3b6add2eed4b2f) fix: allow circular references in config (#18056) (Milos Djermanovic)
* [`77dbfd9`](https://github.com/eslint/eslint/commit/77dbfd9887b201a46fc68631cbde50c08e1a8dbf) docs: show NEXT in version selectors (#18052) (Milos Djermanovic)
* [`42c0aef`](https://github.com/eslint/eslint/commit/42c0aefaf6ea8b998b1c6db61906a79c046d301a) ci: Enable CI for `v8.x` branch (#18047) (Milos Djermanovic)

v9.0.0-beta.0 - February 9, 2024

* [`e40d1d7`](https://github.com/eslint/eslint/commit/e40d1d74a5b9788cbec195f4e602b50249f26659) chore: upgrade @eslint/[email protected] (#18108) (Milos Djermanovic)
* [`9870f93`](https://github.com/eslint/eslint/commit/9870f93e714edefb410fccae1e9924a3c1972a2e) chore: package.json update for @eslint/js release (Jenkins)
* [`2c62e79`](https://github.com/eslint/eslint/commit/2c62e797a433e5fc298b976872a89c594f88bb19) chore: upgrade @eslint/[email protected] (#18107) (Milos Djermanovic)
* [`81f0294`](https://github.com/eslint/eslint/commit/81f0294e651928b49eb49495b90b54376073a790) chore: upgrade [email protected] (#18106) (Milos Djermanovic)
* [`5e2b292`](https://github.com/eslint/eslint/commit/5e2b2922aa65bda54b0966d1bf71acda82b3047c) chore: upgrade [email protected] (#18105) (Milos Djermanovic)
* [`9163646`](https://github.com/eslint/eslint/commit/916364692bae6a93c10b5d48fc1e9de1677d0d09) feat!: Rule Tester checks for missing placeholder data in the message (#18073) (fnx)
* [`53f0f47`](https://github.com/eslint/eslint/commit/53f0f47badffa1b04ec2836f2ae599f4fc464da2) feat: Add loadESLint() API method for v9 (#18097) (Nicholas C. Zakas)
* [`f1c7e6f`](https://github.com/eslint/eslint/commit/f1c7e6fc8ea77fcdae4ad1f8fe1cd104a281d2e9) docs: Switch to Ethical Ads (#18090) (Strek)
* [`15c143f`](https://github.com/eslint/eslint/commit/15c143f96ef164943fd3d39b5ad79d9a4a40de8f) docs: JS Foundation -> OpenJS Foundation in PR template (#18092) (Nicholas C. Zakas)
* [`c4d26fd`](https://github.com/eslint/eslint/commit/c4d26fd3d1f59c1c0f2266664887ad18692039f3) fix: `use-isnan` doesn't report on `SequenceExpression`s (#18059) (StyleShit)
* [`6ea339e`](https://github.com/eslint/eslint/commit/6ea339e658d29791528ab26aabd86f1683cab6c3) docs: add stricter rule test validations to v9 migration guide (#18085) (Milos Djermanovic)
* [`ce838ad`](https://github.com/eslint/eslint/commit/ce838adc3b673e52a151f36da0eedf5876977514) chore: replace dependency npm-run-all with npm-run-all2 ^5.0.0 (#18045) (renovate[bot])
* [`3c816f1`](https://github.com/eslint/eslint/commit/3c816f193eecace5efc6166efa2852a829175ef8) docs: use relative link from CLI to core concepts (#18083) (Milos Djermanovic)
* [`54df731`](https://github.com/eslint/eslint/commit/54df731174d2528170560d1f765e1336eca0a8bd) chore: update dependency markdownlint-cli to ^0.39.0 (#18084) (renovate[bot])
* [`9458735`](https://github.com/eslint/eslint/commit/9458735381269d12b24f76e1b2b6fda1bc5a509b) docs: fix malformed `eslint` config comments in rule examples (#18078) (Francesco Trotta)
* [`07a1ada`](https://github.com/eslint/eslint/commit/07a1ada7166b76c7af6186f4c5e5de8b8532edba) docs: link from `--fix` CLI doc to the relevant core concept (#18080) (Bryan Mishkin)
* [`8f06a60`](https://github.com/eslint/eslint/commit/8f06a606845f40aaf0fea1fd83d5930747c5acec) chore: update dependency shelljs to ^0.8.5 (#18079) (Francesco Trotta)
* [`b844324`](https://github.com/eslint/eslint/commit/b844324e4e8f511c9985a96c7aca063269df9570) docs: Update team responsibilities (#18048) (Nicholas C. Zakas)
* [`aadfb60`](https://github.com/eslint/eslint/commit/aadfb609f1b847e492fc3b28ced62f830fe7f294) docs: document languageOptions and other v9 changes for context (#18074) (fnx)
* [`3c4d51d`](https://github.com/eslint/eslint/commit/3c4d51d55fa5435ab18b6bf46f6b97df0f480ae7) feat!: default for `enforceForClassMembers` in `no-useless-computed-key` (#18054) (Francesco Trotta)
* [`47e60f8`](https://github.com/eslint/eslint/commit/47e60f85e0c3f275207bb4be9b5947166a190477) feat!: Stricter rule test validations (#17654) (fnx)
* [`1a94589`](https://github.com/eslint/eslint/commit/1a945890105d307541dcbff15f6438c19b476ade) feat!: `no-unused-vars` default caughtErrors to 'all' (#18043) (Josh Goldberg ✨)
* [`857e242`](https://github.com/eslint/eslint/commit/857e242584227181ecb8af79fc6bc236b9975228) docs: tweak explanation for meta.docs rule properties (#18057) (Bryan Mishkin)
* [`10485e8`](https://github.com/eslint/eslint/commit/10485e8b961d045514bc1e34227cf09867a6c4b7) docs: recommend messageId over message for reporting rule violations (#18050) (Bryan Mishkin)
* [`98b5ab4`](https://github.com/eslint/eslint/commit/98b5ab406bac6279eadd84e8a5fd5a01fc586ff1) docs: Update README (GitHub Actions Bot)
* [`93ffe30`](https://github.com/eslint/eslint/commit/93ffe30da5e2127e336c1c22e69e09ec0558a8e6) chore: update dependency file-entry-cache to v8 (#17903) (renovate[bot])
* [`505fbf4`](https://github.com/eslint/eslint/commit/505fbf4b35c14332bffb0c838cce4843a00fad68) docs: update `no-restricted-imports` rule (#18015) (Tanuj Kanti)
* [`2d11d46`](https://github.com/eslint/eslint/commit/2d11d46e890a9f1b5f639b8ee034ffa9bd453e42) feat: add suggestions to `use-isnan` in binary expressions (#17996) (StyleShit)
* [`c25b4af`](https://github.com/eslint/eslint/commit/c25b4aff1fe35e5bd9d4fcdbb45b739b6d253828) docs: Update README (GitHub Actions Bot)

v9.0.0-alpha.2 - January 26, 2024

* [`6ffdcbb`](https://github.com/eslint/eslint/commit/6ffdcbb8c51956054d3f81c5ce446c15dcd51a6f) chore: upgrade @eslint/[email protected] (#18038) (Milos Djermanovic)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -15,7 +15,7 @@ Before filing an issue, please be sure to read the guidelines for what you're re
* [Propose a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
* [Request a Change](https://eslint.org/docs/latest/contribute/request-change)

To report a security vulnerability in ESLint, please use our [HackerOne program](https://hackerone.com/eslint).
To report a security vulnerability in ESLint, please use our [create an advisory form](https://github.com/eslint/eslint/security/advisories/new) on GitHub.

## Contributing Code

Expand Down
15 changes: 0 additions & 15 deletions Makefile.js
Expand Up @@ -674,7 +674,6 @@ target.checkRuleFiles = function() {

echo("Validating rules");

const ruleTypes = require("./tools/rule-types.json");
let errors = 0;

RULE_FILES.forEach(filename => {
Expand All @@ -686,14 +685,6 @@ target.checkRuleFiles = function() {
const ruleCode = cat(filename);
const knownHeaders = ["Rule Details", "Options", "Environments", "Examples", "Known Limitations", "When Not To Use It", "Compatibility"];

/**
* Check if basename is present in rule-types.json file.
* @returns {boolean} true if present
* @private
*/
function isInRuleTypes() {
return Object.hasOwn(ruleTypes, basename);
}

/**
* Check if id is present in title
Expand Down Expand Up @@ -776,12 +767,6 @@ target.checkRuleFiles = function() {
}
}

// check for recommended configuration
if (!isInRuleTypes()) {
console.error("Missing setting for %s in tools/rule-types.json", basename);
errors++;
}

// check parity between rules index file and rules directory
const ruleIdsInIndex = require("./lib/rules/index");
const ruleDef = ruleIdsInIndex.get(basename);
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -103,7 +103,7 @@ We are now at or near 100% compatibility with JSCS. If you try ESLint and believ

### Does Prettier replace ESLint?

No, ESLint and Prettier have diffent jobs: ESLint is a linter (looking for problematic patterns) and Prettier is a code formatter. Using both tools is common, refer to [Prettier's documentation](https://prettier.io/docs/en/install#eslint-and-other-linters) to learn how to configure them to work well with each other.
No, ESLint and Prettier have different jobs: ESLint is a linter (looking for problematic patterns) and Prettier is a code formatter. Using both tools is common, refer to [Prettier's documentation](https://prettier.io/docs/en/install#eslint-and-other-linters) to learn how to configure them to work well with each other.

### Why can't ESLint find my plugins?

Expand Down Expand Up @@ -294,7 +294,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
<p><a href="#"><img src="https://images.opencollective.com/2021-frameworks-fund/logo.png" alt="Chrome Frameworks Fund" height="undefined"></a> <a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="undefined"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://engineering.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/eb04ddc/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a> <a href="https://www.workleap.com"><img src="https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4" alt="Workleap" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://transloadit.com/"><img src="https://avatars.githubusercontent.com/u/125754?v=4" alt="Transloadit" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://usenextbase.com"><img src="https://avatars.githubusercontent.com/u/145838380?v=4" alt="Nextbase Starter Kit" height="32"></a></p>
<p><a href="https://www.notion.so"><img src="https://images.opencollective.com/notion/bf3b117/logo.png" alt="notion" height="32"></a> <a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://transloadit.com/"><img src="https://avatars.githubusercontent.com/u/125754?v=4" alt="Transloadit" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://usenextbase.com"><img src="https://avatars.githubusercontent.com/u/145838380?v=4" alt="Nextbase Starter Kit" height="32"></a></p>
<!--sponsorsend-->

## Technology Sponsors
Expand Down
5 changes: 3 additions & 2 deletions docs/package.json
@@ -1,7 +1,7 @@
{
"name": "docs-eslint",
"private": true,
"version": "9.0.0-alpha.2",
"version": "9.0.0-beta.1",
"description": "",
"main": "index.js",
"keywords": [],
Expand All @@ -24,6 +24,7 @@
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-fetch": "^4.0.0",
"@11ty/eleventy-img": "^3.1.1",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-rss": "^1.1.1",
Expand All @@ -48,7 +49,7 @@
"markdown-it-anchor": "^8.1.2",
"markdown-it-container": "^3.0.0",
"netlify-cli": "^10.3.1",
"npm-run-all": "^4.1.5",
"npm-run-all2": "^5.0.0",
"postcss-cli": "^10.0.0",
"postcss-html": "^1.5.0",
"prismjs": "^1.29.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/_data/config.json
@@ -1,5 +1,5 @@
{
"lang": "en",
"version": "8.56.0",
"version": "8.57.0",
"showNextVersion": true
}
32 changes: 32 additions & 0 deletions docs/src/_data/eslintNextVersion.js
@@ -0,0 +1,32 @@
/**
* @fileoverview
* @author Nicholas C. Zakas
*/

//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------

const eleventyFetch = require("@11ty/eleventy-fetch");

//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------

module.exports = async function() {

// if we're on the next branch, we can just read the package.json file
if (process.env.BRANCH === "next") {
return require("../../package.json").version;
}

// otherwise, we need to fetch the latest version from the GitHub API
const url = "https://raw.githubusercontent.com/eslint/eslint/next/docs/package.json";

const response = await eleventyFetch(url, {
duration: "1d",
type: "json"
});

return response.version;
}

0 comments on commit 2b8659b

Please sign in to comment.