-
-
Notifications
You must be signed in to change notification settings - Fork 494
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 9 support #543
Labels
bug
Something isn't working
Comments
6 tasks
My solution has been to just disable it ( |
It’s working fine. // craco-plugin--eslint.js
const path = require('path');
const ESLintPlugin = require('eslint-webpack-plugin');
const { removePlugins, pluginByName, addPlugins } = require('@craco/craco');
module.exports = {
plugin: {
overrideWebpackConfig: ({ webpackConfig }) => {
// remove cra eslint v8
removePlugins(webpackConfig, pluginByName('ESLintWebpackPlugin'));
// add eslint v9 support
addPlugins(webpackConfig, [
new ESLintPlugin({
eslintPath: require.resolve('eslint'),
extensions: ['tsx', 'ts'], // file exts to check
configType: 'flat',
emitWarning: true,
emitError: true,
failOnError: true, // show ERROR devServer.overlay.client (craco.config.js)
}),
]);
return webpackConfig;
},
},
}; // craco.config.js
const cracoPluginEslint = require('./craco-plugin--eslint');
module.exports = {
eslint: {
enable: false,
},
plugins: [
cracoPluginEslint, // <-----------------
],
...
...
... |
Alputer
added a commit
to Alputer/reana-ui
that referenced
this issue
Feb 7, 2025
Craco has build issues with eslint v9, therefore eslint is disabled for builds at the moment. See dilanx/craco#543 Closes reanahub#346 hey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's happening
I recently updated my React.js app to use ESLint 9, and I encountered a strange error. After spending considerable effort troubleshooting, I discovered that the issue was related to Craco.
What should happen
expected to work with eslint 9
To reproduce
update eslint in your react.js app to v9.X.X
CRACO version
7.1.0
CRACO config
package.json
...nothing_special
Additional information
if I add
to CRACO config it works.
The text was updated successfully, but these errors were encountered: