Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Add support for ignore-path #1111

Open
3 tasks done
arv opened this issue Feb 16, 2018 · 5 comments
Open
3 tasks done

Add support for ignore-path #1111

arv opened this issue Feb 16, 2018 · 5 comments

Comments

@arv
Copy link

arv commented Feb 16, 2018

Issue Type

Feature Request

Issue Description

We run our eslint as follows:

eslint --ignore-path=<PathToFileDefiningWhatToIgnore> ...

as described here: https://eslint.org/docs/user-guide/command-line-interface#ignore-path

It would be nice if there was an option to define the same thing using AtomLinter/linter-eslint

Bug Checklist

  • Restart Atom
  • Verify the eslint CLI gives the proper result, while linter-eslint does not
  • Paste the output of the Linter Eslint: Debug command from the Command Palette below
Atom version: 1.24.0
linter-eslint version: 8.4.1
ESLint version: 4.17.0
Hours since last Atom restart: 0
Platform: darwin
Using local project ESLint from: /src/quip/node_modules/eslint
Current file's scopes: [
  "source.js.jsx",
  "punctuation.terminator.statement.js"
]
linter-eslint configuration: {
  "disableWhenNoEslintConfig": false,
  "eslintRulesDirs": [
    "/src/quip/static/tools/eslint/rules/"
  ],
  "eslintrcPath": "/src/quip/static/tools/eslint/eslintrc.yml",
  "lintHtmlFiles": false,
  "useGlobalEslint": false,
  "showRuleIdInMessage": true,
  "globalNodePath": "",
  "advancedLocalNodeModules": "",
  "disableEslintIgnore": false,
  "disableFSCache": false,
  "fixOnSave": false,
  "scopes": [
    "source.js",
    "source.jsx",
    "source.js.jsx",
    "source.babel",
    "source.js-semantic"
  ],
  "rulesToSilenceWhileTyping": [],
  "rulesToDisableWhileFixing": [],
  "ignoreFixableRulesWhileTyping": false
}
@skylize
Copy link
Contributor

skylize commented Feb 16, 2018

Not sure how we would approach this. Some concerns coming immediately to mind:

  • We actually use location of a .eslintignore as one of the flags for locating your project root. How should your specified ignore file interact with this behavior?

  • Is this ignore file expected to be global? If not, are you wanting us to keep a list matching up all your projects to their respective ignore files?

We currently do not track anything. Except for a little bit of caching, we basically do a new search for your project config and the correct copy of eslint every time a lint runs. The only reasonably easy way I can think of to add this feature would be to put a file in your project root to tell us where to find the ignore file, which seems to defeat the whole purpose of the request.

@arv
Copy link
Author

arv commented Feb 16, 2018

I would expect this to be global, just like the eslintrcPath and eslintRulesDirs and have to have absolute paths. The path inside the ignore-path would probably be relative to the working directory.

@IanVS
Copy link
Member

IanVS commented Feb 16, 2018

Hi @arv. Each option we add comes with a maintenance cost and cognitive burden for our users. I'd like to understand your use case to see why this is worth adding. Can you please describe a bit about your setup and why this would be an important option for you to have?

@arv
Copy link
Author

arv commented Feb 17, 2018

Our precommit runs something like:

eslint --config=<PATH> --ignore-path=<PATH> --rulesdir=<PATH> ...

AtomLinter/linter-eslint supports both config and rulesdir but not ignore-path which leads to lots of false positives when editing in Atom.

@IanVS
Copy link
Member

IanVS commented Feb 17, 2018

So, do you have an ignore file that is named something different from .eslintignore, which is why you need to use --ignore-path?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants