refactor: update all (major)
This MR contains the following updates:
Release Notes
tj/commander.js (commander)
v11.0.0
Fixed
- help command works when help option is disabled ([#1864])
Changed
- leading and trailing spaces are now ignored by the .arguments() method ([#1874])
- refine "types" exports for ESM to follow TypeScript guidelines ([#1886])
- Breaking: Commander 11 requires Node.js v16 or higher
v10.0.1
Added
Fixed
- remove unused
Option.optionFlagsproperty from TypeScript definition ([#1844])
Changed
- assume boolean option intended if caller passes string instead of hash to
.implies()([#1854])
conventional-changelog/conventional-changelog (conventional-changelog-cli)
v3.0.0: conventional-changelog-cli: v3.0.0
⚠ BREAKING CHANGES
- now all promises are native
- Node >= 14 is required
Code Refactoring
gajus/eslint-plugin-jsdoc (eslint-plugin-jsdoc)
v46.4.4
Bug Fixes
v46.4.3
Bug Fixes
-
match-description: dropthrowsandyieldsfrom being reported for non-empty descriptions bynonemptyTagsdefault; #1126 (03578ca)
v46.4.2
Bug Fixes
v46.4.1
Bug Fixes
-
require-jsdoc: do not reportPropertyDefinition's with non-publicaccessibility; fixes #1122 (1e45ae4)
v46.4.0
Features
v46.3.0
Bug Fixes
- make name required on
[@template](https://github.com/template)for non-JSDoc modes (467441b)
Features
-
match-description: ensure[@desc](https://github.com/desc)checked by default; check more desc-like tags by default; check non-empty tags; #233 (1b9d9e4)
v46.2.6
Bug Fixes
-
imports-as-dependencies: do not log missing package.json when rule is not active; fixes #1117 (3a5dd7d)
v46.2.5
Bug Fixes
v46.2.4
Bug Fixes
-
imports-as-dependencies: allow relative paths (7469e59)
v46.2.3
Bug Fixes
-
imports-as-dependencies: catchtypingsas possible publishing source (e3b0d0c)
v46.2.2
Bug Fixes
-
imports-as-dependencies: don't report TypeScript proper (75b6b8c)
v46.2.1
Bug Fixes
-
imports-as-dependencies: check fortypesinpackage.jsonand if not present, check[@types](https://github.com/types); fixes #1107 (785fb26)
v46.2.0
Features
-
imports-as-dependencies: add new rule to detect missing dependencies for import statements; fixes #896 (d7ec6e0)
v46.1.0
Features
v46.0.0
Features
-
no-defaults: make no-defaults on by default (034ade1)
BREAKING CHANGES
-
no-defaults: Removes default values. Disable the rule if removal not desired.
Also:
- docs: adds info on TS recommended rules
v45.0.0
Features
- add recommended-typescript-flavor configs (6042b77)
- for typescript configs, disable
no-undefined-types; fixes #888 (ec41b90)
BREAKING CHANGES
- This should only impact users of typescript configs. TS should itself handle checking for undefined types, so the (imperfect) rule has been disabled for such users.
v44.2.7
v44.2.6
v44.2.5
v44.2.4
v44.2.3
v44.2.2
v44.2.1
v44.2.0
v44.1.0
v44.0.2
v44.0.1
v44.0.0
v43.2.0
v43.1.1
v43.1.0
v43.0.9
v43.0.8
v43.0.7
v43.0.6
v43.0.5
v43.0.4
v43.0.3
v43.0.2
v43.0.1
v43.0.0
v42.0.0
v41.1.2
v41.1.1
v41.1.0
v41.0.0
v40.3.0
v40.2.1
v40.2.0
v40.1.2
v40.1.1
v40.1.0
v40.0.3
v40.0.2
v40.0.1
v40.0.0
v39.9.1
v39.9.0
v39.8.0
v39.7.5
prettier/eslint-plugin-prettier (eslint-plugin-prettier)
v5.0.0
Major Changes
-
#508
910aeb6Thanks @JounQin! - feat!: bump peer eslint to ">=8.0.0" and node to "^14.18.0 || >=16.0.0" -
#508
910aeb6Thanks @JounQin! - feat!: upgrade to prettier v3
Minor Changes
Patch Changes
sindresorhus/eslint-plugin-unicorn (eslint-plugin-unicorn)
v48.0.0
Improvements
- Deprecate
no-unsafe-regexrule (#2135)7b473aa -
prefer-top-level-await: Ignore promises insidePromise.{all,allSettled,any,race}()(#2139)d3f6b60 -
no-process-exit: Ignore when usingnode:worker_threadsmodule (#2136)2907805 -
prefer-array-some: Ignore filter calls with literal argument (#2097)7a32edb -
prefer-modern-math-api: Check cases thatMath.hypot()should be preferred (#2080)9bbc948 -
explicit-length-check: Ignore.length || number(#1977)b9b8794
Fixes
- Fix crash on array holes (#2129)
f10f1a6 -
prefer-dom-node-dataset: Fix edge cases (#2171)b2d7378 -
prefer-dom-node-dataset: Remove broken fix forelement.setAttribute(#2169)61234af -
no-lonely-if: Fix an edge case (#2168)ca837a8 -
no-useless-undefined: Turn parameter withundefineddefault value into optional parameter (#2138)4aa7d60 -
no-thenable: FixObject.fromEntries()check (#2130)f3265b9 -
prefer-dom-node-remove: Fix incorrect auto-fix (#2084)74bb36d
v47.0.0
Breaking
- Require Node.js 16 (#2073)
a3bc120 - Require
eslint@>=8.38.0(#2066)04af765 - Enable
prefer-at,prefer-event-target, andprefer-string-replace-allin recommended config (#2073)a3bc120
New rules
Improvements
-
prefer-top-level-await: Ignore.cjsfiles (#2072)0c3ccb1 -
prefer-spread: Stop checkingArray.fromcall with map function (#2064)f5beccb -
prefer-dom-node-text-content: Check optional chaining (#2062)8d6d007 -
prefer-dom-node-{append,remove}: Check optional chaining (#2061)443999b
Fixes
v46.0.1
v46.0.0
Improvements
- Add
elemsto abbreviations (#2040)2a9c840 -
no-useless-spread: CheckArray#{toReversed,toSorted,toSpliced,with}(#2030)55469e5 -
prefer-set-has: SupportArray#{toReversed,toSorted,toSpliced,with}(#2032)fea5b42 -
prefer-spread: Forbid use ofArray#toSpliced()to copy array (#2034)4ada50e -
prefer-negative-index: Check.toSpliced()and.with()(#2031)7ed738a -
no-empty-file: Support.jsxand.tsxextensions (#2002)ba1a00e
Fixes
jprichardson/node-fs-extra (fs-extra)
v11.1.1
v11.1.0
v11.0.0
Breaking Changes
- Don't allow requiring
fs-extra/lib/SOMETHING(switched toexports) (#974) - Require Node v14.14+ (#968, #969)
New Features
- Add
fs-extra/esmfor ESM named export support; see docs for details (#746, #974) - Add promise support for
fs.readv()(#970)
Bugfixes
isaacs/node-glob (glob)
v10.3.3
v10.3.2
v10.3.1
v10.3.0
- Add
--default -pflag to provide a default pattern
v10.2.7
v10.2.6
v10.2.5
v10.2.4
v10.2.3
v10.2.2
v10.2.1
v10.2.0
- Add glob cli
v10.1.0
- Return
'.'instead of the empty string''when the current working directory is returned as a match. - Add
posix: trueoption to return/delimited paths, even on Windows.
v10.0.0
- No default exports, only named exports
v9.3.5
v9.3.4
v9.3.3
- Upgraded minimatch to v8, adding support for any degree of nested extglob patterns.
v9.3.2
v9.3.1
v9.3.0
v9.2.1
v9.2.0
v9.1.2
v9.1.1
v9.1.0
v9.0.2
v9.0.1
v9.0.0
prettier/prettier (prettier)
v3.0.0
v2.8.8
This version is a republished version of v2.8.7. A bad version was accidentally published and it can't be unpublished, apologies for the churn.
v2.8.7
Allow multiple decorators on same getter/setter (#14584 by @fisker)
// Input
class A {
@​decorator()
get foo () {}
@​decorator()
set foo (value) {}
}
// Prettier 2.8.6
SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3)
3 | get foo () {}
4 |
> 5 | @​decorator()
| ^^^^^^^^^^^^
6 | set foo (value) {}
7 | }
// Prettier 2.8.7
class A {
@​decorator()
get foo() {}
@​decorator()
set foo(value) {}
}
v2.8.6
Allow decorators on private members and class expressions (#14548 by @fisker)
// Input
class A {
@​decorator()
#privateMethod () {}
}
// Prettier 2.8.5
SyntaxError: Decorators are not valid here. (2:3)
1 | class A {
> 2 | @​decorator()
| ^^^^^^^^^^^^
3 | #privateMethod () {}
4 | }
// Prettier 2.8.6
class A {
@​decorator()
#privateMethod() {}
}
v2.8.5
Support TypeScript 5.0 (#14391 by @fisker, #13819 by @fisker, @sosukesuzuki)
TypeScript 5.0 introduces two new syntactic features:
-
constmodifiers for type parameters -
export type *declarations
Add missing parentheses for decorator (#14393 by @fisker)
// Input
class Person {
@​(myDecoratorArray[0])
greet() {}
}
// Prettier 2.8.4
class Person {
@​myDecoratorArray[0]
greet() {}
}
// Prettier 2.8.5
class Person {
@​(myDecoratorArray[0])
greet() {}
}
Add parentheses for TypeofTypeAnnotation to improve readability (#14458 by @fisker)
// Input
type A = (typeof node.children)[];
// Prettier 2.8.4
type A = typeof node.children[];
// Prettier 2.8.5
type A = (typeof node.children)[];
Support max_line_length=off when parsing .editorconfig (#14516 by @josephfrazier)
If an .editorconfig file is in your project and it sets max_line_length=off for the file you're formatting,
it will be interpreted as a printWidth of Infinity rather than being ignored
(which previously resulted in the default printWidth of 80 being applied, if not overridden by Prettier-specific configuration).
<!-- Input -->
<div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}/>
<!-- Prettier 2.8.4 -->
<div
className="HelloWorld"
title={`You are visitor number ${num}`}
onMouseOver={onMouseOver}
/>;
<!-- Prettier 2.8.5 -->
<div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />;
v2.8.4
Fix leading comments in mapped types with readonly (#13427 by @thorn0, @sosukesuzuki)
// Input
type Type = {
// comment
readonly [key in Foo];
};
// Prettier 2.8.3
type Type = {
readonly // comment
[key in Foo];
};
// Prettier 2.8.4
type Type = {
// comment
readonly [key in Foo];
};
Group params in opening block statements (#14067 by @jamescdavis)
This is a follow-up to #13930 to establish wrapping consistency between opening block statements and else blocks by grouping params in opening blocks. This causes params to break to a new line together and not be split across lines unless the length of params exceeds the print width. This also updates the else block wrapping to behave exactly the same as opening blocks.
{{! Input }}
{{#block param param param param param param param param param param as |blockParam|}}
Hello
{{else block param param param param param param param param param param as |blockParam|}}
There
{{/block}}
{{! Prettier 2.8.3 }}
{{#block
param
param
param
param
param
param
param
param
param
param
as |blockParam|
}}
Hello
{{else block param
param
param
param
param
param
param
param
param
param}}
There
{{/block}}
{{! Prettier 2.8.4 }}
{{#block
param param param param param param param param param param
as |blockParam|
}}
Hello
{{else block
param param param param param param param param param param
as |blockParam|
}}
There
{{/block}}
Ignore files in .sl/ (#14206 by @bolinfest)
In Sapling SCM, .sl/ is the folder where it stores its state, analogous to .git/ in Git. It should be ignored in Prettier like the other SCM folders.
Recognize @satisfies in Closure-style type casts (#14262 by @fisker)
// Input
const a = /** @​satisfies {Record<string, string>} */ ({hello: 1337});
const b = /** @​type {Record<string, string>} */ ({hello: 1337});
// Prettier 2.8.3
const a = /** @​satisfies {Record<string, string>} */ { hello: 1337 };
const b = /** @​type {Record<string, string>} */ ({ hello: 1337 });
// Prettier 2.8.4
const a = /** @​satisfies {Record<string, string>} */ ({hello: 1337});
const b = /** @​type {Record<string, string>} */ ({hello: 1337});
Fix parens in inferred function return types with extends (#14279 by @fisker)
// Input
type Foo<T> = T extends ((a) => a is infer R extends string) ? R : never;
// Prettier 2.8.3 (First format)
type Foo<T> = T extends (a) => a is infer R extends string ? R : never;
// Prettier 2.8.3 (Second format)
SyntaxError: '?' expected.
// Prettier 2.8.4
type Foo<T> = T extends ((a) => a is infer R extends string) ? R : never;
isaacs/rimraf (rimraf)
v5.0.1
v5.0.0
v4.4.1
v4.4.0
v4.3.1
v4.3.0
v4.2.0
v4.1.4
v4.1.3
v4.1.2
v4.1.1
v4.1.0
v4.0.7
v4.0.6
v4.0.5
v4.0.4
v4.0.3
v4.0.2
v4.0.1
v4.0.0
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.