@@ -31,7 +31,7 @@ export const cliOptionsDefaults = {
31
31
export function parseArgv ( argv : string [ ] ) : ParsedCLIOptions {
32
32
const options = {
33
33
'eslintrc' : { type : 'boolean' , default : cliOptionsDefaults . useEslintrc } ,
34
- 'config' : { type : 'string' } ,
34
+ 'config' : { type : 'string' , short : 'c' } ,
35
35
'ext' : { type : 'string' , multiple : true } ,
36
36
'resolve-plugins-relative-to' : { type : 'string' } ,
37
37
'rulesdir' : { type : 'string' , multiple : true } ,
@@ -53,25 +53,38 @@ export function parseArgv(argv: string[]): ParsedCLIOptions {
53
53
} ) ;
54
54
55
55
if ( values . version ) {
56
- console . log ( `Version: ${ VERSION } ` ) ;
56
+ console . log ( VERSION ) ;
57
+ // eslint-disable-next-line n/no-process-exit
57
58
process . exit ( 0 ) ;
58
59
}
59
60
60
61
if ( values . help ) {
61
- console . log ( `Usage: eslint [options] [file|dir|glob]` ) ;
62
- console . log ( `Options:` ) ;
63
- console . log ( ` --version Show version number` ) ;
64
- console . log ( ` --help Show help` ) ;
65
- console . log ( ` --eslintrc Use configuration from .eslintrc` ) ;
66
- console . log ( ` --config Use this configuration, overriding .eslintrc` ) ;
67
- console . log ( ` --ext Specify JavaScript file extensions` ) ;
68
- console . log ( ` --resolve-plugins-relative-to A folder where plugins should be resolved from` ) ;
69
- console . log ( ` --rulesdir Use additional rules from this directory` ) ;
70
- console . log ( ` --ignore-path Specify path of ignore file` ) ;
71
- console . log ( ` --format Use a specific output format` ) ;
72
- console . log ( ` --quiet Report errors only` ) ;
73
- console . log ( ` --cache Only check changed files` ) ;
74
- console . log ( ` --cache-location Path to the cache file or directory` ) ;
62
+ console . log ( `
63
+ eslint-interactive [file.js] [dir]
64
+
65
+ Options:
66
+ --help Show help [boolean]
67
+ --version Show version number [boolean]
68
+ --eslintrc Enable use of configuration from .eslintrc.* [boolean] [default: true]
69
+ -c, --config Use this configuration, overriding .eslintrc.* config options if present [string]
70
+ --resolve-plugins-relative-to A folder where plugins should be resolved from, CWD by default [string]
71
+ --ext Specify JavaScript file extensions [array]
72
+ --rulesdir Use additional rules from this directory [array]
73
+ --ignore-path Specify path of ignore file [string]
74
+ --format Specify the format to be used for the \`Display problem messages\` action [string] [default: "codeframe"]
75
+ --quiet Report errors only [boolean] [default: false]
76
+ --cache Only check changed files [boolean] [default: true]
77
+ --cache-location Path to the cache file or directory
78
+
79
+ Examples:
80
+ eslint-interactive ./src Lint ./src/ directory
81
+ eslint-interactive ./src ./test Lint multiple directories
82
+ eslint-interactive './src/**/*.{ts,tsx,vue}' Lint with glob pattern
83
+ eslint-interactive ./src --ext .ts,.tsx,.vue Lint with custom extensions
84
+ eslint-interactive ./src --rulesdir ./rules Lint with custom rules
85
+ eslint-interactive ./src --no-eslintrc --config ./.eslintrc.ci.js Lint with custom config
86
+ ` ) ;
87
+ // eslint-disable-next-line n/no-process-exit
75
88
process . exit ( 0 ) ;
76
89
}
77
90
0 commit comments