Merge pull request #20101 from storybookjs/tech/eslint-config-in-settings

add more linting config to vs-code settings.json
This commit is contained in:
Tom Coleman 2022-12-07 10:41:13 +11:00 committed by GitHub
commit ae3cd9cda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 4 deletions

7
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"yzhang.markdown-all-in-one"
]
}

42
.vscode/settings.json vendored
View File

@ -1,6 +1,4 @@
{
"eslint.workingDirectories": ["./code", "./scripts"],
"typescript.tsdk": "./code/node_modules/typescript/lib",
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
@ -17,5 +15,41 @@
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"prettier.ignorePath": "./code/.prettierignore"
}
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.tabSize": 2,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"eslint.options": {
"cache": true,
"cacheLocation": ".cache/eslint",
"extensions": [
".js",
".jsx",
".mjs",
".json",
".ts",
".tsx"
]
},
"eslint.packageManager": "yarn",
"eslint.useESLintClass": true,
"eslint.validate": [
"json",
"javascript",
"javascriptreact",
"html",
"typescript",
"typescriptreact"
],
"eslint.workingDirectories": [
"./code",
"./scripts"
],
"files.associations": {
"*.js": "javascriptreact"
},
"prettier.ignorePath": "./code/.prettierignore",
"typescript.tsdk": "./code/node_modules/typescript/lib"
}