diff --git a/.ls-lint.yml b/.ls-lint.yml deleted file mode 100644 index d8bc94f..0000000 --- a/.ls-lint.yml +++ /dev/null @@ -1,21 +0,0 @@ -ls: - src/*: - .js: kebab-case | PascalCase - .vue: PascalCase | regex:^index - .ts: camelCase | PascalCase - .tsx: camelCase | PascalCase - .d.ts: kebab-case - .mock.ts: kebab-case - .data.ts: camelCase | kebab-case - .test-d.ts: kebab-case - .less: kebab-case | PascalCase - .spec.ts: camelCase | PascalCase - -ignore: - - node_modules - - .git - - .circleci - - .github - - .vscode - - dist - - .local diff --git a/lint-staged.config.js b/lint-staged.config.js index 4448b78..2cff139 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -4,5 +4,5 @@ module.exports = { 'package.json': ['prettier --write'], '*.vue': ['prettier --write', 'stylelint --fix'], '*.{scss,less,styl,css,html}': ['stylelint --fix', 'prettier --write'], - '*.md': ['prettier --write'], -}; + '*.md': ['prettier --write'] +} diff --git a/package.json b/package.json index 72cb2fe..ab62279 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "private": true, "scripts": { "serve": "vue-cli-service serve", - "ls-lint": "npx ls-lint", "lint": "vue-cli-service lint", "build-dev:index": "cross-env PROJECT_NAME=index vue-cli-service build --mode development", "build-pro:index": "cross-env PROJECT_NAME=index vue-cli-service build", @@ -90,10 +89,13 @@ "template", "element-plus" ], - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } + "gitHooks": { + "pre-commit": "lint-staged", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + }, + "lint-staged": { + "*.{js,vue}": [ + "vue-cli-service lint" + ] } }