3

I'm working on a project that has an .eslintrc file checked in to source control at the root of the project.

The problem is that it has custom dependencies and when I use a tool to run my linting (syntastic with Vim) it fails. The dependencies are custom and I wish to skip running them in my editor.

I want to use another .eslintrc file, rather than the one which is in the root of the project.

How can I ignore <projectroot>/.eslintrc and instead use /custom/path/.eslintrc?

Jonathan.Brink
  • 23,757
  • 20
  • 73
  • 115

1 Answers1

7

A glance at the ESLint docs tells us that you want to pass the --no-eslintrc option to make it ignore the .eslintrc in the project root and --config /custom/path/.eslintrc to make it use that file instead.

The Syntastic README says you can configure the arguments given to eslint like so:

let g:syntastic_javascript_eslint_args = "--no-eslintrc --config /custom/path/.eslintrc"
Jordan Running
  • 102,619
  • 17
  • 182
  • 182