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-pluginto@cloudfour/eslint-config
Major Changes
- Update
eslint-plugin-jsdocfromv46tov50 - Update
eslint-plugin-nfromv16tov17 - Update
eslint-plugin-promisefromv6tov7 - Update
eslint-plugin-unicornfromv48tov56 - Update
typescript-eslintfromv6tov8
v23.0.0
Major Changes
-
#551
f11e794Thanks @calebeby! - Improve linting oftypemodifiers on imports.Reconfigured Rules (
recommendedConfig)@cloudfour/import/no-duplicates- "error" + [ + "error", + { + "prefer-inline": true + } + ]
Newly Enabled Rules (
recommendedConfig » TS Overrides)
Minor Changes
v22.0.0
Major Changes
-
#487
88ffd72Thanks @renovate! - Updateeslint-plugin-unicornfromv43tov47New 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
2b0364aThanks @renovate! - Updateeslint-plugin-jsdocfromv39tov46Reconfigured Rules
The
@cloudfour/jsdoc/tag-linesrule 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
ee07640Thanks @calebeby! - Drop support for Node 14 (now only node 16+ is supported)
v21.1.0
Minor Changes
- #396
eaa4ea8Thanks @Paul-Hebert! - Revert changes tono-use-before-definerule since it was more heavy-handed than expected.
v21.0.0
Major Changes
-
#392
a7d5860Thanks @Paul-Hebert! - Disallow the use of variables before they are defined. This rule was previously enabled forletandconstdeclarations, and now it is also enabled forfunctions,classes, andvars. -
#395
ec2c2f3Thanks @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-protocolrule has been updated to always apply torequire()statements. -
#395
ec2c2f3Thanks @renovate! - UpdateecmaVersionto 2022 for ESLint parser
v20.0.2
v20.0.1
v20.0.0
Major Changes
-
#380
80af81bThanks @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
.tsfile, you must import it as.js, because of a decision that the TypeScript team made.It is auto-fixable.
-
#378
4545d67Thanks @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
importform is supported in node v14.13.1+.
Therequireform is supported in node v14.18.0+.It is auto-fixable.
-
#381
bee6a36Thanks @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
20c9859Thanks @renovate! - Update dependencyeslint-plugin-unicorntov42New 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
d156896Thanks @renovate! - Update dependencyeslint-plugin-jsdoctov39No new rules, but there are some parsing and rule enforcement changes.
Node 12 is no longer supported
Node 18 is supported