@diplodoc/lint 1.10.0 → 1.10.2
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +16 -0
- package/bin/lint.js +5 -4
- package/package.json +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.10.2](https://github.com/diplodoc-platform/lint/compare/v1.10.1...v1.10.2) (2026-01-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **lint:** prevent stylelint hang in large projects ([8799514](https://github.com/diplodoc-platform/lint/commit/8799514e6149b21436ba5350e19d05e9f09cf591))
|
|
9
|
+
|
|
10
|
+
## [1.10.1](https://github.com/diplodoc-platform/lint/compare/v1.10.0...v1.10.1) (2026-01-22)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **ci:** resolve duplicate workflow runs and audit artifact upload issues ([0152390](https://github.com/diplodoc-platform/lint/commit/0152390a577a53c623924078f015dacab56db4c2))
|
|
16
|
+
* **ci:** resolve duplicate workflow runs and audit artifact upload issues ([c29a1c2](https://github.com/diplodoc-platform/lint/commit/c29a1c2c536c6522ebcc06d60ee7e7309ac575c2))
|
|
17
|
+
* **eslint:** add [@typescript-eslint](https://github.com/typescript-eslint) packages as peerDependencies ([2272609](https://github.com/diplodoc-platform/lint/commit/2272609b2b57888b3bf22d4cad80821179b96c12))
|
|
18
|
+
|
|
3
19
|
## [1.10.0](https://github.com/diplodoc-platform/lint/compare/v1.9.2...v1.10.0) (2026-01-15)
|
|
4
20
|
|
|
5
21
|
|
package/bin/lint.js
CHANGED
|
@@ -48,9 +48,10 @@ function execCommand(cmd, options = {}) {
|
|
|
48
48
|
|
|
49
49
|
function hasStyleFiles() {
|
|
50
50
|
try {
|
|
51
|
+
// Exclude common directories that should be ignored
|
|
51
52
|
const result = execSync(
|
|
52
|
-
`find . -type f \\( -name '*.css' -o -name '*.scss' \\)
|
|
53
|
-
{shell: shell, cwd: process.cwd(), encoding: 'utf8', stdio: 'pipe'},
|
|
53
|
+
`find . -type f \\( -name '*.css' -o -name '*.scss' \\) ! -path '*/node_modules/*' ! -path '*/build/*' ! -path '*/lib/*' ! -path '*/dist/*' ! -path '*/cache/*' ! -path '*/coverage/*' ! -path '*/.git/*' 2>/dev/null | head -1`,
|
|
54
|
+
{shell: shell, cwd: process.cwd(), encoding: 'utf8', stdio: 'pipe', timeout: 5000},
|
|
54
55
|
);
|
|
55
56
|
return result && result.trim().length > 0;
|
|
56
57
|
} catch {
|
|
@@ -96,7 +97,7 @@ if (fix) {
|
|
|
96
97
|
execCommand(`"${join(binDir, 'prettier')}" --write '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'`);
|
|
97
98
|
|
|
98
99
|
if (hasStyleFiles()) {
|
|
99
|
-
execCommand(`"${join(binDir, 'stylelint')}" '**/*.{css,scss}' --fix`);
|
|
100
|
+
execCommand(`"${join(binDir, 'stylelint')}" '**/*.{css,scss}' --fix --ignore-path .stylelintignore --allow-empty-input`);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
process.exit(0);
|
|
@@ -115,6 +116,6 @@ if (fix) {
|
|
|
115
116
|
execCommand(`"${join(binDir, 'prettier')}" --check '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'`);
|
|
116
117
|
|
|
117
118
|
if (hasStyleFiles()) {
|
|
118
|
-
execCommand(`"${join(binDir, 'stylelint')}" '**/*.{css,scss}'`);
|
|
119
|
+
execCommand(`"${join(binDir, 'stylelint')}" '**/*.{css,scss}' --ignore-path .stylelintignore --allow-empty-input`);
|
|
119
120
|
}
|
|
120
121
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diplodoc/lint",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Diplodoc platform internal utility set for linting",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lint": "./bin/lint.js",
|
|
@@ -62,6 +62,18 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"fs-extra": "^11.3.3"
|
|
64
64
|
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
|
67
|
+
"@typescript-eslint/parser": "^8.40.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@typescript-eslint/eslint-plugin": {
|
|
71
|
+
"optional": false
|
|
72
|
+
},
|
|
73
|
+
"@typescript-eslint/parser": {
|
|
74
|
+
"optional": false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
65
77
|
"overrides": {
|
|
66
78
|
"js-yaml": "^4.1.1",
|
|
67
79
|
"brace-expansion": "^2.0.2",
|