Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
Autogenerated new docs and demo at Fri Jun 03 2022 17:39:17
Browse files Browse the repository at this point in the history
  • Loading branch information
ESLint Jenkins committed Jun 3, 2022
1 parent 630cb21 commit fa00dd6
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 11 deletions.
70 changes: 70 additions & 0 deletions _posts/2022-06-03-eslint-v8.17.0-released.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
layout: post
title: ESLint v8.17.0 released
teaser: "We just pushed ESLint v8.17.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release."
image: release-notes-minor.png
categories:
- Release Notes
tags:
- Release
---








## Features


* [`55319e1`](https://github.com/eslint/eslint/commit/55319e133f0862a008db3557d7350f154f2c784f) feat: fix [indent](/docs/rules/indent) bug with semicolon-first style ([#15951](https://github.com/eslint/eslint/issues/15951)) (Milos Djermanovic)
* [`f6d7920`](https://github.com/eslint/eslint/commit/f6d79209821241c8e03c183b5844a024da0efe8a) feat: add `allowNamedExports` option to [no-use-before-define](/docs/rules/no-use-before-define) ([#15953](https://github.com/eslint/eslint/issues/15953)) (Milos Djermanovic)






## Bug Fixes


* [`54c0953`](https://github.com/eslint/eslint/commit/54c09530c778eb4076d89777165d59db96c9acb5) fix: cleanup typos ([#15939](https://github.com/eslint/eslint/issues/15939)) (Nick Schonning)
* [`845a7af`](https://github.com/eslint/eslint/commit/845a7af90ce03b383c8f09654ac049fc161dbb9f) fix: typo ocatal -> octal ([#15940](https://github.com/eslint/eslint/issues/15940)) (Nick Schonning)




## Documentation


* [`b915018`](https://github.com/eslint/eslint/commit/b9150186bcc0f2732a69ab0ebd83a9b2fb2e6552) docs: Update website UI to latest ([#15944](https://github.com/eslint/eslint/issues/15944)) (Nicholas C. Zakas)
* [`f0bb609`](https://github.com/eslint/eslint/commit/f0bb6099668f54ae6f444126b90dbb1146248146) docs: Update Exponentiation operator MDN link ([#15960](https://github.com/eslint/eslint/issues/15960)) (Pranjal Jain)
* [`baa0153`](https://github.com/eslint/eslint/commit/baa01530469ec233fb60380a0960c1550f9d9a45) docs: Use correct past tense "left" instead of "leaved" ([#15950](https://github.com/eslint/eslint/issues/15950)) (Frederik Braun)
* [`1351a9b`](https://github.com/eslint/eslint/commit/1351a9b875aa32a8961a68457dde03ede9ef7c78) docs: Add Resources section to rule pages ([#15901](https://github.com/eslint/eslint/issues/15901)) (Nicholas C. Zakas)
* [`68cf0fb`](https://github.com/eslint/eslint/commit/68cf0fb7f645da5d992a5e749fc6c1311d30e75a) docs: cleanup typos ([#15936](https://github.com/eslint/eslint/issues/15936)) (Nick Schonning)
* [`13b62ae`](https://github.com/eslint/eslint/commit/13b62aeb710a68e5d838a4d3847c487af1ba9520) docs: use-dart-sass instead of node-sass ([#15912](https://github.com/eslint/eslint/issues/15912)) (Deepshika S)
* [`c81c5d6`](https://github.com/eslint/eslint/commit/c81c5d6ef1ba5808cca95ab965a162802af9b7cc) docs: add social media links ([#15920](https://github.com/eslint/eslint/issues/15920)) (Deepshika S)
* [`0d6a50b`](https://github.com/eslint/eslint/commit/0d6a50b41f2fe444fd222463adad48473eaf9b7d) docs: fix openjs link ([#15917](https://github.com/eslint/eslint/issues/15917)) (Amaresh S M)
* [`54910f5`](https://github.com/eslint/eslint/commit/54910f5a3bf6615f8ac03d33fd26fc1fa6dea21f) docs: display version in mobile view ([#15909](https://github.com/eslint/eslint/issues/15909)) (Amaresh S M)








## Chores


* [`da694b9`](https://github.com/eslint/eslint/commit/da694b9d7cb0247541bcabbf943d1289e0e30167) chore: avoid theme flashes ([#15927](https://github.com/eslint/eslint/issues/15927)) (Strek)
* [`f836743`](https://github.com/eslint/eslint/commit/f836743e95cb8ad3bdd4e88687dbe2f16bfade62) chore: Use build hook for docs deploy ([#15945](https://github.com/eslint/eslint/issues/15945)) (Nicholas C. Zakas)
* [`ce035e5`](https://github.com/eslint/eslint/commit/ce035e5fac632ba8d4f1860f92465f22d6b44d42) test: cleanup typos ([#15937](https://github.com/eslint/eslint/issues/15937)) (Nick Schonning)
* [`10249ad`](https://github.com/eslint/eslint/commit/10249ad1a961463b6b347be71c074951ab8e2652) chore: use addEventListener instead of addListener ([#15923](https://github.com/eslint/eslint/issues/15923)) (Amaresh S M)
* [`5f5c1fb`](https://github.com/eslint/eslint/commit/5f5c1fb1083573ea511d0dae7913651db0dca772) chore: lint eleventy config file ([#15904](https://github.com/eslint/eslint/issues/15904)) (Milos Djermanovic)
* [`8513d37`](https://github.com/eslint/eslint/commit/8513d37c725509c9e9ec1dbbc431f20d32632cf3) chore: update Rule typedefs ([#15915](https://github.com/eslint/eslint/issues/15915)) (Milos Djermanovic)
* [`55534f1`](https://github.com/eslint/eslint/commit/55534f1a7040fad94bb5726759fbb9acb60d1c24) test: ensure [no-restricted-imports](/docs/rules/no-restricted-imports) works with NodeJS imports ([#15907](https://github.com/eslint/eslint/issues/15907)) (Nick Mazuk)


4 changes: 2 additions & 2 deletions docs/developer-guide/code-path-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ module.exports = function(context) {
},

/**
* This is called when a code path segment was leaved.
* This is called when a code path segment was left.
* In this time, the segment does not have the next segments yet.
*
* @param {CodePathSegment} segment - The leaved code path segment.
* @param {CodePathSegment} segment - The left code path segment.
* @param {ASTNode} node - The current node.
* @returns {void}
*/
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/nodejs-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ This method loads a formatter. Formatters convert lint results to a human- or ma
The path to the file you want to check. The following values are allowed:
* `undefined`. In this case, loads the `"stylish"` built-in formatter.
* A name of [built-in formatters][builtin-formatters].
* A name of [third-party formatters][thirdparty-formatters]. For examples:
* A name of [third-party formatters][third-party-formatters]. For examples:
* `"foo"` will load `eslint-formatter-foo`.
* `"@foo"` will load `@foo/eslint-formatter`.
* `"@foo/bar"` will load `@foo/eslint-formatter-bar`.
Expand Down Expand Up @@ -954,7 +954,7 @@ ruleTester.run("my-rule", myRule, {

[configuration object]: ../user-guide/configuring
[builtin-formatters]: https://eslint.org/docs/user-guide/formatters/
[thirdparty-formatters]: https://www.npmjs.com/search?q=eslintformatter
[third-party-formatters]: https://www.npmjs.com/search?q=eslintformatter
[eslint]: #eslint-class
[eslint-constructor]: #-new-eslintoptions
[eslint-lintfiles]: #-eslintlintfilespatterns
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/eol-last.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Examples of **incorrect** code for this rule:
```js
/*eslint eol-last: ["error", "always"]*/

function doSmth() {
function doSomething() {
var foo = 2;
}
```
Expand All @@ -40,7 +40,7 @@ Examples of **correct** code for this rule:
```js
/*eslint eol-last: ["error", "always"]*/

function doSmth() {
function doSomething() {
var foo = 2;
}\n
```
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/key-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ var obj = {
"myObjectFunction": function() {
// Do something
//
}, // These are two separate groups, so no alignment between `myObjectFuction` and `one`
}, // These are two separate groups, so no alignment between `myObjectFunction` and `one`
"one" : 1,
"seven" : 7 // `one` and `seven` are in their own group, and therefore aligned
}
Expand Down
54 changes: 52 additions & 2 deletions docs/rules/no-use-before-define.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ var b = 1;
}
}
}

export { foo };
const foo = 1;
```

Examples of **correct** code for this rule:
Expand Down Expand Up @@ -109,13 +112,21 @@ function g() {
}
}
}

const foo = 1;
export { foo };
```

## Options

```json
{
"no-use-before-define": ["error", { "functions": true, "classes": true, "variables": true }]
"no-use-before-define": ["error", {
"functions": true,
"classes": true,
"variables": true,
"allowNamedExports": false
}]
}
```

Expand All @@ -136,9 +147,13 @@ function g() {
If this is `true`, the rule warns every reference to a variable before the variable declaration.
Otherwise, the rule ignores a reference if the declaration is in an upper scope, while still reporting the reference if it's in the same scope as the declaration.
Default is `true`.
* `allowNamedExports` (`boolean`) -
If this flag is set to `true`, the rule always allows references in `export {};` declarations.
These references are safe even if the variables are declared later in the code.
Default is `false`.

This rule accepts `"nofunc"` string as an option.
`"nofunc"` is the same as `{ "functions": false, "classes": true, "variables": true }`.
`"nofunc"` is the same as `{ "functions": false, "classes": true, "variables": true, "allowNamedExports": false }`.

### functions

Expand Down Expand Up @@ -268,6 +283,41 @@ const g = function() {}
}
```

### allowNamedExports

Examples of **correct** code for the `{ "allowNamedExports": true }` option:

```js
/*eslint no-use-before-define: ["error", { "allowNamedExports": true }]*/

export { a, b, f, C };

const a = 1;

let b;

function f () {}

class C {}
```

Examples of **incorrect** code for the `{ "allowNamedExports": true }` option:

```js
/*eslint no-use-before-define: ["error", { "allowNamedExports": true }]*/

export default a;
const a = 1;

const b = c;
export const c = 1;

export function foo() {
return d;
}
const d = 1;
```

## Version

This rule was introduced in ESLint 0.0.9.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-exponentiation-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: doc
edit_link: https://github.com/eslint/eslint/edit/main/docs/src/rules/prefer-exponentiation-operator.md
rule_type: suggestion
further_reading:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Exponentiation
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation
- https://bugs.chromium.org/p/v8/issues/detail?id=5848
---

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/formatters/html-formatter-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<div id="overview" class="bg-2">
<h1>ESLint Report</h1>
<div>
<span>9 problems (5 errors, 4 warnings)</span> - Generated on Fri May 20 2022 18:37:22 GMT-0400 (Eastern Daylight Time)
<span>9 problems (5 errors, 4 warnings)</span> - Generated on Fri Jun 03 2022 17:39:16 GMT-0400 (Eastern Daylight Time)
</div>
</div>
<table>
Expand Down

0 comments on commit fa00dd6

Please sign in to comment.