disable formatting rules for eslint and add prettier in lint-staged (#2355)

* disable formatting rules for eslint and add prettier in lint-staged

* update npm modules

* set plugin-proposal-private-methods to loose

* update snapshots due to popover package update

* add missing quotes

Co-authored-by: bkmartinjr <bruce@chanzuckerberg.com>
This commit is contained in:
Timmy Huang
2021-07-30 12:27:47 -07:00
committed by GitHub
co-authored by bkmartinjr
parent 97fb98b4eb
commit 5ab96ed360
40 changed files with 11781 additions and 8189 deletions
+21 -23
View File
@@ -355,9 +355,10 @@ class Graph extends React.Component<{}, GraphState> {
if (camera.handleEvent(e, projectionTF)) {
this.renderCanvas();
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
this.setState((state: any) => {
return { ...state, updateOverlay: !state.updateOverlay };
});
this.setState((state: any) => ({
...state,
updateOverlay: !state.updateOverlay,
}));
}
};
@@ -1036,32 +1037,29 @@ const ErrorLoading = ({ displayName, error, width, height }: any) => {
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
const StillLoading = ({ displayName, width, height }: any) => {
const StillLoading = ({ displayName, width, height }: any) => (
/*
Render a busy/loading indicator
*/
return (
<div
style={{
position: "fixed",
fontWeight: 500,
top: height / 2,
width,
}}
>
<div
style={{
position: "fixed",
fontWeight: 500,
top: height / 2,
width,
display: "flex",
justifyContent: "center",
justifyItems: "center",
alignItems: "center",
}}
>
<div
style={{
display: "flex",
justifyContent: "center",
justifyItems: "center",
alignItems: "center",
}}
>
<Button minimal loading intent="primary" />
<span style={{ fontStyle: "italic" }}>Loading {displayName}</span>
</div>
<Button minimal loading intent="primary" />
<span style={{ fontStyle: "italic" }}>Loading {displayName}</span>
</div>
);
};
</div>
);
export default Graph;
@@ -23,7 +23,7 @@ export default class GraphOverlayLayer extends PureComponent<{}, State> {
}
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
matrixToTransformString = (m: any) => {
matrixToTransformString = (m: any) =>
/*
Translates the gl-matrix mat3 to SVG matrix transform style
@@ -32,21 +32,20 @@ export default class GraphOverlayLayer extends PureComponent<{}, State> {
b d f / [a, b, 0, c, d, 0, e, f, 1] => matrix(a, b, c, d, e, f) / matrix(sx, 0, 0, sy, tx, ty) / matrix(m[0] m[3] m[1] m[4] m[6] m[7])
0 0 1
*/
return `matrix(${m[0]} ${m[1]} ${m[3]} ${m[4]} ${m[6]} ${m[7]})`;
};
`matrix(${m[0]} ${m[1]} ${m[3]} ${m[4]} ${m[6]} ${m[7]})`;
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
reverseMatrixScaleTransformString = (m: any) => {
return `matrix(${1 / m[0]} 0 0 ${1 / m[4]} 0 0)`;
};
reverseMatrixScaleTransformString = (m: any) =>
`matrix(${1 / m[0]} 0 0 ${1 / m[4]} 0 0)`;
// This is passed to all children, should be called when an overlay's display state is toggled along with the overlay name and its new display state in boolean form
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
overlaySetShowing = (overlay: any, displaying: any) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
this.setState((state: any) => {
return { ...state, display: { ...state.display, [overlay]: displaying } };
});
this.setState((state: any) => ({
...state,
display: { ...state.display, [overlay]: displaying },
}));
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types --- FIXME: disabled temporarily on migrate to TS.