Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @typescript-eslint/eslint-plugin, @typescript-eslint/parser to the latest version #29

Merged
merged 1 commit into from Oct 12, 2021

Conversation

redpeacock78
Copy link
Owner

Version 5.0.0 of @typescript-eslint/eslint-plugin was just published.

The version(5.0.0) is not covered by your current version range(^4.6.0).

Release Notes

v5.0.0

5.0.0 (2021-10-11)

Breaking Release Notes

All Packages

  • Support for ESLint v8 (see individual packages for relevant breaking changes).
  • Drop support for Node v10 - required node version is now ^12.22.0 || ^14.17.0 || >=16.0.0.

    • Node v10 was EOL'd in April 2021, and ESLint v8 dropped support for it too.
  • Drop Support for ESLint v5

    • ESLint v5 is now 3 years old - why are you still using it? Upgrade to at least ESLint v6.

ESLint-Plugin

  • Changes to the recommended rule set - see #3746
  • [ban-types] remove object from the default ban list

    • This has been a point of contention for a while - I originally added it because TS currently makes it impossible to narrow the type nicely. However there ultimately isn't a good alternative to this type for many usecases. As such we're removing the default ban. If you want to continue banning it, you can configure the rule to do so.
  • [comma-dangle] align schema with ESLint v8

    • Should be pretty transparent unless you were using an invalid config.
  • [explicit-member-accessibility] now checks abstract members
  • [member-ordering] add support for getters and setters

    • This will likely cause your codebase's sort orders to change if you're using the default config.
  • [no-unused-vars-experimental] rule has been deleted

    • You should instead use @typescript-eslint/no-unused-vars instead! It has had full and awesome support for TypeScript since v4.9.0 - and it doesn't require type information!

Experimental-Utils:

  • Remove SourceCode#getComments API from ESLint types.

    • This API was deprecated in ESLint v4, and its usage will error in ESLint v8.
  • Support ESLint v8:

    • CLIEngine is now conditionally undefined. It was deprecated in v7 and removed in v8. If you're still using it, you should upgrade to the ESLint API.
    • Remove meta.docs.category. ESLint has removed this from their core rules as it wasn't ever very useful and was always poorly done. We have followed suit and removed it from our types and our rules.

TypeScript-ESTree / AST-Spec

  • Change .source of ExportNamedDeclaration, ExportAllDeclaration and ImportDeclaration to StringLiteral and add parse-time errors.

    • This ensures we're aligned with ESTree and producing the correct AST.
  • Remove TSParenthesizedType node.

    • This node was added when this project was first created because the TS-AST includes this node. However it ultimately conveys no actual AST meaning (just like parentheses in non-type code). Babel removed this node earlier this year.
    • We expect rules will continue to "just work". In a lot of cases rules will work better as they no longer need manual checks to "look past" the useless node.
  • Remove legacy option useJSXTextNode.

    • This option was added for compatibility between different ASTs a very long time ago - but all ASTs have converged on using JSXText - so you should be using that too.
  • Align class features AST with ESTree. This aligns with ESLint v8.

    • ClassProperty is now called PropertyDefinition
    • TSAbstractClassProperty is now called TSAbstractPropertyDefinition
  • TSAbstractPropertyDefinition.value is now always null.

    • It never made sense that this was allowed, and TS4.4 has now made this invalid.
  • Add full support for PrivateIdentifier (#private class members)

    • Previously we did not officially support them and emitted an "unstable" AST.
    • This will allow the community to build lint rules specifically targeting #private members.
  • Rename LineAndColumnData to Position (aligns naming with the ESTree spec docs)

Scope-Manager

  • Class properties with values now create a 'class-field-initializer' type scope around their value.

    • This aligns with eslint-scope v6.

Raw Changelog

Bug Fixes

  • eslint-plugin: [explicit-member-accessibility] report TSAbstractPropertyDefinition and TSAbstractMethodDefinition properly (#3901) (82016f9)
  • eslint-plugin: update new rules from master (#3840) (d88a6b4)
  • update new rules from master (b34fb7e)
  • eslint-plugin: crash in no-dupe-class-members (v5) (#3813) (4b09644)
  • experimental-utils: fix isSetter's return type (#3975) (d256856)
  • typescript-estree: change source of ExportNamedDeclaration to Literal from Expression (#3763) (dc5a0f5)

Features


Version 5.0.0 of @typescript-eslint/parser was just published.

The version(5.0.0) is not covered by your current version range(^4.6.0).

Release Notes

v5.0.0

5.0.0 (2021-10-11)

Breaking Release Notes

All Packages

  • Support for ESLint v8 (see individual packages for relevant breaking changes).
  • Drop support for Node v10 - required node version is now ^12.22.0 || ^14.17.0 || >=16.0.0.

    • Node v10 was EOL'd in April 2021, and ESLint v8 dropped support for it too.
  • Drop Support for ESLint v5

    • ESLint v5 is now 3 years old - why are you still using it? Upgrade to at least ESLint v6.

ESLint-Plugin

  • Changes to the recommended rule set - see #3746
  • [ban-types] remove object from the default ban list

    • This has been a point of contention for a while - I originally added it because TS currently makes it impossible to narrow the type nicely. However there ultimately isn't a good alternative to this type for many usecases. As such we're removing the default ban. If you want to continue banning it, you can configure the rule to do so.
  • [comma-dangle] align schema with ESLint v8

    • Should be pretty transparent unless you were using an invalid config.
  • [explicit-member-accessibility] now checks abstract members
  • [member-ordering] add support for getters and setters

    • This will likely cause your codebase's sort orders to change if you're using the default config.
  • [no-unused-vars-experimental] rule has been deleted

    • You should instead use @typescript-eslint/no-unused-vars instead! It has had full and awesome support for TypeScript since v4.9.0 - and it doesn't require type information!

Experimental-Utils:

  • Remove SourceCode#getComments API from ESLint types.

    • This API was deprecated in ESLint v4, and its usage will error in ESLint v8.
  • Support ESLint v8:

    • CLIEngine is now conditionally undefined. It was deprecated in v7 and removed in v8. If you're still using it, you should upgrade to the ESLint API.
    • Remove meta.docs.category. ESLint has removed this from their core rules as it wasn't ever very useful and was always poorly done. We have followed suit and removed it from our types and our rules.

TypeScript-ESTree / AST-Spec

  • Change .source of ExportNamedDeclaration, ExportAllDeclaration and ImportDeclaration to StringLiteral and add parse-time errors.

    • This ensures we're aligned with ESTree and producing the correct AST.
  • Remove TSParenthesizedType node.

    • This node was added when this project was first created because the TS-AST includes this node. However it ultimately conveys no actual AST meaning (just like parentheses in non-type code). Babel removed this node earlier this year.
    • We expect rules will continue to "just work". In a lot of cases rules will work better as they no longer need manual checks to "look past" the useless node.
  • Remove legacy option useJSXTextNode.

    • This option was added for compatibility between different ASTs a very long time ago - but all ASTs have converged on using JSXText - so you should be using that too.
  • Align class features AST with ESTree. This aligns with ESLint v8.

    • ClassProperty is now called PropertyDefinition
    • TSAbstractClassProperty is now called TSAbstractPropertyDefinition
  • TSAbstractPropertyDefinition.value is now always null.

    • It never made sense that this was allowed, and TS4.4 has now made this invalid.
  • Add full support for PrivateIdentifier (#private class members)

    • Previously we did not officially support them and emitted an "unstable" AST.
    • This will allow the community to build lint rules specifically targeting #private members.
  • Rename LineAndColumnData to Position (aligns naming with the ESTree spec docs)

Scope-Manager

  • Class properties with values now create a 'class-field-initializer' type scope around their value.

    • This aligns with eslint-scope v6.

Raw Changelog

Bug Fixes

  • eslint-plugin: [explicit-member-accessibility] report TSAbstractPropertyDefinition and TSAbstractMethodDefinition properly (#3901) (82016f9)
  • eslint-plugin: update new rules from master (#3840) (d88a6b4)
  • update new rules from master (b34fb7e)
  • eslint-plugin: crash in no-dupe-class-members (v5) (#3813) (4b09644)
  • experimental-utils: fix isSetter's return type (#3975) (d256856)
  • typescript-estree: change source of ExportNamedDeclaration to Literal from Expression (#3763) (dc5a0f5)

Features


Powered by hothouse 馃悵

kyoto-art_news4discord:
- @typescript-eslint/eslint-plugin: 4.6.0 -> 5.0.0
- @typescript-eslint/parser: 4.6.0 -> 5.0.0
@redpeacock78 redpeacock78 merged commit 99e9a74 into master Oct 12, 2021
@redpeacock78 redpeacock78 deleted the hothouse-20210912032152-f35032bf8c branch October 12, 2021 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for #private class members Remove TSParenthesizedType
1 participant