Skip to content

Commit

Permalink
Merge pull request #194 from JohnsonMao/dev
Browse files Browse the repository at this point in the history
build: eslint config
  • Loading branch information
JohnsonMao authored Dec 26, 2024
2 parents c3f3b06 + 7649b9b commit 12e11cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 8 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ module.exports = {
es2021: true,
node: true,
},
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: [
'*.config.js',
'.eslintrc.js',
'next-sitemap.js',
'server.js',
],
settings: {
'import/resolver': {
alias: {
Expand All @@ -29,12 +34,9 @@ module.exports = {
rules: {
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['./*.js'] },
],
'@typescript-eslint/no-var-requires': [
'error',
{ devDependencies: ['./*.js'] },
{ devDependencies: ['./*.ts'] },
],
'@typescript-eslint/no-require-imports': 'error',
'import/extensions': [
'error',
'ignorePackages',
Expand Down
6 changes: 4 additions & 2 deletions contexts/Auth/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
useReducer,
useRef,
} from "react";
import { useRouter } from "next/navigation";
import { usePathname } from "next/navigation";
import { useRouter, usePathname } from "next/navigation";
import useSWR, { SWRConfig } from "swr";
import { useDispatch } from "react-redux";

Expand Down Expand Up @@ -194,6 +193,9 @@ export function AuthProvider({ children }: PropsWithChildren) {
dispatch({ type: ActionTypes.UPDATE_USER, payload });
break;
}
default: {
break;
}
}
},
openLoginModal: (payload) => {
Expand Down

0 comments on commit 12e11cf

Please sign in to comment.