- Disable a few stylistic rules that aren't currently covered by
eslint-cofig-prettier.
- Update minimum Node version to
v22
- Update
eslint-config-prettiertov10 - Update
eslint-plugin-jsdoctov62 - Update
eslint-plugin-unicorntov63
- Changed from a "super plugin" to a flat config file
- Changed package name from
@cloudfour/eslint-pluginto@cloudfour/eslint-config
- Update
eslint-plugin-jsdocfromv46tov50 - Update
eslint-plugin-nfromv16tov17 - Update
eslint-plugin-promisefromv6tov7 - Update
eslint-plugin-unicornfromv48tov56 - Update
typescript-eslintfromv6tov8
-
#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)
- #551
f11e794Thanks @calebeby! - Re-exportdisable-type-checkedconfig from@typescript-eslint/eslint-plugin
-
#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)
- #396
eaa4ea8Thanks @Paul-Hebert! - Revert changes tono-use-before-definerule since it was more heavy-handed than expected.
- #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.
-
46db2ecThanks @calebeby! - Pin eslint-plugin-n to 15.2.115.2.2 has a regression and inserts the wrong file extensions.
-
#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.
-
#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
-
#293
c24a70eThanks @renovate! - Updateeslint-plugin-unicorntov35New Rules
@cloudfour/unicorn/no-useless-length-check@cloudfour/unicorn/no-useless-spread@cloudfour/unicorn/prefer-object-from-entries
Newly Enabled Rules
-
#306
62e271dThanks @renovate! - Updateeslint-plugin-unicornto v37New Rules (all are enabled by default)
-
#339
ce3d6abThanks @renovate! - Updateeslint-plugin-unicorntov41New 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
db15314Thanks @calebeby! - Require eslint^8.0.0. Migration guide for eslint v8.
-
#307
739814cThanks @renovate! - Updates thetypescript-eslintpackages 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
Deleted Rules
-
#290
eb96b8cThanks @renovate! - Updateeslint-plugin-jsdoctov36New Rules
@cloudfour/jsdoc/match-name(not enabled by default)
- #252
f88d3f6Thanks @renovate! - Updateeslint-config-xotov0.36.0- Add more deprecated Node.js modules to
no-restricted-imports - Remove unnecessary
no-restricted-syntaxrule - Enable
prefer-arrow-callback - Enable
prefer-numeric-literals
- Add more deprecated Node.js modules to
-
#279
4728476Thanks @renovate! - Updateeslint-plugin-unicorntov34New 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
- #262
cd2038fThanks @renovate! - Updateeslint-plugin-unicornto 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
ad9f8bdThanks @renovate! - Updateeslint-plugin-unicornto v31- Enabled new rule
@cloudfour/unicorn/prefer-node-protocol
- Enabled new rule
-
#280
ed92e21Thanks @calebeby! - Disablepadding-line-between-statementsWe decided that since devs can use blank lines to create logical groupings in code, it is best not to have ESLint enforce adding newlines
- #206
4e2b9fbThanks @spaceninja! - Update dependencyeslint-config-prettierto v7- Changed: At least ESLint 7.0.0 is now required.
- #176
404c42dThanks @renovate! - Updateeslint-plugin-unicornto23.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
a1f68c2Thanks @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
58c7204Thanks @renovate! - Updateeslint-plugin-unicorntov29New 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
7f732b6Thanks @renovate! - Updateeslint-config-standardto16.0.1- Remove
eslint-plugin-standardsince all of the rules from it now live in other plugins camelcaserule now allows variables starting withUNSAFE_(from react) and known globalsno-unused-varsnow ignores unused caught errors (unicorn/prefer-optional-catch-bindinghandles this use case)prefer-regex-literals: EnableddisallowRedundantWrappingoptionarray-callback-return: ChangeallowImplicittofalse.use-isnan: ChangeenforceForIndexOftotrue.
- Remove
-
2d8f332#171 Thanks @calebeby! - Add@cloudfour/prefer-early-returnrule (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(); }
-
f4e2715#164 Thanks @renovate! - Updateeslint-plugin-unicornto v22The new
unicorn/import-stylerule is disabled by default, so this is not a breaking change.
43b7918#155 Thanks @renovate! - Update typescript-eslint to v4- Require
@ts-expect-errorcomments 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-importsrule, which will auto-fix type imports to use the newimport typesyntax - Enabled
@typescript-eslint/no-unnecessary-conditionand@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| nullor| undefined), or the condition is not necessary (meaning it either always runs or never runs).
- Require
1c5f202#160 Thanks @calebeby! - Disablenode/no-missing-*rules for TS, so that it doesn't error for importing*.tsfiles
-
5943663#137 Thanks @calebeby! - Remove rule: @cloudfour/no-param-reassignThis change is breaking if you have
// eslint-disable-next-line @cloudfour/no-param-reassignin 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.jsonlocation, you may need to manually configure that
- Update dependency
eslint-plugin-unicornto v21
- Update dependency
eslintto v7.5.0 - Update dependency
eslint-config-xoto v0.32.1 - Update dependency
eslint-formatter-prettyto v4 - Update dependency
eslint-plugin-jsdocto v30 - Update dependency
kleurto v4.0.2 - Update
jestmonorepo to v26.1.0
- Updated
eslint-plugin-jsdocto v25
- Updated
jestto v26.0.1 - Updated
eslintto v7
- Updated
eslint-plugin-unicornto v19 - Add
eslint-plugin-jsdocv24 to lint JSDoc comments (#97)
- Updated
jestto v25.4.0 - Updated
prettierto v2.0.5 - Updated
eslint-config-prettierto v6.11.0 - Add fixtures to make testing new releases more reliable (#91)
- Disabled a few unicorn v19 rules (#104)
- Updated
eslint-plugin-unicornto v18
- Updated
jestto v25.2.4
Edit: @calebeby pointed out that this didn't need to be a major release because prettier is a devDependency, so it won't affect our users. Sorry for the false alarm!
- Updated
prettierto v2
- Updated
eslint-config-prettierto v6.10.1 - Updated
eslint-config-standardto v14.1.1
- Updated
eslint-plugin-unicornto v17
- Updated
eslint-config-xoto v0.29.1
- Updated
jestto v25 - Updated
eslint-plugin-nodeto v11 - Updated
eslint-plugin-unicornto v16
- Updated
eslintto v6.8.0 - Updated
eslint-config-prettierto v6.10.0
- Updated
eslint-plugin-unicornto v14
- Updated
eslintto v6.7.2
- Updated
eslintto v6.6.0 - Updated
eslint-plugin-unicornto v13 - Updated
eslint-config-prettierto v6 - Updated
eslint-config-standardto v14 - Updated
eslint-plugin-nodeto v10
- Updated
eslint-config-xoto v0.27.2 - Updated
prettierto v1.19.1
- Updated
eslint-plugin-nodeto v9 - Updated
eslint-config-prettierto v5 - Updated
eslint-plugin-unicornto v9 - Enabled
no-unused-expressionsfor ternaries and short-circuit (#18)
- Added itself as a
devDep(#17) - Updated
prettierto v1.18
- Update
package.jsonfilesto includesrc/rules/**/*.js(#15)
- Added build process to snapshot config and reduce peerDependencies (#9)
- Changed package name from
@cloudfour/eslint-configto@cloudfour/eslint-pluginInstead of referencing this in your ESLint config as@cloudfour/eslint-config, useplugin:@cloudfour/recommended - Updated dependencies
- Enable more rules from C4 JS guide (#11)
- Enable
eslint-plugin-noderecommendedrules (#11) - Enable
eslint-plugin-unicornrecommendedrules (#12)
- Initial release