|
5 | 5 |
|
6 | 6 | > More than 300 powerful ESLint rules |
7 | 7 |
|
8 | | -Most rules target JavaScript and TypeScript, but [some also lint CSS, HTML, JSON, and Markdown](#non-javascript-files) when used with the matching ESLint language plugin. |
| 8 | +Most rules target JavaScript and TypeScript, but [some also lint CSS, HTML, JSON, Markdown, and YAML](#non-javascript-files) when used with the matching ESLint language plugin. |
9 | 9 |
|
10 | 10 | [**Propose a new rule ➡**](.github/contributing.md) |
11 | 11 |
|
@@ -434,7 +434,7 @@ export default defineConfig([ |
434 | 434 |
|
435 | 435 | ### Non-JavaScript files |
436 | 436 |
|
437 | | -While most rules target JavaScript and TypeScript, some also lint other file types when used with the corresponding [ESLint language plugin](https://eslint.org/docs/latest/use/configure/plugins#specifying-a-language) such as [`@eslint/css`](https://github.com/eslint/css), [`@eslint/json`](https://github.com/eslint/json), [`@eslint/markdown`](https://github.com/eslint/markdown), or [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint). Each such rule declares this with the `meta.languages` field. |
| 437 | +While most rules target JavaScript and TypeScript, some also lint other file types when used with the corresponding [ESLint language plugin](https://eslint.org/docs/latest/use/configure/plugins#specifying-a-language) such as [`@eslint/css`](https://github.com/eslint/css), [`@eslint/json`](https://github.com/eslint/json), [`@eslint/markdown`](https://github.com/eslint/markdown), [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), or [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml). Each such rule declares this with the `meta.languages` field. |
438 | 438 |
|
439 | 439 | When linting JSON, CSS, Markdown, HTML, or other non-JavaScript languages in the same ESLint config, scope Unicorn's JavaScript rule config objects with `files`. Include TypeScript/JSX extensions there only if your config already provides the matching parser/language setup for those files. |
440 | 440 |
|
@@ -522,18 +522,18 @@ These rules work on **any** file type: |
522 | 522 |
|
523 | 523 | These rules also work on specific non-JavaScript languages: |
524 | 524 |
|
525 | | -| Name | CSS | HTML | JSON | Markdown | |
526 | | -| :-- | :-: | :-: | :-: | :-: | |
527 | | -| [`expiring-todo-comments`](docs/rules/expiring-todo-comments.md) | ✅ | ✅ | ✅ | ✅ | |
528 | | -| [`no-empty-file`](docs/rules/no-empty-file.md) | ✅ | ✅ | ✅ | ✅ | |
529 | | -| [`no-invalid-file-input-accept`](docs/rules/no-invalid-file-input-accept.md) | | ✅ | | | |
530 | | -| [`no-manually-wrapped-comments`](docs/rules/no-manually-wrapped-comments.md) | | | ✅ | | |
531 | | -| [`no-missing-local-resource`](docs/rules/no-missing-local-resource.md) | ✅ | ✅ | | ✅ | |
532 | | -| [`no-shorthand-property-overrides`](docs/rules/no-shorthand-property-overrides.md) | ✅ | | | | |
533 | | -| [`no-transition-all`](docs/rules/no-transition-all.md) | ✅ | | | | |
534 | | -| [`prefer-explicit-viewport-units`](docs/rules/prefer-explicit-viewport-units.md) | ✅ | | | | |
535 | | -| [`require-frontmatter-fields`](docs/rules/require-frontmatter-fields.md) | | | | ✅ | |
536 | | -| [`text-encoding-identifier-case`](docs/rules/text-encoding-identifier-case.md) | ✅ | ✅ | | | |
| 525 | +| Name | CSS | HTML | JSON | Markdown | YAML | |
| 526 | +| :-- | :-: | :-: | :-: | :-: | :-: | |
| 527 | +| [`expiring-todo-comments`](docs/rules/expiring-todo-comments.md) | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 528 | +| [`no-empty-file`](docs/rules/no-empty-file.md) | ✅ | ✅ | ✅ | ✅ | | |
| 529 | +| [`no-invalid-file-input-accept`](docs/rules/no-invalid-file-input-accept.md) | | ✅ | | | | |
| 530 | +| [`no-manually-wrapped-comments`](docs/rules/no-manually-wrapped-comments.md) | | | ✅ | | | |
| 531 | +| [`no-missing-local-resource`](docs/rules/no-missing-local-resource.md) | ✅ | ✅ | | ✅ | | |
| 532 | +| [`no-shorthand-property-overrides`](docs/rules/no-shorthand-property-overrides.md) | ✅ | | | | | |
| 533 | +| [`no-transition-all`](docs/rules/no-transition-all.md) | ✅ | | | | | |
| 534 | +| [`prefer-explicit-viewport-units`](docs/rules/prefer-explicit-viewport-units.md) | ✅ | | | | | |
| 535 | +| [`require-frontmatter-fields`](docs/rules/require-frontmatter-fields.md) | | | | ✅ | | |
| 536 | +| [`text-encoding-identifier-case`](docs/rules/text-encoding-identifier-case.md) | ✅ | ✅ | | | | |
537 | 537 |
|
538 | 538 | <!-- end auto-generated non-js languages list --> |
539 | 539 |
|
|
0 commit comments