Tweak lintings

This commit is contained in:
Pig Fang 2019-04-27 14:12:02 +08:00
parent 25256b0814
commit 15f22dd10c
3 changed files with 11 additions and 59 deletions

View File

@ -45,7 +45,7 @@
"@types/jquery": "^3.3.9",
"@types/webpack": "^4.4.25",
"@typescript-eslint/eslint-plugin": "^1.4.2",
"@typescript-eslint/parser": "^1.5.0",
"@typescript-eslint/parser": "^1.7.0",
"@vue/test-utils": "^1.0.0-beta.29",
"autoprefixer": "^9.5.0",
"babel-eslint": "^10.0.1",
@ -60,7 +60,6 @@
"eslint": "^5.16.0",
"eslint-config-gplane": "^5.1.3",
"eslint-formatter-beauty": "^3.0.0",
"eslint-plugin-project": "^0.2.2",
"eslint-plugin-vue": "^5.2.2",
"expose-loader": "^0.7.5",
"file-loader": "^3.0.1",
@ -122,9 +121,6 @@
"globals": {
"blessing": "readonly"
},
"plugins": [
"project"
],
"settings": {
"projectRulesDir": "resources/assets/eslint-rules"
},
@ -141,8 +137,7 @@
120
],
"prefer-object-spread": 0,
"import/no-unresolved": 0,
"project/linebreak-between-tests": 2
"import/no-unresolved": 0
},
"overrides": [
{

View File

@ -1,28 +0,0 @@
module.exports = {
create(context) {
return {
CallExpression(node) {
const args = node.arguments
if (
node.callee.name === 'test' &&
args.length >= 2 &&
args[0].type === 'Literal' &&
args[1].type === 'ArrowFunctionExpression'
) {
const next = context.getTokenAfter(node)
if (
next &&
next.value === 'test' &&
node.loc.end.line + 1 === next.loc.start.line
) {
context.report({
node: context.getLastToken(node),
message: 'Linebreak should be inserted between test blocks.',
fix: fixer => fixer.insertTextAfter(node, '\n'),
})
}
}
},
}
},
}

View File

@ -1036,12 +1036,12 @@
eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0"
"@typescript-eslint/parser@^1.5.0":
version "1.5.0"
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.5.0.tgz#a96114d195dff2a49534e4c4850fb676f905a072"
integrity sha512-pRWTnJrnxuT0ragdY26hZL+bxqDd4liMlftpH2CBlMPryOIOb1J+MdZuw6R4tIu6bWVdwbHKPTs+Q34LuGvfGw==
"@typescript-eslint/parser@^1.7.0":
version "1.7.0"
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.7.0.tgz#c3ea0d158349ceefbb6da95b5b09924b75357851"
integrity sha512-1QFKxs2V940372srm12ovSE683afqc1jB6zF/f8iKhgLz1yoSjYeGHipasao33VXKI+0a/ob9okeogGdKGvvlg==
dependencies:
"@typescript-eslint/typescript-estree" "1.5.0"
"@typescript-eslint/typescript-estree" "1.7.0"
eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0"
@ -1053,10 +1053,10 @@
lodash.unescape "4.0.1"
semver "5.5.0"
"@typescript-eslint/typescript-estree@1.5.0":
version "1.5.0"
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.5.0.tgz#986b356ecdf5a0c3bc9889d221802149cf5dbd4e"
integrity sha512-XqR14d4BcYgxcrpxIwcee7UEjncl9emKc/MgkeUfIk2u85KlsGYyaxC7Zxjmb17JtWERk/NaO+KnBsqgpIXzwA==
"@typescript-eslint/typescript-estree@1.7.0":
version "1.7.0"
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.7.0.tgz#59ec02f5371964da1cc679dba7b878a417bc8c60"
integrity sha512-K5uedUxVmlYrVkFbyV3htDipvLqTE3QMOUQEHYJaKtgzxj6r7c5Ca/DG1tGgFxX+fsbi9nDIrf4arq7Ib7H/Yw==
dependencies:
lodash.unescape "4.0.1"
semver "5.5.0"
@ -3472,13 +3472,6 @@ eslint-plugin-node@^8.0.1:
resolve "^1.8.1"
semver "^5.5.0"
eslint-plugin-project@^0.2.2:
version "0.2.2"
resolved "https://registry.npmjs.org/eslint-plugin-project/-/eslint-plugin-project-0.2.2.tgz#aace7d7d252dc2403a3167cecf59228b80d983f3"
integrity sha512-76UJdTXg3+y0ix/xRjG2DjWumxV6oUYe7q/rEPDddGgxUpv08ybn4DNzm3h5MOqIZ9qY+m6CG1x6o/fAvQZusQ==
dependencies:
js-yaml "^3.12.1"
eslint-plugin-vue@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-5.2.2.tgz#86601823b7721b70bc92d54f1728cfc03b36283c"
@ -5500,14 +5493,6 @@ js-yaml@^3.12.0, js-yaml@^3.5.2, js-yaml@^3.9.0:
argparse "^1.0.7"
esprima "^4.0.0"
js-yaml@^3.12.1:
version "3.12.2"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz#ef1d067c5a9d9cb65bd72f285b5d8105c77f14fc"
integrity sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
js-yaml@^3.13.0:
version "3.13.0"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e"