Skip to content

Commit 2240fa1

Browse files
committed
build: refine typescript configs
1 parent 48ca07a commit 2240fa1

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.eslintrc.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ module.exports = {
99
'operator-linebreak': ['error', 'before']
1010
},
1111
overrides: [
12-
{
13-
files: ['**/__tests__/**/*.spec.js'],
14-
extends: ['plugin:jest/recommended']
15-
},
1612
{
1713
files: ['*.ts'],
1814
extends: [
@@ -21,7 +17,17 @@ module.exports = {
2117
parser: 'vue-eslint-parser',
2218
parserOptions: {
2319
parser: '@typescript-eslint/parser'
20+
},
21+
rules: {
22+
'no-useless-constructor': 'off'
2423
}
24+
},
25+
{
26+
files: [
27+
'**/__tests__/**/*.spec.js',
28+
'**/__tests__/**/*.spec.ts'
29+
],
30+
extends: ['plugin:jest/recommended']
2531
}
2632
]
2733
}

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@
88
],
99
"scripts": {
1010
"boot": "node scripts/bootstrap.js",
11-
"bootstrap": "yarn && yarn tsc",
1211
"build": "yarn tsc && yarn build:docs",
1312
"build:docs": "yarn workspace docs build",
1413
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2",
1514
"clean": "lerna clean && rm -rf node_modules",
1615
"dev": "yarn tsc && yarn dev:docs",
1716
"dev:docs": "yarn workspace docs dev",
18-
"lerna:bootstrap": "lerna bootstrap",
19-
"lint": "yarn lint:check --fix",
20-
"lint:check": "eslint packages --ext .js,.vue",
17+
"lint": "eslint packages --ext .js,.ts,.vue",
2118
"packages:changed": "lerna changed",
2219
"packages:diff": "lerna diff",
2320
"packages:list": "lerna ls -l",
21+
"prepublishOnly": "yarn --pure-lockfile && yarn lint && yarn test && yarn build",
2422
"register-vuepress": "lerna exec --scope vuepress -- yarn link",
25-
"release": "yarn --pure-lockfile && yarn tsc && node scripts/release.js",
23+
"release": "node scripts/release.js",
2624
"remote-version": "node scripts/remote-version.js",
2725
"show-help": "yarn workspace docs show-help",
2826
"test": "node scripts/test.js",
@@ -36,7 +34,7 @@
3634
}
3735
},
3836
"lint-staged": {
39-
"*.{js,vue}": [
37+
"*.{js,ts,vue}": [
4038
"eslint --fix",
4139
"git add"
4240
],

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"lib": ["es2015", "es2016.array.include"],
99
"allowSyntheticDefaultImports": true,
1010
"stripInternal": true,
11-
"noImplicitAny": true,
11+
"noImplicitAny": false,
1212
"noImplicitReturns": true,
1313
"noImplicitThis": true,
14-
"noUnusedLocals": true,
1514
"noUnusedParameters": true,
1615
"noFallthroughCasesInSwitch": true,
16+
"resolveJsonModule": true,
1717
"strictNullChecks": true,
1818
"strictFunctionTypes": true,
1919
"alwaysStrict": true,

0 commit comments

Comments
 (0)