build: fix lint (#245)

This commit is contained in:
Krist Wongsuphasawat 2019-11-11 14:33:38 -08:00 committed by Yongjie Zhao
parent 2923a9318d
commit a5a4f1bcec
7 changed files with 20 additions and 27 deletions

View File

@ -162,8 +162,9 @@ export default class SuperChart extends React.PureComponent<Props, {}> {
}
render() {
const { heightInfo, widthInfo, BoundingBox } = this.parseDimension(this
.props as PropsWithDefault);
const { heightInfo, widthInfo, BoundingBox } = this.parseDimension(
this.props as PropsWithDefault,
);
// If any of the dimension is dynamic, get parent's dimension
if (widthInfo.isDynamic || heightInfo.isDynamic) {

View File

@ -7,17 +7,11 @@ export { default as createLoadableRenderer } from './components/createLoadableRe
export { default as reactify } from './components/reactify';
export { default as SuperChart } from './components/SuperChart';
export {
default as getChartBuildQueryRegistry,
} from './registries/ChartBuildQueryRegistrySingleton';
export { default as getChartBuildQueryRegistry } from './registries/ChartBuildQueryRegistrySingleton';
export { default as getChartComponentRegistry } from './registries/ChartComponentRegistrySingleton';
export {
default as getChartControlPanelRegistry,
} from './registries/ChartControlPanelRegistrySingleton';
export { default as getChartControlPanelRegistry } from './registries/ChartControlPanelRegistrySingleton';
export { default as getChartMetadataRegistry } from './registries/ChartMetadataRegistrySingleton';
export {
default as getChartTransformPropsRegistry,
} from './registries/ChartTransformPropsRegistrySingleton';
export { default as getChartTransformPropsRegistry } from './registries/ChartTransformPropsRegistrySingleton';
export { default as ChartDataProvider } from './components/ChartDataProvider';

View File

@ -252,15 +252,13 @@ describe('Registry', () => {
registry.registerLoader('b', () => 'test2');
registry.registerLoader('c', () => Promise.resolve('test3'));
return registry
.entriesAsPromise()
.then(entries =>
expect(entries).toEqual([
{ key: 'a', value: 'test1' },
{ key: 'b', value: 'test2' },
{ key: 'c', value: 'test3' },
]),
);
return registry.entriesAsPromise().then(entries =>
expect(entries).toEqual([
{ key: 'a', value: 'test1' },
{ key: 'b', value: 'test2' },
{ key: 'c', value: 'test3' },
]),
);
});
});

View File

@ -18,7 +18,8 @@ type CreateEncoderFactoryParams<Config extends EncodingConfig> = {
* if there are missing fields
*/
completeEncoding: (e: Partial<DeriveEncoding<Config>>) => DeriveEncoding<Config>;
});
}
);
export default function createEncoderFactory<Config extends EncodingConfig>(
params: CreateEncoderFactoryParams<Config>,

View File

@ -17,7 +17,7 @@ function isChannelDefWithAxisSupport(
export type CompleteAxisConfig =
| false
| RequiredSome<
| (RequiredSome<
Omit<AxisConfig, 'labelOverlap'>,
| 'labelAngle'
| 'labelFlush'
@ -29,7 +29,7 @@ export type CompleteAxisConfig =
| 'titlePadding'
> & {
labelOverlap: LabelOverlapStrategy;
};
});
export default function completeAxisConfig(
channelType: ChannelType,

View File

@ -9,6 +9,4 @@ export {
export { default as createD3NumberFormatter } from './factories/createD3NumberFormatter';
export { default as createDurationFormatter } from './factories/createDurationFormatter';
export {
default as createSiAtMostNDigitFormatter,
} from './factories/createSiAtMostNDigitFormatter';
export { default as createSiAtMostNDigitFormatter } from './factories/createSiAtMostNDigitFormatter';

View File

@ -17,7 +17,8 @@ export type QueryObjectFilterClause = {
}
| {
op: UnaryOperator;
});
}
);
export type QueryObjectMetric = {
label: string;