tern.java icon indicating copy to clipboard operation
tern.java copied to clipboard

Project re-validation should be triggered when changing one of the configuration elements of a linter

Open orlandoibm opened this issue 9 years ago • 5 comments

Take this example:

  1. Have a simple project
  2. Convert it to Tern Project
  3. Enable JsHint validation (at this point, tern.java offers to make a validation since Validation Settings have changed, which is good)
  4. Open preferences and make a change in one of the JsHint flags (let's say bitwise), then apply the changes.
  5. At this point, Validation Settings have changed, but since no linter has been added or removed from tern project, the onLintersChanged event is not fired, then the re-validation is not offered as it should.

orlandoibm avatar Jan 27 '16 21:01 orlandoibm

@orlandoibm I agree with you. It should be very cool to do that when you update and save the .jshintrc.

angelozerr avatar Jan 27 '16 21:01 angelozerr

@angelozerr I actually was thinking about the case when you use a "config object" directly in .tern-project instead .jshintrc file, but certainly supporting both cases would be great.

orlandoibm avatar Jan 27 '16 22:01 orlandoibm

@orlandoibm I have fixed the problem. For your information, you can update the .tern-project from the editor. See the following demo:

test2

angelozerr avatar Jan 28 '16 19:01 angelozerr

@angelozerr Nice !

jabby avatar Jan 28 '16 19:01 jabby

@jabby glaid it please you:)

Next step is to do the sam ething when .jshintrc is updated. I thinj it's a cool feature when you want to check quickly your jshint config.

angelozerr avatar Jan 28 '16 19:01 angelozerr