@codacy/tools-stylelint-0 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Codacy
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,58 @@
1
+ # @codacy/tools-stylelint-0
2
+
3
+ ## Table of Contents
4
+ - [Overview](#overview)
5
+ - [Updating patterns](#updating-patterns)
6
+ - [Updating the Stylelint version](#updating-the-stylelint-version)
7
+ - [Development](#development)
8
+ - [Notes for maintainers](#notes-for-maintainers)
9
+
10
+ ---
11
+
12
+ ## Overview
13
+
14
+ CSS/SCSS/Less linter using [Stylelint](https://stylelint.io). Uses the Library execution strategy — calls the Stylelint API directly rather than spawning a subprocess.
15
+
16
+ | Property | Value |
17
+ |----------|-------|
18
+ | Tool ID | `Stylelint` |
19
+ | Codacy UUID | `1f03328a-086e-459e-bfa3-73e56f01020f` |
20
+ | Strategy | Library |
21
+ | Languages | CSS, LESS, SASS |
22
+ | Dependency | `stylelint` npm package (v16.x) |
23
+ | File patterns | `**/*.css`, `**/*.scss`, `**/*.less` |
24
+
25
+ ## Updating patterns
26
+
27
+ ```bash
28
+ # Re-fetch pattern metadata from the Codacy API
29
+ pnpm prefetch
30
+
31
+ # Commit the result
32
+ git add src/patterns.json
33
+ ```
34
+
35
+ Pattern IDs follow the format `Stylelint_block-no-empty`, `Stylelint_color-no-invalid-hex`, etc.
36
+
37
+ ## Updating the Stylelint version
38
+
39
+ 1. Update the `stylelint` version in `package.json`
40
+ 2. Run `pnpm install`
41
+ 3. Run `pnpm prefetch` to check for new/removed rules
42
+ 4. Run `pnpm test` to verify compatibility
43
+ 5. If the major version changes, create a new adapter package (`stylelint-1/`)
44
+
45
+ ## Development
46
+
47
+ ```bash
48
+ pnpm build # Build with tsup
49
+ pnpm test # Run tests
50
+ ```
51
+
52
+ ## Notes for maintainers
53
+
54
+ - Stylelint v16+ is **pure ESM**. The adapter uses dynamic `import()` at runtime to stay CJS-compatible with the tsup build.
55
+ - `stylelint-config-standard` is used as the default config when no local config or Codacy patterns are provided. Without it, Stylelint has zero rules enabled.
56
+ - Stylelint appends the rule name in parentheses to warning text (e.g. `"Unexpected empty block (block-no-empty)"`). The adapter strips this suffix for cleaner messages.
57
+ - `checkAvailability` dynamically imports Stylelint and runs a trivial lint to verify it loads.
58
+ - `install` is a no-op — the npm dependency handles installation.
@@ -0,0 +1,5 @@
1
+ import * as _codacy_tooling from '@codacy/tooling';
2
+
3
+ declare const _default: Readonly<_codacy_tooling.ToolAdapter>;
4
+
5
+ export { _default as default };