elicwhite / ESLint-Formatter

Sublime Text 3 Plugin to Autoformat with Eslint
MIT License
139 stars 20 forks source link

Added ability to set cwd dynamically by searching for config file #90

Closed IPWright83 closed 2 years ago

IPWright83 commented 2 years ago

Fixes #89 by providing a way of determining the root of the project, to set the current working directory when running the linter. This allows eslint_d to use it's caching when pulling out a separate tabbed window which massively improves performance.

IPWright83 commented 2 years ago

I've tried to make this work in a similar way to the Sublime linter, in that it searches up for a config file and marks that as the current working directory.

I didn't want to break anything so it's basically behind a new flag. I also kept it configurable accepting that not everyone stores their lint config in package.json