Skip to content

Conversation

randycoulman
Copy link
Contributor

@randycoulman randycoulman commented May 16, 2017

Atom runs eslint from the directory containing the file being linted.

Because we were using a relative path to the client directory as our resolve root, eslint was reporting errors and warnings because it wasn’t able to resolve some imports.

A work-around would be to add an .eslintignore file to the root of the project, but a better solution is to use an absolute path to the
client directory.

To do that, we need to use path.resolve, so our config file must be JavaScript instead of JSON.

Fixes #59

Atom runs eslint from the directory containing the file being linted.

Because we were using a relative path to the `client` directory as our
resolve root, eslint was reporting errors and warnings because it
wasn’t able to resolve some imports.

A work-around would be to add an `.eslintignore` file to the root of
the project, but a better solution is to use an absolute path to the
`client` directory.

To do that, we need to use `path.resolve`, so our config file must be
JavaScript instead of JSON.
@randycoulman randycoulman requested review from lexun and casto101 May 16, 2017 16:23
@randycoulman randycoulman merged commit a38e360 into master May 16, 2017
@randycoulman randycoulman deleted the fixes/atom-linting branch May 16, 2017 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint warnings in Atom when importing from client directory
3 participants