eslint-config-un 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/index.cjs +344 -68
- package/dist/index.d.cts +2709 -442
- package/dist/index.d.ts +2709 -442
- package/dist/index.js +348 -69
- package/package.json +14 -10
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ Includes the rules from the following configs & plugins:
|
|
|
33
33
|
- [prefer-arrow-functions](https://www.npmjs.com/package/eslint-plugin-prefer-arrow-functions) (since v0.1.0)
|
|
34
34
|
- [eslint-comments](https://www.npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments) (since v0.1.3)
|
|
35
35
|
- [package-json](https://www.npmjs.com/package/eslint-plugin-package-json) (since v0.1.5)
|
|
36
|
+
- [markdown](https://www.npmjs.com/package/@eslint/markdown) (since v0.2.0)
|
|
37
|
+
- [css](https://www.npmjs.com/package/eslint-plugin-css) (since v0.2.0)
|
|
36
38
|
|
|
37
39
|
## Features
|
|
38
40
|
|
|
@@ -70,6 +72,12 @@ export default eslintConfig({
|
|
|
70
72
|
- `package-json`
|
|
71
73
|
- Some rules are set to warn by default. You can change some or even all such rule's reporting level using `errorsInsteadOfWarnings` option. You can find all such rules by inspecting the source code of this package.
|
|
72
74
|
|
|
75
|
+
### Certain rules are disabled for code blocks inside `*.md` files
|
|
76
|
+
|
|
77
|
+
If `markdown` config is enabled (which is the default), the same rules provided by other configs will be applied to code blocks (\```lang ... \```) inside Markdown files. This works because under the hood the plugin [`@eslint/markdown`](https://www.npmjs.com/package/@eslint/markdown) that provides that functionality will create virtual files for each code block with the same extension as specified after ```.
|
|
78
|
+
|
|
79
|
+
But applying certain rules for code blocks might not be desirable because some of them are too strict for the code that won't be executed anyway or even unfixable (like missing imports). You can find the full list of disabled rules in `src/configs/markdown.ts` file.
|
|
80
|
+
|
|
73
81
|
## Troubleshooting
|
|
74
82
|
|
|
75
83
|
### TypeError: Key `rules`: Key `disable-autofix/<rule name>`: Could not find `<rule name>` in plugin `disable-autofix`
|