TypeScript Rewrite
- Rework the project structure
- Switch to ESM modules & TypeScript
- Switch from the
bin/directory to using commands insidepackage.json - Bundle the configuration into a single file
- Replace
jestwithvitest
- Rework testing strategy
- All plugins are now checked in the same test suite
- Test are now checked in the following aspects:
- Whether they are defined
- Whether the rule has a valid configuration according to the rule schema
- Whether it is not deprecated
- A rule can be manually marked as skipped if it is deprecated or has a broken schema
- The list of skipped rules is available inside
tests/utils/skipped.ts
- The list of skipped rules is available inside
- The linting stage now works as a test as well
- Some rules can pass as properly defined according to their schema, but will fail once loaded by ESLint due to malformed schema.
- Actually running the built configuration ensures it is working correctly.
- Rule changes:
- Added:
logical-assignment-operators: ['error', 'never']no-constant-binary-expression: 'error'no-empty-static-block: 'error'no-new-native-nonconstructor: 'error'no-object-constructor: 'error'import/no-empty-named-blocks: 'error'import/consistent-type-specifier-style: ['error', prefer-top-level']@typescript-eslint/block-spacing: ['error', 'never']@typescript-eslint/class-methods-use-this: 'off'@typescript-eslint/consistent-generic-constructors: ['error', 'constructor']@typescript-eslint/default-param-last: 'error'@typescript-eslint/key-spacing: ['error', {beforeColon: false, afterColon: true, mode: 'strict'}]@typescript-eslint/lines-around-comment: 'off'@typescript-eslint/no-duplicate-enum-values: 'error'@typescript-eslint/no-duplicate-type-constituents: 'error'@typescript-eslint/no-import-type-side-effects: 'off'@typescript-eslint/no-mixed-enums: 'error'@typescript-eslint/no-unsafe-declaration-merging: 'error'@typescript-eslint/no-unsafe-enum-comparison: 'error'@typescript-eslint/no-unsafe-unary-minus: 'error'@typescript-eslint/parameter-properties: 'error'@typescript-eslint/prefer-destructuring: ['error', {object: true, array: false}, {enforceForRenamedProperties: false, enforceForDeclarationWithTypeAnnotation: false}]@typescript-eslint/sort-type-constituents: ['error', {checkIntersections: true, checkUnions: true, groupOrder: ['conditional', 'function', 'import', 'import', 'intersection', 'keyword', 'literal', 'named', 'nullish', 'object', 'operator', 'tuple', 'union']]
- Modified:
-
default-param-last: 'off'- turned off in favor of the@typescript-eslintrule -
key-spacing: 'off'- turned off in favor of the@typescript-eslintrule -
no-shadow: 'off'- turned off in favor of the@typescript-eslintrule -
import/first:- extended to full configuration -
import/no-relative-packages-['off']=>'off' @typescript-eslint/default-param-last: 'error'-
@typescript-eslint/member-ordering- removedprivate-abstract-fieldas it was removed from the plugin -
@typscript-eslint/prefer-nullish-coalescing- removedforceSuggestionFixeroption as it was removed from the plugin -
@typescript-eslint/prefer-optional-chain- made the options more verbose -
@typescript-eslint/restrict-plus-operands- removedcheckCompoundAssignmentsoption as it was removed from the plugin -
@typescript-eslint/semi:- extended to full configuration -
@typescript-eslint/switch-exhaustiveness-check:- extended to full configuration -
@typescript-eslint/unified-signatures:- extended to full configuration
-
- Removed
-
@typescript-eslint/no-duplicate-importsdeleted from the plugin, switched to the native rule -
@typescript-eslint/no-implicit-any-catchdeleted from the plugin -
@typescript-eslint/no-type-aliasdeprecated by the plugin -
@typescript-eslint/sort-type-union-intersection-membersdeleted from the plugin -
import/imports-first- deprecated by the plugin
-
- Added: