-
Notifications
You must be signed in to change notification settings - Fork 61
Chore: Upgrade deps to eslint 4 and typescript-parser 4 #31
Conversation
Spoke to soon, but looks like it is actually the test harness @JamesHenry do you have any idea what might have broken it? |
I can take a look. A lot of re-factoring was done to the Linter class in eslint don't think too much changed with RuleTester. |
If you change the rule tester line: It runs the tests with errors. Not sure why that change needs to happen. Still looking into it. |
@JamesHenry @soda0289 Thanks I just rolled it back let me figure out what broke the no-unused and then will squash it down and we are good to go |
@soda0289 That change seems to be causing only the main |
@corbinu I'm not sure what the test was supposed to be checking for. I guess it wants both rules to be run at the same time. This line: Is loading the original rule since: ruleNoUnusedVars is the original no-unused-vars rule. Maybe we should change that part as well. Can spend some more time tonight digging into it, |
@soda0289 Ok I think I know whats happening the change is causing eslint to overwrite typescript/no-unused-vars as the original rule. We need to change it back to no-unused-vars and then figure out why eslint isn't finding that rule even though it is defined on line 16 with this
|
@corbinu I think what might be happening is that RuleTester is creating its own Linter instance and eslint has a different Linter instance. In eslint v4 Linter is no longer a singleton meaning multiple instances can exists. Instead of doing |
@soda0289 Haha just did that and was about to comment I found it. Thanks for all your help! |
@soda0289 @JamesHenry All set and ready for release! I bumped the version to 0.3.0 since we did release a 0.2.0 under my scope before. |
Also fixed bugs against both parser master and ts-2.4 |
Theres a breaking change in the parser that will cause the type-annotation spacing rule to break. Not sure if we should fix that now or after we release a new version of the parser. |
@soda0289 I don't think there is a way to do it without breaking support for version 3 of the parser so lets merge this and then we can release a version 0.4.0 that supports version 4 of the parser and typescript 2.4 |
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.
Hey @corbinu, thanks for this, it is nearly ready to merge, the only thing I would ask is that you please remove the package-lock.json
file and add a .npmrc
file to prevent it being created in the future. This is purely to mirror the position that we took for the ESLint repo.
See:
@JamesHenry Now that the breaking change is in parser 4.0.0 I do think I should fix that first. Also I am really sad to hear that but will do for parity. |
@JamesHenry Wouldn't it make more sense to add package-lock.json to .gitignore that way at least reinstalls during development would be faster? It seems like eslint/eslint#8742 misunderstands a bit what the package-lock does and doesn't do :/ |
@corbinu Based on this comment: eslint/eslint#8742 (comment) |
@soda0289 Yes but my understanding is that specifically has to do with eslint's release system which we aren't using here. Also package-lock for dependencies is not respected on npm install so it ending up in the release or not does absolutely nothing. It only affects when somebody git clones the repo. So what we are talking about is A) if it is committed then when any of us forks this repo we are all working of the same dep tree B) it is not committed because it is in the .gitignore at least we each get a faster npm install on subsequent installs in our own versions. Also this comment
Is no longer true. |
@corbinu I see your point. I'm not too familiar on the details of npm and package-lock.json just thought I'd share the reason why eslint did not use .gitignore |
@soda0289 I just wish I had seen that issue before it was merged would have brought all this up there. However if you guys want it to match I understand |
…ng to latest eslint-config and fix tests. Bump to 0.3.0
@JamesHenry All set for release but I still don't like it ;) |
Thanks! Published as |
This should land after #30 I updated the deps. Cleaned up the linting to fit eslint-config-eslint 4 and then fixed the broken tests. I did test against both eslint 3 and 4. We should be ready to add new rules now!