Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wave 04 async #17

Open
wants to merge 4 commits into
base: wave-04
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .eslintrc.cjs

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dist
dist-ssr
*.local

.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ The goals of this pair project are to:

- Part 1: React Components, Props, State and Event Handling
- [Wave 01: Setup and Baseline](./project-docs/wave-01.md)
- [Wave 02: Lifting Up State](./project-docs/wave-02.md)
- [Wave 02: State and Event Handling](./project-docs/wave-02.md)
- [Wave 03: Lifting Up State](./project-docs/wave-03.md)
- Part 2: Connecting to the Task List API
- [Wave 03: useEffect And Axios](./project-docs/wave-03.md)
- [Wave 04: Handling Forms](./project-docs/wave-04.md)
- [Wave 04: useEffect And Axios](./project-docs/wave-04.md)
- [Wave 05: Handling Forms](./project-docs/wave-05.md)

## Notes on Tests

Expand Down
66 changes: 66 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { fixupConfigRules } from "@eslint/compat";
import reactRefresh from "eslint-plugin-react-refresh";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import vitestGlobals from "eslint-plugin-vitest-globals";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["**/dist", "**/.eslintrc.cjs", "**/eslint.config.mjs", "**/vite.config.js"],
},
{
files: ["**/*.js", "**/*.jsx"]
}
, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:vitest-globals/recommended",
)), {
plugins: {
"react-refresh": reactRefresh,
},

languageOptions: {
globals: {
...globals.browser,
...vitestGlobals.environments.env.globals,
},

ecmaVersion: "latest",
sourceType: "module",
},

settings: {
react: {
version: "18.2",
},
},

rules: {
"react-refresh/only-export-components": ["warn", {
allowConstantExport: true,
}],

semi: ["warn", "always"],
"comma-dangle": ["warn", "only-multiline"],

quotes: ["error", "single", {
allowTemplateLiterals: true,
avoidEscape: true,
}],

camelcase: "error",
},
}];
Loading