Releases: cloudfour/eslint-config
v18.0.0
Major Changes
-
#293
c24a70e
Thanks @renovate! - Updateeslint-plugin-unicorn
tov35
New Rules
@cloudfour/unicorn/no-useless-length-check
@cloudfour/unicorn/no-useless-spread
@cloudfour/unicorn/prefer-object-from-entries
Newly Enabled Rules
-
#306
62e271d
Thanks @renovate! - Updateeslint-plugin-unicorn
to v37New Rules (all are enabled by default)
-
#339
ce3d6ab
Thanks @renovate! - Updateeslint-plugin-unicorn
tov41
New Rules
@cloudfour/unicorn/no-await-expression-member
@cloudfour/unicorn/no-empty-file
@cloudfour/unicorn/no-thenable
@cloudfour/unicorn/no-useless-promise-resolve-reject
@cloudfour/unicorn/prefer-code-point
@cloudfour/unicorn/prefer-export-from
@cloudfour/unicorn/prefer-json-parse-buffer
@cloudfour/unicorn/relative-url-style
@cloudfour/unicorn/text-encoding-identifier-case
Newly Enabled Rules
@cloudfour/unicorn/no-await-expression-member
@cloudfour/unicorn/no-empty-file
@cloudfour/unicorn/no-thenable
@cloudfour/unicorn/no-useless-promise-resolve-reject
@cloudfour/unicorn/prefer-code-point
@cloudfour/unicorn/prefer-export-from
@cloudfour/unicorn/relative-url-style
@cloudfour/unicorn/text-encoding-identifier-case
Newly Disabled Rules
-
#344
db15314
Thanks @calebeby! - Require eslint^8.0.0
. Migration guide for eslint v8. -
#351
bb7da9e
Thanks @renovate! - Updateeslint-plugin-jsdoc
tov38
-
#307
739814c
Thanks @renovate! - Updates thetypescript-eslint
packages to 5.0.0.Newly Enabled Rules
@cloudfour/typescript-eslint/no-confusing-void-expression
@cloudfour/typescript-eslint/no-meaningless-void-operator
@cloudfour/typescript-eslint/no-unnecessary-type-constraint
New Rules (not enabled by default)
@cloudfour/typescript-eslint/comma-dangle
@cloudfour/typescript-eslint/consistent-indexed-object-style
@cloudfour/typescript-eslint/no-confusing-void-expression
@cloudfour/typescript-eslint/no-duplicate-imports
@cloudfour/typescript-eslint/no-loop-func
@cloudfour/typescript-eslint/no-meaningless-void-operator
@cloudfour/typescript-eslint/no-non-null-asserted-nullish-coalescing
@cloudfour/typescript-eslint/no-restricted-imports
@cloudfour/typescript-eslint/no-unnecessary-type-constraint
@cloudfour/typescript-eslint/no-unsafe-argument
@cloudfour/typescript-eslint/non-nullable-type-assertion-style
@cloudfour/typescript-eslint/object-curly-spacing
@cloudfour/typescript-eslint/padding-line-between-statements
@cloudfour/typescript-eslint/prefer-return-this-type
@cloudfour/typescript-eslint/sort-type-union-intersection-members
- [
@cloudfour/typescript-eslint/space-infix-ops
](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs...
v17.1.0
v17.0.1
v17.0.0
Major Changes
-
bbde55f
Thanks @calebeby! - Update eslint-plugin-jsdoc to v35New rules, enabled by default:
-
#252
f88d3f6
Thanks @renovate! - Updateeslint-config-xo
tov0.36.0
- Add more deprecated Node.js modules to
no-restricted-imports
- Remove unnecessary
no-restricted-syntax
rule - Enable
prefer-arrow-callback
- Enable
prefer-numeric-literals
- Add more deprecated Node.js modules to
-
#279
4728476
Thanks @renovate! - Updateeslint-plugin-unicorn
tov34
New Rules
@cloudfour/unicorn/no-array-method-this-argument
@cloudfour/unicorn/prefer-at
@cloudfour/unicorn/prefer-object-has-own
@cloudfour/unicorn/prefer-prototype-methods
@cloudfour/unicorn/prefer-top-level-await
@cloudfour/unicorn/require-array-join-separator
@cloudfour/unicorn/require-number-to-fixed-digits-argument
@cloudfour/unicorn/require-post-message-target-origin
Newly Enabled Rules
-
#274
186580d
Thanks @renovate! - Updateeslint-config-xo
tov0.37.0
Newly Enabled Rules
-
#262
cd2038f
Thanks @renovate! - Updateeslint-plugin-unicorn
to v32- New rule:
@cloudfour/unicorn/no-document-cookie
(enabled by default) - Enable rule:
@cloudfour/unicorn/numeric-separators-style
- Enable rule:
@cloudfour/unicorn/prefer-array-flat
- Enable rule:
@cloudfour/unicorn/prefer-array-flat-map
- New rule:
-
#256
ad9f8bd
Thanks @renovate! - Updateeslint-plugin-unicorn
to v31- Enabled new rule
@cloudfour/unicorn/prefer-node-protocol
- Enabled new rule
Minor Changes
v16.0.0
Major Changes
-
#206
4e2b9fb
Thanks @spaceninja! - Update dependencyeslint-config-prettier
to v7- Changed: At least ESLint 7.0.0 is now required.
-
#176
404c42d
Thanks @renovate! - Updateeslint-plugin-unicorn
to23.0.0
- New rule:
unicorn/prefer-math-trunc
(enabled by default) - New rule:
unicorn/prefer-ternary
(enabled by default) - New rule:
numeric-separators-style
(not enabled by default yet)
- New rule:
-
#187
a1f68c2
Thanks @spaceninja! - Upgraded to v15 of eslint-config-standard, which adds several rules:- Require indentation for values of ternary expressions (indent)
- Enforce newlines between operands of ternary expressions if the expression spans multiple lines (multiline-ternary)
- Disallow loops with a body that allows only one iteration (no-unreachable-loop)
- Disallow useless backreferences in regular expressions (no-useless-backreference)
- Enforce default clauses in switch statements to be last (default-case-last)
- Disallow Number Literals That Lose Precision (no-loss-of-precision)
-
#242
58c7204
Thanks @renovate! - Updateeslint-plugin-unicorn
tov29
New rules:
@cloudfour/unicorn/no-array-for-each
@cloudfour/unicorn/no-array-push-push
@cloudfour/unicorn/no-this-assignment
@cloudfour/unicorn/no-lonely-if
@cloudfour/unicorn/empty-brace-spaces
(not enabled by default)@cloudfour/unicorn/prefer-date-now
@cloudfour/unicorn/no-new-array
@cloudfour/unicorn/prefer-array-index-of
@cloudfour/unicorn/prefer-regexp-test
@cloudfour/unicorn/consistent-destructuring
(not enabled by default)@cloudfour/unicorn/prefer-array-some
@cloudfour/unicorn/prefer-default-parameters
@cloudfour/unicorn/no-static-only-class
@cloudfour/unicorn/prefer-array-flat
(not enabled by default)
Disabled rules:
@cloudfour/unicorn/import-index
(due to Node ESM resolution implementation)
Rename rules:
@cloudfour/unicorn/no-fn-reference-in-iterator
→@cloudfour/unicorn/no-array-callback-reference
@cloudfour/unicorn/no-array-instanceof
→@cloudfour/unicorn/no-instanceof-array
@cloudfour/unicorn/no-reduce
→@cloudfour/unicorn/no-array-reduce
@cloudfour/unicorn/prefer-dataset
→@cloudfour/unicorn/prefer-dom-node-dataset
@cloudfour/unicorn/prefer-flat-map
→@cloudfour/unicorn/prefer-array-flat-map
@cloudfour/unicorn/prefer-replace-all
→@cloudfour/unicorn/prefer-string-replace-all
@cloudfour/unicorn/prefer-starts-ends-with
→@cloudfour/unicorn/prefer-string-starts-ends-with
@cloudfour/unicorn/prefer-text-content
→@cloudfour/unicorn/prefer-dom-node-text-content
@cloudfour/unicorn/prefer-trim-start-end
→@cloudfour/unicorn/prefer-string-trim-start-end
@cloudfour/unicorn/prefer-event-key
→@cloudfour/unicorn/prefer-keyboard-event-key
@cloudfour/unicorn/prefer-node-append
→@cloudfour/unicorn/prefer-dom-node-append
@cloudfour/unicorn/prefer-node-remove
→@cloudfour/unicorn/prefer-dom-node-remove
There were many improvements/changes to individual rules, listed here
-
#191
7f732b6
Thanks @renovate! - Updateeslint-config-standard
to16.0.1
- Remove
eslint-plugin-standard
since all of the rules from it now live in other plugins camelcase
rule now allows variables starting withUNSAFE_
(from react) and known globalsno-unused-vars
now ignores unused caught errors (unicorn/prefer-optional-catch-binding
handles this use case)prefer-regex-literals
: EnableddisallowRedundantWrapping
optionarray-callback-return
: ChangeallowImplicit
tofalse
.use-isnan
: ChangeenforceForIndexOf
totrue
.
- Remove
v15.0.1
v15.0.0
Major Changes
-
2d8f332
#171 Thanks @calebeby! - Add@cloudfour/prefer-early-return
rule (enabled by default)This rule suggests to change code like this:
function a() { if (_) { a(); b(); c(); } }
into:
function a() { if (!_) return; a(); b(); c(); }
Minor Changes
-
f4e2715
#164 Thanks @renovate! - Updateeslint-plugin-unicorn
to v22The new
unicorn/import-style
rule is disabled by default, so this is not a breaking change.
v14.0.0
Major Changes
-
43b7918
#155 Thanks @renovate! - Update typescript-eslint to v4- Require
@ts-expect-error
comments to have a description explaining why - New scope analyzer. This is mostly bugfixes, but it is possible that it could cause rules to (correctly) trigger on code that they didn't before.
- Enabled the new
@typescript-eslint/consistent-type-imports
rule, which will auto-fix type imports to use the newimport type
syntax - Enabled
@typescript-eslint/no-unnecessary-condition
and@typescript-eslint/no-unnecessary-boolean-literal-compare
. If either of these rules trigger on your code, then that means that either your types are incorrect (likely missing| null
or| undefined
), or the condition is not necessary (meaning it either always runs or never runs).
- Require
Minor Changes
v13.0.0
Major Changes
-
5943663
#137 Thanks @calebeby! - Remove rule: @cloudfour/no-param-reassignThis change is breaking if you have
// eslint-disable-next-line @cloudfour/no-param-reassign
in your code, or if you are manually enabling/configuring this rule. In either case, the migration path is to remove the rule configuration -
3112bb7
#136 Thanks @calebeby! - Add support for linting TypeScript filesIf you have .ts or .tsx files, ESLint should automatically start linting them once you update.
If typescript-eslint is unable to automatically infer your
tsconfig.json
location, you may need to manually configure that
v12.0.0
Major/Breaking Changes
- Update dependency
eslint-plugin-unicorn
to v21
Minor Changes
- Update dependency
eslint
to v7.5.0 - Update dependency
eslint-config-xo
to v0.32.1 - Update dependency
eslint-formatter-pretty
to v4 - Update dependency
eslint-plugin-jsdoc
to v30 - Update dependency
kleur
to v4.0.2 - Update
jest
monorepo to v26.1.0