You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,13 @@ Contributing is welcome! See the [ESLint Vue Plugin Developer Guide](https://esl
34
34
35
35
Be sure to read the [official ESLint guide](https://eslint.org/docs/developer-guide/working-with-rules) before you start writing a new rule.
36
36
37
-
To see what an abstract syntax tree (AST) of your code looks like, you may use [AST Explorer](https://astexplorer.net). After opening [AST Explorer](https://astexplorer.net), select `Vue` as the syntax and `vue-eslint-parser` as the parser.
37
+
To see what an abstract syntax tree (AST) of your code looks like, you may use [AST Explorer](https://astexplorer.net). After opening [AST Explorer](https://astexplorer.net), select `Vue` as the syntax and [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) as the parser.
38
38
39
39
The default JavaScript parser must be replaced because [Vue.js single file components](https://vuejs.org/guide/scaling-up/sfc.html) are not plain JavaScript, but a custom file format. [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) is a replacement parser that generates an enhanced AST with nodes that represent specific parts of the template syntax, as well as the contents of the `<script>` tag.
40
40
41
41
To learn more about certain nodes in a produced AST, see the [ESTree project page](https://github.com/estree/estree) and the [vue-eslint-parser AST documentation](https://github.com/vuejs/vue-eslint-parser/blob/master/docs/ast.md).
42
42
43
-
`vue-eslint-parser` provides a few useful parser services to help traverse the produced AST and access template tokens:
43
+
[`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) provides a few useful parser services to help traverse the produced AST and access template tokens:
Copy file name to clipboardExpand all lines: docs/developer-guide/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,18 +39,18 @@ Before you start writing new rule, please read the [official ESLint guide](https
39
39
Next, in order to get an idea how does the AST of the code that you want to check looks like, use the [astexplorer.net].
40
40
The [astexplorer.net] is a great tool to inspect ASTs, also Vue templates are supported.
41
41
42
-
After opening [astexplorer.net], select `Vue` as the syntax and `vue-eslint-parser` as the parser.
42
+
After opening [astexplorer.net], select `Vue` as the syntax and [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) as the parser.
43
43
44
44
[astexplorer.net]: https://astexplorer.net/
45
45
46
-
Since single file components in Vue are not plain JavaScript, we can't use the default parser, and we had to introduce additional one: `vue-eslint-parser`, that generates enhanced AST with nodes that represent specific parts of the template syntax, as well as what's inside the `<script>` tag.
46
+
Since single file components in Vue are not plain JavaScript, we can't use the default parser, and we had to introduce additional one: [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser), that generates enhanced AST with nodes that represent specific parts of the template syntax, as well as what's inside the `<script>` tag.
47
47
48
48
To know more about certain nodes in produced ASTs, go here:
The `vue-eslint-parser` provides few useful parser services, to help traverse the produced AST and access tokens of the template:
53
+
The [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) provides few useful parser services, to help traverse the produced AST and access tokens of the template:
@@ -63,7 +63,7 @@ If you'll stuck, remember there are plenty of rules you can learn from already,
63
63
64
64
## :white_check_mark: JSDoc type checking with TypeScript
65
65
66
-
We have type checking enabled via TypeScript and JSDoc.
66
+
We have type checking enabled via TypeScript and JSDoc.\
67
67
The command to perform type checking is: `npm run tsc`
68
68
69
69
This is just to help you write the rules, not to do strict type checking. If you find it difficult to resolve type checking warnings, feel free to suppress warnings using the `// @ts-nocheck` and `// @ts-ignore` comment.
Copy file name to clipboardExpand all lines: docs/rules/block-lang.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,14 +48,14 @@ This rule disallows the use of languages other than those available in the your
48
48
49
49
</eslint-code-block>
50
50
51
-
Specify the block name for the key of the option object.
51
+
Specify the block name for the key of the option object.\
52
52
You can use the object as a value and use the following properties:
53
53
54
54
-`lang` ... Specifies the available value for the `lang` attribute of the block. If multiple languages are available, specify them as an array. If you do not specify it, will disallow any language.
55
55
-`allowNoLang` ... If `true`, allows the `lang` attribute not to be specified (allows the use of the default language of block).
56
56
57
57
::: warning Note
58
-
If the default language is specified for `lang` option of `<template>`, `<style>` and `<script>`, it will be enforced to not specify `lang` attribute.
58
+
If the default language is specified for `lang` option of `<template>`, `<style>` and `<script>`, it will be enforced to not specify `lang` attribute.\
59
59
This is to prevent unintended problems with [Vetur](https://vuejs.github.io/vetur/).
60
60
61
61
See also [Vetur - Syntax Highlighting](https://vuejs.github.io/vetur/guide/highlighting.html).
Copy file name to clipboardExpand all lines: docs/rules/html-indent.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ This rule enforces a consistent indentation style in `<template>`. The default s
79
79
-`type` (`number | "tab"`) ... The type of indentation. Default is `2`. If this is a number, it's the number of spaces for one indent. If this is `"tab"`, it uses one tab for one indent.
80
80
-`attribute` (`integer`) ... The multiplier of indentation for attributes. Default is `1`.
81
81
-`baseIndent` (`integer`) ... The multiplier of indentation for top-level statements. Default is `1`.
82
-
-`closeBracket` (`integer | object`) ... The multiplier of indentation for right brackets. Default is `0`.
82
+
-`closeBracket` (`integer | object`) ... The multiplier of indentation for right brackets. Default is `0`.\
83
83
You can apply all of the following by setting a number value.
84
84
-`closeBracket.startTag` (`integer`) ... The multiplier of indentation for right brackets of start tags (`<div>`). Default is `0`.
85
85
-`closeBracket.endTag` (`integer`) ... The multiplier of indentation for right brackets of end tags (`</div>`). Default is `0`.
-`allowEmptyLines` ... if `true`, it allows empty lines around content. If you want to disallow multiple empty lines, use [no-multiple-empty-lines] in combination.
94
+
-`allowEmptyLines` ... if `true`, it allows empty lines around content. If you want to disallow multiple empty lines, use [no-multiple-empty-lines] in combination.\
95
95
default `false`
96
96
97
97
::: info
@@ -146,7 +146,9 @@ This rule enforces a line break before and after the contents of a multiline ele
0 commit comments