Skip to content

Commit

Permalink
perf: eslintrc
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Jan 11, 2022
1 parent 0be12f6 commit 32e68ee
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const { defineConfig } = require('eslint-define-config');

module.exports = defineConfig({
parser: '@typescript-eslint/parser',
extends: ['react-app', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
plugins: ['@typescript-eslint'],
extends: ['react-app', 'plugin:prettier/recommended'],
// "off" or 0 - turn the rule off
// "warn" or 1 - turn the rule on as a warning (doesn't affect exit code)
// "error" or 2 - turn the rule on as an error (exit code will be 1)
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/react-resizable": "^1.7.4",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"@vitejs/plugin-react": "^1.1.4",
"autoprefixer": "^10.4.2",
"eslint": "^8.6.0",
Expand Down
4 changes: 0 additions & 4 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions src/utils/useSafeState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function useSafeState<S>(initialState?: S | (() => S)) {
/** if component is unmounted, stop update */
if (unmountedRef.current) return;
setState(currentState);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

return [state, setCurrentState] as const;
Expand Down

0 comments on commit 32e68ee

Please sign in to comment.