File tree 3 files changed +23
-20
lines changed
3 files changed +23
-20
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ module.exports = (api, {
46
46
}
47
47
}
48
48
49
- if ( tsLint && ! api . hasPlugin ( 'eslint' ) ) {
49
+ if ( tsLint ) {
50
50
api . extendPackage ( {
51
51
scripts : {
52
52
lint : 'vue-cli-service lint'
@@ -114,13 +114,16 @@ module.exports = (api, {
114
114
const jsRE = / \. j s $ /
115
115
const excludeRE = / ^ t e s t \/ e 2 e \/ | \. c o n f i g \. j s $ /
116
116
const convertLintFlags = require ( '../lib/convertLintFlags' )
117
- const convertImports = require ( '../lib/convertImports' )
118
117
api . postProcessFiles ( files => {
119
118
for ( const file in files ) {
120
119
if ( jsRE . test ( file ) && ! excludeRE . test ( file ) ) {
121
120
const tsFile = file . replace ( jsRE , '.ts' )
122
121
if ( ! files [ tsFile ] ) {
123
- files [ tsFile ] = convertLintFlags ( convertImports ( files [ file ] ) )
122
+ let content = files [ file ]
123
+ if ( tsLint ) {
124
+ content = convertLintFlags ( content )
125
+ }
126
+ files [ tsFile ] = content
124
127
}
125
128
delete files [ file ]
126
129
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,6 +7,22 @@ module.exports = {
7
7
webpack : {
8
8
config : require . resolve ( '@vue/cli-service/webpack.config.js' )
9
9
}
10
- }
10
+ } ,
11
+ 'import/extensions' : [
12
+ '.js' ,
13
+ '.jsx' ,
14
+ '.mjs' ,
15
+ '.ts' ,
16
+ '.tsx'
17
+ ]
18
+ } ,
19
+ rules : {
20
+ 'import/extensions' : [ 'error' , 'always' , {
21
+ js : 'never' ,
22
+ mjs : 'never' ,
23
+ jsx : 'never' ,
24
+ ts : 'never' ,
25
+ tsx : 'never'
26
+ } ]
11
27
}
12
28
}
You can’t perform that action at this time.
0 commit comments