@diplodoc/lint 1.10.2 → 1.11.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/.husky/commit-msg CHANGED
@@ -23,14 +23,14 @@ if echo "$SUBJECT" | grep -qE '^(fixup!|squash!)'; then
23
23
  fi
24
24
 
25
25
  # Check Conventional Commits format: <type>(<scope>): <subject>
26
- # Types: feat, fix, perf, refactor, docs, chore, revert
26
+ # Types: feat, fix, perf, refactor, docs, chore, revert, deps
27
27
  # Scope is optional
28
- if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert)(\([^)]+\))?: .+'; then
28
+ if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert|deps)(\([^)]+\))?: .+'; then
29
29
  echo "❌ Error: Commit message does not follow Conventional Commits format."
30
30
  echo ""
31
31
  echo "Expected format: <type>(<scope>): <subject>"
32
32
  echo ""
33
- echo "Types: feat, fix, perf, refactor, docs, chore, revert"
33
+ echo "Types: feat, fix, perf, refactor, docs, chore, revert, deps"
34
34
  echo "Scope is optional"
35
35
  echo ""
36
36
  echo "Examples:"
package/.lintstagedrc.js CHANGED
@@ -37,20 +37,19 @@ module.exports = {
37
37
  if (filtered.length === 0) {
38
38
  return [];
39
39
  }
40
+
40
41
  return [
41
- ...filtered.map((f) => `prettier --write ${f}`),
42
- ...filtered.map(
43
- (f) => `env ESLINT_USE_FLAT_CONFIG=false npx eslint --max-warnings=0 --fix ${f}`,
44
- ),
42
+ `prettier --write ${filtered.join(' ')}`,
43
+ `env ESLINT_USE_FLAT_CONFIG=false npx eslint --max-warnings=0 --fix`,
45
44
  ];
46
45
  },
47
46
  // Handle .lintstagedrc.js separately (only prettier, no eslint)
48
47
  '.lintstagedrc.js': (filenames) => filenames.map((f) => `prettier --write ${f}`),
49
48
  '**/*.{css,scss}': (filenames) => [
50
- ...filenames.map((f) => `prettier --write ${f}`),
51
- ...filenames.map((f) => `stylelint --fix ${f}`),
49
+ `prettier --write ${filenames.join(' ')}`,
50
+ `stylelint --fix ${filenames.join(' ')}`,
52
51
  ],
53
- '**/*.{json,yaml,yml,md}': (filenames) => filenames.map((f) => `prettier --write ${f}`),
52
+ '**/*.{json,yaml,yml,md}': (filenames) => `prettier --write ${filenames.join(' ')}`,
54
53
  '**/*.{svg,svgx}': ['svgo'],
55
54
  // Run unit tests when test files or source files change
56
55
  '**/*.{ts,tsx}': (filenames) => {
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.10.2"
2
+ ".": "1.11.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.11.0](https://github.com/diplodoc-platform/lint/compare/v1.10.3...v1.11.0) (2026-02-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * add esbuild subpath export and dependency ([add2e55](https://github.com/diplodoc-platform/lint/commit/add2e5556c34e6f48ba1be8923d8dd0d820f42e9))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **infra:** add prerelease in workflow ([6615364](https://github.com/diplodoc-platform/lint/commit/66153649c68d297ce2ace30b71ba89db87c95dbe))
14
+
15
+ ## [1.10.3](https://github.com/diplodoc-platform/lint/compare/v1.10.2...v1.10.3) (2026-01-28)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * Add warning to autogenerated files ([3f394fa](https://github.com/diplodoc-platform/lint/commit/3f394fa9800fc622d006d12257819f7bf1a562ba))
21
+ * Fix linstaged filters ([16d2b12](https://github.com/diplodoc-platform/lint/commit/16d2b12446c059db3040a7fd3f566da39d8dbbdb))
22
+ * **lint:** simplify stylelint execution and improve hasStyleFiles ([7e37390](https://github.com/diplodoc-platform/lint/commit/7e373900d764e58abe543bd6c837e94c073eb56e))
23
+
3
24
  ## [1.10.2](https://github.com/diplodoc-platform/lint/compare/v1.10.1...v1.10.2) (2026-01-22)
4
25
 
5
26
 
package/bin/lint.js CHANGED
@@ -48,7 +48,8 @@ function execCommand(cmd, options = {}) {
48
48
 
49
49
  function hasStyleFiles() {
50
50
  try {
51
- // Exclude common directories that should be ignored
51
+ // Quick check if there are any style files (excluding common ignored directories)
52
+ // This prevents hanging when scanning large projects
52
53
  const result = execSync(
53
54
  `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
55
  {shell: shell, cwd: process.cwd(), encoding: 'utf8', stdio: 'pipe', timeout: 5000},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/lint",
3
- "version": "1.10.2",
3
+ "version": "1.11.0",
4
4
  "description": "Diplodoc platform internal utility set for linting",
5
5
  "bin": {
6
6
  "lint": "./bin/lint.js",
@@ -31,6 +31,11 @@
31
31
  "build": "exit 0"
32
32
  },
33
33
  "exports": {
34
+ "./esbuild": {
35
+ "types": "./lib/esbuild.d.ts",
36
+ "import": "./lib/esbuild.mjs",
37
+ "default": "./lib/esbuild.cjs"
38
+ },
34
39
  "./eslint-config": "./eslint-common-config.js",
35
40
  "./eslint-config/client": "./eslint-client-config.js",
36
41
  "./eslint-config/node": "./eslint-node-config.js",
@@ -48,6 +53,7 @@
48
53
  "@gravity-ui/stylelint-config": "^4.0.1",
49
54
  "@typescript-eslint/eslint-plugin": "^8.40.0",
50
55
  "@typescript-eslint/parser": "^8.40.0",
56
+ "esbuild": "^0.27.3",
51
57
  "eslint": "^8.57.0",
52
58
  "eslint-config-prettier": "^9.1.0",
53
59
  "eslint-import-resolver-typescript": "^3.6.1",
@@ -23,14 +23,14 @@ if echo "$SUBJECT" | grep -qE '^(fixup!|squash!)'; then
23
23
  fi
24
24
 
25
25
  # Check Conventional Commits format: <type>(<scope>): <subject>
26
- # Types: feat, fix, perf, refactor, docs, chore, revert
26
+ # Types: feat, fix, perf, refactor, docs, chore, revert, deps
27
27
  # Scope is optional
28
- if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert)(\([^)]+\))?: .+'; then
28
+ if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert|deps)(\([^)]+\))?: .+'; then
29
29
  echo "❌ Error: Commit message does not follow Conventional Commits format."
30
30
  echo ""
31
31
  echo "Expected format: <type>(<scope>): <subject>"
32
32
  echo ""
33
- echo "Types: feat, fix, perf, refactor, docs, chore, revert"
33
+ echo "Types: feat, fix, perf, refactor, docs, chore, revert, deps"
34
34
  echo "Scope is optional"
35
35
  echo ""
36
36
  echo "Examples:"
@@ -37,20 +37,19 @@ module.exports = {
37
37
  if (filtered.length === 0) {
38
38
  return [];
39
39
  }
40
+
40
41
  return [
41
- ...filtered.map((f) => `prettier --write ${f}`),
42
- ...filtered.map(
43
- (f) => `env ESLINT_USE_FLAT_CONFIG=false npx eslint --max-warnings=0 --fix ${f}`,
44
- ),
42
+ `prettier --write ${filtered.join(' ')}`,
43
+ `env ESLINT_USE_FLAT_CONFIG=false npx eslint --max-warnings=0 --fix`,
45
44
  ];
46
45
  },
47
46
  // Handle .lintstagedrc.js separately (only prettier, no eslint)
48
47
  '.lintstagedrc.js': (filenames) => filenames.map((f) => `prettier --write ${f}`),
49
48
  '**/*.{css,scss}': (filenames) => [
50
- ...filenames.map((f) => `prettier --write ${f}`),
51
- ...filenames.map((f) => `stylelint --fix ${f}`),
49
+ `prettier --write ${filenames.join(' ')}`,
50
+ `stylelint --fix ${filenames.join(' ')}`,
52
51
  ],
53
- '**/*.{json,yaml,yml,md}': (filenames) => filenames.map((f) => `prettier --write ${f}`),
52
+ '**/*.{json,yaml,yml,md}': (filenames) => `prettier --write ${filenames.join(' ')}`,
54
53
  '**/*.{svg,svgx}': ['svgo'],
55
54
  // Run unit tests when test files or source files change
56
55
  '**/*.{ts,tsx}': (filenames) => {