Skip to content

Commit

Permalink
ci: 提交加上hook
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Aug 17, 2022
1 parent edf4b66 commit 5437577
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
7 changes: 0 additions & 7 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module.exports = {
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
cjs: '@babel/eslint-parser',
js: '@babel/eslint-parser',
jsx: '@babel/eslint-parser',

Expand All @@ -20,12 +19,6 @@ module.exports = {
'no-undef': 'off', // ts(2304)
},
},
{
files: ['*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
],
env: {
// Your environments (which contains several predefined global variables)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ types/directives.d.ts
stats.html
vite.config.ts.timestamp*
types/components.d.ts
.eslintcache
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"type-check": "vue-tsc --noEmit",
"preview": "vite preview",
"release": "release-it",
"eslint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
"eslint": "eslint . --cache --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
"eslint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
"prettier": "prettier -l \"./**/*\"",
"prettier:fix": "prettier --write -l \"./**/*\"",
"prettier": "prettier --cache -l \"./**/*\"",
"prettier:fix": "prettier --write --cache -l \"./**/*\"",
"i": "npm install --registry=https://registry.npm.taobao.org && npx husky install"
},
"dependencies": {
Expand Down Expand Up @@ -71,6 +71,7 @@
"xregexp": "^5.1.1"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
"**/*": "prettier --cache --write --ignore-unknown",
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --cache"
}
}

0 comments on commit 5437577

Please sign in to comment.