Skip to content

Commit

Permalink
Resolve ESLint warnings
Browse files Browse the repository at this point in the history
Various tweaks to either resolve ESLint warnings or to allow behaviors
(such as allowing default exports of objects)
  • Loading branch information
brianlove committed Aug 15, 2023
1 parent ce94e1a commit fb07d14
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 14 additions & 0 deletions web/gui-v2/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default {
rules: {
"import/no-anonymous-default-export": ["error", {
"allowArray": false,
"allowArrowFunction": false,
"allowAnonymousClass": false,
"allowAnonymousFunction": false,
"allowCallExpression": false, // backward compatibility -> e.g. export default foo(bar)
"allowNew": false,
"allowLiteral": false,
"allowObject": true
}]
}
}
5 changes: 2 additions & 3 deletions web/gui-v2/src/components/HeaderSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ const HeaderSlider = ({
);

// Debounce handler for propagating internal changes to the outside
const externalHandler = (newVal) => onChange(newVal);
const handleExternalChange = useMemo(() => {
return debounce(externalHandler, 300);
}, []);
return debounce(onChange, 300);
}, [onChange]);

// Trigger external state change
useEffect(
Expand Down
1 change: 0 additions & 1 deletion web/gui-v2/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { css } from '@emotion/react';
import { DateTime } from 'luxon';
import { graphql, useStaticQuery } from 'gatsby';

import { AppWrapper, InfoCard, breakpoints } from '@eto/eto-ui-components';
Expand Down

0 comments on commit fb07d14

Please sign in to comment.