9 Star 30 Fork 0

Gitee 极速下载 / next-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/vercel/next.js
克隆/下载
lint-staged.config.js 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
const escape = require('shell-quote').quote
const { ESLint } = require('eslint')
const eslint = new ESLint()
const isWin = process.platform === 'win32'
module.exports = {
'**/*.{js,jsx,ts,tsx}': (filenames) => {
const escapedFileNames = filenames
.map((filename) => `"${isWin ? filename : escape([filename])}"`)
.join(' ')
return [
`prettier --with-node-modules --ignore-path .prettierignore_staged --write ${escapedFileNames}`,
`eslint --no-ignore --max-warnings=0 --fix ${filenames
.filter((file) => !eslint.isPathIgnored(file))
.map((f) => `"${f}"`)
.join(' ')}`,
]
},
'**/*.{json,md,mdx,css,html,yml,yaml,scss}': (filenames) => {
const escapedFileNames = filenames
.map((filename) => `"${isWin ? filename : escape([filename])}"`)
.join(' ')
return [
`prettier --with-node-modules --ignore-path .prettierignore_staged --write ${escapedFileNames}`,
]
},
}
JavaScript
1
https://gitee.com/mirrors/next-js.git
git@gitee.com:mirrors/next-js.git
mirrors
next-js
next-js
master

搜索帮助