-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint-loader doesn't appear to be respected #3241
Comments
I have the same issue too |
hi @ryami333, I have working setup like: if (!dev)
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'disabled',
// For all options see https://github.com/th0r/webpack-bundle-analyzer#as-plugin
generateStatsFile: true,
// Will be available at `.next/stats.json`
statsFilename: 'stats.json'
})
);
else {
config.module.rules.push(
{
test: /\.js$/,
enforce: 'pre',
include: [
path.resolve('components'),
path.resolve('pages'),
path.resolve('utils')
],
options: {
configFile: path.resolve('.eslintrc.js'),
eslint: {
configFile: path.resolve(__dirname, '.eslintrc.js')
}
},
loader: 'eslint-loader'
}
);
config.devtool = 'cheap-module-eval-source-map';
} Please note else statement Let me know does it work for you as well. |
@davscro it doesnt work for me |
Sorry @davscro, I abandoned Next for that project because of this issue, so I can't verify whether you setup works, but I'm fairly certain I had something almost identical. |
@ryami333 sorry about that. |
I'm trying to use custom image loaders at next.config.js with no success, I think it is kind of related to this issue. |
This will be fixed in Next.js v5. |
Have attempted to extend the webpack config in
next.config.js
to use theeslint-loader
(to give warnings and/or errors duringdev
orbuild
, much the same as Create React App does.What I've tried:
What happens:
dev
andbuild
both run without incident.What I expect to happen:
dev
andbuild
to either fail entirely, or to produce an error in the browser, the browser console, or the CLI.What I've already found:
I found this issue already, which I believe might have been prematurely closed - a user referenced a way to configure the loader, which the OP had presumably already done.
Has anybody got any idea how I can configure nextjs to either fail-on-error or to emit some kind of error/warning message, in a similar way to CRA?
The text was updated successfully, but these errors were encountered: