-
Notifications
You must be signed in to change notification settings - Fork 0
disable-lint-thimble #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: disable-lint
Are you sure you want to change the base?
Conversation
5eb1061 to
6776486
Compare
| exports.TOGGLE_ACTIVE_LINE = "view.toggleActiveLine"; // EditorOptionHandlers.js _getToggler() | ||
| exports.TOGGLE_WORD_WRAP = "view.toggleWordWrap"; // EditorOptionHandlers.js _getToggler() | ||
| exports.TOGGLE_ALLOW_JAVASCRIPT = "cmd.toggleAllowJavaScript"; // EditorOptionsHandlers.js _getToggler() | ||
| exports.TOGGLE_ALLOW_LINT = "cmd.toggleAllowLint"; // EditorOptionsHandlers.js _getToggler() |
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.
Don't need this file changed.
| WORD_WRAP = "wordWrap", | ||
| INDENT_LINE_COMMENT = "indentLineComment", | ||
| ALLOW_JAVASCRIPT = "allowJavaScript", | ||
| ALLOW_LINT = "interactive-linter", |
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.
Don't need any of the changes to this file, you can revert all this.
| // Constants for the preferences referred to in this file | ||
| var SHOW_LINE_NUMBERS = "showLineNumbers", | ||
| STYLE_ACTIVE_LINE = "styleActiveLine", | ||
| WORD_WRAP = "wordWrap", |
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.
Don't need any of these changes.
| PostMessageTransport.reload(); | ||
| break; | ||
| case "BRAMBLE_ENABLE_LINT": | ||
| PreferencesManager.set("allowLint", true); |
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.
You have to set this for the proper pref in your extension:
PreferencesManager.getExtensionPrefs("interactive-linter").set("enabled" true);I think. Test that.
| PostMessageTransport.reload(); | ||
| break; | ||
| case "BRAMBLE_DISABLE_LINT": | ||
| PreferencesManager.set("allowLint", false); |
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.
Same thing here.
| }); | ||
| }); | ||
| // Listen for changes to allow javascript | ||
| var Lint = PreferencesManager.getExtensionPrefs("interactive-linter"); |
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.
var lintPrefs
| }); | ||
| // Listen for changes to allow javascript | ||
| var Lint = PreferencesManager.getExtensionPrefs("interactive-linter"); | ||
| Lint.on("change", "allowLint", function () { |
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 is wrong. Check out https://github.com/mozilla/brackets/pull/702/files which is pretty similar to what you're doing.
|
@humphd I made the changes you suggested on the brackets side. |
@humphd so for release 0.4 my task is to add a toggle button for linting [enable-disable]
please reivew, my code on the brackets side. for some reason thimble isn't loading anymore and I can't figure out why
I know i need to fix my indentation for release 0.3. will do after work tonight
i will also be posting thimble code change for this task and link it here
mozilla/thimble.mozilla.org#2024