The following is a curated list of changes in the Enact eslint config:
- Updated the minimum version of Node to
18.18.0
. - Replaced deprecated rules with
@stylistic/js
rules.
- Updated dependencies.
- Added
@rushstack/eslint-patch
to support eslint shareable config.
- Removed deprecated rule
testing-library/no-wait-for-empty-callback
. - Renamed
testing-library
rules for Jest unit tests validation:testing-library/await-async-query
renamed totesting-library/await-async-queries
testing-library/no-await-sync-query
renamed totesting-library/no-await-sync-queries
testing-library/no-render-in-setup
renamed totesting-library/no-render-in-lifecycle
- Updated
@typescript-eslint/eslint-plugin
and@typescript-eslint/parser
version to^6.1.0
and the minimum version of Node to^16.0.0
.
- Fixed support for
ENACT_PACK_NO_ANIMATION
global
- Updated all dependencies to the latest.
- Removed
jest/no-jest-import
rule. - Updated
eslint-plugin-react
version to^7.32.2
.
- Updated dependencies.
- Fixed
eslint-plugin-react
version to7.31.11
temporarily. - Replaced
babel-preset-react-app
withbabel-preset-enact
to use babel config for Enact. - Fixed
eslint-plugin-jest
version to26.x
to fix unexpected lint errors.
- No significant changes.
- Updated the
lockfileVersion
of npm-shrinkwrap file to v2.
- Replaced deprecated
babel-eslint-plugin
with@babel/eslint-plugin
and related rules. - Replaced deprecated
no-native-reassign
rule withno-global-assign
. - Replaced deprecated
no-negated-in-lhs
rule withno-unsafe-negation
. - Removed
babel/quotes
rule. - Updated glob pattern for searching test files to compatible with windows.
- Added
eslint-plugin-jest
dependency. - Added
jest
andtesting-library
rules for Jest unit tests validation:jest/no-conditional-expect
warnjest/no-identical-title
warnjest/no-jest-import
warnjest/valid-describe-callback
warnjest/valid-expect
warnjest/valid-expect-in-promise
warnjest/valid-title
warntesting-library/no-container
warntesting-library/no-debugging-utils
warntesting-library/no-promise-in-fire-event
warntesting-library/no-render-in-setup
warntesting-library/no-unnecessary-act
warntesting-library/no-wait-for-multiple-assertions
warntesting-library/no-wait-for-side-effects
warntesting-library/prefer-find-by
warntesting-library/prefer-presence-queries
warntesting-library/prefer-query-by-disappearance
warntesting-library/prefer-screen-queries
errortesting-library/render-result-naming-convention
warn
- Updated all dependencies including ESLint 8.
- Replaced deprecated
babel-eslint
with@babel/eslint-parser
.
- Fixed
@typescript-eslint
peerDependency to support4.x
version.
- Updated dependencies.
- Added
eslint-plugin-testing-library
as a peerDependency.
- Added
testing-library
rules for Jest unit tests validation:testing-library/await-async-query
errortesting-library/await-async-utils
errortesting-library/no-await-sync-query
warningtesting-library/no-dom-import
[error, react]testing-library/no-wait-for-empty-callback
errortesting-library/no-wait-for-snapshot
error
- Fixed the glob patterns for test files.
- Removed deprecated
jsx-a11y/accessible-emoji
rule. - Updated React version to 17 and
@typescript-eslint
related modules to4.x
. - Turned
react/jsx-uses-react
andreact/react-in-jsx-scope
off to support the new JSX transform with React 17.
- All dependencies have been updated and 2.0.0 of this config package is now designed for ESLint 6, 7 and later.
- Added
jsx-a11y
rules for base-level accessibility validation:jsx-a11y/accessible-emoji
warningjsx-a11y/alt-text
warningjsx-a11y/anchor-has-content
warningjsx-a11y/anchor-is-valid
warningjsx-a11y/aria-activedescendant-has-tabindex
warningjsx-a11y/aria-props
warningjsx-a11y/aria-proptypes
warningjsx-a11y/aria-role
warningjsx-a11y/aria-unsupported-elements
warningjsx-a11y/heading-has-content
warningjsx-a11y/iframe-has-title
warningjsx-a11y/img-redundant-alt
warningjsx-a11y/no-access-key
warningjsx-a11y/no-distracting-elements
warningjsx-a11y/no-redundant-roles
warningjsx-a11y/role-has-required-aria-props
warningjsx-a11y/role-supports-aria-props
warningjsx-a11y/scope
warning
- Added override sections for Jest unit tests and WDIO ui/screenshot tests, with appropriate environment setup and
react/jsx-no-bind
disabled for testing convenience. - Added optional
@typescript-eslint
rules for Typescript filetype validation (disabling built-in equivalent rules as needed):@typescript-eslint/consistent-type-assertions
warning@typescript-eslint/no-array-constructor
warning@typescript-eslint/no-use-before-define
warning@typescript-eslint/no-unused-expressions
error@typescript-eslint/no-unused-vars
warning@typescript-eslint/no-useless-constructor
warning
- Changed from the built-in
new-cap
andno-unused-expressions
rules to thebabel/*
equivalents for greater ECMAScript compatibility. - Changed React version setting from
15.0
todetect
to auto-detect the correct value. - Updated
react/forbid-foreign-prop-types
to a warning, as a safety forbabel-plugin-transform-react-remove-prop-types
tooling support. - Strict: Added optional
@typescript-eslint
rules for Typescript filetype validation (disabling built-in equivalent rules as needed):@typescript-eslint/no-array-constructor
error@typescript-eslint/no-use-before-define
error
- Strict: Changed from the built-in
quotes
andsemi
rules to thebabel/*
equivalents for greater ECMAScript compatibility. - Strict: Changed
max-nested-callbacks
andenact/prop-types
off for test files, as they are not applicable for those files. - Strict: Removed
jest/no-focused-tests
and replaced it with an equivalentno-restricted-properties
rule fordescribe.only
,test.only
andit.only
, applied exclusively to test files.
- Updated ECMAScript support to ES2018
- Updated ESLint Enact plugin peerDependency to support version
0.2.0
- Added
react-hooks/exhaustive-deps
warning - Added
react-hooks/rules-of-hooks
error
- Strict: Added
jest/no-focused-tests
error
- Updated
camelcase
rule to allow for^UNSAFE_
react lifecycle methods - Strict: Updated
camelcase
rule to allow for^UNSAFE_
react lifecycle methods
- Added support for
jest
globals and removedmocha
globals.
- Fixed support for
process
global
- Added
react/no-access-state-in-setstate
warning - Strict: Added
react/jsx-props-no-multi-spaces
warning - Strict: Added
react/forbid-foreign-prop-types
warning - Strict: Added
react/no-this-in-sfc
warning - Strict: Added
react/jsx-sort-default-props
warning - Strict: Added
react/no-access-state-in-setstate
warning
- Updated copyright for 2018
- Update github references for new repo location
- Default: Allow nested ternary (still warning in strict)
- Strict: Added
no-useless-escape
warning - Strict: Added
react/default-props-match-prop-types
warning - Strict: Optimized indentation rules
- Removed deprecated
react/jsx-space-before-closing
rule
- Added
enact/no-module-exports-import
rule
- Strict: Added
react/void-dom-elements-no-children
- Default: Disabled
no-spaced-func
andno-undefined
warnings
- Basic documentation added
- Replaced deprecated
babel/array-bracket-spacing
witharray-bracket-spacing
- Strict: Added
react/jsx-tag-spacing
to enforce proper jsx tag spacing - Strict: Added
react/sort-comp
to enforce order of component methods - Strict: Added
jsx-quotes
to enforce double quotes in jsx
- Strict: Disabled
valid-jsdoc
warning as it was causing more troubles than it was solving
- Initial release with default and strict mode