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
expose JSHint's options as a configurable setting #895
Comments
i've started doing this in the worker branch it's not very convenient to use now
and i'll probably add a way for setting default options for new workers |
Thank you. How do I use this? |
something like this function configureWorker(e, session) {
if (session.getMode().id == "ace/mode/javascript")
if (session.$worker) {
session.$worker.send("changeOptions",[ {undef: true}])
// or
session.$worker.send("setOptions",[ {onevar: false, asi:true}])
}
}
// after changing the session
session.on("changeMode", configureWorker) |
Thank you! |
I hope it helps saving time: if you like to suppress specific error / warning codes use:
|
@homam tried using that line, but it's not working, it complains that $worker is undefined, any other way to expose the jshint options? or disable the linting process altogether? |
There should be a settings file. |
@hyusetiawan this is what I'm using: editor.session.on('changeMode', function(e, session){
if ("ace/mode/javascript" === session.getMode().$id) {
if (!!session.$worker) {
session.$worker.send("setOptions", [{
"-W095": false,
"-W025": false
}]);
}
}
}); |
i had to silence editor.session.on('changeMode', function(e, session){
if ("ace/mode/javascript" === session.getMode().$id) {
if (!!session.$worker) {
session.$worker.send("setOptions", [{
"-W117": false
}]);
}
}
}); here |
hei, if i just want to ignore some keyword in ' is not defined', e.g, i just want to ignore 'dog' and 'cat', how can i do |
For anyone wondering how to change esversion in the linter scroll to the end of this issue: #3160 |
Currently the options sent to JSHint are hardwired within javascript_worker.js:
Please make them available via the public API as a configurable setting.
The text was updated successfully, but these errors were encountered: