Skip to content

Gatsby's .eslintignore being ignored #837

@NMinhNguyen

Description

@NMinhNguyen

Gatsby version: 0.12.45

Hi, I noticed that npm test on master fails due to some linting problems in interfaces folder, however this folder is actually specified in .eslintignore. But because linting is configured with --ignore-path .gitignore in package.json, .eslintignore is ignored in favour of .gitignore.

{
  "scripts": {
    "lint": "eslint --ext .js,.jsx --ignore-path .gitignore ."
  }
}

From ESLint docs:

Keep in mind that specifying --ignore-path means that any existing .eslintignore file will not be used.

Short of copying the contents of .gitignore into .eslintignore, I'm not sure what the best way to combine .eslintignore and .gitignore is.

You can scroll to the bottom of this recent build log to see the exact error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions