mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 12:32:08 -06:00
Run eslint at root, rather than on src and scripts individually (#50327)
This commit is contained in:
parent
42165a183a
commit
df25b77d0f
@ -1,6 +1,9 @@
|
||||
**/node_modules/**
|
||||
/built/local/**
|
||||
/tests/**
|
||||
/lib/**
|
||||
/src/lib/*.generated.d.ts
|
||||
/scripts/*.js
|
||||
/scripts/eslint/built/**
|
||||
/internal/**
|
||||
/coverage/**
|
||||
|
||||
19
Gulpfile.js
19
Gulpfile.js
@ -350,7 +350,6 @@ task("run-eslint-rules-tests").description = "Runs the eslint rule tests";
|
||||
|
||||
/** @type { (folder: string) => { (): Promise<any>; displayName?: string } } */
|
||||
const eslint = (folder) => async () => {
|
||||
|
||||
const formatter = cmdLineOptions.ci ? "stylish" : "autolinkable-stylish";
|
||||
const args = [
|
||||
"node_modules/eslint/bin/eslint",
|
||||
@ -370,22 +369,12 @@ const eslint = (folder) => async () => {
|
||||
return exec(process.execPath, args);
|
||||
};
|
||||
|
||||
const lintScripts = eslint("scripts");
|
||||
lintScripts.displayName = "lint-scripts";
|
||||
task("lint-scripts", series([buildEslintRules, lintScripts]));
|
||||
task("lint-scripts").description = "Runs eslint on the scripts sources.";
|
||||
const lintRoot = eslint(".");
|
||||
lintRoot.displayName = "lint";
|
||||
|
||||
const lintCompiler = eslint("src");
|
||||
lintCompiler.displayName = "lint-compiler";
|
||||
task("lint-compiler", series([buildEslintRules, lintCompiler]));
|
||||
task("lint-compiler").description = "Runs eslint on the compiler sources.";
|
||||
task("lint-compiler").flags = {
|
||||
" --ci": "Runs eslint additional rules",
|
||||
};
|
||||
|
||||
const lint = series([buildEslintRules, lintScripts, lintCompiler]);
|
||||
const lint = series([buildEslintRules, lintRoot]);
|
||||
lint.displayName = "lint";
|
||||
task("lint", series([buildEslintRules, lint]));
|
||||
task("lint", lint);
|
||||
task("lint").description = "Runs eslint on the compiler and scripts sources.";
|
||||
task("lint").flags = {
|
||||
" --ci": "Runs eslint additional rules",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
"gulp": "gulp",
|
||||
"lint": "gulp lint",
|
||||
"lint:ci": "gulp lint --ci",
|
||||
"lint:compiler": "gulp lint-compiler",
|
||||
"lint:scripts": "gulp lint-scripts",
|
||||
"setup-hooks": "node scripts/link-hooks.js"
|
||||
},
|
||||
"browser": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user