Skip to content

Commit c7ab1de

Browse files
authored
Added test cases for the upcoming ESLint 9.0 version & move to latest lsp libs. (#1816)
1 parent 6fb09e0 commit c7ab1de

File tree

15 files changed

+2890
-38
lines changed

15 files changed

+2890
-38
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ This section describes major releases and their improvements. For a detailed lis
2323

2424
From version 2.2.3 on forward odd minor or patch version numbers indicate an insider or pre-release. So versions `2.2.3`, `2.2.5` and `2.3.1` will all be pre-release versions. `2.2.10`, `2.4.10` and `3.0.0` will all be regular release versions.
2525

26-
### Version 3.0.1 - pre-release
27-
28-
- converted the server to use diagnostic pull instead of push.
29-
- files will be revalidated on focus gain.
26+
### Version 3.0.3 - pre-release
27+
28+
- Support for the new ESLint flat config files has improved. The following changes have been implemented:
29+
- To use flat config files it is recommended to use ESLint version 8.57.0 or above.
30+
- There is a new `eslint.useFlatConfig` setting which is honored by ESLint version 8.57.0 and above. If one of those versions is used, the extension adheres to the [ESLint Flat config rollout plan](https://eslint.org/blog/2023/10/flat-config-rollout-plans/). The setting has the same meaning as the environment variable `ESLINT_USE_FLAT_CONFIG`.
31+
- The experimental settings `eslint.experimental.useFlatConfig` is deprecated and should only be used for ESLint versions >= 8.21 < 8.57.0.
32+
- Converted the server to use diagnostic pull instead of push.
33+
- Files will be revalidated on focus gain.
3034
- Add a command `ESLint: Revalidate all open files` to revalidate all open files.
3135
- Probing support for [Astro](https://github.com/microsoft/vscode-eslint/pull/1795), [MDX](https://github.com/microsoft/vscode-eslint/pull/1794) and [JSON](https://github.com/microsoft/vscode-eslint/pull/1787)
32-
- various [bug fixes](https://github.com/microsoft/vscode-eslint/issues?q=is%3Aclosed+milestone%3ANext)
36+
- Various [bug fixes](https://github.com/microsoft/vscode-eslint/issues?q=is%3Aclosed+milestone%3ANext)
3337

3438
### Version 2.4.4
3539

client/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/vscode": "1.86.0"
2121
},
2222
"dependencies": {
23-
"vscode-languageclient": "10.0.0-next.2"
23+
"vscode-languageclient": "10.0.0-next.3"
2424
},
2525
"scripts": {
2626
"test": "node ../node_modules/mocha/bin/_mocha",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-eslint",
33
"displayName": "ESLint",
44
"description": "Integrates ESLint JavaScript into VS Code.",
5-
"version": "3.0.1",
5+
"version": "3.0.3",
66
"author": "Microsoft Corporation",
77
"license": "MIT",
88
"repository": {

playgrounds/9.0/flat/app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function bar() {
2+
if (foo) {
3+
foo++;
4+
}
5+
}
6+
7+
function foo(x) {
8+
console.log(x);
9+
bar();
10+
var x = 10;
11+
console.log(undef);
12+
}

playgrounds/9.0/flat/eslint.config.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
const globals = require('globals');
2+
3+
module.exports = [
4+
{
5+
files: ["**/*.js"],
6+
languageOptions: {
7+
sourceType: "module",
8+
globals: {
9+
...globals.browser,
10+
...globals.node,
11+
...globals.es6,
12+
...globals.commonjs
13+
}
14+
},
15+
rules: {
16+
"no-use-before-define": "error",
17+
"no-useless-escape": "error",
18+
"no-const-assign": "warn",
19+
"no-this-before-super": "warn",
20+
"no-undef": "warn",
21+
"no-unreachable": "warn",
22+
"no-unused-vars": "warn",
23+
"constructor-super": "warn",
24+
"valid-typeof": "warn",
25+
"no-extra-semi": "warn",
26+
"curly": "warn",
27+
"no-console": [
28+
2,
29+
{
30+
"allow": [
31+
"warn",
32+
"error"
33+
]
34+
}
35+
],
36+
"eqeqeq": [
37+
"error",
38+
"always",
39+
{
40+
"null": "ignore"
41+
}
42+
],
43+
"indent": [
44+
"warn",
45+
"tab",
46+
{
47+
"VariableDeclarator": {
48+
"var": 2,
49+
"let": 2,
50+
"const": 3
51+
},
52+
"MemberExpression": 1,
53+
"SwitchCase": 1
54+
}
55+
]
56+
}
57+
}
58+
]

0 commit comments

Comments
 (0)