Skip to content

Commit

Permalink
fix(deps): configure and fix new ESLint rules from @jenssimon/eslint-…
Browse files Browse the repository at this point in the history
…config-base
  • Loading branch information
jenssimon committed Aug 3, 2022
1 parent d84c210 commit 7b904f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/__tests__/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const mqFor = (breakpoint: string, bps: BreakpointDefinitions): string => (Objec
.filter(([, val]) => val)
.map(([str, val]) => `(${str}-width: ${val})`)
.join(' and '))
// eslint-disable-next-line unicorn/no-array-reduce
).reduce((prev, curr) => curr);

/*
Expand Down
3 changes: 2 additions & 1 deletion src/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ export const parseBreakpoints = (
): BreakpointDefinitions => {
const parseConfig: BreakpointParseConfig = {
...defaultParseConfig,
...config ?? {},
...config,
};
// eslint-disable-next-line unicorn/no-array-reduce
return Object.entries(object).reduce<BreakpointDefinitions>((obj, [key, value]) => {
const breakpointMatch = key.match(parseConfig.regex as RegExp);
if (breakpointMatch && typeof value === 'string') {
Expand Down

0 comments on commit 7b904f5

Please sign in to comment.