Skip to content

feat(*): change TypeScript version range to >=3.2.1 <3.4.0 #184

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

Merged
merged 4 commits into from
Feb 4, 2019

Conversation

JamesHenry
Copy link
Member

@JamesHenry JamesHenry commented Feb 1, 2019

@typescript-eslint/core-team I always use to do these TypeScript version changes as major version bumps for clarity - regardless of whether or not breaking changes were required.

It seems for 3.3, we do not need any changes.

Do we want to do major bumps only when breaking changes are required? Or also force them for TS version changes?

Bear in mind, a standard user will receive a warning in their console that they are using an unsupported version if they switch between the versions before and after this PR without updating their TypeScript version.

armano2
armano2 previously approved these changes Feb 1, 2019
@j-f1
Copy link
Contributor

j-f1 commented Feb 2, 2019

IMO minor versions can add warnings but not errors.

bradzacher
bradzacher previously approved these changes Feb 3, 2019
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's worth a major bump if it doesn't break anything.
It will just make our version number grow too quickly considering TS is looking to release a new version every month or so.
Which means we'll be back to v20 in no time

@aboyton
Copy link
Contributor

aboyton commented Feb 4, 2019

In my experience it's not that uncommon for your code to not build with a bump in TypeScript version as it finds some new type bugs in your code. I'm assuming that when you bump the version of TypeScript in this library then my code won't be able to be linted?

That said, I'm not sure if we need to do a major bump even if technically this is a breaking change (TypeScript doesn't). I think it makes the number bigger than it needs to be.

@armano2
Copy link
Collaborator

armano2 commented Feb 4, 2019

@aboyton, we are not installing typescript and we are allowing to use *, but we are only testing against one version and if yours is not same as defined in package you are going to see warning in console.

https://github.com/typescript-eslint/typescript-eslint#supported-typescript-version

@aboyton
Copy link
Contributor

aboyton commented Feb 4, 2019

@aboyton, we are not installing typescript and we are allowing to use *, but we are only testing against one version and if yours is not same as defined in package you are going to see warning in console.

https://github.com/typescript-eslint/typescript-eslint#supported-typescript-version

Sounds great. Ignore me then. Personally I try to keep on the tip as much as I can and so as long as you do too I don't really mind how you name things. Thanks everyone again for all of the work on this. Now to bump to 3.2 to I can start using this :)

@Jessidhia
Copy link
Contributor

It would be nice to be able to silence the warning with an environment variable or something to that effect, though. Running eslint in parallel on a monorepo prints a big warning banner for every single package that is checked; same if you have multiple instances of eslint-loader (one warning for each instance, you'll likely have at least 3 instances if using thread-loader).

@mysticatea
Copy link
Member

If no change, can we support both versions? For example,

-     "typescript": "~3.2.1"
+     "typescript": ">=3.2.1 <3.4.0"

@aboyton
Copy link
Contributor

aboyton commented Feb 4, 2019

From memory there’s a way to turn the warning off. Can we document that as I’ve had to do it in the past as I had tools that required ESLint to output nothing when nothing was wrong? In the past I’ve wanted to update TypeScript versions faster than this repo has (and so silenced the warning).

@JamesHenry JamesHenry dismissed stale reviews from bradzacher and armano2 via f82553d February 4, 2019 14:31
@JamesHenry JamesHenry changed the title feat(*): bump TypeScript version to ~3.3.1 feat(*): change TypeScript version range to >=3.2.1 <3.4.0 Feb 4, 2019
@JamesHenry
Copy link
Member Author

JamesHenry commented Feb 4, 2019

I have implemented all the feedback.

  • There is now a supported range of >=3.2.1 <3.4.0
  • Better docs
  • New documented warnOnUnsupportedTypeScriptVersion parserOption for parser which is true by default to match the current behaviour

@codecov
Copy link

codecov bot commented Feb 4, 2019

Codecov Report

Merging #184 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #184      +/-   ##
=========================================
+ Coverage    96.2%   96.2%   +<.01%     
=========================================
  Files          51      51              
  Lines        2449    2451       +2     
  Branches      368     369       +1     
=========================================
+ Hits         2356    2358       +2     
  Misses         48      48              
  Partials       45      45
Impacted Files Coverage Δ
packages/parser/src/parser.ts 100% <100%> (ø) ⬆️
packages/typescript-estree/src/parser.ts 91.22% <100%> (-0.08%) ⬇️

@JamesHenry JamesHenry merged commit f513a14 into master Feb 4, 2019
@JamesHenry JamesHenry deleted the ts-3.3 branch February 4, 2019 16:49
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this pull request Feb 28, 2019
typescript-eslint/typescript-eslint#184
@typescript-eslint/eslint-plugin has now loosen their requirement for
peer dep.
And users are now able to disable the warning by specifying
`warnOnUnsupportedTypeScriptVersion` in `parserOptions`.
So to ease maintenance burden, we should also loosen this restriction.
kaicataldo pushed a commit to kaicataldo/typescript-eslint that referenced this pull request Aug 27, 2019
…escript-eslint#186)

* chore: udpate package dependencies
* Add typescript-eslint-parser as a direct dependency of the plugin
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants