Skip to content

Commit 828ebd5

Browse files
committed
add eslint setting for .vscode
1 parent 455f8b5 commit 828ebd5

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ tests/cases/**/*.js
3737
!tests/cases/docker/*.js/
3838
tests/cases/**/*.js.map
3939
*.config
40+
scripts/eslint/built/
4041
scripts/debug.bat
4142
scripts/run.bat
4243
scripts/word2md.js
@@ -60,6 +61,8 @@ internal/
6061
**/.vs
6162
**/.vscode
6263
!**/.vscode/tasks.json
64+
!**/.vscode/settings.json
65+
!**/.vscode/extensions.json
6366
!tests/cases/projects/projectOption/**/node_modules
6467
!tests/cases/projects/NodeModulesSearch/**/*
6568
!tests/baselines/reference/project/nodeModules*/**/*

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint"
4+
],
5+
6+
"unwantedRecommendations": [
7+
"ms-vscode.vscode-typescript-tslint-plugin"
8+
]
9+
}

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"eslint.validate": [
3+
"javascript",
4+
{
5+
"language": "typescript",
6+
"autoFix": true
7+
}
8+
],
9+
"eslint.options": {
10+
"rulePaths": ["./scripts/eslint/built/rules/"],
11+
}
12+
}

Gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ cleanTasks.push(cleanEslintRules);
327327
task("clean-eslint-rules", cleanEslintRules);
328328
task("clean-eslint-rules").description = "Cleans the outputs for the eslint rules";
329329

330-
const runEslintRulesTests = () => runConsoleTests("built/eslint/tests", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false);
330+
const runEslintRulesTests = () => runConsoleTests("scripts/eslint/built/tests", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false);
331331
task("run-eslint-rules-tests", series(buildEslintRules, runEslintRulesTests));
332332
task("run-eslint-rules-tests").description = "Runs the eslint rule tests";
333333

@@ -337,7 +337,7 @@ const eslint = (path) => async () => {
337337
const args = [
338338
"node_modules/eslint/bin/eslint",
339339
"--format", "autolinkable-stylish",
340-
"--rulesdir", "built/eslint/rules/",
340+
"--rulesdir", "scripts/eslint/built/rules",
341341
"--ext", ".ts",
342342
`"${ path }"`,
343343
];

scripts/eslint/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"strict": true,
1717
"module": "commonjs",
1818
"target": "es6",
19-
"outDir": "../../built/eslint",
19+
"outDir": "./built",
2020
"lib": ["es2015", "es2016"]
2121
},
2222

0 commit comments

Comments
 (0)