Skip to content

Commit 4fd1e66

Browse files
committed
linting fix
1 parent 6384e10 commit 4fd1e66

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.eslintrc.cjs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
14+
'no-unused-vars': 'off',
15+
'@typescript-eslint/no-unused-vars': 'off',
16+
},
17+
}

react/_full-app/AuthContext.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ export function useAuthContext() {
7979
if (!context) {
8080
throw Error('Use of `useAuthContext` is outside of `AuthProvider`')
8181
}
82-
return context || {}
82+
return context || { authenticated: null, user: null }
8383
}

tsconfig.json

-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
"noEmit": true,
1515
"jsx": "react-jsx",
1616

17-
/* Linting */
18-
"strict": true,
19-
"noUnusedLocals": true,
20-
"noUnusedParameters": true,
21-
"noFallthroughCasesInSwitch": true,
22-
2317
"baseUrl": "./",
2418
"paths": {
2519
"~/*": ["react/_full-app/*"]

0 commit comments

Comments
 (0)