@@ -31,29 +31,34 @@ $ npm install --save-dev eslint vue-eslint-parser
3131```
3232
3333``` bash
34- $ eslint " src/**.{js,vue}"
34+ $ eslint " src/**/* .{js,vue}"
3535# or
3636$ eslint src --ext .vue
3737```
3838
3939## :wrench : Options
4040
41- ` parserOptions ` is the same as what [ espree] ( https://github.com/eslint/espree#usage ) , the default parser of ESLint, is supporting.
41+ ` parserOptions ` has the same properties as what [ espree] ( https://github.com/eslint/espree#usage ) , the default parser of ESLint, is supporting.
4242For example:
4343
4444``` json
4545{
4646 "parser" : " vue-eslint-parser" ,
4747 "parserOptions" : {
4848 "sourceType" : " module" ,
49- "ecmaVersion" : 2017
50- // ...
49+ "ecmaVersion" : 2017 ,
50+ "ecmaFeatures" : {
51+ "globalReturn" : false ,
52+ "impliedStrict" : false ,
53+ "jsx" : false ,
54+ "experimentalObjectRestSpread" : false
55+ }
5156 }
5257}
5358```
5459
55- On the other hand , you can specify a custom parser to parse ` <script> ` tags.
56- In this case, specify ` parser ` property. Other properties than ` parser ` would be given to the specified parser.
60+ Also , you can use ` parser ` property to specify a custom parser to parse ` <script> ` tags.
61+ Other properties than parser would be given to the specified parser.
5762For example:
5863
5964``` json
@@ -67,16 +72,26 @@ For example:
6772}
6873```
6974
75+ ``` json
76+ {
77+ "parser" : " vue-eslint-parser" ,
78+ "parserOptions" : {
79+ "parser" : " typescript-eslint-parser"
80+ }
81+ }
82+ ```
83+
7084## :warning : Known Limitations
7185
72- - Those rules are warning code due to the outside of ` <script> ` tags.
73- Please disable those rules for ` .vue ` files as necessary.
74- - [ eol-last] ( http://eslint.org/docs/rules/eol-last )
75- - [ linebreak-style] ( http://eslint.org/docs/rules/linebreak-style )
76- - [ max-len] ( http://eslint.org/docs/rules/max-len )
77- - [ max-lines] ( http://eslint.org/docs/rules/max-lines )
78- - [ no-trailing-spaces] ( http://eslint.org/docs/rules/no-trailing-spaces )
79- - [ unicode-bom] ( http://eslint.org/docs/rules/unicode-bom )
86+ Some rules make warnings due to the outside of ` <script> ` tags.
87+ Please disable those rules for ` .vue ` files as necessary.
88+
89+ - [ eol-last] ( http://eslint.org/docs/rules/eol-last )
90+ - [ linebreak-style] ( http://eslint.org/docs/rules/linebreak-style )
91+ - [ max-len] ( http://eslint.org/docs/rules/max-len )
92+ - [ max-lines] ( http://eslint.org/docs/rules/max-lines )
93+ - [ no-trailing-spaces] ( http://eslint.org/docs/rules/no-trailing-spaces )
94+ - [ unicode-bom] ( http://eslint.org/docs/rules/unicode-bom )
8095- Other rules which are using the source code text instead of AST might be confused as well.
8196
8297## :newspaper : Changelog
0 commit comments