eslint-plugin-stylelint-2 1.0.9
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/CHANGELOG.md +329 -0
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/_internal/rule-docs-url.d.ts +15 -0
- package/dist/_internal/rule-docs-url.d.ts.map +1 -0
- package/dist/_internal/rule-docs-url.js +15 -0
- package/dist/_internal/rule-docs-url.js.map +1 -0
- package/dist/_internal/rules-registry.d.ts +88 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -0
- package/dist/_internal/rules-registry.js +85 -0
- package/dist/_internal/rules-registry.js.map +1 -0
- package/dist/_internal/stylelint-config-boolean-option-rule.d.ts +17 -0
- package/dist/_internal/stylelint-config-boolean-option-rule.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-boolean-option-rule.js +90 -0
- package/dist/_internal/stylelint-config-boolean-option-rule.js.map +1 -0
- package/dist/_internal/stylelint-config-disallowed-option-rule.d.ts +16 -0
- package/dist/_internal/stylelint-config-disallowed-option-rule.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-disallowed-option-rule.js +48 -0
- package/dist/_internal/stylelint-config-disallowed-option-rule.js.map +1 -0
- package/dist/_internal/stylelint-config-object.d.ts +62 -0
- package/dist/_internal/stylelint-config-object.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-object.js +114 -0
- package/dist/_internal/stylelint-config-object.js.map +1 -0
- package/dist/_internal/stylelint-config-package-option-rule.d.ts +12 -0
- package/dist/_internal/stylelint-config-package-option-rule.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-package-option-rule.js +66 -0
- package/dist/_internal/stylelint-config-package-option-rule.js.map +1 -0
- package/dist/_internal/stylelint-config-rules-object.d.ts +23 -0
- package/dist/_internal/stylelint-config-rules-object.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-rules-object.js +47 -0
- package/dist/_internal/stylelint-config-rules-object.js.map +1 -0
- package/dist/_internal/stylelint-config-string-array-option-rule.d.ts +27 -0
- package/dist/_internal/stylelint-config-string-array-option-rule.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-string-array-option-rule.js +234 -0
- package/dist/_internal/stylelint-config-string-array-option-rule.js.map +1 -0
- package/dist/_internal/stylelint-config-string-array-option.d.ts +32 -0
- package/dist/_internal/stylelint-config-string-array-option.d.ts.map +1 -0
- package/dist/_internal/stylelint-config-string-array-option.js +55 -0
- package/dist/_internal/stylelint-config-string-array-option.js.map +1 -0
- package/dist/_internal/stylelint-package-dependencies.d.ts +18 -0
- package/dist/_internal/stylelint-package-dependencies.d.ts.map +1 -0
- package/dist/_internal/stylelint-package-dependencies.js +107 -0
- package/dist/_internal/stylelint-package-dependencies.js.map +1 -0
- package/dist/_internal/stylelint-runner.d.ts +4 -0
- package/dist/_internal/stylelint-runner.d.ts.map +1 -0
- package/dist/_internal/stylelint-runner.js +93 -0
- package/dist/_internal/stylelint-runner.js.map +1 -0
- package/dist/_internal/stylelint-worker-types.d.ts +70 -0
- package/dist/_internal/stylelint-worker-types.d.ts.map +1 -0
- package/dist/_internal/stylelint-worker-types.js +2 -0
- package/dist/_internal/stylelint-worker-types.js.map +1 -0
- package/dist/_internal/stylelint-worker.d.ts +2 -0
- package/dist/_internal/stylelint-worker.d.ts.map +1 -0
- package/dist/_internal/stylelint-worker.js +113 -0
- package/dist/_internal/stylelint-worker.js.map +1 -0
- package/dist/_internal/stylelint2-config-references.d.ts +32 -0
- package/dist/_internal/stylelint2-config-references.d.ts.map +1 -0
- package/dist/_internal/stylelint2-config-references.js +65 -0
- package/dist/_internal/stylelint2-config-references.js.map +1 -0
- package/dist/_internal/typed-rule.d.ts +42 -0
- package/dist/_internal/typed-rule.d.ts.map +1 -0
- package/dist/_internal/typed-rule.js +53 -0
- package/dist/_internal/typed-rule.js.map +1 -0
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.d.cts +10 -0
- package/dist/plugin.d.ts +36 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +183 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/disallow-stylelint-allow-empty-input.d.ts +9 -0
- package/dist/rules/disallow-stylelint-allow-empty-input.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-allow-empty-input.js +29 -0
- package/dist/rules/disallow-stylelint-allow-empty-input.js.map +1 -0
- package/dist/rules/disallow-stylelint-configuration-comment.d.ts +9 -0
- package/dist/rules/disallow-stylelint-configuration-comment.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-configuration-comment.js +29 -0
- package/dist/rules/disallow-stylelint-configuration-comment.js.map +1 -0
- package/dist/rules/disallow-stylelint-custom-syntax.d.ts +12 -0
- package/dist/rules/disallow-stylelint-custom-syntax.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-custom-syntax.js +32 -0
- package/dist/rules/disallow-stylelint-custom-syntax.js.map +1 -0
- package/dist/rules/disallow-stylelint-default-severity.d.ts +9 -0
- package/dist/rules/disallow-stylelint-default-severity.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-default-severity.js +28 -0
- package/dist/rules/disallow-stylelint-default-severity.js.map +1 -0
- package/dist/rules/disallow-stylelint-duplicate-extends.d.ts +9 -0
- package/dist/rules/disallow-stylelint-duplicate-extends.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-duplicate-extends.js +29 -0
- package/dist/rules/disallow-stylelint-duplicate-extends.js.map +1 -0
- package/dist/rules/disallow-stylelint-duplicate-plugins.d.ts +9 -0
- package/dist/rules/disallow-stylelint-duplicate-plugins.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-duplicate-plugins.js +29 -0
- package/dist/rules/disallow-stylelint-duplicate-plugins.js.map +1 -0
- package/dist/rules/disallow-stylelint-duplicate-rule-option-values.d.ts +10 -0
- package/dist/rules/disallow-stylelint-duplicate-rule-option-values.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-duplicate-rule-option-values.js +171 -0
- package/dist/rules/disallow-stylelint-duplicate-rule-option-values.js.map +1 -0
- package/dist/rules/disallow-stylelint-empty-rules-object.d.ts +7 -0
- package/dist/rules/disallow-stylelint-empty-rules-object.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-empty-rules-object.js +65 -0
- package/dist/rules/disallow-stylelint-empty-rules-object.js.map +1 -0
- package/dist/rules/disallow-stylelint-ignore-disables.d.ts +9 -0
- package/dist/rules/disallow-stylelint-ignore-disables.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-ignore-disables.js +28 -0
- package/dist/rules/disallow-stylelint-ignore-disables.js.map +1 -0
- package/dist/rules/disallow-stylelint-ignore-files.d.ts +9 -0
- package/dist/rules/disallow-stylelint-ignore-files.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-ignore-files.js +28 -0
- package/dist/rules/disallow-stylelint-ignore-files.js.map +1 -0
- package/dist/rules/disallow-stylelint-null-rule-config.d.ts +7 -0
- package/dist/rules/disallow-stylelint-null-rule-config.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-null-rule-config.js +86 -0
- package/dist/rules/disallow-stylelint-null-rule-config.js.map +1 -0
- package/dist/rules/disallow-stylelint-overrides-runtime-options.d.ts +7 -0
- package/dist/rules/disallow-stylelint-overrides-runtime-options.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-overrides-runtime-options.js +124 -0
- package/dist/rules/disallow-stylelint-overrides-runtime-options.js.map +1 -0
- package/dist/rules/disallow-stylelint-processors.d.ts +9 -0
- package/dist/rules/disallow-stylelint-processors.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-processors.js +29 -0
- package/dist/rules/disallow-stylelint-processors.js.map +1 -0
- package/dist/rules/disallow-stylelint-relative-extends-paths.d.ts +9 -0
- package/dist/rules/disallow-stylelint-relative-extends-paths.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-relative-extends-paths.js +28 -0
- package/dist/rules/disallow-stylelint-relative-extends-paths.js.map +1 -0
- package/dist/rules/disallow-stylelint-relative-plugin-paths.d.ts +9 -0
- package/dist/rules/disallow-stylelint-relative-plugin-paths.d.ts.map +1 -0
- package/dist/rules/disallow-stylelint-relative-plugin-paths.js +28 -0
- package/dist/rules/disallow-stylelint-relative-plugin-paths.js.map +1 -0
- package/dist/rules/prefer-stylelint-cache.d.ts +9 -0
- package/dist/rules/prefer-stylelint-cache.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-cache.js +28 -0
- package/dist/rules/prefer-stylelint-cache.js.map +1 -0
- package/dist/rules/prefer-stylelint-define-config.d.ts +7 -0
- package/dist/rules/prefer-stylelint-define-config.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-define-config.js +82 -0
- package/dist/rules/prefer-stylelint-define-config.js.map +1 -0
- package/dist/rules/prefer-stylelint-extends-array.d.ts +9 -0
- package/dist/rules/prefer-stylelint-extends-array.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-extends-array.js +29 -0
- package/dist/rules/prefer-stylelint-extends-array.js.map +1 -0
- package/dist/rules/prefer-stylelint-fix.d.ts +7 -0
- package/dist/rules/prefer-stylelint-fix.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-fix.js +90 -0
- package/dist/rules/prefer-stylelint-fix.js.map +1 -0
- package/dist/rules/prefer-stylelint-formatter.d.ts +10 -0
- package/dist/rules/prefer-stylelint-formatter.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-formatter.js +77 -0
- package/dist/rules/prefer-stylelint-formatter.js.map +1 -0
- package/dist/rules/prefer-stylelint-plugins-array.d.ts +9 -0
- package/dist/rules/prefer-stylelint-plugins-array.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-plugins-array.js +29 -0
- package/dist/rules/prefer-stylelint-plugins-array.js.map +1 -0
- package/dist/rules/prefer-stylelint-report-descriptionless-disables.d.ts +12 -0
- package/dist/rules/prefer-stylelint-report-descriptionless-disables.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-report-descriptionless-disables.js +32 -0
- package/dist/rules/prefer-stylelint-report-descriptionless-disables.js.map +1 -0
- package/dist/rules/prefer-stylelint-report-invalid-scope-disables.d.ts +12 -0
- package/dist/rules/prefer-stylelint-report-invalid-scope-disables.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-report-invalid-scope-disables.js +32 -0
- package/dist/rules/prefer-stylelint-report-invalid-scope-disables.js.map +1 -0
- package/dist/rules/prefer-stylelint-report-needless-disables.d.ts +9 -0
- package/dist/rules/prefer-stylelint-report-needless-disables.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-report-needless-disables.js +29 -0
- package/dist/rules/prefer-stylelint-report-needless-disables.js.map +1 -0
- package/dist/rules/prefer-stylelint-report-unscoped-disables.d.ts +9 -0
- package/dist/rules/prefer-stylelint-report-unscoped-disables.d.ts.map +1 -0
- package/dist/rules/prefer-stylelint-report-unscoped-disables.js +29 -0
- package/dist/rules/prefer-stylelint-report-unscoped-disables.js.map +1 -0
- package/dist/rules/require-stylelint-config-file-naming-convention.d.ts +13 -0
- package/dist/rules/require-stylelint-config-file-naming-convention.d.ts.map +1 -0
- package/dist/rules/require-stylelint-config-file-naming-convention.js +58 -0
- package/dist/rules/require-stylelint-config-file-naming-convention.js.map +1 -0
- package/dist/rules/require-stylelint-custom-syntax-in-overrides.d.ts +7 -0
- package/dist/rules/require-stylelint-custom-syntax-in-overrides.d.ts.map +1 -0
- package/dist/rules/require-stylelint-custom-syntax-in-overrides.js +100 -0
- package/dist/rules/require-stylelint-custom-syntax-in-overrides.js.map +1 -0
- package/dist/rules/require-stylelint-extends-packages-installed.d.ts +12 -0
- package/dist/rules/require-stylelint-extends-packages-installed.d.ts.map +1 -0
- package/dist/rules/require-stylelint-extends-packages-installed.js +31 -0
- package/dist/rules/require-stylelint-extends-packages-installed.js.map +1 -0
- package/dist/rules/require-stylelint-overrides-configuration.d.ts +7 -0
- package/dist/rules/require-stylelint-overrides-configuration.d.ts.map +1 -0
- package/dist/rules/require-stylelint-overrides-configuration.js +100 -0
- package/dist/rules/require-stylelint-overrides-configuration.js.map +1 -0
- package/dist/rules/require-stylelint-overrides-files-array.d.ts +7 -0
- package/dist/rules/require-stylelint-overrides-files-array.d.ts.map +1 -0
- package/dist/rules/require-stylelint-overrides-files-array.js +99 -0
- package/dist/rules/require-stylelint-overrides-files-array.js.map +1 -0
- package/dist/rules/require-stylelint-overrides-files.d.ts +7 -0
- package/dist/rules/require-stylelint-overrides-files.d.ts.map +1 -0
- package/dist/rules/require-stylelint-overrides-files.js +104 -0
- package/dist/rules/require-stylelint-overrides-files.js.map +1 -0
- package/dist/rules/require-stylelint-plugins-packages-installed.d.ts +12 -0
- package/dist/rules/require-stylelint-plugins-packages-installed.d.ts.map +1 -0
- package/dist/rules/require-stylelint-plugins-packages-installed.js +31 -0
- package/dist/rules/require-stylelint-plugins-packages-installed.js.map +1 -0
- package/dist/rules/require-stylelint-report-disables.d.ts +9 -0
- package/dist/rules/require-stylelint-report-disables.d.ts.map +1 -0
- package/dist/rules/require-stylelint-report-disables.js +29 -0
- package/dist/rules/require-stylelint-report-disables.js.map +1 -0
- package/dist/rules/require-stylelint-rules-object.d.ts +7 -0
- package/dist/rules/require-stylelint-rules-object.d.ts.map +1 -0
- package/dist/rules/require-stylelint-rules-object.js +65 -0
- package/dist/rules/require-stylelint-rules-object.js.map +1 -0
- package/dist/rules/sort-stylelint-extends.d.ts +9 -0
- package/dist/rules/sort-stylelint-extends.d.ts.map +1 -0
- package/dist/rules/sort-stylelint-extends.js +28 -0
- package/dist/rules/sort-stylelint-extends.js.map +1 -0
- package/dist/rules/sort-stylelint-plugins.d.ts +9 -0
- package/dist/rules/sort-stylelint-plugins.d.ts.map +1 -0
- package/dist/rules/sort-stylelint-plugins.js +28 -0
- package/dist/rules/sort-stylelint-plugins.js.map +1 -0
- package/dist/rules/sort-stylelint-rule-keys.d.ts +7 -0
- package/dist/rules/sort-stylelint-rule-keys.d.ts.map +1 -0
- package/dist/rules/sort-stylelint-rule-keys.js +129 -0
- package/dist/rules/sort-stylelint-rule-keys.js.map +1 -0
- package/dist/rules/stylelint.d.ts +15 -0
- package/dist/rules/stylelint.d.ts.map +1 -0
- package/dist/rules/stylelint.js +157 -0
- package/dist/rules/stylelint.js.map +1 -0
- package/docs/rules/disallow-stylelint-allow-empty-input.md +62 -0
- package/docs/rules/disallow-stylelint-configuration-comment.md +62 -0
- package/docs/rules/disallow-stylelint-custom-syntax.md +70 -0
- package/docs/rules/disallow-stylelint-default-severity.md +77 -0
- package/docs/rules/disallow-stylelint-duplicate-extends.md +61 -0
- package/docs/rules/disallow-stylelint-duplicate-plugins.md +61 -0
- package/docs/rules/disallow-stylelint-duplicate-rule-option-values.md +73 -0
- package/docs/rules/disallow-stylelint-empty-rules-object.md +62 -0
- package/docs/rules/disallow-stylelint-ignore-disables.md +78 -0
- package/docs/rules/disallow-stylelint-ignore-files.md +78 -0
- package/docs/rules/disallow-stylelint-null-rule-config.md +63 -0
- package/docs/rules/disallow-stylelint-overrides-runtime-options.md +82 -0
- package/docs/rules/disallow-stylelint-processors.md +62 -0
- package/docs/rules/disallow-stylelint-relative-extends-paths.md +61 -0
- package/docs/rules/disallow-stylelint-relative-plugin-paths.md +61 -0
- package/docs/rules/getting-started.md +130 -0
- package/docs/rules/overview.md +99 -0
- package/docs/rules/prefer-stylelint-cache.md +79 -0
- package/docs/rules/prefer-stylelint-define-config.md +90 -0
- package/docs/rules/prefer-stylelint-extends-array.md +61 -0
- package/docs/rules/prefer-stylelint-fix.md +79 -0
- package/docs/rules/prefer-stylelint-formatter.md +80 -0
- package/docs/rules/prefer-stylelint-plugins-array.md +61 -0
- package/docs/rules/prefer-stylelint-report-descriptionless-disables.md +85 -0
- package/docs/rules/prefer-stylelint-report-invalid-scope-disables.md +83 -0
- package/docs/rules/prefer-stylelint-report-needless-disables.md +83 -0
- package/docs/rules/prefer-stylelint-report-unscoped-disables.md +83 -0
- package/docs/rules/presets/all.md +39 -0
- package/docs/rules/presets/configs.md +40 -0
- package/docs/rules/presets/configuration.md +64 -0
- package/docs/rules/presets/index.md +82 -0
- package/docs/rules/presets/recommended.md +40 -0
- package/docs/rules/presets/stylelint-only.md +42 -0
- package/docs/rules/require-stylelint-config-file-naming-convention.md +61 -0
- package/docs/rules/require-stylelint-custom-syntax-in-overrides.md +77 -0
- package/docs/rules/require-stylelint-extends-packages-installed.md +61 -0
- package/docs/rules/require-stylelint-overrides-configuration.md +80 -0
- package/docs/rules/require-stylelint-overrides-files-array.md +78 -0
- package/docs/rules/require-stylelint-overrides-files.md +83 -0
- package/docs/rules/require-stylelint-plugins-packages-installed.md +61 -0
- package/docs/rules/require-stylelint-report-disables.md +67 -0
- package/docs/rules/require-stylelint-rules-object.md +61 -0
- package/docs/rules/sort-stylelint-extends.md +61 -0
- package/docs/rules/sort-stylelint-plugins.md +61 -0
- package/docs/rules/sort-stylelint-rule-keys.md +65 -0
- package/docs/rules/stylelint.md +100 -0
- package/package.json +577 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
<!-- markdownlint-disable -->
|
|
2
|
+
<!-- eslint-disable markdown/no-missing-label-refs -->
|
|
3
|
+
# Changelog
|
|
4
|
+
|
|
5
|
+
All notable changes to this project will be documented in this file.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
[a030a19...2266a76](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/compare/a030a19ab6f6c3c50eb7d22f53e2ccbd6cc9eb4c...2266a76345f8ea7c233c7ecebbe34500f52f33d5)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features
|
|
14
|
+
|
|
15
|
+
- [`2266a76`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/2266a76345f8ea7c233c7ecebbe34500f52f33d5) — ✨ [feat] Enhance HomepageFeatures with new icons and improved styles
|
|
16
|
+
|
|
17
|
+
- Add icon support for external and internal features
|
|
18
|
+
|
|
19
|
+
- Update styles for card components, including hover effects and transitions
|
|
20
|
+
|
|
21
|
+
- Refactor feature structure to improve clarity and maintainability
|
|
22
|
+
🧪 [test] Update configs test to include new rules for duplicate extends and plugins
|
|
23
|
+
|
|
24
|
+
- Add tests for "disallow-stylelint-duplicate-extends" and "disallow-stylelint-duplicate-plugins"
|
|
25
|
+
|
|
26
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- [`fab4f56`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/fab4f561cdaec2ac89495b5ed51c52a00d5887bc) — ✨ [feat] Add stylelint config hygiene rules and helpers
|
|
30
|
+
|
|
31
|
+
✨ [feat] Adds a broad new policy layer for stylelint config files:
|
|
32
|
+
|
|
33
|
+
- duplicates in extends/plugins/secondary option arrays
|
|
34
|
+
|
|
35
|
+
- non-array extends/plugins, relative path extends/plugins, and null rule values
|
|
36
|
+
|
|
37
|
+
- stable ordering for extends/plugins/rules keys
|
|
38
|
+
|
|
39
|
+
- canonical stylelint config filename convention
|
|
40
|
+
|
|
41
|
+
- require reportDisables true and requires installed extends/plugins packages
|
|
42
|
+
|
|
43
|
+
✨ [feat] Implements shared internal factories for:
|
|
44
|
+
|
|
45
|
+
- string-array config option parsing/fixing
|
|
46
|
+
|
|
47
|
+
- package dependency resolution from nearest package.json
|
|
48
|
+
|
|
49
|
+
- top-level rules object value traversal
|
|
50
|
+
|
|
51
|
+
📝 [docs] Updates README, docs site, presets index to expose new rules.
|
|
52
|
+
|
|
53
|
+
🧪 [test] Adds test coverage for each new rule plus plugin config registry states.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
- Enables cleaner, deterministic config composition and auditability in stylelint authoring.
|
|
57
|
+
|
|
58
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
- [`adf5e9c`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/adf5e9c268132c7195e1faaa0f224179a75ab727) — ✨ [feat] Add new Stylelint configuration rules for enhanced hygiene
|
|
62
|
+
|
|
63
|
+
- Introduced `disallow-stylelint-allow-empty-input` to prevent empty input configurations.
|
|
64
|
+
|
|
65
|
+
- Added `disallow-stylelint-configuration-comment` to disallow configuration comments in Stylelint configs.
|
|
66
|
+
|
|
67
|
+
- Implemented `disallow-stylelint-custom-syntax` to restrict custom syntax at the top level.
|
|
68
|
+
|
|
69
|
+
- Created `disallow-stylelint-empty-rules-object` to disallow empty rules objects in Stylelint configs.
|
|
70
|
+
|
|
71
|
+
- Added `disallow-stylelint-processors` to prevent the use of processors in Stylelint configurations.
|
|
72
|
+
|
|
73
|
+
- Introduced `require-stylelint-custom-syntax-in-overrides` to enforce custom syntax within overrides.
|
|
74
|
+
|
|
75
|
+
- Implemented `require-stylelint-overrides-files` to ensure non-empty files matchers in overrides.
|
|
76
|
+
|
|
77
|
+
- Added `require-stylelint-rules-object` to enforce the presence of a top-level rules object in Stylelint configs.
|
|
78
|
+
🧪 [test] Add tests for new Stylelint configuration rules
|
|
79
|
+
|
|
80
|
+
- Created tests for `disallow-stylelint-allow-empty-input` to validate empty input handling.
|
|
81
|
+
|
|
82
|
+
- Added tests for `disallow-stylelint-configuration-comment` to ensure comments are disallowed.
|
|
83
|
+
|
|
84
|
+
- Implemented tests for `disallow-stylelint-custom-syntax` to validate custom syntax restrictions.
|
|
85
|
+
|
|
86
|
+
- Created tests for `disallow-stylelint-empty-rules-object` to ensure non-empty rules objects.
|
|
87
|
+
|
|
88
|
+
- Added tests for `disallow-stylelint-processors` to validate processor restrictions.
|
|
89
|
+
|
|
90
|
+
- Implemented tests for `require-stylelint-custom-syntax-in-overrides` to ensure custom syntax is scoped.
|
|
91
|
+
|
|
92
|
+
- Created tests for `require-stylelint-overrides-files` to validate non-empty files matchers.
|
|
93
|
+
|
|
94
|
+
- Added tests for `require-stylelint-rules-object` to ensure rules object presence.
|
|
95
|
+
|
|
96
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
- [`b10b6bb`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/b10b6bb0afd81fc55d6c85dd5f7afc138f4038ce) — ✨ [feat] Add new rules to enhance Stylelint configuration hygiene
|
|
100
|
+
|
|
101
|
+
- Introduced `disallow-stylelint-cache` to prevent cache configuration in Stylelint config files.
|
|
102
|
+
|
|
103
|
+
- Added `disallow-stylelint-default-severity` to disallow top-level default severity settings.
|
|
104
|
+
|
|
105
|
+
- Implemented `disallow-stylelint-fix` to prevent fix configuration in Stylelint config files.
|
|
106
|
+
|
|
107
|
+
- Added `disallow-stylelint-ignore-files` to disallow ignore files configuration in Stylelint config files.
|
|
108
|
+
📝 [docs] Update documentation to reflect new rules
|
|
109
|
+
|
|
110
|
+
- Updated presets documentation to include new rules with descriptions and autofix capabilities.
|
|
111
|
+
|
|
112
|
+
- Enhanced configuration documentation to include new rules in the flat config example.
|
|
113
|
+
|
|
114
|
+
- Updated the rules matrix in the index documentation to include new rules and their respective preset keys.
|
|
115
|
+
🧪 [test] Add tests for new rules
|
|
116
|
+
|
|
117
|
+
- Created tests for `disallow-stylelint-cache`, `disallow-stylelint-default-severity`, `disallow-stylelint-fix`, and `disallow-stylelint-ignore-files` to ensure correct functionality and error reporting.
|
|
118
|
+
|
|
119
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
- [`6903302`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/6903302e0e5a7b2a395036da6c197a5994877d73) — ✨ [feat] (homepage) Revamp homepage layout and content
|
|
123
|
+
|
|
124
|
+
- Introduced hero badges to highlight key features of the ESLint plugin.
|
|
125
|
+
|
|
126
|
+
- Added quick links for easy navigation to important documentation sections.
|
|
127
|
+
|
|
128
|
+
- Updated meta tags for improved SEO and social sharing.
|
|
129
|
+
|
|
130
|
+
- Enhanced visual elements with a new logo and improved SVG graphics.
|
|
131
|
+
|
|
132
|
+
- Refactored layout structure for better responsiveness and user experience.
|
|
133
|
+
|
|
134
|
+
🎨 [style] (navbar) Improve navbar component styling
|
|
135
|
+
|
|
136
|
+
- Adjusted color mode toggle styling for consistency.
|
|
137
|
+
|
|
138
|
+
- Cleaned up code formatting for better readability.
|
|
139
|
+
|
|
140
|
+
🧹 [chore] (assets) Update favicon and logo images
|
|
141
|
+
|
|
142
|
+
- Replaced existing favicon and logo images with new versions for branding consistency.
|
|
143
|
+
|
|
144
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
- [`e771060`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/e771060f1a84e8125d75dd646a313d76e7c130f2) — ✨ [feat] (presets) Introduce new configuration presets and update aliases
|
|
148
|
+
|
|
149
|
+
- Introduced `stylelintOnly` preset for stylesheet linting only, replacing `stylesheets` alias.
|
|
150
|
+
|
|
151
|
+
- Introduced `configuration` preset for config hygiene, replacing `configs` alias.
|
|
152
|
+
|
|
153
|
+
- Updated documentation to reflect new preset structure and usage.
|
|
154
|
+
|
|
155
|
+
- Updated all relevant code references to use new preset names.
|
|
156
|
+
|
|
157
|
+
- Ensured backward compatibility for legacy aliases.
|
|
158
|
+
📝 [docs] (presets) Update documentation for new preset structure
|
|
159
|
+
|
|
160
|
+
- Added detailed descriptions for `stylelintOnly` and `configuration` presets.
|
|
161
|
+
|
|
162
|
+
- Updated related documentation links and examples across multiple files.
|
|
163
|
+
|
|
164
|
+
- Enhanced clarity on the purpose and usage of each preset.
|
|
165
|
+
🧪 [test] (configs) Update tests to reflect new preset names and functionality
|
|
166
|
+
|
|
167
|
+
- Adjusted tests to verify the behavior of new `stylelintOnly` and `configuration` presets.
|
|
168
|
+
|
|
169
|
+
- Ensured legacy aliases are still wired correctly to the new presets.
|
|
170
|
+
|
|
171
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
- [`6571c41`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/6571c418578d8d05f9470c3c18fe5a9df5570c58) — ✨ [feat] Update documentation links and configurations for eslint-plugin-stylelint-2
|
|
175
|
+
|
|
176
|
+
- Updated robots.txt to point to the new sitemap for eslint-plugin-stylelint-2.
|
|
177
|
+
|
|
178
|
+
- Modified typedoc.config.json to reflect the new hosted base URL.
|
|
179
|
+
|
|
180
|
+
- Changed rule documentation links in all preset markdown files to use eslint-plugin-stylelint-2.
|
|
181
|
+
|
|
182
|
+
- Updated package.json to change homepage and issue URLs to eslint-plugin-stylelint-2.
|
|
183
|
+
|
|
184
|
+
- Adjusted internal rule documentation URLs in the source code to point to eslint-plugin-stylelint-2.
|
|
185
|
+
|
|
186
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
- [`e0a5b55`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/e0a5b558c0f488da9a91613afed207fb6887213e) — ✨ [feat] Add rules to disallow top-level Stylelint config options
|
|
190
|
+
|
|
191
|
+
- Introduced `disallow-stylelint-formatter` rule to prevent configuring the `formatter` option in Stylelint config files.
|
|
192
|
+
|
|
193
|
+
- Introduced `disallow-stylelint-ignore-disables` rule to prevent configuring the `ignoreDisables` option in Stylelint config files.
|
|
194
|
+
|
|
195
|
+
- Implemented shared rule factory for disallowing top-level Stylelint config options.
|
|
196
|
+
|
|
197
|
+
- Updated `stylelint2Rules` registry to include new rules.
|
|
198
|
+
|
|
199
|
+
- Updated package dependencies for `@secretlint` to version `^11.4.1`.
|
|
200
|
+
|
|
201
|
+
- Enhanced scripts for syncing presets and README rules to include new rules.
|
|
202
|
+
|
|
203
|
+
- Added tests for both new rules to ensure proper functionality and coverage.
|
|
204
|
+
|
|
205
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
- [`f6ee840`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/f6ee8401289f513d88857b05c753d7b075fe6846) — ✨ [feat] Add new Stylelint config hygiene rules
|
|
209
|
+
|
|
210
|
+
- Introduced five new rules: `prefer-stylelint-report-descriptionless-disables`, `prefer-stylelint-report-invalid-scope-disables`, `prefer-stylelint-report-needless-disables`, `prefer-stylelint-report-unscoped-disables`, and `prefer-stylelint-define-config`.
|
|
211
|
+
|
|
212
|
+
- Each rule enforces specific Stylelint configuration options to improve code quality and reporting.
|
|
213
|
+
|
|
214
|
+
- Updated documentation to reflect the new rules and their usage.
|
|
215
|
+
|
|
216
|
+
- Enhanced the rules matrix and presets to include the new rules, ensuring they are part of the recommended configurations.
|
|
217
|
+
🧪 [test] Add tests for new Stylelint config hygiene rules
|
|
218
|
+
|
|
219
|
+
- Created individual test files for each new rule to ensure proper functionality and adherence to expected behaviors.
|
|
220
|
+
|
|
221
|
+
- Added tests to validate that the rules correctly enforce the required configuration options in various scenarios.
|
|
222
|
+
|
|
223
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
- [`2b412a3`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/2b412a3bdd82f5a30e40b12af2e7091385b07451) — ✨ [feat] Enhance Stylelint integration and rule definitions
|
|
227
|
+
|
|
228
|
+
- Introduced support for `ignoreDisables` option in Stylelint rules to allow ignoring disable comments during linting.
|
|
229
|
+
|
|
230
|
+
- Updated `prefer-stylelint-define-config` rule to enforce usage of `defineConfig()` for Stylelint config modules.
|
|
231
|
+
|
|
232
|
+
- Improved worker thread handling in `stylelint-runner` for better performance and error management.
|
|
233
|
+
|
|
234
|
+
- Refactored rule definitions to ensure immutability and better type safety.
|
|
235
|
+
|
|
236
|
+
- Enhanced documentation for rule options and configurations to provide clearer guidance.
|
|
237
|
+
🧪 [test] Expand test coverage for Stylelint rules and configurations
|
|
238
|
+
|
|
239
|
+
- Added tests for new `ignoreDisables` option and its impact on linting results.
|
|
240
|
+
|
|
241
|
+
- Updated existing tests to reflect changes in rule behavior and configuration requirements.
|
|
242
|
+
|
|
243
|
+
- Ensured all tests pass with the latest changes to maintain code integrity.
|
|
244
|
+
|
|
245
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
### 🛠️ Other Changes
|
|
250
|
+
|
|
251
|
+
- [`f717fc4`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/f717fc456256fa529f7ea4c1d294adc2b8629e96) — Initialize project with basic structure and dependencies
|
|
252
|
+
|
|
253
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
- [`a030a19`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/a030a19ab6f6c3c50eb7d22f53e2ccbd6cc9eb4c) — Initial commit
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
### 🎨 Styling
|
|
261
|
+
|
|
262
|
+
- [`6e86931`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/6e869319c881b41bf517eefdca5bb2f1645dc520) — 🎨 [style] Improve code formatting and documentation clarity
|
|
263
|
+
|
|
264
|
+
- Adjust typedef formatting in eslint-benchmark-config.mjs for better readability
|
|
265
|
+
|
|
266
|
+
- Reorder rule registration in rules-registry.ts for consistency
|
|
267
|
+
|
|
268
|
+
- Update stylelint2-config-references.ts to maintain consistent configuration order
|
|
269
|
+
|
|
270
|
+
- Ensure configurationPreset is consistently defined in plugin.ts
|
|
271
|
+
|
|
272
|
+
- Enhance documentation comments in prefer-stylelint-report-descriptionless-disables.ts and prefer-stylelint-report-invalid-scope-disables.ts for clarity
|
|
273
|
+
|
|
274
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
### 🧹 Chores
|
|
279
|
+
|
|
280
|
+
- [`69076c3`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/69076c3850dc19675f4aea033f0a4ce4cfde34d6) — 🔧 [chore] Update npm-package-json-lint to version 10.0.0
|
|
281
|
+
|
|
282
|
+
- Upgrade npm-package-json-lint dependency in package.json and package-lock.json
|
|
283
|
+
|
|
284
|
+
- Adjust node engine requirement to >=22.0.0
|
|
285
|
+
|
|
286
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
- [`7018ecb`](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/commit/7018ecba8ae1b47c5a3eb8369afa935a2ba0264c) — 🔧 [chore] Update dependencies in package.json
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
- Upgrade "@stylistic/stylelint-plugin" from "^5.0.1" to "^5.1.0" for improved linting capabilities.
|
|
293
|
+
|
|
294
|
+
- Upgrade "eslint-plugin-copilot" from "^1.0.5" to "^1.0.6" for better integration with GitHub Copilot.
|
|
295
|
+
|
|
296
|
+
- Upgrade "eslint-plugin-etc-misc" from "^1.0.4" to "^1.0.5" for additional miscellaneous linting rules.
|
|
297
|
+
|
|
298
|
+
- Upgrade "eslint-plugin-file-progress-2" from "^3.4.3" to "^3.4.4" for enhanced file progress tracking.
|
|
299
|
+
|
|
300
|
+
- Upgrade "eslint-plugin-github-actions-2" from "^1.0.1" to "^1.0.2" for improved GitHub Actions linting.
|
|
301
|
+
|
|
302
|
+
- Upgrade "eslint-plugin-immutable-2" from "^1.0.6" to "^1.0.7" for better immutability checks.
|
|
303
|
+
|
|
304
|
+
- Upgrade "eslint-plugin-package-json" from "^0.91.0" to "^0.91.1" for updated package.json linting rules.
|
|
305
|
+
|
|
306
|
+
- Upgrade "eslint-plugin-sdl-2" from "^1.0.4" to "^1.0.5" for improved SDL linting.
|
|
307
|
+
|
|
308
|
+
- Upgrade "eslint-plugin-tsdoc-require-2" from "^1.0.6" to "^1.0.7" for better TSDoc compliance.
|
|
309
|
+
|
|
310
|
+
- Upgrade "eslint-plugin-typefest" from "^1.0.7" to "^1.0.8" for additional TypeScript utility types.
|
|
311
|
+
|
|
312
|
+
- Upgrade "eslint-plugin-unicorn" from "^63.0.0" to "^64.0.0" for new unicorn rules and improvements.
|
|
313
|
+
|
|
314
|
+
- Upgrade "eslint-plugin-write-good-comments-2" from "^1.0.4" to "^1.0.5" for better comment quality checks.
|
|
315
|
+
|
|
316
|
+
- Upgrade "knip" from "^6.0.6" to "^6.1.0" for improved code analysis and duplication detection.
|
|
317
|
+
|
|
318
|
+
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
## Contributors
|
|
326
|
+
Thanks to all the [contributors](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/graphs/contributors) for their hard work!
|
|
327
|
+
## License
|
|
328
|
+
This project is licensed under the [MIT License](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/blob/main/LICENSE)
|
|
329
|
+
*This changelog was automatically generated with [git-cliff](https://github.com/orhun/git-cliff).*
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nick2bad4u
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# eslint-plugin-stylelint-2
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/blob/main/LICENSE) [](https://www.npmjs.com/package/eslint-plugin-stylelint-2) [](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/releases) [](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/stargazers) [](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/forks) [](https://github.com/Nick2bad4u/eslint-plugin-stylelint-2/issues) [](https://codecov.io/gh/Nick2bad4u/eslint-plugin-stylelint-2)
|
|
4
|
+
|
|
5
|
+
`eslint-plugin-stylelint-2` brings Stylelint reporting and autofix support into ESLint while also adding Stylelint-specific authoring rules for Stylelint config files.
|
|
6
|
+
|
|
7
|
+
This package exists as `eslint-plugin-stylelint-2` on npm because `eslint-plugin-stylelint` is already taken.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install --save-dev eslint-plugin-stylelint-2 eslint stylelint
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Compatibility
|
|
16
|
+
|
|
17
|
+
- **Supported ESLint versions:** `9.x` and `10.x`
|
|
18
|
+
- **Config system:** Flat Config only (`eslint.config.*`)
|
|
19
|
+
- **Node.js runtime:** `>=22.0.0`
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import stylelint2 from "eslint-plugin-stylelint-2";
|
|
25
|
+
|
|
26
|
+
export default [
|
|
27
|
+
...stylelint2.configs.recommended,
|
|
28
|
+
];
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Presets
|
|
32
|
+
|
|
33
|
+
| Preset | Purpose |
|
|
34
|
+
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
35
|
+
| [`stylelint2.configs.recommended`](./docs/rules/presets/recommended.md) | Enable stylesheet linting plus the broadly useful Stylelint config guidance |
|
|
36
|
+
| [`stylelint2.configs.stylelintOnly`](./docs/rules/presets/stylelint-only.md) | Enable only the Stylelint bridge workflow for stylesheets and ESLint-side autofix |
|
|
37
|
+
| [`stylelint2.configs.configuration`](./docs/rules/presets/configuration.md) | Enable the full Stylelint config authoring rule catalog, with no stylesheet bridge |
|
|
38
|
+
| [`stylelint2.configs.all`](./docs/rules/presets/all.md) | Enable the stylesheet bridge plus the full config rule catalog |
|
|
39
|
+
|
|
40
|
+
Legacy aliases remain available:
|
|
41
|
+
|
|
42
|
+
- `stylelint2.configs.stylesheets` → `stylelint2.configs.stylelintOnly`
|
|
43
|
+
- `stylelint2.configs.configs` → `stylelint2.configs.configuration`
|
|
44
|
+
|
|
45
|
+
## Configuration examples
|
|
46
|
+
|
|
47
|
+
### Recommended
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import stylelint2 from "eslint-plugin-stylelint-2";
|
|
51
|
+
|
|
52
|
+
export default [
|
|
53
|
+
...stylelint2.configs.recommended,
|
|
54
|
+
];
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Stylelint bridge only
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import stylelint2 from "eslint-plugin-stylelint-2";
|
|
61
|
+
|
|
62
|
+
export default [
|
|
63
|
+
stylelint2.configs.stylelintOnly,
|
|
64
|
+
];
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Configuration only
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import stylelint2 from "eslint-plugin-stylelint-2";
|
|
71
|
+
|
|
72
|
+
export default [
|
|
73
|
+
stylelint2.configs.configuration,
|
|
74
|
+
];
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
That preset notably enables:
|
|
78
|
+
|
|
79
|
+
- `stylelint-2/prefer-stylelint-formatter`
|
|
80
|
+
- `stylelint-2/disallow-stylelint-ignore-disables`
|
|
81
|
+
- `stylelint-2/prefer-stylelint-define-config`
|
|
82
|
+
- `stylelint-2/prefer-stylelint-report-descriptionless-disables`
|
|
83
|
+
- `stylelint-2/prefer-stylelint-report-invalid-scope-disables`
|
|
84
|
+
- `stylelint-2/prefer-stylelint-report-needless-disables`
|
|
85
|
+
- `stylelint-2/prefer-stylelint-report-unscoped-disables`
|
|
86
|
+
|
|
87
|
+
### Passing Stylelint options
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import stylelint2 from "eslint-plugin-stylelint-2";
|
|
91
|
+
|
|
92
|
+
export default [
|
|
93
|
+
{
|
|
94
|
+
...stylelint2.configs.stylelintOnly,
|
|
95
|
+
rules: {
|
|
96
|
+
"stylelint-2/stylelint": [
|
|
97
|
+
"error",
|
|
98
|
+
{
|
|
99
|
+
configFile: "./stylelint.config.mjs",
|
|
100
|
+
customSyntax: "postcss-scss",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Rules
|
|
109
|
+
|
|
110
|
+
Fix legend:
|
|
111
|
+
- `🔧` = autofixable
|
|
112
|
+
- `—` = report only
|
|
113
|
+
|
|
114
|
+
Preset key legend:
|
|
115
|
+
- [`🟡`](./docs/rules/presets/recommended.md) — [`stylelint2.configs.recommended`](./docs/rules/presets/recommended.md)
|
|
116
|
+
- [`🎨`](./docs/rules/presets/stylelint-only.md) — [`stylelint2.configs.stylelintOnly`](./docs/rules/presets/stylelint-only.md)
|
|
117
|
+
- [`🔧`](./docs/rules/presets/configuration.md) — [`stylelint2.configs.configuration`](./docs/rules/presets/configuration.md)
|
|
118
|
+
- [`🟣`](./docs/rules/presets/all.md) — [`stylelint2.configs.all`](./docs/rules/presets/all.md)
|
|
119
|
+
|
|
120
|
+
| Rule | Fix | Preset key |
|
|
121
|
+
| --- | :-: | :-- |
|
|
122
|
+
| [`stylelint`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/stylelint) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🎨](./docs/rules/presets/stylelint-only.md) [🟣](./docs/rules/presets/all.md) |
|
|
123
|
+
| [`disallow-stylelint-allow-empty-input`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-allow-empty-input) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
124
|
+
| [`disallow-stylelint-configuration-comment`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-configuration-comment) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
125
|
+
| [`disallow-stylelint-custom-syntax`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-custom-syntax) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
126
|
+
| [`disallow-stylelint-default-severity`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-default-severity) | 🔧 | [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
127
|
+
| [`disallow-stylelint-duplicate-extends`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-duplicate-extends) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
128
|
+
| [`disallow-stylelint-duplicate-plugins`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-duplicate-plugins) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
129
|
+
| [`disallow-stylelint-duplicate-rule-option-values`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-duplicate-rule-option-values) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
130
|
+
| [`disallow-stylelint-empty-rules-object`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-empty-rules-object) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
131
|
+
| [`disallow-stylelint-ignore-disables`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-ignore-disables) | 🔧 | [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
132
|
+
| [`disallow-stylelint-ignore-files`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-ignore-files) | 🔧 | [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
133
|
+
| [`disallow-stylelint-null-rule-config`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-null-rule-config) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
134
|
+
| [`disallow-stylelint-overrides-runtime-options`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-overrides-runtime-options) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
135
|
+
| [`disallow-stylelint-processors`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-processors) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
136
|
+
| [`disallow-stylelint-relative-extends-paths`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-relative-extends-paths) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
137
|
+
| [`disallow-stylelint-relative-plugin-paths`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/disallow-stylelint-relative-plugin-paths) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
138
|
+
| [`prefer-stylelint-cache`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-cache) | 🔧 | [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
139
|
+
| [`prefer-stylelint-define-config`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-define-config) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
140
|
+
| [`prefer-stylelint-extends-array`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-extends-array) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
141
|
+
| [`prefer-stylelint-fix`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-fix) | 🔧 | [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
142
|
+
| [`prefer-stylelint-formatter`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-formatter) | — | [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
143
|
+
| [`prefer-stylelint-plugins-array`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-plugins-array) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
144
|
+
| [`prefer-stylelint-report-descriptionless-disables`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-report-descriptionless-disables) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
145
|
+
| [`prefer-stylelint-report-invalid-scope-disables`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-report-invalid-scope-disables) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
146
|
+
| [`prefer-stylelint-report-needless-disables`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-report-needless-disables) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
147
|
+
| [`prefer-stylelint-report-unscoped-disables`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/prefer-stylelint-report-unscoped-disables) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
148
|
+
| [`require-stylelint-custom-syntax-in-overrides`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-custom-syntax-in-overrides) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
149
|
+
| [`require-stylelint-config-file-naming-convention`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-config-file-naming-convention) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
150
|
+
| [`require-stylelint-extends-packages-installed`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-extends-packages-installed) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
151
|
+
| [`require-stylelint-overrides-configuration`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-overrides-configuration) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
152
|
+
| [`require-stylelint-overrides-files-array`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-overrides-files-array) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
153
|
+
| [`require-stylelint-overrides-files`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-overrides-files) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
154
|
+
| [`require-stylelint-plugins-packages-installed`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-plugins-packages-installed) | — | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
155
|
+
| [`require-stylelint-report-disables`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-report-disables) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
156
|
+
| [`require-stylelint-rules-object`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/require-stylelint-rules-object) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
157
|
+
| [`sort-stylelint-extends`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/sort-stylelint-extends) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
158
|
+
| [`sort-stylelint-plugins`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/sort-stylelint-plugins) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
159
|
+
| [`sort-stylelint-rule-keys`](https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/sort-stylelint-rule-keys) | 🔧 | [🟡](./docs/rules/presets/recommended.md) [🔧](./docs/rules/presets/configuration.md) [🟣](./docs/rules/presets/all.md) |
|
|
160
|
+
## Why use this plugin?
|
|
161
|
+
|
|
162
|
+
Use this plugin when you want ESLint to become the single command and editor integration that reports:
|
|
163
|
+
|
|
164
|
+
- JavaScript and TypeScript issues
|
|
165
|
+
- CSS issues from Stylelint
|
|
166
|
+
- Stylelint config authoring issues
|
|
167
|
+
|
|
168
|
+
This package is strongest when you want repo-level consistency around both stylesheet linting and Stylelint config hygiene.
|
|
169
|
+
|
|
170
|
+
If your team prefers running Stylelint separately, this package may be unnecessary.
|
|
171
|
+
|
|
172
|
+
## Contributors ✨
|
|
173
|
+
|
|
174
|
+
See [CONTRIBUTORS.md](./CONTRIBUTORS.md).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Canonical rule documentation URL helpers.
|
|
4
|
+
*/
|
|
5
|
+
/** Stable docs host/prefix for generated rule docs links. */
|
|
6
|
+
export declare const RULE_DOCS_URL_BASE: "https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/";
|
|
7
|
+
/**
|
|
8
|
+
* Build the canonical documentation URL for one rule id.
|
|
9
|
+
*
|
|
10
|
+
* @param ruleName - Rule id (for example `stylelint`).
|
|
11
|
+
*
|
|
12
|
+
* @returns Canonical docs URL for the rule page.
|
|
13
|
+
*/
|
|
14
|
+
export declare const createRuleDocsUrl: (ruleName: string) => string;
|
|
15
|
+
//# sourceMappingURL=rule-docs-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-docs-url.d.ts","sourceRoot":"","sources":["../../src/_internal/rule-docs-url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,EAC3B,oEAA6E,CAAC;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,MACf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Canonical rule documentation URL helpers.
|
|
4
|
+
*/
|
|
5
|
+
/** Stable docs host/prefix for generated rule docs links. */
|
|
6
|
+
export const RULE_DOCS_URL_BASE = "https://nick2bad4u.github.io/eslint-plugin-stylelint-2/docs/rules/";
|
|
7
|
+
/**
|
|
8
|
+
* Build the canonical documentation URL for one rule id.
|
|
9
|
+
*
|
|
10
|
+
* @param ruleName - Rule id (for example `stylelint`).
|
|
11
|
+
*
|
|
12
|
+
* @returns Canonical docs URL for the rule page.
|
|
13
|
+
*/
|
|
14
|
+
export const createRuleDocsUrl = (ruleName) => `${RULE_DOCS_URL_BASE}${ruleName}`;
|
|
15
|
+
//# sourceMappingURL=rule-docs-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-docs-url.js","sourceRoot":"","sources":["../../src/_internal/rule-docs-url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAC3B,oEAA6E,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC1D,GAAG,kBAAkB,GAAG,QAAQ,EAAE,CAAC"}
|