Releases: cloudfour/eslint-config
v24.0.0
Breaking Changes
- Changed from a "super plugin" to a flat config file
- Changed package name from
@cloudfour/eslint-plugin
to@cloudfour/eslint-config
Major Changes
- Update
eslint-plugin-jsdoc
fromv46
tov50
- Update
eslint-plugin-n
fromv16
tov17
- Update
eslint-plugin-promise
fromv6
tov7
- Update
eslint-plugin-unicorn
fromv48
tov56
- Update
typescript-eslint
fromv6
tov8
v23.0.0
Major Changes
-
#551
f11e794
Thanks @calebeby! - Improve linting oftype
modifiers on imports.Reconfigured Rules (
recommended
Config)@cloudfour/import/no-duplicates
- "error" + [ + "error", + { + "prefer-inline": true + } + ]
Newly Enabled Rules (
recommended
Config » TS Overrides)
Minor Changes
v22.0.0
Major Changes
-
#487
88ffd72
Thanks @renovate! - Updateeslint-plugin-unicorn
fromv43
tov47
New Rules
@cloudfour/unicorn/no-negated-condition
@cloudfour/unicorn/no-typeof-undefined
@cloudfour/unicorn/no-unnecessary-await
@cloudfour/unicorn/prefer-set-size
@cloudfour/unicorn/switch-case-braces
@cloudfour/unicorn/prefer-blob-reading-methods
Newly Enabled Rules
@cloudfour/unicorn/no-negated-condition
@cloudfour/unicorn/no-typeof-undefined
@cloudfour/unicorn/no-unnecessary-await
@cloudfour/unicorn/prefer-set-size
@cloudfour/unicorn/switch-case-braces
@cloudfour/unicorn/prefer-blob-reading-methods
@cloudfour/unicorn/prefer-event-target
Newly Disabled Rules
-
#497
2b0364a
Thanks @renovate! - Updateeslint-plugin-jsdoc
fromv39
tov46
Reconfigured Rules
The
@cloudfour/jsdoc/tag-lines
rule is now configured to enforce one blank line in JSDoc comments between the description of a function and the@param
/other tags.For example, the blank line after the description is enforced here:
/** * This is the description for the function, the blank line below this is enforced * * @param {string} name A parameter called name */ function someFunction(name) {}
New Rules
@cloudfour/jsdoc/informative-docs
@cloudfour/jsdoc/no-blank-block-descriptions
@cloudfour/jsdoc/no-blank-blocks
Deleted Rules
Newly Enabled Rules
-
#498
ee07640
Thanks @calebeby! - Drop support for Node 14 (now only node 16+ is supported)
v21.1.0
Minor Changes
- #396
eaa4ea8
Thanks @Paul-Hebert! - Revert changes tono-use-before-define
rule since it was more heavy-handed than expected.
v21.0.0
Major Changes
-
#392
a7d5860
Thanks @Paul-Hebert! - Disallow the use of variables before they are defined. This rule was previously enabled forlet
andconst
declarations, and now it is also enabled forfunction
s,class
es, andvar
s. -
#395
ec2c2f3
Thanks @renovate! - Update eslint-plugin-unicorn to v43New Rules
Newly Enabled Rules
@cloudfour/unicorn/prefer-event-target
@cloudfour/unicorn/prefer-logical-operator-over-ternary
@cloudfour/unicorn/prefer-top-level-await
Also, the
prefer-node-protocol
rule has been updated to always apply torequire()
statements. -
#395
ec2c2f3
Thanks @renovate! - UpdateecmaVersion
to 2022 for ESLint parser
v20.0.2
v20.0.1
v20.0.0
Major Changes
-
#380
80af81b
Thanks @calebeby! - Enabled@cloudfour/n/file-extension-in-import
.❌
require('./foo')
→ ✅require('./foo.js')
❌import * as foo from './foo'
→ ✅import * as foo from './foo.js'
If the file that you are importing is a
.ts
file, you must import it as.js
, because of a decision that the TypeScript team made.It is auto-fixable.
-
#378
4545d67
Thanks @calebeby! - Enforce using thenode:
protocol for imports to node built-in modules (prefer-node-protocol
).❌
require('fs')
→ ✅require('node:fs')
❌import * as fs from 'fs'
→ ✅import * as fs from 'node:fs'
The
import
form is supported in node v14.13.1+.
Therequire
form is supported in node v14.18.0+.It is auto-fixable.
-
#381
bee6a36
Thanks @calebeby! - Sort importsNewly Enabled Rules
These rules sort imports into separate categories, with empty lines between the categories, and with the imports within a category sorted alphabetically. The variable bindings within an import statement are also sorted alphabetically.
These rules are auto-fixable, however in some cases manual sorting may be needed. Occasionally, the auto-fix will detach comments from the import statements they refer to.
v19.0.0
Major Changes
-
#364
20c9859
Thanks @renovate! - Update dependencyeslint-plugin-unicorn
tov42
New Rules
@cloudfour/unicorn/no-unreadable-iife
@cloudfour/unicorn/no-useless-switch-case
@cloudfour/unicorn/prefer-modern-math-apis
@cloudfour/unicorn/prefer-native-coercion-functions
Newly Enabled Rules
@cloudfour/unicorn/no-unreadable-iife
@cloudfour/unicorn/no-useless-switch-case
@cloudfour/unicorn/prefer-modern-math-apis
@cloudfour/unicorn/prefer-native-coercion-functions
Reconfigured Rules
@cloudfour/unicorn/template-indent
- "warn" + "error"
-
#366
d156896
Thanks @renovate! - Update dependencyeslint-plugin-jsdoc
tov39
No new rules, but there are some parsing and rule enforcement changes.
Node 12 is no longer supported
Node 18 is supported