Enable "--max-warnings" flag into "next lint" command #26671
dudusotero
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Added here: #26697 :) |
Beta Was this translation helpful? Give feedback.
1 reply
-
@housseindjirdeh This apparently isn't working. I have an application in Next.js that is using I have the following: const path = require('path')
const buildEslintCommand = (filenames) =>
`next lint --max-warnings 0 --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(' --file ')}`
module.exports = {
'**/*.{js,jsx,ts,tsx}': [buildEslintCommand, 'npm run format:fix'],
'**/*.{md,mdx,mjs,yml,yaml,css,json}': ['npm run format:fix'],
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the feature you'd like to request
I would like to request Max Warnings flag into
next lint
command.The main reason for this is to use together with something like
lint-staged
to validade all my files.Sometimes I have only warnings but I want stop commit actions like when I have errors.
Describe the solution you'd like
Add a new flag into "Handling warnings" section, like we already have with
---quiet
flag.Describe alternatives you've considered
One idea will be just add a
--ignore-warnings
flag that will be a boolean value.But, just use the
eslint
way will be better due to a entire community already know how to handle this with pure eslint configuration.Beta Was this translation helpful? Give feedback.
All reactions