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
You'll first need to install [ESLint](http://eslint.org)6.7 or greater:
12
+
You'll first need to install [ESLint](http://eslint.org)8 or greater:
13
13
```
14
14
$ npm i eslint --save-dev
15
15
$ yarn add -D eslint
@@ -31,11 +31,6 @@ Extending the `plugin:actions/recommended` config will enable the processor on a
31
31
}
32
32
```
33
33
34
-
With ESLint v7, you can run it as usual. If you're using ESLint v6, you'll need to pass [`--ext` option](https://eslint.org/docs/user-guide/command-line-interface#ext) to include YAML files:
35
-
```
36
-
$ eslint --ext js,yml,yaml .
37
-
```
38
-
39
34
Currently, only literal blocks (`|`) are supported and it's recommended to use them:
40
35
```yaml
41
36
# .github/workflows/ci.yml
@@ -54,16 +49,9 @@ The autofixing (`--fix`) is supported, but it's still experimental and whitespac
54
49
### Advanced Configuration
55
50
56
51
Dotfiles are ignored by ESLint by default. To lint files inside `.github`, you'll need to add `!.github` to
57
-
`.eslintignore`file or `ignorePatterns` of your configuration file. In ESLint v6, all files having extensions
58
-
specified by `--ext` option are included, so to exclude non-workflow YAML files, add `*.yml`, `*.yaml`, and
59
-
`!/.github/workflows/*.{yml,yaml}`:
52
+
`.eslintignore` file or `ignorePatterns` of your configuration file:
60
53
```gitignore
61
54
!/.github
62
-
# only for ESLint v6:
63
-
*.yml
64
-
*.yaml
65
-
!/.github/workflows/*.yml
66
-
!/.github/workflows/*.yaml
67
55
```
68
56
69
57
Then, add `actions` to the plugins section of your configuration file. You can omit the `eslint-plugin-` prefix:
0 commit comments