Skip to content

Commit

Permalink
9.0.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Jan 12, 2024
1 parent 52d5e7a commit bbf2b21
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 63 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
@@ -1,7 +1,7 @@
{
"name": "docs-eslint",
"private": true,
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "",
"main": "index.js",
"keywords": [],
Expand Down
9 changes: 6 additions & 3 deletions docs/src/_data/rule_versions.json
Expand Up @@ -308,7 +308,8 @@
"logical-assignment-operators": "8.24.0",
"no-empty-static-block": "8.27.0",
"no-new-native-nonconstructor": "8.27.0",
"no-object-constructor": "8.50.0"
"no-object-constructor": "8.50.0",
"no-useless-assignment": "9.0.0-alpha.1"
},
"removed": {
"generator-star": "1.0.0-rc-1",
Expand All @@ -328,6 +329,8 @@
"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"
"spaced-line-comment": "1.0.0-rc-1",
"require-jsdoc": "9.0.0-alpha.0",
"valid-jsdoc": "9.0.0-alpha.0"
}
}
}
7 changes: 7 additions & 0 deletions docs/src/_data/rules.json
Expand Up @@ -372,6 +372,13 @@
"fixable": false,
"hasSuggestions": false
},
{
"name": "no-useless-assignment",
"description": "Disallow variable assignments when the value is not used",
"recommended": false,
"fixable": false,
"hasSuggestions": false
},
{
"name": "no-useless-backreference",
"description": "Disallow useless backreferences in regular expressions",
Expand Down
8 changes: 8 additions & 0 deletions docs/src/_data/rules_meta.json
Expand Up @@ -1962,6 +1962,14 @@
"url": "https://eslint.org/docs/latest/rules/no-use-before-define"
}
},
"no-useless-assignment": {
"type": "problem",
"docs": {
"description": "Disallow variable assignments when the value is not used",
"recommended": false,
"url": "https://eslint.org/docs/latest/rules/no-useless-assignment"
}
},
"no-useless-backreference": {
"type": "problem",
"docs": {
Expand Down
15 changes: 3 additions & 12 deletions docs/src/use/formatters/html-formatter-example.html
Expand Up @@ -118,15 +118,15 @@
<div id="overview" class="bg-2">
<h1>ESLint Report</h1>
<div>
<span>9 problems (5 errors, 4 warnings)</span> - Generated on Sat Dec 30 2023 01:21:43 GMT+0100 (Central European Standard Time)
<span>8 problems (4 errors, 4 warnings)</span> - Generated on Fri Jan 12 2024 20:48:30 GMT+0000 (Coordinated Universal Time)
</div>
</div>
<table>
<tbody>
<tr class="bg-2" data-group="f-0">
<th colspan="4">
[+] C:\projects\eslint\fullOfProblems.js
<span>9 problems (5 errors, 4 warnings)</span>
[+] /var/lib/jenkins/workspace/eslint Release/eslint/fullOfProblems.js
<span>8 problems (4 errors, 4 warnings)</span>
</th>
</tr>
<tr style="display: none;" class="f-0">
Expand Down Expand Up @@ -201,15 +201,6 @@ <h1>ESLint Report</h1>
</td>
</tr>

<tr style="display: none;" class="f-0">
<td>7:2</td>
<td class="clr-2">Error</td>
<td>Unnecessary semicolon.</td>
<td>
<a href="" target="_blank" rel="noopener noreferrer">no-extra-semi</a>
</td>
</tr>

</tbody>
</table>
<script type="text/javascript">
Expand Down
55 changes: 9 additions & 46 deletions docs/src/use/formatters/index.md
Expand Up @@ -78,7 +78,7 @@ Example output (formatted for easier reading):
{
"results": [
{
"filePath": "C:\\projects\\eslint\\fullOfProblems.js",
"filePath": "/var/lib/jenkins/workspace/eslint Release/eslint/fullOfProblems.js",
"messages": [
{
"ruleId": "no-unused-vars",
Expand Down Expand Up @@ -202,31 +202,13 @@ Example output (formatted for easier reading):
],
"text": ";"
}
},
{
"ruleId": "no-extra-semi",
"severity": 2,
"message": "Unnecessary semicolon.",
"line": 7,
"column": 2,
"nodeType": "EmptyStatement",
"messageId": "unexpected",
"endLine": 7,
"endColumn": 3,
"fix": {
"range": [
93,
95
],
"text": "}"
}
}
],
"suppressedMessages": [],
"errorCount": 5,
"errorCount": 4,
"fatalErrorCount": 0,
"warningCount": 4,
"fixableErrorCount": 2,
"fixableErrorCount": 1,
"fixableWarningCount": 4,
"source": "function addOne(i) {\n if (i != NaN) {\n return i ++\n } else {\n return\n }\n};"
}
Expand Down Expand Up @@ -680,7 +662,7 @@ Example output (formatted for easier reading):
```json
[
{
"filePath": "C:\\projects\\eslint\\fullOfProblems.js",
"filePath": "/var/lib/jenkins/workspace/eslint Release/eslint/fullOfProblems.js",
"messages": [
{
"ruleId": "no-unused-vars",
Expand Down Expand Up @@ -804,31 +786,13 @@ Example output (formatted for easier reading):
],
"text": ";"
}
},
{
"ruleId": "no-extra-semi",
"severity": 2,
"message": "Unnecessary semicolon.",
"line": 7,
"column": 2,
"nodeType": "EmptyStatement",
"messageId": "unexpected",
"endLine": 7,
"endColumn": 3,
"fix": {
"range": [
93,
95
],
"text": "}"
}
}
],
"suppressedMessages": [],
"errorCount": 5,
"errorCount": 4,
"fatalErrorCount": 0,
"warningCount": 4,
"fixableErrorCount": 2,
"fixableErrorCount": 1,
"fixableWarningCount": 4,
"source": "function addOne(i) {\n if (i != NaN) {\n return i ++\n } else {\n return\n }\n};"
}
Expand All @@ -843,7 +807,7 @@ Example output:

```text
C:\projects\eslint\fullOfProblems.js
/var/lib/jenkins/workspace/eslint Release/eslint/fullOfProblems.js
1:10 error 'addOne' is defined but never used no-unused-vars
2:9 error Use the isNaN function to compare with NaN use-isnan
3:16 error Unexpected space before unary operator '++' space-unary-ops
Expand All @@ -852,9 +816,8 @@ C:\projects\eslint\fullOfProblems.js
5:1 warning Expected indentation of 8 spaces but found 6 indent
5:7 error Function 'addOne' expected a return value consistent-return
5:13 warning Missing semicolon semi
7:2 error Unnecessary semicolon no-extra-semi
9 problems (5 errors, 4 warnings)
2 errors and 4 warnings potentially fixable with the `--fix` option.
8 problems (4 errors, 4 warnings)
1 error and 4 warnings potentially fixable with the `--fix` option.
```
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"bin": {
Expand Down

0 comments on commit bbf2b21

Please sign in to comment.