-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use new configs * new package * fix errors * fix errors * fix errors
- Loading branch information
Showing
68 changed files
with
602 additions
and
340 deletions.
There are no files selected for viewing
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
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
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
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,66 @@ | ||
import js from "@eslint/js" | ||
import globals from "globals" | ||
import react from "eslint-plugin-react" | ||
import reactHooks from "eslint-plugin-react-hooks" | ||
import reactRefresh from "eslint-plugin-react-refresh" | ||
import prettier from "eslint-plugin-prettier" | ||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended" | ||
import tseslint from "typescript-eslint" | ||
|
||
// https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts | ||
export default tseslint.config( | ||
{ ignores: ["dist", "**/*.d.ts"] }, | ||
{ | ||
settings: { react: { version: "18.3" } }, | ||
extends: [ | ||
js.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
eslintPluginPrettierRecommended, | ||
], | ||
files: ["**/*.{ts,tsx}"], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
parserOptions: { | ||
project: ["./tsconfig.node.json", "./tsconfig.app.json"], | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
plugins: { | ||
react, | ||
prettier, | ||
"react-hooks": reactHooks, | ||
"react-refresh": reactRefresh, | ||
}, | ||
rules: { | ||
...react.configs.recommended.rules, | ||
...react.configs["jsx-runtime"].rules, | ||
...reactHooks.configs.recommended.rules, | ||
"sort-imports": ["error", { allowSeparatedGroups: true }], | ||
"@typescript-eslint/no-empty-object-type": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ fixStyle: "inline-type-imports" }, | ||
], | ||
"@typescript-eslint/no-restricted-imports": [ | ||
"error", | ||
{ | ||
paths: [ | ||
{ | ||
name: "react-redux", | ||
importNames: ["useSelector", "useStore", "useDispatch"], | ||
message: | ||
"Please use pre-typed versions from `src/app/hooks.ts` instead.", | ||
}, | ||
], | ||
patterns: [ | ||
{ | ||
group: ["codeforlife/src"], | ||
message: "Please use `codeforlife` instead of `codeforlife/src`.", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
) |
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
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,16 +1,14 @@ | ||
import { CssBaseline, ThemeProvider } from "@mui/material" | ||
import type { FC } from "react" | ||
import { type FC } from "react" | ||
import { App as _ } from "codeforlife/components" | ||
|
||
import Router from "./router" | ||
import routes from "./routes" | ||
import store from "./app/store" | ||
import theme from "./app/theme" | ||
|
||
const App: FC = () => { | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Router /> | ||
</ThemeProvider> | ||
) | ||
} | ||
export interface AppProps {} | ||
|
||
const App: FC<AppProps> = () => ( | ||
<_ store={store} theme={theme} routes={routes} /> | ||
) | ||
|
||
export default App |
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
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
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
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,20 @@ | ||
import env from "codeforlife/env" | ||
|
||
export * from "codeforlife/env" | ||
|
||
// Gmail. | ||
export const GMAIL_FILTERS_PASSWORD_RESET_REQUEST = | ||
env.VITE_GMAIL_FILTERS_PASSWORD_RESET_REQUEST | ||
export const GMAIL_FILTERS_EMAIL_VERIFICATION = | ||
env.VITE_GMAIL_FILTERS_EMAIL_VERIFICATION | ||
|
||
// Links to external sites. | ||
export const LINK_FEMALE_GRADUATES_IN_CS = env.VITE_LINK_FEMALE_GRADUATES_IN_CS | ||
export const LINK_OUTLOOK_HOME = env.VITE_LINK_OUTLOOK_HOME | ||
export const LINK_SKILLS_FOR_THE_FUTURE = env.VITE_LINK_SKILLS_FOR_THE_FUTURE | ||
export const LINK_PORTAL_GITHUB = env.VITE_LINK_PORTAL_GITHUB | ||
export const LINK_CFL_DOCS = env.VITE_LINK_CFL_DOCS | ||
export const LINK_PRIMARY_PACK_GITBOOK = env.VITE_LINK_PRIMARY_PACK_GITBOOK | ||
export const LINK_PRIMARY_PACK_DOWNLOAD = env.VITE_LINK_PRIMARY_PACK_DOWNLOAD | ||
export const LINK_PYTHON_PACK_GITBOOK = env.VITE_LINK_PYTHON_PACK_GITBOOK | ||
export const LINK_PYTHON_PACK_DOWNLOAD = env.VITE_LINK_PYTHON_PACK_DOWNLOAD |
Oops, something went wrong.