elicwhite / ESLint-Formatter

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

How to selectively run Eslint-Formatter ("On save" mode) on particular files #83

Closed shmdhussain closed 4 years ago

shmdhussain commented 4 years ago

for example, the project is having the structure

.
├── a.js
├── b.js
└── lib
    ├── a_lib.js
    └── b_lib.js

I like to run the eslint-formatter on save for the a.js and b.js not on lib/a.js lib/b.js.

Is it possible to do something like this?. Thanks in advance for any help

skeggse commented 4 years ago

If you add lib/* to your .eslintignore file, eslint formatter will still attempt to format on save, but will not replace the file buffer after eslint itself runs. Beyond that, we don't currently support filtering which files. If using the .eslintignore doesn't work for you, more detail about your particular use-case would be useful.