Skip to content

Commit

Permalink
feat: ✨ improve curly rule by adding consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Apr 13, 2024
1 parent 78a1ad0 commit b464c37
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/__snapshots__/factory.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ exports[`jimmyDotCodes > should create default configuration 1`] = `
"always",
],
"constructor-super": "error",
"curly": "error",
"curly": [
"error",
"multi-or-nest",
"consistent",
],
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
Expand Down
6 changes: 5 additions & 1 deletion src/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ exports[`should create default configuration 1`] = `
"always",
],
"constructor-super": "error",
"curly": "error",
"curly": [
"error",
"multi-or-nest",
"consistent",
],
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
Expand Down
6 changes: 5 additions & 1 deletion src/rules/__snapshots__/base.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ exports[`should create base rules 1`] = `
"always",
],
"constructor-super": "error",
"curly": "error",
"curly": [
"error",
"multi-or-nest",
"consistent",
],
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type Rules } from "../types";

export const baseRules = {
...eslint.configs.recommended.rules,
"curly": "error",
"curly": ["error", "multi-or-nest", "consistent"],
"arrow-body-style": ["error", "always"],
"object-shorthand": "error",
"prefer-arrow-callback": "error",
Expand Down

0 comments on commit b464c37

Please sign in to comment.