Skip to content

Commit

Permalink
fix: fix rule configs creation
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed May 16, 2023
1 parent ff2b45d commit 8a43758
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ let getRulesWithOptions = (options: {
}): {
[key: string]: [string, { [key: string]: unknown }]
} => {
let recommendedRules = {
let recommendedRules: {
[key: string]: [string, { [key: string]: unknown }?]
} = {
[sortInterfacesName]: ['error'],
[sortJsxPropsName]: ['error'],
[sortNamedImportsName]: ['error'],
}
return Object.fromEntries(
Object.entries(recommendedRules).map(([key, [message, baseOptions]]) => [
Object.entries(recommendedRules).map(([key, [message, baseOptions = {}]]) => [
key,
[message, Object.assign(baseOptions, options)],
]),
Expand Down

0 comments on commit 8a43758

Please sign in to comment.