Skip to content

Commit

Permalink
Merge branch 'main' into custom_rules_cleanup_expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
bpmutter committed Apr 2, 2023
2 parents e744873 + b0f11cf commit a33e401
Show file tree
Hide file tree
Showing 135 changed files with 2,176 additions and 663 deletions.
5 changes: 3 additions & 2 deletions .eslintignore
@@ -1,7 +1,8 @@
/build/**
/coverage/**
/docs/**
!/docs/.eleventy.js
/docs/*
!/docs/*.js
!/docs/tools/
/jsdoc/**
/templates/**
/tests/bench/**
Expand Down
5 changes: 3 additions & 2 deletions .eslintrc.js
Expand Up @@ -83,9 +83,10 @@ module.exports = {
},
overrides: [
{
files: ["tools/*.js"],
files: ["tools/*.js", "docs/tools/*.js"],
rules: {
"no-console": "off"
"no-console": "off",
"n/no-process-exit": "off"
}
},
{
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/change.yml
Expand Up @@ -3,7 +3,6 @@ description: "Request a change that is not a bug fix, rule change, or new rule"
title: "Change Request: (fill in)"
labels:
- enhancement
- triage
- core
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v7
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 30
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,51 @@
v8.37.0 - March 28, 2023

* [`c67f299`](https://github.com/eslint/eslint/commit/c67f2992a743de4765bb6f11c12622e3651324b9) chore: upgrade @eslint/js@8.37.0 (#17033) (Milos Djermanovic)
* [`ee9ddbd`](https://github.com/eslint/eslint/commit/ee9ddbd63e262aed0052853760866c7a054af561) chore: package.json update for @eslint/js release (ESLint Jenkins)
* [`dddb475`](https://github.com/eslint/eslint/commit/dddb47528816cd7e2e737bfde108ed4d62e6a219) chore: upgrade @eslint/eslintrc@2.0.2 (#17032) (Milos Djermanovic)
* [`522431e`](https://github.com/eslint/eslint/commit/522431e5206bac2fcb41c0d6dc98a84929203bee) chore: upgrade espree@9.5.1 (#17031) (Milos Djermanovic)
* [`f5f9a88`](https://github.com/eslint/eslint/commit/f5f9a88c79b32222c0331a9bac1c02571d953b69) chore: upgrade eslint-visitor-keys@3.4.0 (#17030) (Milos Djermanovic)
* [`75339df`](https://github.com/eslint/eslint/commit/75339df99418df4d7e05a77e42ed7e22eabcc9e0) docs: fix typos and missing info in id-match docs (#17029) (Ed Lucas)
* [`b6ab8b2`](https://github.com/eslint/eslint/commit/b6ab8b2a2ca8807baca121407f5bfb0a0a839427) feat: `require-unicode-regexp` add suggestions (#17007) (Josh Goldberg)
* [`4dd8d52`](https://github.com/eslint/eslint/commit/4dd8d524e0fc9e8e2019df13f8b968021600e85c) ci: bump actions/stale from 7 to 8 (#17026) (dependabot[bot])
* [`619f3fd`](https://github.com/eslint/eslint/commit/619f3fd17324c7b71bf17e02047d0c6dc7e5109e) fix: correctly handle `null` default config in `RuleTester` (#17023) (Brad Zacher)
* [`ec2d830`](https://github.com/eslint/eslint/commit/ec2d8307850dd039e118c001416606e1e0342bc8) docs: Fix typos in the `semi` rule docs (#17012) (Andrii Lundiak)
* [`e39f28d`](https://github.com/eslint/eslint/commit/e39f28d8578a00f4da8d4ddad559547950128a0d) docs: add back to top button (#16979) (Tanuj Kanti)
* [`ad9dd6a`](https://github.com/eslint/eslint/commit/ad9dd6a933fd098a0d99c6a9aa059850535c23ee) chore: remove duplicate scss, (#17005) (Strek)
* [`10022b1`](https://github.com/eslint/eslint/commit/10022b1f4bda1ad89193512ecf18c2ee61db8202) feat: Copy getScope() to SourceCode (#17004) (Nicholas C. Zakas)
* [`1665c02`](https://github.com/eslint/eslint/commit/1665c029acb92bf8812267f1647ad1a7054cbcb4) feat: Use plugin metadata for flat config serialization (#16992) (Nicholas C. Zakas)
* [`b3634f6`](https://github.com/eslint/eslint/commit/b3634f695ddab6a82c0a9b1d8695e62b60d23366) feat: docs license (#17010) (Samuel Roldan)
* [`721c717`](https://github.com/eslint/eslint/commit/721c71782a7c11025689a1500e7690fb3794fcce) docs: Custom Processors cleanup and expansion (#16838) (Ben Perlmutter)
* [`1fbf118`](https://github.com/eslint/eslint/commit/1fbf1184fed57df02640aad4659afb54dc26a2e9) fix: `getFirstToken`/`getLastToken` on comment-only node (#16889) (Francesco Trotta)
* [`129e252`](https://github.com/eslint/eslint/commit/129e252132c7c476d7de17f40b54a333ddb2e6bb) fix: Fix typo in `logical-assignment-operators` rule description (#17000) (Francesco Trotta)
* [`892e6e5`](https://github.com/eslint/eslint/commit/892e6e58c5a07a549d3104de3b6b5879797dc97f) feat: languageOptions.parser must be an object. (#16985) (Nicholas C. Zakas)
* [`ada6a3e`](https://github.com/eslint/eslint/commit/ada6a3e6e3607523958f35e1260537630ec0e976) ci: unpin Node 19 (#16993) (Milos Djermanovic)
* [`c3da975`](https://github.com/eslint/eslint/commit/c3da975e69fde46f35338ce48528841a8dc1ffd2) chore: Remove triage label from template (#16990) (Nicholas C. Zakas)
* [`d049f97`](https://github.com/eslint/eslint/commit/d049f974103e530ef76ede25af701635caf1f405) docs: 'How ESLint is Maintained' page (#16961) (Ben Perlmutter)
* [`5251a92`](https://github.com/eslint/eslint/commit/5251a921866e8d3b380dfe8db8a6e6ab97773d5e) docs: Describe guard options for guard-for-in (#16986) (alope107)
* [`69bc0e2`](https://github.com/eslint/eslint/commit/69bc0e2f4412998f9384600a100d7882ea4dd3f3) ci: pin Node 19 to 19.7.0 (#16987) (Milos Djermanovic)
* [`6157d81`](https://github.com/eslint/eslint/commit/6157d813e19b80481a46f8cbdf9eae18a55e5619) docs: Add example to guard-for-in docs. (#16983) (alope107)
* [`fd47998`](https://github.com/eslint/eslint/commit/fd47998af6efadcdf5ba93e0bd1f4c02d97d22b3) docs: update `Array.prototype.toSorted` specification link (#16982) (Milos Djermanovic)
* [`3e1cf6b`](https://github.com/eslint/eslint/commit/3e1cf6bfc5ebc29314ddbe462d6cb580e9ab085c) docs: Copy edits on Maintain ESLint docs (#16939) (Ben Perlmutter)

v8.36.0 - March 10, 2023

* [`602b111`](https://github.com/eslint/eslint/commit/602b11121910a97ab2bc4a95a46dd0ccd0a89309) chore: upgrade @eslint/js@8.36.0 (#16978) (Milos Djermanovic)
* [`43c2345`](https://github.com/eslint/eslint/commit/43c2345c27024aeab6127e6bbfd55c8b70bd317e) chore: package.json update for @eslint/js release (ESLint Jenkins)
* [`00afb84`](https://github.com/eslint/eslint/commit/00afb84e5039874c8745a45c953fceaf0c71c454) chore: upgrade @eslint/eslintrc@2.0.1 (#16977) (Milos Djermanovic)
* [`698c5aa`](https://github.com/eslint/eslint/commit/698c5aad50e628ff00281dbc786e42de79834035) chore: upgrade espree@9.5.0 (#16976) (Milos Djermanovic)
* [`b98fdd4`](https://github.com/eslint/eslint/commit/b98fdd413a3b07b262bfce6f704c1c1bb8582770) docs: Update README (GitHub Actions Bot)
* [`c89a485`](https://github.com/eslint/eslint/commit/c89a485c49450532ee3db74f2638429f1f37d0dd) feat: Add `checkJSDoc` option to multiline-comment-style (#16807) (Laurent Cozic)
* [`f5f5e11`](https://github.com/eslint/eslint/commit/f5f5e11bd5fd3daab9ccae41e270739c836c305e) feat: Serialize parsers/processors in flat config (#16944) (Nicholas C. Zakas)
* [`caf08ce`](https://github.com/eslint/eslint/commit/caf08ce0cc74917f7c0eec92d25fd784dc33ac4d) docs: fix estree link in custom formatters docs (#16967) (Milos Djermanovic)
* [`75acdd2`](https://github.com/eslint/eslint/commit/75acdd21c5ce7024252e9d41ed77d2f30587caac) chore: lint more js files in docs (#16964) (Milos Djermanovic)
* [`3398431`](https://github.com/eslint/eslint/commit/3398431574b903757bc78b08c8ed36b7b9fce8eb) docs: Custom Parsers cleanup/expansion (#16887) (Ben Perlmutter)
* [`19d3531`](https://github.com/eslint/eslint/commit/19d3531d9b54e1004318d28f9a6e18305c5bcc18) docs: Update README (GitHub Actions Bot)
* [`4799297`](https://github.com/eslint/eslint/commit/4799297ea582c81fd1e5623d32a7ddf7a7f3a126) feat: use @eslint-community dependencies (#16784) (Michaël De Boey)
* [`b09a512`](https://github.com/eslint/eslint/commit/b09a512107249a4eb19ef5a37b0bd672266eafdb) docs: detect and fix broken links (#16837) (Nitin Kumar)
* [`92c1943`](https://github.com/eslint/eslint/commit/92c1943ba73ea01e87086236e8736539b0eed558) fix: correctly iterate files matched by glob patterns (#16831) (Nitin Kumar)
* [`89d9844`](https://github.com/eslint/eslint/commit/89d9844b3151f09b5b21b6eeeda671009ec301e9) ci: bump actions/add-to-project from 0.4.0 to 0.4.1 (#16943) (dependabot[bot])

v8.35.0 - February 26, 2023

* [`cdcbe12`](https://github.com/eslint/eslint/commit/cdcbe127de20cbcc4e24131a808c13b1024e61a2) chore: upgrade @eslint/js@8.35.0 (#16935) (Brandon Mills)
Expand Down
13 changes: 4 additions & 9 deletions README.md
Expand Up @@ -212,11 +212,6 @@ The people who manage releases, review feature requests, and meet regularly to e
Nicholas C. Zakas
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/btmills">
<img src="https://github.com/btmills.png?s=75" width="75" height="75"><br />
Brandon Mills
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/mdjermanovic">
<img src="https://github.com/mdjermanovic.png?s=75" width="75" height="75"><br />
Milos Djermanovic
Expand Down Expand Up @@ -249,9 +244,9 @@ The people who review and fix bugs and help triage issues.
Bryan Mishkin
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/SaraSoueidan">
<img src="https://github.com/SaraSoueidan.png?s=75" width="75" height="75"><br />
Sara Soueidan
<a href="https://github.com/btmills">
<img src="https://github.com/btmills.png?s=75" width="75" height="75"><br />
Brandon Mills
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/fasttime">
Expand Down Expand Up @@ -297,7 +292,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
<h3>Platinum Sponsors</h3>
<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://ridicorp.com/career/"><img src="https://images.opencollective.com/ridi-corporation/175dcf3/logo.png" alt="RIDI" height="96"></a> <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://sentry.io"><img src="https://avatars.githubusercontent.com/u/1396951?v=4" alt="Sentry" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://sentry.io"><img src="https://avatars.githubusercontent.com/u/1396951?v=4" alt="Sentry" 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></p><h3>Bronze Sponsors</h3>
<p><a href="https://paydaysay.com/"><img src="https://images.opencollective.com/payday-say-organization/9cd2467/logo.png" alt="PayDay Say" 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://nx.dev"><img src="https://images.opencollective.com/nx/0efbe42/logo.png" alt="Nx (by Nrwl)" 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: free icons, photos, illustrations, and music" 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://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://quickbookstoolhub.com"><img src="https://avatars.githubusercontent.com/u/95090305?u=e5bc398ef775c9ed19f955c675cdc1fb6abf01df&v=4" alt="QuickBooks Tool hub" height="32"></a></p>
<!--sponsorsend-->

Expand Down
1 change: 0 additions & 1 deletion docs/.stylelintrc.json
Expand Up @@ -14,7 +14,6 @@
"indentation": 4,
"max-line-length": null,
"no-descending-specificity": null,
"no-duplicate-selectors": null,
"number-leading-zero": null,
"number-no-trailing-zeros": null,
"selector-class-pattern": null,
Expand Down
4 changes: 4 additions & 0 deletions docs/README.md
Expand Up @@ -39,3 +39,7 @@ To autofix JS files, run this from the root folder (not the `docs` folder):
```shell
npm run fix:docsjs
```

## License

© OpenJS Foundation and ESLint contributors, [www.openjsf.org](https://www.openjsf.org/). Content licensed under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/).
2 changes: 1 addition & 1 deletion docs/package.json
@@ -1,7 +1,7 @@
{
"name": "docs-eslint",
"private": true,
"version": "8.35.0",
"version": "8.37.0",
"description": "",
"main": "index.js",
"keywords": [],
Expand Down
8 changes: 5 additions & 3 deletions docs/postcss.config.js
@@ -1,7 +1,9 @@
"use strict";

module.exports = {
plugins: [
require('autoprefixer'),
require('cssnano')
require("autoprefixer"),
require("cssnano")
],
map: false
}
};
4 changes: 2 additions & 2 deletions docs/src/_data/rules.json
Expand Up @@ -588,7 +588,7 @@
},
{
"name": "logical-assignment-operators",
"description": "Require or disallow logical assignment logical operator shorthand",
"description": "Require or disallow logical assignment operator shorthand",
"recommended": false,
"fixable": true,
"hasSuggestions": true
Expand Down Expand Up @@ -1382,7 +1382,7 @@
"description": "Enforce the use of `u` flag on RegExp",
"recommended": false,
"fixable": false,
"hasSuggestions": false
"hasSuggestions": true
},
{
"name": "require-yield",
Expand Down
5 changes: 3 additions & 2 deletions docs/src/_data/rules_meta.json
Expand Up @@ -534,7 +534,7 @@
"logical-assignment-operators": {
"type": "suggestion",
"docs": {
"description": "Require or disallow logical assignment logical operator shorthand",
"description": "Require or disallow logical assignment operator shorthand",
"recommended": false,
"url": "https://eslint.org/docs/rules/logical-assignment-operators"
},
Expand Down Expand Up @@ -2261,7 +2261,8 @@
"description": "Enforce the use of `u` flag on RegExp",
"recommended": false,
"url": "https://eslint.org/docs/rules/require-unicode-regexp"
}
},
"hasSuggestions": true
},
"require-yield": {
"type": "suggestion",
Expand Down
3 changes: 2 additions & 1 deletion docs/src/_data/sites/en.yml
Expand Up @@ -85,8 +85,9 @@ footer:
description: Selecting a language will take you to the ESLint website in that language.
change_language: Change Language
language: Language
latest: Latest
copyright: >
&copy; OpenJS Foundation and ESLint contributors, <a href="https://www.openjsf.org">www.openjsf.org</a>
&copy; OpenJS Foundation and ESLint contributors, <a href="https://www.openjsf.org">www.openjsf.org</a>. Content licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
links:
open_jsf: The OpenJS Foundation
terms: Terms of Use
Expand Down
3 changes: 2 additions & 1 deletion docs/src/_data/sites/zh-hans.yml
Expand Up @@ -83,8 +83,9 @@ footer:
description: 切换到你所选择语言版本对应的 ESLint 网站。
change_language: 更改语言
language: 语言
latest: 最新
copyright: >
&copy; OpenJS Foundation and ESLint contributors, <a href="https://www.openjsf.org">www.openjsf.org</a>
&copy; OpenJS Foundation and ESLint contributors, <a href="https://www.openjsf.org">www.openjsf.org</a>. Content licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
links:
open_jsf: OpenJS 基金会
terms: 使用条款
Expand Down
8 changes: 6 additions & 2 deletions docs/src/_includes/components/language-switcher.html
Expand Up @@ -14,9 +14,13 @@
<select name="language selector" id="language-select" aria-describedby="language-infobox"
class="c-custom-select switcher__select">
{% for key, other_site in sites %}
<option value="{{ other_site.language.code }}" data-url="https://{{ other_site.hostname }}" {% if
site.language.code==other_site.language.code %} selected {% endif %}>
<option
value="{{ other_site.language.code }}"
data-url="https://{{ other_site.hostname }}/docs/latest{{ page.url | prettyURL }}"
{% if site.language.code==other_site.language.code %}selected{% endif %}
>
{{ other_site.language.flag }} {{ other_site.language.name }}
{% if site.language.code!=other_site.language.code or GIT_BRANCH=="latest" %}({{ other_site.footer.language_switcher.latest }}){% endif %}
</option>
{% endfor %}
</select>
Expand Down
3 changes: 2 additions & 1 deletion docs/src/_includes/layouts/base.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ config.lang }}" class="no-js">
<html lang="{{ config.lang }}" class="no-js" id="site_top">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down Expand Up @@ -154,6 +154,7 @@
<script src="{{ '/assets/js/focus-visible.js' | url }}"></script>
<script src="{{ '/assets/js/main.js' | url }}"></script>
<script src="{{ '/assets/js/tabs.js' | url }}"></script>
<script src="{{ '/assets/js/scroll-up-btn.js' | url }}"></script>
{% include 'partials/analytics.html' %}

{%- if hook == "component-library" -%}
Expand Down
3 changes: 3 additions & 0 deletions docs/src/_includes/layouts/doc.html
Expand Up @@ -102,6 +102,9 @@ <h1>{{ title }}</h1>
{% include "partials/docs-footer.html" %}
</div>
</div>
<a id="scroll-up-btn" href="#site_top">
<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24"><line x1="12" x2="12" y1="19" y2="5"/><polyline points="5 12 12 5 19 12"/></svg>
</a>
</div>

<script src="{{ '/assets/js/tabs.js' | url }}"></script>
13 changes: 13 additions & 0 deletions docs/src/assets/js/scroll-up-btn.js
@@ -0,0 +1,13 @@
(function () {
const scrollUpBtn = document.getElementById("scroll-up-btn");

if(window.innerWidth < 1400) {
window.addEventListener("scroll", function () {
if(document.body.scrollTop > 500 || document.documentElement.scrollTop > 500) {
scrollUpBtn.style.display = "flex";
} else {
scrollUpBtn.style.display = "none";
}
});
}
})();
19 changes: 3 additions & 16 deletions docs/src/assets/scss/components/alert.scss
Expand Up @@ -16,6 +16,7 @@
color: var(--color-rose-600);

[data-theme="dark"] & {
border: 1px solid var(--color-rose-300);
color: var(--color-rose-300);
background-color: var(--color-rose-900);
}
Expand All @@ -27,6 +28,7 @@

[data-theme="dark"] & {
color: var(--color-warning-300);
border: 1px solid var(--color-warning-300);
background-color: var(--color-warning-900);
}
}
Expand All @@ -37,23 +39,8 @@

[data-theme="dark"] & {
color: var(--color-success-300);
background-color: var(--color-success-900);
}
}
}

[data-theme="dark"] {
.alert {
&.alert--warning {
border: 1px solid var(--color-rose-300);
}

&.alert--important {
border: 1px solid var(--color-warning-300);
}

&.alert--tip {
border: 1px solid var(--color-success-300);
background-color: var(--color-success-900);
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions docs/src/assets/scss/components/theme-switcher.scss
Expand Up @@ -75,9 +75,3 @@
}
}
}

.theme-switcher__button:hover {
.theme-switcher__icon {
color: var(--link-color);
}
}
8 changes: 2 additions & 6 deletions docs/src/assets/scss/components/toc.scss
@@ -1,17 +1,13 @@
.docs-toc {
margin: 2rem 0;
}

.docs-toc {
.docs-aside & {
display: none;
}

@media all and (min-width: 1400px) {
display: none;
}

.docs-aside & {
display: none;

@media all and (min-width: 1400px) {
display: block;
}
Expand Down

0 comments on commit a33e401

Please sign in to comment.