Skip to content

Commit

Permalink
dev: fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-crowell committed Jun 17, 2024
1 parent 0df2e65 commit 9e37190
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 13 deletions.
16 changes: 13 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import doob from '@do-ob/eslint-config';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import reactCompiler from 'eslint-plugin-react-compiler';
import { fixupPluginRules } from '@eslint/compat';

export default [
...doob.configs.recommended,
{
files: [ '**/*.{jsx,tsx}' ],
plugins: {
react,
'react': fixupPluginRules(react),
},
languageOptions: {
parserOptions: {
Expand All @@ -23,10 +25,18 @@ export default [
},
{
plugins: {
'react-hooks': reactHooks,
'react-hooks': fixupPluginRules(reactHooks),
},
rules: {
...reactHooks.configs.recommended.rules,
},
}
},
{
plugins: {
'react-compiler': fixupPluginRules(reactCompiler),
},
rules: {
'react-compiler/react-compiler': 'error',
},
},
];
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@do-ob/eslint-config": "^2.3.0",
"@do-ob/ts-config": "^2.0.0",
"@do-ob/vite-lib-config": "^3.0.1",
"@eslint/compat": "^1.1.0",
"@heroicons/react": "^2.1.3",
"@nextui-org/react": "^2.4.2",
"@storybook/addon-a11y": "8.2.0-alpha.9",
Expand All @@ -42,8 +43,8 @@
"autoprefixer": "^10.4.19",
"cssnano": "^7.0.2",
"eslint": "^9.2.0",
"eslint-plugin-next": "^0.0.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-compiler": "0.0.0-experimental-51a85ea-20240601",
"eslint-plugin-react-hooks": "^4.6.2",
"framer-motion": "^11.2.10",
"postcss": "^8.4.38",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function Form({
debounceTimeout.current = setTimeout(() => {
currentTarget.requestSubmit();
}, changeDefer);
}, [ changeDefer, onChange ]);
}, [ changeDefer, changeSubmit, onChange ]);

return (
<form
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use client';

import { ThemeButton, SearchButton } from '@do-ob/ui/components';
import { SocialIcons } from '@do-ob/ui/icons';
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/hooks/useMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function useMode(prefer: ThemeMode = 'light') {

// Clean up the observer
return () => observer.disconnect();
}, []);
}, [ mode ]);

const modeToggle = () => {
const next = mode === 'light' ? 'dark' : 'light';
Expand Down
76 changes: 70 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9e37190

Please sign in to comment.