polygonplanet / sublime-text-eslint

ESLint any JavaScript file in Sublime Text
24 stars 7 forks source link

Possible to specify custom rules directory? #5

Closed leslc closed 8 years ago

leslc commented 8 years ago

Hello,

Is there a setting in Sublime preferences for ESLINT (or separate file) that makes it possible to specify a custom rules directory (basically passing in a value for "--rulesdir" to eslint).

Thanks!

polygonplanet commented 8 years ago

Yes, this plugin is using the ESLint CLIEngine. And I found rulePaths option that is same as --rulesdir.

polygonplanet commented 8 years ago

Added 618c3acbf7c8986a65a16700513ee65038191909

leslc commented 8 years ago

Thanks @polygonplanet !

leslc commented 8 years ago

I tried to use this it didn't work as expected. Rereading the docs made me realize this is where CUSTOM rules are defined, which are then specified in your rules files to enable or not.

For the location of a eslintrc file I think the config is "-c", or "configFile" in the CLI. If it's easy to add, this would be useful. Or I can submit a PR later on.

Thanks!