Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade prettier #1402

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
"arrowParens": "avoid",
"endOfLine": "auto",
"proseWrap": "always",
"singleQuote": true,
"trailingComma": "all"
"singleQuote": true
},
"release": {
"branches": [
Expand Down Expand Up @@ -126,7 +125,7 @@
"eslint-plugin-eslint-plugin": "^5.0.6",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-remote-tester": "^3.0.0",
"eslint-remote-tester-repositories": "~1.0.0",
"husky": "^8.0.1",
Expand All @@ -136,7 +135,7 @@
"lint-staged": "^13.0.3",
"markdown-link-check": "^3.10.2",
"pinst": "^3.0.0",
"prettier": "^2.0.5",
"prettier": "^3.0.0",
"rimraf": "^5.0.0",
"semantic-release": "^21.0.0",
"semver": "^7.3.5",
Expand Down
15 changes: 6 additions & 9 deletions src/rules/consistent-test-it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ const buildFixer =
nodeName: string,
preferredTestKeyword: TestCaseName.test | TestCaseName.it,
) =>
(fixer: TSESLint.RuleFixer) =>
[
fixer.replaceText(
callee.type === AST_NODE_TYPES.MemberExpression
? callee.object
: callee,
getPreferredNodeName(nodeName, preferredTestKeyword),
),
];
(fixer: TSESLint.RuleFixer) => [
fixer.replaceText(
callee.type === AST_NODE_TYPES.MemberExpression ? callee.object : callee,
getPreferredNodeName(nodeName, preferredTestKeyword),
),
];

export default createRule<
[
Expand Down
3 changes: 2 additions & 1 deletion src/rules/utils/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ interface CalledKnownMemberExpression<Name extends string = string>
* Represents a `CallExpression` with a single argument.
*/
export interface CallExpressionWithSingleArgument<
Argument extends TSESTree.CallExpression['arguments'][number] = TSESTree.CallExpression['arguments'][number],
Argument extends
TSESTree.CallExpression['arguments'][number] = TSESTree.CallExpression['arguments'][number],
> extends TSESTree.CallExpression {
arguments: [Argument];
}
Expand Down
185 changes: 170 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,20 @@ __metadata:
languageName: node
linkType: hard

"@pkgr/utils@npm:^2.3.1":
version: 2.4.2
resolution: "@pkgr/utils@npm:2.4.2"
dependencies:
cross-spawn: ^7.0.3
fast-glob: ^3.3.0
is-glob: ^4.0.3
open: ^9.1.0
picocolors: ^1.0.0
tslib: ^2.6.0
checksum: 24e04c121269317d259614cd32beea3af38277151c4002df5883c4be920b8e3490bb897748e844f9d46bf68230f86dabd4e8f093773130e7e60529a769a132fc
languageName: node
linkType: hard

"@pnpm/config.env-replace@npm:^1.1.0":
version: 1.1.0
resolution: "@pnpm/config.env-replace@npm:1.1.0"
Expand Down Expand Up @@ -3553,6 +3567,13 @@ __metadata:
languageName: node
linkType: hard

"big-integer@npm:^1.6.44":
version: 1.6.51
resolution: "big-integer@npm:1.6.51"
checksum: 3d444173d1b2e20747e2c175568bedeebd8315b0637ea95d75fd27830d3b8e8ba36c6af40374f36bdaea7b5de376dcada1b07587cb2a79a928fccdb6e6e3c518
languageName: node
linkType: hard

"bin-links@npm:^4.0.1":
version: 4.0.1
resolution: "bin-links@npm:4.0.1"
Expand Down Expand Up @@ -3593,6 +3614,15 @@ __metadata:
languageName: node
linkType: hard

"bplist-parser@npm:^0.2.0":
version: 0.2.0
resolution: "bplist-parser@npm:0.2.0"
dependencies:
big-integer: ^1.6.44
checksum: d5339dd16afc51de6c88f88f58a45b72ed6a06aa31f5557d09877575f220b7c1d3fbe375da0b62e6a10d4b8ed80523567e351f24014f5bc886ad523758142cdd
languageName: node
linkType: hard

"brace-expansion@npm:^1.1.7":
version: 1.1.11
resolution: "brace-expansion@npm:1.1.11"
Expand Down Expand Up @@ -3670,6 +3700,15 @@ __metadata:
languageName: node
linkType: hard

"bundle-name@npm:^3.0.0":
version: 3.0.0
resolution: "bundle-name@npm:3.0.0"
dependencies:
run-applescript: ^5.0.0
checksum: edf2b1fbe6096ed32e7566947ace2ea937ee427391744d7510a2880c4b9a5b3543d3f6c551236a29e5c87d3195f8e2912516290e638c15bcbede7b37cc375615
languageName: node
linkType: hard

"cacache@npm:^17.0.0, cacache@npm:^17.0.4, cacache@npm:^17.1.3":
version: 17.1.3
resolution: "cacache@npm:17.1.3"
Expand Down Expand Up @@ -4432,6 +4471,28 @@ __metadata:
languageName: node
linkType: hard

"default-browser-id@npm:^3.0.0":
version: 3.0.0
resolution: "default-browser-id@npm:3.0.0"
dependencies:
bplist-parser: ^0.2.0
untildify: ^4.0.0
checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941
languageName: node
linkType: hard

"default-browser@npm:^4.0.0":
version: 4.0.0
resolution: "default-browser@npm:4.0.0"
dependencies:
bundle-name: ^3.0.0
default-browser-id: ^3.0.0
execa: ^7.1.1
titleize: ^3.0.0
checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7
languageName: node
linkType: hard

"defaults@npm:^1.0.3":
version: 1.0.4
resolution: "defaults@npm:1.0.4"
Expand All @@ -4441,6 +4502,13 @@ __metadata:
languageName: node
linkType: hard

"define-lazy-prop@npm:^3.0.0":
version: 3.0.0
resolution: "define-lazy-prop@npm:3.0.0"
checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6
languageName: node
linkType: hard

"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0":
version: 1.2.0
resolution: "define-properties@npm:1.2.0"
Expand Down Expand Up @@ -4944,7 +5012,7 @@ __metadata:
eslint-plugin-eslint-plugin: ^5.0.6
eslint-plugin-import: ^2.25.1
eslint-plugin-node: ^11.0.0
eslint-plugin-prettier: ^4.2.1
eslint-plugin-prettier: ^5.0.0
eslint-remote-tester: ^3.0.0
eslint-remote-tester-repositories: ~1.0.0
husky: ^8.0.1
Expand All @@ -4954,7 +5022,7 @@ __metadata:
lint-staged: ^13.0.3
markdown-link-check: ^3.10.2
pinst: ^3.0.0
prettier: ^2.0.5
prettier: ^3.0.0
rimraf: ^5.0.0
semantic-release: ^21.0.0
semver: ^7.3.5
Expand Down Expand Up @@ -4988,18 +5056,22 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.2.1":
version: 4.2.1
resolution: "eslint-plugin-prettier@npm:4.2.1"
"eslint-plugin-prettier@npm:^5.0.0":
version: 5.0.0
resolution: "eslint-plugin-prettier@npm:5.0.0"
dependencies:
prettier-linter-helpers: ^1.0.0
synckit: ^0.8.5
peerDependencies:
eslint: ">=7.28.0"
prettier: ">=2.0.0"
"@types/eslint": ">=8.0.0"
eslint: ">=8.0.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, this might actually stop us as we still support ESLint 7

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is happy, so I guess it doesn't matter. This isn't exposed outside of this repo anyways

prettier: ">=3.0.0"
peerDependenciesMeta:
"@types/eslint":
optional: true
eslint-config-prettier:
optional: true
checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6
checksum: 84e88744b9050f2d5ef31b94e85294dda16f3a53c2449f9d33eac8ae6264889b459bf35a68e438fb6b329c2a1d6491aac4bfa00d86317e7009de3dad0311bec6
languageName: node
linkType: hard

Expand Down Expand Up @@ -5234,7 +5306,7 @@ __metadata:
languageName: node
linkType: hard

"execa@npm:^7.0.0":
"execa@npm:^7.0.0, execa@npm:^7.1.1":
version: 7.1.1
resolution: "execa@npm:7.1.1"
dependencies:
Expand Down Expand Up @@ -6363,6 +6435,24 @@ __metadata:
languageName: node
linkType: hard

"is-docker@npm:^2.0.0":
version: 2.2.1
resolution: "is-docker@npm:2.2.1"
bin:
is-docker: cli.js
checksum: 3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56
languageName: node
linkType: hard

"is-docker@npm:^3.0.0":
version: 3.0.0
resolution: "is-docker@npm:3.0.0"
bin:
is-docker: cli.js
checksum: b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90
languageName: node
linkType: hard

"is-extglob@npm:^2.1.1":
version: 2.1.1
resolution: "is-extglob@npm:2.1.1"
Expand Down Expand Up @@ -6400,6 +6490,17 @@ __metadata:
languageName: node
linkType: hard

"is-inside-container@npm:^1.0.0":
version: 1.0.0
resolution: "is-inside-container@npm:1.0.0"
dependencies:
is-docker: ^3.0.0
bin:
is-inside-container: cli.js
checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03
languageName: node
linkType: hard

"is-lambda@npm:^1.0.1":
version: 1.0.1
resolution: "is-lambda@npm:1.0.1"
Expand Down Expand Up @@ -6556,6 +6657,15 @@ __metadata:
languageName: node
linkType: hard

"is-wsl@npm:^2.2.0":
version: 2.2.0
resolution: "is-wsl@npm:2.2.0"
dependencies:
is-docker: ^2.0.0
checksum: 20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8
languageName: node
linkType: hard

"isarray@npm:~1.0.0":
version: 1.0.0
resolution: "isarray@npm:1.0.0"
Expand Down Expand Up @@ -8642,6 +8752,18 @@ __metadata:
languageName: node
linkType: hard

"open@npm:^9.1.0":
version: 9.1.0
resolution: "open@npm:9.1.0"
dependencies:
default-browser: ^4.0.0
define-lazy-prop: ^3.0.0
is-inside-container: ^1.0.0
is-wsl: ^2.2.0
checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9
languageName: node
linkType: hard

"optionator@npm:^0.9.3":
version: 0.9.3
resolution: "optionator@npm:0.9.3"
Expand Down Expand Up @@ -9070,12 +9192,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.0.5":
version: 2.8.8
resolution: "prettier@npm:2.8.8"
"prettier@npm:^3.0.0":
version: 3.0.0
resolution: "prettier@npm:3.0.0"
bin:
prettier: bin-prettier.js
checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8
prettier: bin/prettier.cjs
checksum: 6a832876a1552dc58330d2467874e5a0b46b9ccbfc5d3531eb69d15684743e7f83dc9fbd202db6270446deba9c82b79d24383d09924c462b457136a759425e33
languageName: node
linkType: hard

Expand Down Expand Up @@ -9640,6 +9762,15 @@ __metadata:
languageName: node
linkType: hard

"run-applescript@npm:^5.0.0":
version: 5.0.0
resolution: "run-applescript@npm:5.0.0"
dependencies:
execa: ^5.0.0
checksum: d00c2dbfa5b2d774de7451194b8b125f40f65fc183de7d9dcae97f57f59433586d3c39b9001e111c38bfa24c3436c99df1bb4066a2a0c90d39a8c4cd6889af77
languageName: node
linkType: hard

"run-parallel@npm:^1.1.9":
version: 1.2.0
resolution: "run-parallel@npm:1.2.0"
Expand Down Expand Up @@ -10309,6 +10440,16 @@ __metadata:
languageName: node
linkType: hard

"synckit@npm:^0.8.5":
version: 0.8.5
resolution: "synckit@npm:0.8.5"
dependencies:
"@pkgr/utils": ^2.3.1
tslib: ^2.5.0
checksum: 8a9560e5d8f3d94dc3cf5f7b9c83490ffa30d320093560a37b88f59483040771fd1750e76b9939abfbb1b5a23fd6dfbae77f6b338abffe7cae7329cd9b9bb86b
languageName: node
linkType: hard

"tar@npm:^6.1.11, tar@npm:^6.1.13, tar@npm:^6.1.15, tar@npm:^6.1.2":
version: 6.1.15
resolution: "tar@npm:6.1.15"
Expand Down Expand Up @@ -10407,6 +10548,13 @@ __metadata:
languageName: node
linkType: hard

"titleize@npm:^3.0.0":
version: 3.0.0
resolution: "titleize@npm:3.0.0"
checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28
languageName: node
linkType: hard

"tmpl@npm:1.0.5":
version: 1.0.5
resolution: "tmpl@npm:1.0.5"
Expand Down Expand Up @@ -10515,7 +10663,7 @@ __metadata:
languageName: node
linkType: hard

"tslib@npm:^2.0.3, tslib@npm:^2.1.0":
"tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.5.0, tslib@npm:^2.6.0":
version: 2.6.0
resolution: "tslib@npm:2.6.0"
checksum: c01066038f950016a18106ddeca4649b4d76caa76ec5a31e2a26e10586a59fceb4ee45e96719bf6c715648e7c14085a81fee5c62f7e9ebee68e77a5396e5538f
Expand Down Expand Up @@ -10747,6 +10895,13 @@ __metadata:
languageName: node
linkType: hard

"untildify@npm:^4.0.0":
version: 4.0.0
resolution: "untildify@npm:4.0.0"
checksum: 39ced9c418a74f73f0a56e1ba4634b4d959422dff61f4c72a8e39f60b99380c1b45ed776fbaa0a4101b157e4310d873ad7d114e8534ca02609b4916bb4187fb9
languageName: node
linkType: hard

"update-browserslist-db@npm:^1.0.11":
version: 1.0.11
resolution: "update-browserslist-db@npm:1.0.11"
Expand Down