Skip to content

Commit f1821a0

Browse files
authored
Merge pull request #1 from CodeCafeCommunity/create-initial-react-scaffold
Create initial react scaffold
2 parents ec57d2c + d70f652 commit f1821a0

20 files changed

Lines changed: 5031 additions & 1 deletion
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Format and Lint
2+
on:
3+
push:
4+
pull_request:
5+
branches: [main]
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [18]
15+
steps:
16+
- name: Check out branch (pull request)
17+
uses: actions/checkout@v4
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Install packages
23+
run: npm ci
24+
- name: Check Formatting with Prettier
25+
run: npx prettier --check .
26+
- name: Lint with ESLint
27+
run: npx eslint .

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# codecafecommunity.github.io
1+
# Code Café Community website
2+
3+
:construction: Currently under construction :construction:

eslint.config.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import prettierConfig from "eslint-config-prettier";
4+
import react from "eslint-plugin-react";
5+
import reactHooks from "eslint-plugin-react-hooks";
6+
import reactRefresh from "eslint-plugin-react-refresh";
7+
import tseslint from "typescript-eslint";
8+
9+
export default tseslint.config(
10+
{ ignores: ["dist"] },
11+
{
12+
extends: [
13+
js.configs.recommended,
14+
...tseslint.configs.strictTypeChecked,
15+
...tseslint.configs.stylisticTypeChecked,
16+
prettierConfig,
17+
],
18+
files: ["**/*.{ts,tsx}"],
19+
languageOptions: {
20+
ecmaVersion: 2020,
21+
globals: globals.browser,
22+
parserOptions: {
23+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
24+
tsconfigRootDir: import.meta.dirname,
25+
},
26+
},
27+
settings: { react: { version: "18.3.1" } },
28+
plugins: {
29+
react,
30+
"react-hooks": reactHooks,
31+
"react-refresh": reactRefresh,
32+
},
33+
rules: {
34+
...reactHooks.configs.recommended.rules,
35+
"react-refresh/only-export-components": [
36+
"warn",
37+
{ allowConstantExport: true },
38+
],
39+
...react.configs.recommended.rules,
40+
...react.configs["jsx-runtime"].rules,
41+
},
42+
},
43+
);

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)