-
Notifications
You must be signed in to change notification settings - Fork 36
Add disableWhenNoJshintrcFileInPath
option
#144
Conversation
We are actually planning on support this steelbrain/linter#744 |
Right now not having this supported in this plugin makes my dev workflow pretty ugly, as I have to entirely disable the package when switching to some projects that I work on. Could we include this as a stop-gap until it's merged into |
Sure, but you might wanna see AtomLinter/linter-eslint#172 |
I can update to use that - would that be all that you'd like to see done before merging? |
Yep, and if you could remove that notification that would be great. |
Updated! |
@@ -38,6 +42,12 @@ module.exports = | |||
lintOnFly: true | |||
lint: (textEditor) => | |||
filePath = textEditor.getPath() | |||
|
|||
onlyConfig = atom.config.get('linter-jshint.disableWhenNoJshintrcFileInPath') | |||
jshintConfig = helpers.findFile(filePath, '.jshintrc') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check for config file only when the setting is enabled please, 'cause we don't wanna find it when the config is disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch/optimization :D
…sabled if no jshintrc file is in project.
Fixed. |
Nice! Thanks! |
Add `disableWhenNoJshintrcFileInPath` option
Allows linter to be disabled if no jshintrc file is in project.
This is mostly lifted from linter-eslint.