未验证 提交 9fd2b6f5 编写于 作者: P Peter Pan 提交者: GitHub

fix: make lint-staged great again (#577)

上级 33dbf151
module.exports = {
'**/*.ts?(x)': () => ['tsc -p tsconfig.json --noEmit', 'eslint'],
'**/*.js?(x)': () => 'eslint'
'**/*.ts?(x)': filenames => [
'tsc -p tsconfig.json --noEmit',
'tsc -p tsconfig.server.json --noEmit',
`eslint ${filenames.join(' ')}`
],
'**/*.js?(x)': filenames => `eslint ${filenames.join(' ')}`
};
......@@ -30,7 +30,7 @@
"build": "./scripts/build.sh",
"export": "yarn build:next && next export",
"start": "NODE_ENV=production node dist/server/index.js",
"lint": "tsc --noEmit && eslint --ext .tsx,.jsx.ts,.js --ignore-path .gitignore .",
"lint": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.server.json --noEmit && eslint --ext .tsx,.jsx.ts,.js --ignore-path .gitignore .",
"format": "prettier --write \"**/*.ts\" \"**/*.tsx\" \"**/*.js\" \"**/*.jsx\"",
"test": "echo \"Error: no test specified\" && exit 0"
},
......
......@@ -29,6 +29,7 @@
"isolatedModules": true
},
"exclude": [
"server",
"node_modules"
],
"include": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册