-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add eslint to help maintain higher code standards (#315)
The most important part of having eslint here is the checks in `eslint-plugin-react-hooks` which help check some of the most critical usage patterns when it comes to writing React code.
- Loading branch information
Showing
18 changed files
with
3,056 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
import pluginReact from 'eslint-plugin-react'; | ||
import pluginReactHooks from 'eslint-plugin-react-hooks'; | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
{ files: ['**/*.{js,mjs,cjs,jsx}'] }, | ||
{ languageOptions: { globals: globals.browser } }, | ||
pluginJs.configs.recommended, | ||
pluginReact.configs.flat.recommended, | ||
pluginReact.configs.flat['jsx-runtime'], | ||
pluginReactHooks.configs['recommended-latest'], | ||
{ | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
'react/prop-types': 'off', | ||
'no-unused-vars': 'off', | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.