ESLint v7.4.0 released
We just pushed ESLint v7.4.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.
Shortly after the v7.3.0 release, we received an issue that
eslint-config-airbnb was breaking because it used
Infinity in a rule config.
Infinity should have been forbidden by the rule's option schema, but a bug in Ajv, the JSON schema validator that ESLint uses, incorrectly allowed
Infinity when an
integer was specified. This was finally caught because the v7.3.0 release included a change that fixed an unrelated issue by serializing rule configs. ESLint expects rule configs to be JSON-serializable for consistency between all supported JSON, YAML, and JS
.eslintrc formats, and it relies on this property in the
--print-config command line options.
eslint-config-airbnb to use
Number.MAX_SAFE_INTEGER instead of
Infinity is the ideal solution but would have taken too long. Since this was the only reported issue and isolated to
eslint-config-airbnb rather than end-user configs, we implemented an exception that replaced
Number.MAX_SAFE_INTEGER and released it in v7.3.1, which allowed us to preserve the unrelated bug fix.
After the v7.3.1 release, we received another issue that an
eslint-plugin-unicorn rule was directing users to use regular expression instances, which are not JSON-serializable. Unlike
eslint-config-airbnb, where the non-serializable value was isolated to a single dependency, end user configs for
eslint-plugin-unicorn include regular expressions, so fixing all of them is not practical.
We're therefore reverting the original change for the v7.4.0 release and will be finding another solution. This will unblock regular linting for users whose rule configs include non-JSON-serializable values, though the
--print-config command line options may exhibit undefined behavior in those cases. A future major version of ESLint will enforce that rule configs contain only JSON-serializable values, and we anticipate that enhancements to
RuleTester will help rule authors prepare their schemas for that.
ff5317eUpdate: Improve array-callback-return report message (#13395) (Philip (flip) Kromer)
51e42ecUpdate: Add option "ignoreGlobals" to camelcase rule (fixes #11716) (#12782) (David Gasperoni)
0655f66Update: improve report location in arrow-body-style (refs #12334) (#13424) (YeonJuan)
d53d69aUpdate: prefer-regex-literal detect regex literals (fixes #12840) (#12842) (Mathias Schreck)
004adaeUpdate: rename id-blacklist to id-denylist (fixes #13407) (#13408) (Kai Cataldo)
ada2c89Fix: support typescript generics in arrow-parens (fixes #12570) (#13451) (Milos Djermanovic)
89ee01eFix: Revert config cloning (fixes #13447) (#13449) (薛定谔的猫)
3f51930Fix: false positive new with member in no-extra-parens (fixes #12740) (#13375) (YeonJuan)
825a5b9Fix: Clarify documentation on implicit ignore behavior (fixes #12348) (#12600) (Scott Hardin)