eslint / typescript-eslint-parser

An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
Other
915 stars 92 forks source link

Breaking: typescript-estree to 18.0.0 and typescript to 3.2.1 #596

Closed armano2 closed 5 years ago

armano2 commented 5 years ago

This PR contains changes from #576, #584, #589, #590, #591, #592 and deprecates changes from #581

v18.0.0 - v5.3.0 changes:

https://github.com/JamesHenry/typescript-estree/compare/v5.3.0...v18.0.0

PRs with changes to ast:

fixes: #414, #588, #384, #593

armano2 commented 5 years ago

there is one test witch i'm thinking about adding, but i'm unsure if i should do it here or as separate pr:

const { AST_NODE_TYPES } = require("typescript-estree/dist/ast-node-types");
const visitorKeys = require("../../visitor-keys");
const astTypes = Object.keys(AST_NODE_TYPES);
describe("visitor-keys", () => {
    for (const type of astTypes) {
        test(`type ${type} should be present in visitor-keys`, () => {
            expect(visitorKeys).toHaveProperty(type);
        });
    }
});

this will ensure that we have all supported nodes by typescript-estree in visitor-keys

from this test i can see that we are still missing 5 node types :( ClassImplements, Import, JSXClosingFragment, JSXOpeningFragment, JSXSpreadChild

JamesHenry commented 5 years ago

@armano2 I am back reviewing PRs on this side of the fence again :)

I'm strongly of the opinion that we should just jump straight to this PR and close your other ones. Thanks for putting all of these different ones together and making the options available.

Maybe we could creates some failing tests related to the missing visitor keys in a follow up PR?

armano2 commented 5 years ago

should i upgrade it to ~16.x.x~ 17.x.x ?

JamesHenry commented 5 years ago

We should be able to release 18 today (the heritage related PR) and then draw a line under the major changes in this batch :)

platinumazure commented 5 years ago

@JamesHenry Just to make sure I'm following- are you suggesting that typescript-estree will release 18.x soon and we should jump to that, closing this PR at that point?

@armano2 I agree we can do a follow up PR to add the missing visitor keys- as soon as I'm clear on what version of typescript-estree we want to migrate to (see above), we'll get that in and then have a couple of days where the other PRs will need to rebase- during that time you can write a PR for the new test. Sound good?

JamesHenry commented 5 years ago

Yes, exactly 👍

JamesHenry commented 5 years ago

18 is out now and should hopefully be the last major change for a little while now. We'll work on catching things up here next

armano2 commented 5 years ago

ok, PR updated with changes for v18

armano2 commented 5 years ago

@JamesHenry looks like not all tickets got closed

588, #384, #593

siebertm commented 5 years ago

Are there any plans for a new release soon? This kindof blocks me from upgrading typescript to 3.2...

Jessidhia commented 5 years ago

A workaround that can be used with yarn, as long as you have no BigInt syntax in your code, is:

  "resolutions": {
    "**/typescript-eslint-parser/typescript-estree": "6.0.0"
  }

This must, of course, be removed as soon as the ecosystem updates, or there will be pain.

corbinu commented 5 years ago

I also have been maintaining a kind of nightly @corbinu/typescript-eslint-parser

I will say in the latest version typescript/no-empty-interface seems to be broken so I did turn it off