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,
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 0,
|
||||
"no-cond-assign": 0,
|
||||
"no-unused-vars": 1,
|
||||
"no-extra-semi": "warn",
|
||||
"semi": "warn"
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"experimentalObjectRestSpread": true
|
||||
}
|
||||
}
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"code-oss-eslint",
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"no-extra-semi": "off",
|
||||
"no-unused-vars": "off",
|
||||
"eqeqeq": "warn",
|
||||
"semi": "off",
|
||||
"@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', () => {
|
||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(eslintFilter))
|
||||
.pipe(gulpeslint('src/.eslintrc'))
|
||||
.pipe(gulpeslint('.eslintrc.json'))
|
||||
.pipe(gulpeslint.formatEach('compact'))
|
||||
.pipe(gulpeslint.failAfterError());
|
||||
});
|
||||
|
@ -227,7 +227,7 @@ function checkPackageJSON(actualPath) {
|
|||
|
||||
const checkPackageJSONTask = task.define('check-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/web/package.json');
|
||||
}));
|
||||
|
@ -359,7 +359,7 @@ function hygiene(some) {
|
|||
|
||||
const javascript = result
|
||||
.pipe(filter(eslintFilter))
|
||||
.pipe(gulpeslint('src/.eslintrc'))
|
||||
.pipe(gulpeslint('.eslintrc.json'))
|
||||
.pipe(gulpeslint.formatEach('compact'))
|
||||
.pipe(gulpeslint.failAfterError());
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"strict-function-types-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictFunctionTypes",
|
||||
"update-distro": "node build/npm/update-distro.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": {
|
||||
"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