Skip to content

Commit

Permalink
Added test cases for the upcoming ESLint 9.0 version & move to latest…
Browse files Browse the repository at this point in the history
… lsp libs. (#1816)
  • Loading branch information
dbaeumer authored Mar 27, 2024
1 parent 6fb09e0 commit c7ab1de
Show file tree
Hide file tree
Showing 15 changed files with 2,890 additions and 38 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ This section describes major releases and their improvements. For a detailed lis

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.

### Version 3.0.1 - pre-release

- converted the server to use diagnostic pull instead of push.
- files will be revalidated on focus gain.
### Version 3.0.3 - pre-release

- Support for the new ESLint flat config files has improved. The following changes have been implemented:
- To use flat config files it is recommended to use ESLint version 8.57.0 or above.
- 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`.
- The experimental settings `eslint.experimental.useFlatConfig` is deprecated and should only be used for ESLint versions >= 8.21 < 8.57.0.
- Converted the server to use diagnostic pull instead of push.
- Files will be revalidated on focus gain.
- Add a command `ESLint: Revalidate all open files` to revalidate all open files.
- 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)
- various [bug fixes](https://github.com/microsoft/vscode-eslint/issues?q=is%3Aclosed+milestone%3ANext)
- Various [bug fixes](https://github.com/microsoft/vscode-eslint/issues?q=is%3Aclosed+milestone%3ANext)

### Version 2.4.4

Expand Down
30 changes: 15 additions & 15 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/vscode": "1.86.0"
},
"dependencies": {
"vscode-languageclient": "10.0.0-next.2"
"vscode-languageclient": "10.0.0-next.3"
},
"scripts": {
"test": "node ../node_modules/mocha/bin/_mocha",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-eslint",
"displayName": "ESLint",
"description": "Integrates ESLint JavaScript into VS Code.",
"version": "3.0.1",
"version": "3.0.3",
"author": "Microsoft Corporation",
"license": "MIT",
"repository": {
Expand Down
12 changes: 12 additions & 0 deletions playgrounds/9.0/flat/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function bar() {
if (foo) {
foo++;
}
}

function foo(x) {
console.log(x);
bar();
var x = 10;
console.log(undef);
}
58 changes: 58 additions & 0 deletions playgrounds/9.0/flat/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const globals = require('globals');

module.exports = [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
...globals.es6,
...globals.commonjs
}
},
rules: {
"no-use-before-define": "error",
"no-useless-escape": "error",
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn",
"no-extra-semi": "warn",
"curly": "warn",
"no-console": [
2,
{
"allow": [
"warn",
"error"
]
}
],
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"indent": [
"warn",
"tab",
{
"VariableDeclarator": {
"var": 2,
"let": 2,
"const": 3
},
"MemberExpression": 1,
"SwitchCase": 1
}
]
}
}
]
Loading

0 comments on commit c7ab1de

Please sign in to comment.