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+
118module . exports = function lint ( args = { } , api ) {
219 const path = require ( 'path' )
320 const chalk = require ( 'chalk' )
@@ -59,7 +76,11 @@ module.exports = function lint (args = {}, api) {
5976function normalizeConfig ( args ) {
6077 const config = { }
6178 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 !== '_' ) {
6384 config [ camelize ( key ) ] = args [ key ]
6485 }
6586 }
You can’t perform that action at this time.
0 commit comments