v1.4.0
Changelog
Dependencies changes
- Set required
eslint
version to be6.7.0
or greater. - Updated these packages:
babel-eslint
from10.0.2
to10.0.3
.eslint-config-prettier
from6.0.0
to6.10.0
.eslint-plugin-import
from2.18.0
to2.20.0
.eslint-plugin-jest
from22.7.2
to23.6.0
.eslint-plugin-prettier
from3.1.0
to3.1.2
.eslint-plugin-react
from7.14.2
to7.18.0
.eslint-plugin-react-hooks
from1.6.1
to2.3.0
.eslint-plugin-sonarjs
from0.4.0
to0.5.0
.eslint-plugin-unicorn
from9.1.1
to15.0.1
.prettier
from1.18.2
to1.19.1
.
ESLint changes
Best practices
New rules
- Added
default-param-last
aserror
. - Added
grouped-accessor-pairs
aserror
. - Added
no-construtor-return
aserror
. - Added
prefer-regex-literals
aserror
.
Errors
New rules
- Added
no-dupe-else-if
aserror
. - Added
no-import-assign
aserror
. - Added
no-setter-return
aserror
.
Styling
New rules
- Added
prefer-exponentiation-operator
aserror
. - Added
no-ternary
asoff
.
Config: Prettier
Prettier disabled the following rules in their config:
function-call-argument-newline
.unicorn/no-nested-ternary
.
Plugin: Import
Options changes
- Added
'**/__generated__/**'
to devDependencies option fromimport/no-extraneous-dependencies
. - Added
bundleDependencies: false
toimport/no-extraneous-dependencies
. - Added
alphabetize
option (set toorder: asc, caseInsensitive: true
) toimport/order
.
Plugin: Jest
New rules
- Added
jest/no-duplicate-hooks
aserror
. - Added
jest/no-expect-resolves
aserror
. - Added
jest/no-export
aserror
. - Added
jest/no-if
aserror
. - Added
jest/no-standalone-expect
aserror
. - Added
jest/no-try-expect
aserror
. - Added
jest/require-top-level-describe
aserror
. - Added
jest/valid-title
(replacesjest/empty-title
) aserror
. - Added
jest/prefer-hooks-on-top
aserror
. - Added
jest/require-to-throw-message
(replacesjest/require-tothrow-message
) aswarn
.
Removed rules
- Removed
jest/empty-title
(deprecated). - Removed
jest/require-tothrow-message
(deprecated).
Plugin: React Hooks
- Moved hooks rules from
plugins/react
toplugins/react-hooks
.- Added
react-hooks/rules-of-hooks
aserror
.
- Added
Changed rules
- Disabled
react-hooks/exhaustive-deps
.
Plugin: React
New rules
- Added
react/function-component-definition
aserror
. - Added
react/no-adjacent-inline-elements
aserror
. - Added
react/jsx-no-useless-fragment
aserror
. - Added
react/jsx-no-script-url
aserror
.
Changed rules
- Disabled
react/jsx-handler-names
.
Options changes
- Added
allowReferrer: false
toreact/jsx-no-target-blank
. - Added
static-variables
to the first index of theorder
option fromreact/sort-comp
.
Plugin: SonarJS
New rules
- Added
sonarjs/no-collection-size-mischeck
aserror
. - Added
sonarjs/no-redundant-jump
aserror
. - Added
sonarjs/no-same-line-conditional
aserror
. - Added
sonarjs/no-unused-collection
aserror
.
Changed rules
- Disabled
sonarjs/no-identical-functions
. - Disabled
sonarjs/no-duplicate-string
.
Plugin: Unicorn
New rules
- Added
unicorn/consistent-function-scoping
aserror
. - Added
unicorn/prefer-modern-dom-apis
aserror
. - Added
unicorn/prefer-negative-index
aserror
. - Added
unicorn/reflect-apply
aserror
. - Added
unicorn/string-slice
aserror
. - Added
unicorn/trim-start-end
aserror
. - Added
unicorn/expiring-todo-comments
asoff
. - Added
unicorn/prefer-dataset
asoff
.