Skip to content

Commit

Permalink
Merge pull request #1369 from szhsin/feat/update-deps
Browse files Browse the repository at this point in the history
feat: update deps
  • Loading branch information
szhsin authored Aug 10, 2024
2 parents 31bd25e + e378872 commit bb277a6
Show file tree
Hide file tree
Showing 8 changed files with 5,097 additions and 17,924 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

50 changes: 0 additions & 50 deletions .eslintrc.json

This file was deleted.

69 changes: 69 additions & 0 deletions eslint.config.mjs
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'
}
}
];
35 changes: 34 additions & 1 deletion example/.eslintrc.json
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
}
}
Loading

0 comments on commit bb277a6

Please sign in to comment.