-
Notifications
You must be signed in to change notification settings - Fork 141
Conversation
@@ -11,7 +11,7 @@ module.exports = { | |||
this.subscriptions = new CompositeDisposable() | |||
this.active = true | |||
this.worker = null | |||
this.scopes = ['source.js', 'source.jsx', 'source.js.jsx', 'source.babel', 'source.js-semantic'] | |||
this.scopes = atom.config.get('linter-eslint.scopes') |
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.
Maintaining the scopes list isn't quite this simple. Your current code will only update on launching Atom, since that is (generally) the only time the activate()
function is called.
You'll need to update this to code like this, so whenever the setting is changed, the scopes array is update (not replaced!) with the new values.
@@ -11,8 +11,14 @@ module.exports = { | |||
this.subscriptions = new CompositeDisposable() | |||
this.active = true | |||
this.worker = null | |||
this.scopes = atom.config.get('linter-eslint.scopes') | |||
this.scopes = new CompositeDisposable() |
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.
this.scopes
must be an Array
@neurosnap A few more changes needed here. |
LGTM and CI is green, merging 😉. Thanks for putting this together! |
I'm glad we could get this merged. Thanks for all the input and examples, much appreciated! |
This PR will allow the user to add or remove scopes that will apply to
linter-eslint
. The primary reason I am submitting this PR is for https://github.com/rtsao/csjs and by proxy https://github.com/neurosnap/language-csjs which will allow us to extend the linter to this pseudo language.