My shared (and personal) eslint configurations for different projects.
Currently supporting:
Add .eslintrc.js to the root of the project, and with npm i -D @remy/eslint,
add the following code:
module.exports = require('@remy/eslint')('next', {
// overrides live here
});
For example, to allow console.log:
module.exports = require('@remy/eslint')('next', {
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
},
});
A bin util is provided, which echos out a default using:
npx lint-config # defaults to next
npx lint-config node # echo node config
# ideally:
npx lint-config > .eslintrc.js
eslint is reading from the package.json, and the engines.node value is missing (assuming you want node@latest).