Skip to content
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

Update the default eslint configuration to ignore config and dist files #2092

Open
jpeach opened this issue Mar 9, 2022 · 1 comment
Open
Labels
type: bug Something isn't working

Comments

@jpeach
Copy link

jpeach commented Mar 9, 2022

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"],
      },
    },
  ],
};
@jpeach jpeach added the type: bug Something isn't working label Mar 9, 2022
@jpeach
Copy link
Author

jpeach commented Mar 9, 2022

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

@dschaller dschaller removed their assignment Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants