1.4.1 (2023-11-30)
Editors
Bug fixes
- Fix #933. Some files are properly ignored in the LSP too.
E.g.
package.json
, tsconfig.json
, etc. - Fix #1394, by inferring the language extension from the internal saved
files. Now newly created files JavaScript correctly show diagnostics.
Formatter
Bug fixes
-
Fix some accidental line breaks when printing array expressions within arrow functions and other long
lines #917. Contributed by @faultyserver
-
Match Prettier's breaking strategy for ArrowChain
layouts #934.
Contributed by @faultyserver
-
Fix double-printing of leading comments in arrow chain expressions #951.
Contributed by @faultyserver
Linter
Bug fixes
- Fix #910, where the rule
noSvgWithoutTitle
should skip elements that
have aria-hidden
attributes. Contributed by @vasucp1207
New features
- Add useForOf rule.
The rule recommends a for-of loop when the loop index is only used to read from an array that is being iterated.
Contributed by @victor-teles
Enhancement
-
Address #924
and #920. noUselessElse
now ignores else
clauses that follow at least one if
statement that doesn't break early. Contributed by @Conaclos
For example, the following code is no longer reported by the rule:
function f(x) {
if (x < 0) {
// this `if` doesn't break early.
} else if (x > 0) {
return x;
} else {
// This `else` block was previously reported as useless.
}
}
Bug fixes
Fix #918. useSimpleNumberKeys
no longer repports false positive on comments. Contributed by @kalleep
Fix #608. useExhaustiveDependencies
no longer repports missing dependencies for React hooks without dependency array. Contributed by @kalleep
Parser