Skip to content

Commit 957e08d

Browse files
committed
tweak ts setup
1 parent 18036a3 commit 957e08d

File tree

3 files changed

+10
-21
lines changed

3 files changed

+10
-21
lines changed

packages/@vue/cli-plugin-typescript/generator/template/tslint.json

+4-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@
44
"tslint:recommended"
55
],
66
"rules": {
7-
"quotemark": [
8-
true,
9-
"single"
10-
],
11-
"indent": [
12-
true
13-
],
14-
"interface-name": [
15-
false
16-
],
17-
"arrow-parens": false,
18-
// Pending fix for shorthand property names.
7+
"quotemark": [true, "single"],
8+
"indent": [true, "spaces", 2],
9+
"interface-name": false,
10+
"ordered-imports": false,
1911
"object-literal-sort-keys": false
2012
}
2113
}

packages/@vue/cli-plugin-typescript/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = api => {
1313
.test(/\.tsx?$/)
1414
.include
1515
.add(api.resolve('src'))
16+
.add(api.resolve('test'))
1617
.end()
1718
.use('ts-loader')
1819
.loader('ts-loader')

packages/@vue/cli-plugin-unit-mocha/index.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
module.exports = api => {
2-
api.configureWebpack(webpackConfig => {
2+
api.chainWebpack(webpackConfig => {
33
if (process.env.NODE_ENV === 'test') {
4-
if (!webpackConfig.externals) {
5-
webpackConfig.externals = []
6-
}
7-
webpackConfig.externals = [].concat(
8-
webpackConfig.externals,
9-
require('webpack-node-externals')()
10-
)
11-
webpackConfig.devtool = 'inline-cheap-module-source-map'
4+
webpackConfig.merge({
5+
devtool: 'inline-cheap-module-source-map',
6+
externals: [require('webpack-node-externals')()]
7+
})
128
}
139
})
1410

0 commit comments

Comments
 (0)