use single eslintrc-file for extensions/ and src/, no type check rules
This commit is contained in:
parent
d0e72fe1c3
commit
a1047421ff
13
.eslintignore
Normal file
13
.eslintignore
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
**/vs/nls.build.js
|
||||||
|
**/vs/nls.js
|
||||||
|
**/vs/css.build.js
|
||||||
|
**/vs/css.js
|
||||||
|
**/vs/loader.js
|
||||||
|
**/promise-polyfill/**
|
||||||
|
**/insane/**
|
||||||
|
**/marked/**
|
||||||
|
**/test/**/*.js
|
||||||
|
**/node_modules/**
|
||||||
|
**/vscode-api-tests/testWorkspace/**
|
||||||
|
**/extensions/**/out/**
|
||||||
|
**/extensions/**/build/**
|
|
@ -1,20 +1,54 @@
|
||||||
{
|
{
|
||||||
"root": true,
|
"root": true,
|
||||||
"env": {
|
"parser": "@typescript-eslint/parser",
|
||||||
"node": true,
|
"parserOptions": {
|
||||||
"es6": true
|
"ecmaVersion": 6,
|
||||||
},
|
"sourceType": "module"
|
||||||
"rules": {
|
},
|
||||||
"no-console": 0,
|
"plugins": [
|
||||||
"no-cond-assign": 0,
|
"code-oss-eslint",
|
||||||
"no-unused-vars": 1,
|
"@typescript-eslint"
|
||||||
"no-extra-semi": "warn",
|
],
|
||||||
"semi": "warn"
|
"rules": {
|
||||||
},
|
"no-extra-semi": "off",
|
||||||
"extends": "eslint:recommended",
|
"no-unused-vars": "off",
|
||||||
"parserOptions": {
|
"eqeqeq": "warn",
|
||||||
"ecmaFeatures": {
|
"semi": "off",
|
||||||
"experimentalObjectRestSpread": true
|
"@typescript-eslint/semi": "warn",
|
||||||
}
|
"no-duplicate-imports": "warn",
|
||||||
}
|
"code-oss-eslint/layering": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"common": [],
|
||||||
|
"node": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
|
"browser": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
|
"electron-main": [
|
||||||
|
"common",
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"electron-browser": [
|
||||||
|
"common",
|
||||||
|
"browser",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/class-name-casing": "warn",
|
||||||
|
"constructor-super": "warn",
|
||||||
|
"curly": "warn",
|
||||||
|
"no-caller": "warn",
|
||||||
|
"no-debugger": "warn",
|
||||||
|
"no-duplicate-case": "warn",
|
||||||
|
"no-eval": "warn",
|
||||||
|
"no-new-wrappers": "warn",
|
||||||
|
"no-sparse-arrays": "warn",
|
||||||
|
"no-throw-literal": "warn",
|
||||||
|
"no-unsafe-finally": "warn",
|
||||||
|
"no-unused-labels": "warn",
|
||||||
|
"no-var": "warn"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ const copyrightHeaderLines = [
|
||||||
gulp.task('eslint', () => {
|
gulp.task('eslint', () => {
|
||||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||||
.pipe(filter(eslintFilter))
|
.pipe(filter(eslintFilter))
|
||||||
.pipe(gulpeslint('src/.eslintrc'))
|
.pipe(gulpeslint('.eslintrc.json'))
|
||||||
.pipe(gulpeslint.formatEach('compact'))
|
.pipe(gulpeslint.formatEach('compact'))
|
||||||
.pipe(gulpeslint.failAfterError());
|
.pipe(gulpeslint.failAfterError());
|
||||||
});
|
});
|
||||||
|
@ -227,7 +227,7 @@ function checkPackageJSON(actualPath) {
|
||||||
|
|
||||||
const checkPackageJSONTask = task.define('check-package-json', () => {
|
const checkPackageJSONTask = task.define('check-package-json', () => {
|
||||||
return gulp.src('package.json')
|
return gulp.src('package.json')
|
||||||
.pipe(es.through(function() {
|
.pipe(es.through(function () {
|
||||||
checkPackageJSON.call(this, 'remote/package.json');
|
checkPackageJSON.call(this, 'remote/package.json');
|
||||||
checkPackageJSON.call(this, 'remote/web/package.json');
|
checkPackageJSON.call(this, 'remote/web/package.json');
|
||||||
}));
|
}));
|
||||||
|
@ -359,7 +359,7 @@ function hygiene(some) {
|
||||||
|
|
||||||
const javascript = result
|
const javascript = result
|
||||||
.pipe(filter(eslintFilter))
|
.pipe(filter(eslintFilter))
|
||||||
.pipe(gulpeslint('src/.eslintrc'))
|
.pipe(gulpeslint('.eslintrc.json'))
|
||||||
.pipe(gulpeslint.formatEach('compact'))
|
.pipe(gulpeslint.formatEach('compact'))
|
||||||
.pipe(gulpeslint.failAfterError());
|
.pipe(gulpeslint.failAfterError());
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"strict-function-types-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictFunctionTypes",
|
"strict-function-types-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictFunctionTypes",
|
||||||
"update-distro": "node build/npm/update-distro.js",
|
"update-distro": "node build/npm/update-distro.js",
|
||||||
"web": "node scripts/code-web.js",
|
"web": "node scripts/code-web.js",
|
||||||
"eslint": "eslint -c ./src/.eslintrc.json ./src/vs --ext .ts --ext .js"
|
"eslint": "eslint -c .eslintrc.json --ext .ts --ext .js ./src/vs ./extensions"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"applicationinsights": "1.0.8",
|
"applicationinsights": "1.0.8",
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 6
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"node": true,
|
|
||||||
"es6": true,
|
|
||||||
"browser": true,
|
|
||||||
"amd": true
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"no-console": 0,
|
|
||||||
"no-cond-assign": 0,
|
|
||||||
"no-unused-vars": "error",
|
|
||||||
"no-extra-semi": "error",
|
|
||||||
"semi": "error",
|
|
||||||
"no-inner-declarations": 0
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,70 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "http://json.schemastore.org/eslintrc",
|
|
||||||
"root": true,
|
|
||||||
"ignorePatterns": [
|
|
||||||
"**/vs/nls.build.js",
|
|
||||||
"**/vs/nls.js",
|
|
||||||
"**/vs/css.build.js",
|
|
||||||
"**/vs/css.js",
|
|
||||||
"**/vs/loader.js",
|
|
||||||
"**/promise-polyfill/**",
|
|
||||||
"**/insane/**",
|
|
||||||
"**/marked/**",
|
|
||||||
"**/test/**/*.js"
|
|
||||||
],
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"project": "src/tsconfig.json",
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"code-oss-eslint",
|
|
||||||
"@typescript-eslint"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"no-extra-semi": "off",
|
|
||||||
"no-unused-vars": "off",
|
|
||||||
"semi": "warn",
|
|
||||||
"eqeqeq": "warn",
|
|
||||||
"no-duplicate-imports": "warn",
|
|
||||||
"code-oss-eslint/layering": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"common": [],
|
|
||||||
"node": [
|
|
||||||
"common"
|
|
||||||
],
|
|
||||||
"browser": [
|
|
||||||
"common"
|
|
||||||
],
|
|
||||||
"electron-main": [
|
|
||||||
"common",
|
|
||||||
"node"
|
|
||||||
],
|
|
||||||
"electron-browser": [
|
|
||||||
"common",
|
|
||||||
"browser",
|
|
||||||
"node"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/class-name-casing": "warn",
|
|
||||||
"@typescript-eslint/no-for-in-array": "warn",
|
|
||||||
"@typescript-eslint/semi": [
|
|
||||||
"warn",
|
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"constructor-super": "warn",
|
|
||||||
"curly": "warn",
|
|
||||||
"no-caller": "warn",
|
|
||||||
"no-debugger": "warn",
|
|
||||||
"no-duplicate-case": "warn",
|
|
||||||
"no-eval": "warn",
|
|
||||||
"no-new-wrappers": "warn",
|
|
||||||
"no-sparse-arrays": "warn",
|
|
||||||
"no-throw-literal": "warn",
|
|
||||||
"no-unsafe-finally": "warn",
|
|
||||||
"no-unused-labels": "warn",
|
|
||||||
"no-var": "warn"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue