Update the default eslint configuration to ignore config and dist files
jpeach opened this issue · comments
James Peach commented
Description
In a workflow module, running "yarn run lint" emits spurious errors because too many files are checked.
Expected Behavior
Excluding config and dist files seems to work better, for example:
const baseConfig = require("@clutch-sh/tools/.eslintrc.js");
module.exports = {
...baseConfig,
ignorePatterns: [".eslintrc.js","babel.config.js","prettier.config.js","jest.config.js","**/dist"],
overrides: [
...baseConfig.overrides,
{
files: ["**/*.test.*"],
rules: {
"import/no-extraneous-dependencies": ["off"],
},
},
],
};
James Peach commented
An alternative for the config files might be to turn off the import/extensions
warning for @clutch-sh/tools
. For example:
/Users/jpeach/work/clutch/workflows/software/.eslintrc.js
1:28 error Unexpected use of file extension "js" for "@clutch-sh/tools/.eslintrc.js" import/extensions
/Users/jpeach/work/clutch/workflows/software/babel.config.js
1:26 error Unexpected use of file extension "js" for "@clutch-sh/tools/babel.config.js" import/extensions