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 all commits
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
2 changes: 1 addition & 1 deletion docs/rules/no-conditional-expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ thrown by the wrapped function:
```typescript
class NoErrorThrownError extends Error {}

const getError = async <TError>(call: () => unknown): Promise<TError> => {
const getError = async <TError,>(call: () => unknown): Promise<TError> => {
try {
await call();

Expand Down
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
Loading