improve eslint config

This commit is contained in:
Philipp Kühn 2020-09-24 00:06:12 +02:00
parent 0895555054
commit aefb4ca8e6
3 changed files with 34 additions and 5 deletions

View File

@ -1,5 +1,5 @@
module.exports = {
plugins: ['html', 'cypress'],
plugins: ['html', 'cypress', '@typescript-eslint'],
parserOptions: {
parser: '@typescript-eslint/parser',
@ -33,6 +33,7 @@ module.exports = {
'class-methods-use-this': 'off',
'global-require': 'off',
'func-names': ['error', 'never'],
'arrow-body-style': 'off',
'vue/this-in-template': ['error', 'never'],
'vue/max-attributes-per-line': ['error', {
singleline: 3,
@ -41,5 +42,7 @@ module.exports = {
allowFirstLine: false,
},
}],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},
}

View File

@ -15,7 +15,7 @@
"build:docs": "yarn --cwd ./docs build",
"build:packages": "yarn clean:packages && lerna exec --parallel -- microbundle --compress",
"clean:packages": "rm -rf ./packages/*/dist",
"lint": "eslint --quiet --no-error-on-unmatched-pattern ./",
"lint": "eslint --quiet --no-error-on-unmatched-pattern --ext .js,.jsx,.ts,.vue ./docs ./packages",
"test:open": "cypress open --project tests",
"test": "cypress run --project tests",
"reset": "yarn clean:packages && rm -rf ./**/.cache && rm -rf ./**/node_modules && rm -rf ./yarn.lock && yarn install"
@ -31,6 +31,7 @@
"@types/prosemirror-state": "^1.2.5",
"@types/prosemirror-transform": "^1.1.1",
"@types/prosemirror-view": "^1.15.0",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"cypress": "^5.2.0",
"eslint": "^7.9.0",

View File

@ -2210,7 +2210,7 @@
"@types/parse5" "*"
"@types/tough-cookie" "*"
"@types/json-schema@^7.0.5":
"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5":
version "7.0.6"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
@ -2406,6 +2406,31 @@
"@types/unist" "*"
"@types/vfile-message" "*"
"@typescript-eslint/eslint-plugin@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.2.0.tgz#a3d5c11b377b7e18f3cd9c4e87d465fe9432669b"
integrity sha512-zBNRkzvLSwo6y5TG0DVcmshZIYBHKtmzD4N+LYnfTFpzc4bc79o8jNRSb728WV7A4Cegbs+MV5IRAj8BKBgOVQ==
dependencies:
"@typescript-eslint/experimental-utils" "4.2.0"
"@typescript-eslint/scope-manager" "4.2.0"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"
"@typescript-eslint/experimental-utils@4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.2.0.tgz#3d0b5cd4aa61f5eb7aa1e873dea0db1410b062d2"
integrity sha512-5BBj6BjgHEndBaQQpUVzRIPERz03LBc0MCQkHwUaH044FJFL08SwWv/sQftk7gf0ShZ2xZysz0LTwCwNt4Xu3w==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/scope-manager" "4.2.0"
"@typescript-eslint/types" "4.2.0"
"@typescript-eslint/typescript-estree" "4.2.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
"@typescript-eslint/parser@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.2.0.tgz#1879ef400abd73d972e20f14c3522e5b343d1d1b"
@ -5688,7 +5713,7 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.0:
esrecurse "^4.3.0"
estraverse "^4.1.1"
eslint-utils@^2.1.0:
eslint-utils@^2.0.0, eslint-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
@ -11720,7 +11745,7 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
regexpp@^3.1.0:
regexpp@^3.0.0, regexpp@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==