File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
packages/@vue/cli-plugin-eslint Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change
1
+ const renamedArrayArgs = {
2
+ ext : 'extensions' ,
3
+ env : 'envs' ,
4
+ global : 'globals' ,
5
+ rulesdir : 'rulePaths' ,
6
+ plugin : 'plugins' ,
7
+ 'ignore-pattern' : 'ignorePattern'
8
+ }
9
+
10
+ const renamedArgs = {
11
+ 'inline-config' : 'allowInlineConfig' ,
12
+ rule : 'rules' ,
13
+ eslintrc : 'useEslintrc' ,
14
+ c : 'configFile' ,
15
+ config : 'configFile'
16
+ }
17
+
1
18
module . exports = function lint ( args = { } , api ) {
2
19
const path = require ( 'path' )
3
20
const chalk = require ( 'chalk' )
@@ -59,7 +76,11 @@ module.exports = function lint (args = {}, api) {
59
76
function normalizeConfig ( args ) {
60
77
const config = { }
61
78
for ( const key in args ) {
62
- if ( key !== '_' ) {
79
+ if ( renamedArrayArgs [ key ] ) {
80
+ config [ renamedArrayArgs [ key ] ] = args [ key ] . split ( ',' )
81
+ } else if ( renamedArgs [ key ] ) {
82
+ config [ renamedArgs [ key ] ] = args [ key ]
83
+ } else if ( key !== '_' ) {
63
84
config [ camelize ( key ) ] = args [ key ]
64
85
}
65
86
}
You can’t perform that action at this time.
0 commit comments