Skip to content

v2.0.0: Upgrade to TypeScript 5.2, `typescript-eslint` v6; improve types

Choose a tag to compare

@nchevsky nchevsky released this 03 Oct 17:12
· 9 commits to master since this release

⚠️ BREAKING CHANGES

  • Upgrade to TypeScript 5.2, make it an optional peer dependency, and adjust configuration:
    • allowJs: off → on
    • checkJs: off → on
    • emitDeclarationOnly: off → on
    • module: "ESNext" → "NodeNext"
    • moduleResolution: "NodeNext" → 🗑️
    • strictNullChecks: off → on
  • Upgrade peer dependency typescript-eslint to v6 and base the rule set on new presets strict-type-checked and stylistic-type-checked, with the following net changes:
    • Added: …/adjacent-overload-signatures, …/await-thenable, …/ban-ts-comment, …/ban-types, …/no-array-constructor, …/no-confusing-void-expression, …/no-extra-non-null-assertion, …/no-floating-promises, …/no-for-in-array, …/no-implied-eval, …/no-misused-new, …/no-misused-promises, …/no-namespace, …/no-non-null-asserted-optional-chain, …/no-object-constructor, …/no-redundant-type-constituents, …/no-this-alias, …/no-unnecessary-type-assertion, …/no-unnecessary-type-constraint, …/no-unsafe-argument, …/no-unsafe-assignment, …/no-unsafe-call, …/no-unsafe-member-access, …/no-unsafe-return, …/no-useless-empty-export, …/no-var-requires, …/parameter-properties, …/prefer-as-const, …/require-await, …/restrict-plus-operands, …/restrict-template-expressions, …/triple-slash-reference, …/unbound-method.
    • Removed: …/no-duplicate-imports (deprecated), …/no-new-object (deprecated).
  • Rename type Constructor to AbstractConstructor and reintroduce Constructor as non-abstract.

🌎 External changes

  • Turn on TypeScript option allowImportingTsExtensions along with @babel/preset-typescript option rewriteImportExtensions, enabling the use of TypeScript file extensions in imports and exports.
  • Change typescript-eslint option parserOptions.project to true (from "./tsconfig.json") for improved monorepo support.
  • Implement Rollup support for array exports in package.json.
  • Add real typings to Babel, ESLint, and Rollup configurations.

🏠 Internal changes

  • Change all TypeScript exports and imports to .ts file extensions.

🧹 Chores

  • Upgrade dependencies.
  • Clean lint.