-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1369 from szhsin/feat/update-deps
feat: update deps
- Loading branch information
Showing
8 changed files
with
5,097 additions
and
17,924 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,69 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import { fixupPluginRules } from '@eslint/compat'; | ||
import globals from 'globals'; | ||
import prettier from 'eslint-config-prettier'; | ||
import jest from 'eslint-plugin-jest'; | ||
import react from 'eslint-plugin-react'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import reactHooksAddons from 'eslint-plugin-react-hooks-addons'; | ||
|
||
export default [ | ||
eslint.configs.recommended, | ||
prettier, | ||
jest.configs['flat/recommended'], | ||
jest.configs['flat/style'], | ||
react.configs.flat.recommended, | ||
{ | ||
ignores: ['**/dist/', '**/types/', '**/coverage/', '**/example/'] | ||
}, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.jest | ||
} | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect' | ||
} | ||
}, | ||
plugins: { | ||
jest, | ||
react, | ||
// @ts-ignore | ||
['react-hooks']: fixupPluginRules(reactHooks), | ||
['react-hooks-addons']: fixupPluginRules(reactHooksAddons) | ||
}, | ||
rules: { | ||
'no-console': ['error', { allow: ['warn', 'error'] }], | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_\\d?$' | ||
} | ||
], | ||
'jest/expect-expect': [ | ||
'error', | ||
{ | ||
assertFunctionNames: ['expect', 'utils.expect*'] | ||
} | ||
], | ||
'react/react-in-jsx-scope': 0, | ||
'react/prop-types': 0, | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'error', | ||
'react-hooks-addons/no-unused-deps': 'error' | ||
} | ||
} | ||
]; |
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 |
---|---|---|
@@ -1,12 +1,45 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es2022": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
}, | ||
"next": { | ||
"rootDir": "example/" | ||
} | ||
}, | ||
"extends": ["plugin:@next/next/recommended"], | ||
"plugins": ["react", "react-hooks", "react-hooks-addons"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@next/next/recommended", | ||
"plugin:react-hooks/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"no-console": ["error", { "allow": ["warn", "error"] }], | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_\\d?$" | ||
} | ||
], | ||
"react/prop-types": 0, | ||
"react/display-name": 0, | ||
"react/react-in-jsx-scope": 0, | ||
"react-hooks-addons/no-unused-deps": "warn", | ||
"@next/next/no-img-element": 0 | ||
} | ||
} |
Oops, something went wrong.