Skip to content

Commit 927f6cb

Browse files
authored
build: add ls-lint for linting file names (#855)
1 parent b7d1e0f commit 927f6cb

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.ls-lint.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ls:
2+
packages/**/{src,__tests__}:
3+
.js: kebab-case
4+
.ts: camelCase | PascalCase
5+
.d.ts: camelCase
6+
.spec.ts: camelCase | PascalCase
7+
.mock.ts: camelCase

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build": "node scripts/build.js",
1010
"size": "node scripts/build.js vue runtime-dom size-check -p -f global",
1111
"lint": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"",
12-
"test": "node scripts/build.js vue -f global -d && jest",
12+
"ls-lint": "npx @ls-lint/ls-lint",
13+
"test": "node scripts/build.js vue -f global -d && ls-lint && jest",
1314
"test-dts": "node scripts/build.js shared reactivity runtime-core runtime-dom -dt -f esm-bundler && tsd",
1415
"release": "node scripts/release.js",
1516
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
@@ -64,6 +65,7 @@
6465
"ts-jest": "^24.0.2",
6566
"tsd": "^0.11.0",
6667
"typescript": "^3.7.0",
67-
"yorkie": "^2.0.0"
68+
"yorkie": "^2.0.0",
69+
"@ls-lint/ls-lint": "^1.8.0"
6870
}
6971
}

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@
287287
"@types/istanbul-reports" "^1.1.1"
288288
"@types/yargs" "^13.0.0"
289289

290+
"@ls-lint/ls-lint@^1.8.0":
291+
version "1.8.0"
292+
resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.8.0.tgz#508fe32d4dbdd90d61c8ea156c20af33c294a22e"
293+
integrity sha512-XaItB+/qOMdCJbTuT/mT6yDlzUSClOtPx9S/dUBETUHxmcOlvdLOXoIiSvZBlpmux81qtz6pVvkmzWNK0SpojQ==
294+
290295
"@microsoft/[email protected]":
291296
version "7.7.9"
292297
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.7.9.tgz#9a6ded46f63b6729b1c6630f6ef4e20c1396e177"

0 commit comments

Comments
 (0)