build: refine typescript configs

This commit is contained in:
meteorlxy
2019-11-28 17:09:55 +08:00
parent 48ca07aa8c
commit 2240fa1f73
3 changed files with 16 additions and 12 deletions
+10 -4
View File
@@ -9,10 +9,6 @@ module.exports = {
'operator-linebreak': ['error', 'before']
},
overrides: [
{
files: ['**/__tests__/**/*.spec.js'],
extends: ['plugin:jest/recommended']
},
{
files: ['*.ts'],
extends: [
@@ -21,7 +17,17 @@ module.exports = {
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
},
rules: {
'no-useless-constructor': 'off'
}
},
{
files: [
'**/__tests__/**/*.spec.js',
'**/__tests__/**/*.spec.ts'
],
extends: ['plugin:jest/recommended']
}
]
}
+4 -6
View File
@@ -8,21 +8,19 @@
],
"scripts": {
"boot": "node scripts/bootstrap.js",
"bootstrap": "yarn && yarn tsc",
"build": "yarn tsc && yarn build:docs",
"build:docs": "yarn workspace docs build",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2",
"clean": "lerna clean && rm -rf node_modules",
"dev": "yarn tsc && yarn dev:docs",
"dev:docs": "yarn workspace docs dev",
"lerna:bootstrap": "lerna bootstrap",
"lint": "yarn lint:check --fix",
"lint:check": "eslint packages --ext .js,.vue",
"lint": "eslint packages --ext .js,.ts,.vue",
"packages:changed": "lerna changed",
"packages:diff": "lerna diff",
"packages:list": "lerna ls -l",
"prepublishOnly": "yarn --pure-lockfile && yarn lint && yarn test && yarn build",
"register-vuepress": "lerna exec --scope vuepress -- yarn link",
"release": "yarn --pure-lockfile && yarn tsc && node scripts/release.js",
"release": "node scripts/release.js",
"remote-version": "node scripts/remote-version.js",
"show-help": "yarn workspace docs show-help",
"test": "node scripts/test.js",
@@ -36,7 +34,7 @@
}
},
"lint-staged": {
"*.{js,vue}": [
"*.{js,ts,vue}": [
"eslint --fix",
"git add"
],
+2 -2
View File
@@ -8,12 +8,12 @@
"lib": ["es2015", "es2016.array.include"],
"allowSyntheticDefaultImports": true,
"stripInternal": true,
"noImplicitAny": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"alwaysStrict": true,