miniprogram-template
miniprogram-template copied to clipboard
Update @typescript-eslint/eslint-plugin to the latest version ๐
๐จ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐ ๐๐จ ๐
Find out how to migrate to Snyk at greenkeeper.io
The devDependency @typescript-eslint/eslint-plugin was updated from 2.34.0 to 3.0.0.
This version is not covered by your current version range.
If you donโt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Publisher: jameshenry License: MIT
Release Notes for v3.0.0
This major release has been a long time coming! We've been saving up breaking changes for a while now, waiting for the ESLint v7 release which we knew would deprecate support for node version 8.
Due to our weekly release cadence, this major release mostly contains breaking changes!
Breaking Changes
Dropped support for Node version 8 (#1420)
In line with ESLint v7 - we've also dropped explicit support for node version 8.
This version of node has been end of life since 2019-12-31.
We no longer test against the version, so we provide no guarantees about whether or not future versions of our tooling will work on it.
Dropped support for TypeScript 3.2 (#2004)
Old TS versions cause us maintenance pain as we work on integrating tightly with the TypeScript APIs for performance and stability reasons.
As such we've updated our required TS version range to require a minimum of >=3.3.1.
Each version of TS brings bugfixes and features, but most importantly they bring performance improvements. TS 3.9 is releasing with a host of performance improvements that will improve both your build times, and your lint times - so you should endeavour to upgrade if you can. We cannot provide any guarantees around the performance of old TS versions.
Configs
We've updated all of our configs! We've added new rules, old rules, and removed some stylistic rules.
Both of the recommended and recommended-requiring-typechecking sets now inherit from the eslint-recommended set. We noticed that the majority of the time, users were using the sets in tandem, so this just removes one line of config for everyone.
Check out the linked issues for more information about added/removed rules:
eslint-recommendedconfig (#1273)recommendedconfig (#1423)recommended-requiring-typechecking(#1423)
Rules Changes
ban-typesgot a rework of its default ban list to provide some more sensible defaults and remove fixers that caused users issues. (#848)no-floating-promisesnow has theignoreVoidoption set to true by default. (#2003)no-unnecessary-condition- the
ignoreRHSoption has been removed. The rule will now only check the RHS when it matters (i.e. in boolean contexts). (#1163) - the
checkArrayPredicatesoption has been removed. The rule will now always check array predicate functions. (#1579) - the rule now will report if you do an equality check against
null/undefinedwhen the value is not nullable. (#1659)
- the
prefer-nullish-coalescing- the fixer has been converted to a suggestion fixer always - it was unsafe in most cases.
- removed option
forceSuggestionFixer.
prefer-optional-chain- the fixer has been converted to a suggestion fixer always - it was unsafe in a number of cases.
- removed option
suggestInsteadOfAutofix.
restrict-template-expressionsstrict-boolean-expressionreceived a complete rework. The rule is now more configurable, with smarter defaults and more intuitive logic. (#1515)
Rule Removals
The following deprecated rules have been deleted. Please switch to the listed alternative:
ban-ts-ignore- replaced byban-ts-commentcamelcase- replaced bynaming-conventionclass-name-casing- replaced bynaming-conventiongeneric-type-naming- replaced bynaming-conventioninterface-name-prefix- replaced bynaming-conventionmember-naming- replaced bynaming-conventionno-untyped-public-signatures- replaced byexplicit-module-boundary-types
AST Changes
typescript-estreenow emits aTSEmptyBodyFunctionExpressionwhen it encounters a function expression without a body. Previously this was done inparser(for legacy reasons). This change should only affect users directly consumingtypescript-estree. (#1289)- When a method is marked as optional (
class Foo { name?() {} }) we now mark theMethodDefinition/TSAbstractMethodDefinitionas optional. Previously we marked thekeyof the node asoptional, but this only works if thekeyis anIdentifier, and didn't work in the case of a computedkey(class Foo { ['name']?() {} }). (#1429) - Import expressions (
import('foo')) now conform to the newly released ESTree spec, outputting as anImportExpression. (#1950) - BigInt literals now conform to the newly released ESTree spec, outputting as a
Literalwith a value of typebigint. (#1999)
Parser Services
parserServices are now always emitted from both typescript-estree and parser, regardless of the parserOptions.project configuration. (#716)
This will allow you to consume parts of the TypeScript API that are generated at the file level, like variable usage diagnostics, without requiring full type information is generated for the project.
Part of this change includes a new boolean flag on the output: parserServices.hasFullTypeInformation which is true when parserOptions.project was configured, and false otherwise.
If you were using our getParserServices function from experimental-utils, then this will be handled automatically, and you will not notice any changes. If you built your own function for resolving the parserServices, then you'll have to update accordingly.
ESLint Types (experimental-utils)
The old version of our ESLint types were based on those found in the DefinitelyTyped repo. There was a lot of missing documentation, missing properties, misnamed types.
As part of this release, we've reworked some of the internals to be much closer to the ESLint library itself. (#2023)
As part of this change, we have also added the types for the new ESLint class.
SourceCode.isSpaceBetween has also been marked as optional, because it is only available in ESLint v6+
Non-breaking changes
ESLint v7
We now have full support for ESLint v7 (#1550).
Better handling for TS 3.9's non-null assertion changes (#2036)
TS 3.9 introduced a breaking change for how non-null assertions are handled in optional chains.
Pre-3.9, x?.y!.z means (x?.y).z - i.e. it essentially scrubbed the optionality from the chain
Post-3.9, x?.y!.z means x?.y!.z - i.e. it just asserts that the property y is non-null, not the result of x?.y
Previously x?.y!.z produced MemberExpression > TSNonNullAssertion > OptionalMemberExpression.
Now it produces OptionalMemberExpression > TSNonNullAssertion > OptionalMemberExpression.
Note that both (x?.y)!.z and (x?.y!).z still produce MemberExpression > TSNonNullAssertion > OptionalMemberExpression.
The same applies for call expressions.
The rule no-non-null-asserted-optional-chain was also updated to handle this appropriately. It will no longer error on x?.y!.z, but it will still error on (x?.y)!.z.
Bug Fixes
Commits
The new version differs by 34 commits.
1765a17chore: remove v3 canary Ci step7e39f5bv3.0.03dfc46dfeat: add index files to parser and typescript-estree52b6085feat(eslint-plugin): [prefer-nullish-coalescing][prefer-optional-chain] remove unsafe fixersae82ea4fix(experimental-utils): add back SourceCode.isSpaceBetweenTokensfe59f69fix(eslint-plugin): correct parser peerDep versionf199cbdfix(typescript-estree): remove now defunctImportnode typea35026dchore: provide more granularity in the CI logs (#2024)06869c9feat(experimental-utils): upgrade eslint types for v7 (#2023)208de71feat: upgrade to ESLint v7 (#2022)7ad4d7cfeat: bump minimum required TS version (#2004)264b017feat(eslint-plugin): [restrict-template-expressions] renameallowNullabletoallowNullish(#2006)bfd9b60feat(eslint-plugin): [no-unnecessary-condition] removecheckArrayPredicatesand always check it (#1579)7fa9060feat(eslint-plugin): [no-unnecessary-condition] report when non-nullish is compared tonull/undefined(#1659)643ec24feat(eslint-plugin): [restrict-template-expressions]allowNumber: trueby default (#2005)
There are 34 commits in total.
See the full diff
FAQ and help
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper bot :palm_tree:
๐จ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐ ๐๐จ ๐
Find out how to migrate to Snyk at greenkeeper.io
- The
devDependency@typescript-eslint/eslint-plugin was updated from2.34.0to3.0.1.
Update to this version instead ๐
Release Notes for v3.0.1
3.0.1 (2020-05-25)
Bug Fixes
- eslint-plugin: [naming-convention] handle no options correctly (#2095) (fd7d02b)
- eslint-plugin: [no-throw-literal] handle intersection and union types (#2085) (cae037f)
- eslint-plugin: [unbound-method] fix crash due to missing
Intl(#2090) (f2fa82c) - experimental-utils: export
CLIEngine&ESLint(#2083) (014341b) - typescript-estree: handle
BigIntwith_numeric separator (#2067) (66f1627) - typescript-estree: mark TS 3.8 and 3.9 as "supported" (#2057) (5eedbff), closes #1436 #1436
Commits
The new version differs by 17 commits.
a71b9c9chore: publish v3.0.1fd7d02bfix(eslint-plugin): [naming-convention] handle no options correctly (#2095)cae037ffix(eslint-plugin): [no-throw-literal] handle intersection and union types (#2085)f2fa82cfix(eslint-plugin): [unbound-method] fix crash due to missingIntl(#2090)014341bfix(experimental-utils): exportCLIEngine&ESLint(#2083)893b8dddocs(eslint-plugin): [naming-convention] improve comment text regarding ESLint's camelCase (#2080)1cb1cb5docs(eslint-plugin): [naming-convention] document ignoring quoted properties (#2071)071e5a0docs: various updates based on v3 feedback (#2070)66f1278docs(eslint-plugin): [explicit-module-boundary-types] fix allowedNames config example (#2061)66f1627fix(typescript-estree): handleBigIntwith_numeric separator (#2067)765ec4bdocs: update supported TS version in readme (#2059)5eedbfffix(typescript-estree): mark TS 3.8 and 3.9 as "supported" (#2057)159c225chore: link GH release in changelogs (#2055)729f2a2docs(eslint-plugin): remove mention ofeslint-recommended(#2053)23b4b66docs(eslint-plugin): removeignoreRHSfromno-unnecessary-condition(#2052)
There are 17 commits in total.
See the full diff
๐จ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐ ๐๐จ ๐
Find out how to migrate to Snyk at greenkeeper.io
- The
devDependency@typescript-eslint/eslint-plugin was updated from2.34.0to3.0.2.
๐จ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐ ๐๐จ ๐
Find out how to migrate to Snyk at greenkeeper.io
- The
devDependency@typescript-eslint/eslint-plugin was updated from2.34.0to3.1.0.