Skip to content

Commit

Permalink
removed deprecated tslint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dfee committed Jun 13, 2019
1 parent eb39273 commit 0f36191
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 48 deletions.
8 changes: 2 additions & 6 deletions src/base/helpers/float.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ export const makePropTypes = makePropTypesFactory(vars => ({
export const transform: TransformFunction<FloatHelpersProps> = props => {
const { clearfix, pull, ...rest } = props;

// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
rest.className = classNames(
{
"is-clearfix": clearfix,
[`is-pulled-${pull}`]: pull,
},
(rest as any).className,
rest.className,
);

return rest;
Expand Down
8 changes: 2 additions & 6 deletions src/base/helpers/other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ export const transform: TransformFunction<OtherHelpersProps> = props => {
unselectable,
...rest
} = props;
// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
rest.className = classNames(
{
"is-marginless": marginless,
"is-paddingless": paddingless,
Expand All @@ -55,7 +51,7 @@ export const transform: TransformFunction<OtherHelpersProps> = props => {
"is-shadowless": shadowless,
"is-unselectable": unselectable,
},
(rest as any).className,
rest.className,
);

return rest;
Expand Down
9 changes: 1 addition & 8 deletions src/base/helpers/overflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ export const makePropTypes = makePropTypesFactory(vars => ({
export const transform: TransformFunction<OverflowHelpersProps> = props => {
const { clipped, ...rest } = props;

// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
{ "is-clipped": clipped },
(rest as any).className,
);
rest.className = classNames({ "is-clipped": clipped }, rest.className);

return rest;
};
Expand Down
9 changes: 1 addition & 8 deletions src/base/helpers/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ export const makePropTypes = makePropTypesFactory(vars => ({

export const transform: TransformFunction<OverlayHelpersProps> = props => {
const { overlay, ...rest } = props;
// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
{ "is-overlay": overlay },
(rest as any).className,
);
rest.className = classNames({ "is-overlay": overlay }, rest.className);

return rest;
};
Expand Down
12 changes: 4 additions & 8 deletions src/base/helpers/responsive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export type ResponsiveBreakpointProps = Partial<{
export type ResponsiveHelpersProps = Partial<{
responsive: Partial<
{
[B in Variables["breakpointsLimited"]]: LimitedResponsiveBreakpointProps
[B in Variables["breakpointsLimited"]]: LimitedResponsiveBreakpointProps;
} &
{
[B in Exclude<
Variables["breakpoints"],
Variables["breakpointsLimited"]
>]: ResponsiveBreakpointProps
>]: ResponsiveBreakpointProps;
}
>;
}>;
Expand Down Expand Up @@ -109,11 +109,7 @@ export const makePropTypes = makePropTypesFactory(vars => ({

export const transform: TransformFunction<ResponsiveHelpersProps> = props => {
const { responsive, ...rest } = props;
// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
rest.className = classNames(
responsive !== undefined
? Object.keys(responsive)
.filter(breakpoint => responsive[breakpoint] !== undefined)
Expand Down Expand Up @@ -152,7 +148,7 @@ export const transform: TransformFunction<ResponsiveHelpersProps> = props => {
})
.reduce((acc, cv) => ({ ...acc, ...cv }), {})
: undefined,
(rest as any).className,
rest.className,
);

return rest;
Expand Down
8 changes: 2 additions & 6 deletions src/base/helpers/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ export const transform: TransformFunction<TypographyHelpersProps> = props => {
...rest
} = props;

// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
rest.className = classNames(
{
[`has-background-${backgroundColor}`]: backgroundColor,
[`has-text-${textColor}`]: textColor,
Expand All @@ -55,7 +51,7 @@ export const transform: TransformFunction<TypographyHelpersProps> = props => {
[`has-text-weight-${textWeight}`]: textWeight,
[`is-size-${textSize}`]: textSize,
},
(rest as any).className,
rest.className,
);

return rest;
Expand Down
8 changes: 2 additions & 6 deletions src/base/helpers/visibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ export const makePropTypes = makePropTypesFactory(vars => ({
export const transform: TransformFunction<VisibilityHelpersProps> = props => {
const { hidden, invisible, srOnly, ...rest } = props;

// Can remove "no-any" and "no-unsafe-any" with TypeScript 3.3
// https://github.com/Microsoft/TypeScript/pull/29121
// tslint:disable:no-any
// tslint:disable:no-unsafe-any
(rest as any).className = classNames(
rest.className = classNames(
{
"is-hidden": hidden,
"is-invisible": invisible,
"is-sr-only": srOnly,
},
(rest as any).className,
rest.className,
);

return rest;
Expand Down

0 comments on commit 0f36191

Please sign in to comment.