build: add ls-lint for linting file names (#855)

This commit is contained in:
Lucas Löffel 2020-03-19 21:35:55 +01:00 committed by GitHub
parent b7d1e0fa2f
commit 927f6cbd62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

7
.ls-lint.yml Normal file
View File

@ -0,0 +1,7 @@
ls:
packages/**/{src,__tests__}:
.js: kebab-case
.ts: camelCase | PascalCase
.d.ts: camelCase
.spec.ts: camelCase | PascalCase
.mock.ts: camelCase

View File

@ -9,7 +9,8 @@
"build": "node scripts/build.js", "build": "node scripts/build.js",
"size": "node scripts/build.js vue runtime-dom size-check -p -f global", "size": "node scripts/build.js vue runtime-dom size-check -p -f global",
"lint": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"", "lint": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"",
"test": "node scripts/build.js vue -f global -d && jest", "ls-lint": "npx @ls-lint/ls-lint",
"test": "node scripts/build.js vue -f global -d && ls-lint && jest",
"test-dts": "node scripts/build.js shared reactivity runtime-core runtime-dom -dt -f esm-bundler && tsd", "test-dts": "node scripts/build.js shared reactivity runtime-core runtime-dom -dt -f esm-bundler && tsd",
"release": "node scripts/release.js", "release": "node scripts/release.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
@ -64,6 +65,7 @@
"ts-jest": "^24.0.2", "ts-jest": "^24.0.2",
"tsd": "^0.11.0", "tsd": "^0.11.0",
"typescript": "^3.7.0", "typescript": "^3.7.0",
"yorkie": "^2.0.0" "yorkie": "^2.0.0",
"@ls-lint/ls-lint": "^1.8.0"
} }
} }

View File

@ -287,6 +287,11 @@
"@types/istanbul-reports" "^1.1.1" "@types/istanbul-reports" "^1.1.1"
"@types/yargs" "^13.0.0" "@types/yargs" "^13.0.0"
"@ls-lint/ls-lint@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.8.0.tgz#508fe32d4dbdd90d61c8ea156c20af33c294a22e"
integrity sha512-XaItB+/qOMdCJbTuT/mT6yDlzUSClOtPx9S/dUBETUHxmcOlvdLOXoIiSvZBlpmux81qtz6pVvkmzWNK0SpojQ==
"@microsoft/api-extractor-model@7.7.9": "@microsoft/api-extractor-model@7.7.9":
version "7.7.9" version "7.7.9"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.7.9.tgz#9a6ded46f63b6729b1c6630f6ef4e20c1396e177" resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.7.9.tgz#9a6ded46f63b6729b1c6630f6ef4e20c1396e177"