All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Disabled
@typescript-eslint/require-await
, which caused some builds to fail inconsistently and doesn't seem particularly valuable
- Downgraded eslint-plugin-import to remove a regression behaviour with parent and sibling imports. #TINY-9845
- Upgraded ESLint dependencies. #TINY-9845
- Some rules did not work correctly on Windows.
- Enabled the
@typescript-eslint/func-call-spacing
,computed-property-spacing
,no-whitespace-before-property
,rest-spread-spacing
,semi-spacing
andswitch-colon-spacing
spacing rules by default.
- Swapped to the
@typescript-eslint/brace-style
,@typescript-eslint/object-curly-spacing
and@typescript-eslint/space-before-blocks
rule variants to detect issues in interfaces and types.
- Enabled the
@typescript-eslint/naming-convention
rule so that it enforces pascal case type names. - Added new
@tinymce/prefer-mcagar-tiny-assertions
rule to detect places whereTinyAssertions.assertContent
andTinyAssertions.assertRawContent
should be used in tests. - Added new
@tinymce/prefer-mcagar-tiny-dom
rule to detect places whereTinyDom
should be used in tests. - Added new
@tinymce/no-direct-editor-events
rule to ensure events are only dispatched insideapi/Events.ts
. - Added new
@tinymce/no-direct-editor-options
rule to ensure options are only registered and accessed insideapi/Options.ts
. - Added new
@tinymce/no-publicapi-module-imports
rule to detect invalid imports fromPublicApi.ts
.
- Fixed incorrect
eslint-plugin-import
dependency.
- Upgraded to require ESLint 8.x.
- The
@tinymce/no-unimported-promise
is no longer enabled by default.
- The
@tinymce/prefer-fun
rule now supports configuring which rules should be checked.
- The
@tinymce/no-main-module-imports
rule now detects Main imports via aliases from outside thesrc/main/
directory. - The
@tinymce/prefer-fun
rule now detects whereFun.constant
andFun.identity
should be used.
- The editor configuration now enforces newlines between import groups.
- Enabled the
template-curly-spacing
rule by default. - Added the
mocha
plugin to detect duplicate test names and exclusive/only tests.
- Enabled the
brace-style
rule to ensure code cannot be on the same line as if/else statements.
Fun.constant(false)
was not detected as syntax that should be replaced byFun.never
.
- Added new
@tinymce/prefer-fun
rule to detect places whereFun.noop
,Fun.never
andFun.always
should be used. - Added a new
editor
config that extends the standard rules to provide more editor specific rules.
- Enabled the following additional rules by default:
@typescript-eslint/await-thenable
@typescript-eslint/ban-ts-comment
@typescript-eslint/consistent-type-assertions
@typescript-eslint/consistent-type-definitions
@typescript-eslint/no-for-in-array
@typescript-eslint/no-implied-eval
@typescript-eslint/no-namespace
@typescript-eslint/no-parameter-properties
@typescript-eslint/switch-exhaustiveness-check
@typescript-eslint/type-annotation-spacing
arrow-spacing
dot-location
key-spacing
max-len
no-fallthrough
no-nested-ternary
prefer-arrow/prefer-arrow-functions
space-before-blocks
- Some dom-globals weren't flagged as invalid when using the
@tinymce/no-implicit-dom-globals
rule.
- Updated dependencies to support new tuple syntax in typescript 4.
- Added new
@tinymce/no-implicit-dom-globals
rule to prevent dom global variables being used implicitly.
- Added the
@typescript-eslint/keyword-spacing
,comma-spacing
,no-multi-spaces
,space-infix-ops
andspace-unary-ops
rules to the default ruleset.
- Fixed the
@tinymce/no-unimported-promise
incorrectly detecting local variables. - Fixed the
@tinymce/no-enums-in-export-specifier
detecting built-in object properties.
@typescript-eslint/no-unused-vars
enabled as a warning with ability to use leading underscore to ignore@typescript-eslint/no-empty-interface
turned off as empty interfaces are frequently used as placeholders@typescript-eslint/prefer-includes
turned off as it causes IE incompatibility@typescript-eslint/prefer-string-starts-ends-with
turned off as it causes IE incompatibility
- Setup project
- Imported all rules from
tslint-rules