Skip to content

Commit

Permalink
chore: format all files on pre-commit, lint ts files (vitejs#4132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored and aleclarson committed Nov 8, 2021
1 parent fc8a7fa commit 0403b00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ module.exports = defineConfig({
'error',
{ allow: ['arrowFunctions'] }
],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off', // maybe we should turn this on in a new PR
'@typescript-eslint/no-extra-semi': 'off', // conflicts with prettier
'@typescript-eslint/no-inferrable-types': 'off',
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"format": "prettier --write .",
"lint": "eslint --ext .js,.ts packages/*/src/**",
"lint": "eslint packages/*/{src,types}/**",
"test": "run-s test-serve test-build",
"test-serve": "jest",
"debug-serve": "cross-env VITE_DEBUG_SERVE=1 node --inspect-brk ./node_modules/.bin/jest",
Expand Down Expand Up @@ -59,19 +59,18 @@
"yorkie": "^2.0.0"
},
"gitHooks": {
"pre-commit": "lint-staged",
"pre-commit": "lint-staged --concurrent false",
"commit-msg": "node scripts/verifyCommit.js"
},
"lint-staged": {
"*.js": [
"*": [
"prettier --write"
],
"*.ts": [
"eslint",
"prettier --parser=typescript --write"
"packages/*/{src,types}/**/*.ts": [
"eslint --ext .ts"
],
"*.html": [
"prettier --write"
"packages/**/*.d.ts": [
"eslint --ext .ts"
]
}
}

0 comments on commit 0403b00

Please sign in to comment.