Skip to content

Commit

Permalink
🔨 Added eslint for frontend linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Carr committed Apr 6, 2022
1 parent 87c058a commit 8c84968
Show file tree
Hide file tree
Showing 6 changed files with 1,260 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/hooks/local-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function useLocalStorage<T = any>(key: string, initialValue: T): [T, Upda
// A more advanced implementation would handle the error case
console.log(error)
}
}, [storedValue])
}, [key, storedValue])

return [storedValue, setStoredValue]
}
28 changes: 27 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "vite preview",
"lint": "eslint --ext .ts,tsx --ignore-path .gitignore ."
},
"dependencies": {
"immer": "9.0.12",
Expand All @@ -19,12 +20,37 @@
},
"devDependencies": {
"@preact/preset-vite": "2.2.0",
"@typescript-eslint/parser": "5.18.0",
"eslint": "8.12.0",
"eslint-config-preact": "1.3.0",
"typescript": "4.6.3",
"vite": "2.9.1",
"vite-plugin-windicss": "1.8.3",
"vite-tsconfig-paths": "3.4.1",
"windicss": "3.5.1"
},
"eslintConfig": {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"preact"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"rules": {},
"settings": {
"jest": { "version": 27 }
}
},
"volta": {
"node": "16.14.2"
}
Expand Down
Loading

0 comments on commit 8c84968

Please sign in to comment.