kratiahuja / broccoli-tslinter

Broccoli Plugin to run linter on typescript files. Uses tslint internally.
MIT License
9 stars 6 forks source link

Tests not getting updated when tslint.json is updated #15

Open kratiahuja opened 7 years ago

kratiahuja commented 7 years ago

From @turbo87 in https://github.com/kratiahuja/broccoli-tslinter/pull/12

one issue I noticed though is that when I change the tslint.json file the tests are apparently not updated, but that seems to be a different issue and unrelated to fixing the extends feature.

rwjblue commented 7 years ago

In general, changing config will require a restart of the build (this is true of package.json, .eslintrc.js, ember-cli-build.js, etc).

Turbo87 commented 7 years ago

@rwjblue that might be the current state, but is there no way to fix that?

rwjblue commented 7 years ago

It is currently not possible to watch things in the root of the project because changes in tmp would also be watched and cause infinite rebuild loop. Using watchman helps a little bit, because it suppresses the rebuild triggered by ./tmp changes (since we have a config file that ignores tmp and dust), but watchman isn't required (or well supported for some of our platforms).

tldr; upgrading to broccoli@1 unblocks things like this (conceptually), but it's still pretty difficult to reason about

rwjblue commented 7 years ago

It's probably possible to do a one off solution for this particular case (basically forcing a content comparison of the tslint.json for every build), but I wouldn't trigger a rebuild upon changing the lint config (it would only allow a subsequent watched file change to pull in the new config).