-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Experimental support of Flat Config (#1522)
* feat(client): add eslint.config.js to watch target * add experimentalUseFlatConfig setting * Support loading FlatESLint * add flatConfig playground * fix * clean up flatConfig playground * comment in * revert unnecessary formatting changes * fix type and make error message more helpful * update error message * improve error message
- Loading branch information
Showing
10 changed files
with
2,341 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"eslint.enable": true, | ||
"eslint.run": "onType", | ||
"eslint.trace.server": { | ||
"verbosity": "messages", | ||
"format": "text" | ||
}, | ||
"files.autoSave": "off", | ||
"editor.formatOnSave": false, | ||
"[javascript]": { | ||
"editor.formatOnSave": false, | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"eslint.format.enable": true, | ||
"eslint.onIgnoredFiles": "off", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.fixAll.eslint": true | ||
}, | ||
"eslint.experimentalUseFlatConfig": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const globals = require('globals'); | ||
|
||
module.exports = [ | ||
"eslint:recommended", | ||
{ | ||
files: ["**/*.js"], | ||
languageOptions: { | ||
parserOptions: { | ||
sourceType: "module" | ||
}, | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.es6, | ||
...globals.commonjs | ||
} | ||
}, | ||
}, | ||
{ | ||
files: ["sub/*.js"], | ||
rules: { | ||
"no-undef": "warn", | ||
"no-console": "warn" | ||
} | ||
} | ||
] |
Oops, something went wrong.