Skip to content

Commit

Permalink
chore: upgrade prettier (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Jul 13, 2023
1 parent 463418f commit 3347fc5
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 30 deletions.
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

0 comments on commit 3347fc5

Please sign in to comment.