Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bsholmes committed Sep 18, 2023
1 parent 2f9bbec commit e4db833
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
12 changes: 10 additions & 2 deletions src/components/CssReset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,16 @@ Improve consistency of default fonts in all browsers. (https://github.com/sindre
*/
body {
font-family: system-ui, -apple-system, /* Firefox supports this but not yet system-ui */ "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
font-family:
system-ui,
-apple-system,
/* Firefox supports this but not yet system-ui */ "Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji";
}
/*
Expand Down
5 changes: 4 additions & 1 deletion src/components/Filters/BaseFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { TestIds } from "src/utils/useTestIds";
* detail.
*/
export class BaseFilter<V, P extends { label?: string; defaultValue?: V }> {
constructor(protected key: string, protected props: P) {}
constructor(
protected key: string,
protected props: P,
) {}

get label(): string {
return this.props.label || defaultLabel(this.key);
Expand Down
6 changes: 5 additions & 1 deletion src/components/Table/utils/ColumnState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export class ColumnState<R extends Kinded> {
private visible = true;
private expanded = false;

constructor(private states: ColumnStates<R>, storage: ColumnStorage<R>, column: GridColumnWithId<R>) {
constructor(
private states: ColumnStates<R>,
storage: ColumnStorage<R>,
column: GridColumnWithId<R>,
) {
this.column = column;
// If the user sets `canHide: true`, we default to hidden unless they set `initVisible: true`
this.visible = storage.wasVisible(column.id) ?? (column.canHide ? column.initVisible ?? false : true);
Expand Down
6 changes: 1 addition & 5 deletions src/components/Table/utils/RowState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ export class RowState<R extends Kinded> {
removed: false | "soft" | "hard" = false;
private isCalculatingDirectMatch = false;

constructor(
private states: RowStates<R>,
public parent: RowState<R> | undefined,
row: GridDataRow<R>,
) {
constructor(private states: RowStates<R>, public parent: RowState<R> | undefined, row: GridDataRow<R>) {
this.row = row;
this.selected = !!row.initSelected;
this.collapsed = states.storage.wasCollapsed(row.id) ?? !!row.initCollapsed;
Expand Down
2 changes: 1 addition & 1 deletion src/components/internal/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function Menu<T>(props: PropsWithChildren<MenuProps<T>>) {
// by React-Aria to keep track of item states such as focus, and provide hooks for calling those actions.
const tree = useTreeData({
initialItems: [items, persistentItems ? persistentItems : []].map(
(i, idx) => ({ label: idx === 0 ? "items" : "persistent", items: i }) as MenuSection,
(i, idx) => ({ label: idx === 0 ? "items" : "persistent", items: i } as MenuSection),
),
getKey: (item) => camelCase(item.label),
getChildren: (item) => (item as MenuSection).items ?? [],
Expand Down
2 changes: 1 addition & 1 deletion src/inputs/TreeSelectField/TreeSelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ interface CollapsedChildrenState<O, V extends Value> {
export const CollapsedContext = React.createContext<CollapsedChildrenState<any, any>>({
collapsedKeys: [],
setCollapsedKeys: () => {},
getOptionValue: () => ({}) as any,
getOptionValue: () => ({} as any),
});

function TreeSelectFieldBase<O, V extends Value>(props: TreeSelectFieldProps<O, V>) {
Expand Down
11 changes: 6 additions & 5 deletions src/utils/sb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ export const withBeamDecorator = (Story: () => JSX.Element) => (
*/
export const withDimensions =
(width: number | string = "100vw", height: number | string = "100vh", xss?: Properties) =>
(Story: () => JSX.Element) => (
<div css={{ ...Css.w(width).h(height).$, ...xss }}>
<Story />
</div>
);
(Story: () => JSX.Element) =>
(
<div css={{ ...Css.w(width).h(height).$, ...xss }}>
<Story />
</div>
);

0 comments on commit e4db833

Please sign in to comment.