use (most of) generated eslintrc-file

This commit is contained in:
Johannes Rieken 2019-12-24 13:51:11 +01:00
parent ce0d7058a6
commit 31d049f329
5 changed files with 112 additions and 43 deletions

View file

@ -1,3 +0,0 @@
**/insane/**
**/marked/**
**/test/**/*.js

View file

@ -1,40 +1,20 @@
{
"$schema": "http://json.schemastore.org/eslintrc",
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
"env": {
"node": true,
"es6": true
},
"plugins": [
"code-oss-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"
]
}
]
"no-console": 0,
"no-cond-assign": 0,
"no-unused-vars": 1,
"no-extra-semi": "warn",
"semi": "warn"
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
}
}

View file

@ -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 .eslintrc.json ./src/vs/ --ext .ts"
"eslint": "eslint -c ./src/.eslintrc.json ./src/vs --ext .ts"
},
"dependencies": {
"applicationinsights": "1.0.8",
@ -82,6 +82,7 @@
"@types/yauzl": "^2.9.1",
"@types/yazl": "^2.4.2",
"@typescript-eslint/parser": "^2.12.0",
"@typescript-eslint/eslint-plugin": "2.3.2",
"ansi-colors": "^3.2.3",
"asar": "^0.14.0",
"chromium-pickle-js": "^0.2.0",

64
src/.eslintrc.json Normal file
View file

@ -0,0 +1,64 @@
{
"$schema": "http://json.schemastore.org/eslintrc",
"root": true,
"ignorePatterns": [
"**/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"
}
}

View file

@ -258,6 +258,17 @@
dependencies:
"@types/node" "*"
"@typescript-eslint/eslint-plugin@2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.3.2.tgz#7e112ca0bb29044d915baf10163a8199a20f7c69"
integrity sha512-tcnpksq1bXzcIRbYLeXkgp6l+ggEMXXUcl1wsSvL807fRtmvVQKygElwEUf4hBA76dNag3VAK1q2m3vd7qJaZA==
dependencies:
"@typescript-eslint/experimental-utils" "2.3.2"
eslint-utils "^1.4.2"
functional-red-black-tree "^1.0.1"
regexpp "^2.0.1"
tsutils "^3.17.1"
"@typescript-eslint/experimental-utils@2.13.0":
version "2.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.13.0.tgz#958614faa6f77599ee2b241740e0ea402482533d"
@ -267,6 +278,15 @@
"@typescript-eslint/typescript-estree" "2.13.0"
eslint-scope "^5.0.0"
"@typescript-eslint/experimental-utils@2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.3.2.tgz#e50f31264507e6fec7b33840bb6af260c24f4ea8"
integrity sha512-t+JGdTT6dRbmvKDlhlVkEueoZa0fhJNfG6z2cpnRPLwm3VwYr2BjR//acJGC1Yza0I9ZNcDfRY7ubQEvvfG6Jg==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.3.2"
eslint-scope "^5.0.0"
"@typescript-eslint/parser@^2.12.0":
version "2.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.13.0.tgz#ea1ab394cf9ca17467e3da7f96eca9309f57c326"
@ -290,6 +310,16 @@
semver "^6.3.0"
tsutils "^3.17.1"
"@typescript-eslint/typescript-estree@2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.3.2.tgz#107414aa04e689fe6f7251eb63fb500217f2b7f4"
integrity sha512-eZNEAai16nwyhIVIEaWQlaUgAU3S9CkQ58qvK0+3IuSdLJD3W1PNuehQFMIhW/mTP1oFR9GNoTcLg7gtXz6lzA==
dependencies:
glob "^7.1.4"
is-glob "^4.0.1"
lodash.unescape "4.0.1"
semver "^6.3.0"
"@webassemblyjs/ast@1.5.13":
version "1.5.13"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25"
@ -1757,9 +1787,6 @@ coa@~1.0.1:
"code-oss-eslint@file:./build/lib/eslint":
version "1.0.0"
"code-oss-eslint@file:./build/lib/eslint/":
version "1.0.0"
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
@ -2816,7 +2843,7 @@ eslint-utils@^1.3.1:
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512"
integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==
eslint-utils@^1.4.3:
eslint-utils@^1.4.2, eslint-utils@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
@ -3831,7 +3858,7 @@ glob@^7.1.3:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.1.6:
glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==