diff --git a/package.json b/package.json index 644239d3..eb3a5163 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "preview:dist": "vite preview", "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", "clean:lib": "rimraf node_modules", - "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint": "eslint \"src/**/*.{vue,ts,tsx}\"", + "lint:fix": "eslint \"src/**/*.{vue,ts,tsx}\" --fix", "lint:stylelint": "stylelint \"**/*.{vue,css,less,scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/", "lint:lint-staged": "lint-staged", "npm:check": "npx npm-check-updates", @@ -142,7 +142,28 @@ "vue-tsc": "^1.8.8" }, "lint-staged": { - "*": "eslint --fix" + "*.{js,jsx,ts,tsx}": [ + "prettier --write", + "eslint --fix" + ], + "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [ + "prettier --write--parser json" + ], + "package.json": [ + "prettier --write" + ], + "*.vue": [ + "prettier --write", + "eslint --fix", + "stylelint --fix" + ], + "*.{scss,less,styl,html}": [ + "prettier --write", + "stylelint --fix" + ], + "*.md": [ + "prettier --write" + ] }, "config": { "commitizen": {