From 927f6cbd620221734c561ab1b662b2ee19ba2443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20L=C3=B6ffel?= Date: Thu, 19 Mar 2020 21:35:55 +0100 Subject: [PATCH] build: add ls-lint for linting file names (#855) --- .ls-lint.yml | 7 +++++++ package.json | 6 ++++-- yarn.lock | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .ls-lint.yml diff --git a/.ls-lint.yml b/.ls-lint.yml new file mode 100644 index 00000000..424a3fc9 --- /dev/null +++ b/.ls-lint.yml @@ -0,0 +1,7 @@ +ls: + packages/**/{src,__tests__}: + .js: kebab-case + .ts: camelCase | PascalCase + .d.ts: camelCase + .spec.ts: camelCase | PascalCase + .mock.ts: camelCase diff --git a/package.json b/package.json index 9bb63111..edaa3840 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "build": "node scripts/build.js", "size": "node scripts/build.js vue runtime-dom size-check -p -f global", "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", "release": "node scripts/release.js", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", @@ -64,6 +65,7 @@ "ts-jest": "^24.0.2", "tsd": "^0.11.0", "typescript": "^3.7.0", - "yorkie": "^2.0.0" + "yorkie": "^2.0.0", + "@ls-lint/ls-lint": "^1.8.0" } } diff --git a/yarn.lock b/yarn.lock index 3a031585..01411d8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -287,6 +287,11 @@ "@types/istanbul-reports" "^1.1.1" "@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": version "7.7.9" resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.7.9.tgz#9a6ded46f63b6729b1c6630f6ef4e20c1396e177"