generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial repo setup #2
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8451904
add: Initial repo setup
MehulKChaudhari 4a0a9ad
add: testing and eslint
MehulKChaudhari c39607f
add: workflow file
MehulKChaudhari a5bdfa8
fix: title of site
MehulKChaudhari 839be08
fix: eslint config
MehulKChaudhari 2d50efe
Update README.md
MehulKChaudhari 733ebb8
Update README.md
MehulKChaudhari b8affa6
Fix: title
MehulKChaudhari 841e091
fix: eslint
MehulKChaudhari b14340b
fix: CI
MehulKChaudhari 63d001f
chore: remove frozen file flag
MehulKChaudhari 5e6df34
fix: lint errors
MehulKChaudhari 78c9cd0
add: volta
MehulKChaudhari 32e9f3d
update: pnpm-lock.yaml
MehulKChaudhari caf2b9c
fix: pnpm version in CI
MehulKChaudhari b703e06
fix: formatting
MehulKChaudhari 62151cc
chore: remove unneccesary step
MehulKChaudhari 1183a6d
fix: format
MehulKChaudhari 8db393a
fix: CI file
MehulKChaudhari a7b1cc7
Merge branch 'setup/react-ts-vite' into add-test-setup
MehulKChaudhari 8f13fcf
fix: eslint config
MehulKChaudhari bd6e583
Update README.md
MehulKChaudhari c8c39c2
fix: title of site
MehulKChaudhari 8e47eec
fix: lint
MehulKChaudhari 1af6f68
Merge branch 'add-test-setup' into add-Workflow-to-run-tests-eslint-c…
MehulKChaudhari 5ef3a12
Merge branch 'add-Workflow-to-run-tests-eslint-check' into add--volta
MehulKChaudhari 5d3083a
Fix: title
MehulKChaudhari 3aaf58d
Merge pull request #5 from Real-Dev-Squad/add--volta
prakashchoudhary07 f0cd89a
Merge pull request #4 from Real-Dev-Squad/add-Workflow-to-run-tests-e…
prakashchoudhary07 200948f
Merge pull request #3 from Real-Dev-Squad/add-test-setup
prakashchoudhary07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,43 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
lint_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use latest node version |
||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run ESLint | ||
run: pnpm lint | ||
|
||
- name: Check code format | ||
run: pnpm format | ||
|
||
- name: Run tests | ||
run: pnpm test |
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,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,9 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"printWidth": 80, | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false | ||
} |
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,2 +1,3 @@ | ||
# website-template | ||
|
||
A template to create all public facing sites |
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,81 @@ | ||
import js from '@eslint/js'; | ||
import globals from 'globals'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import reactRefresh from 'eslint-plugin-react-refresh'; | ||
import tseslint from 'typescript-eslint'; | ||
import react from 'eslint-plugin-react'; | ||
import prettier from 'eslint-plugin-prettier'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
import jsxA11y from 'eslint-plugin-jsx-a11y'; | ||
|
||
export default tseslint.config( | ||
{ | ||
ignores: ['dist/**'], | ||
}, | ||
js.configs.recommended, | ||
{ | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
...globals.jest, | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
parser: tseslint.parser, | ||
}, | ||
plugins: { | ||
react: react, | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
prettier: prettier, | ||
'@typescript-eslint': tseslint.plugin, | ||
import: importPlugin, | ||
'jsx-a11y': jsxA11y, | ||
}, | ||
rules: { | ||
'no-use-before-define': 'off', | ||
'no-shadow': 'off', | ||
'no-unused-vars': 'off', | ||
'no-underscore-dangle': 'off', | ||
'import/extensions': 'off', | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }], | ||
'import/prefer-default-export': 'off', | ||
'import/no-unresolved': 'off', | ||
'react/jsx-filename-extension': ['warn', { extensions: ['.tsx'] }], | ||
'react/function-component-definition': [ | ||
'error', | ||
{ namedComponents: 'arrow-function' }, | ||
], | ||
'react/require-default-props': 'off', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'@typescript-eslint/no-use-before-define': ['error'], | ||
'@typescript-eslint/no-shadow': ['error'], | ||
'@typescript-eslint/no-unused-vars': ['error'], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
'prettier/prettier': ['error'], | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
}, | ||
); |
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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/rds-logo.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Feature Flag | Real Dev Squad</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,52 @@ | ||
{ | ||
"name": "feature-flag-frontend", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"format": "prettier --check .", | ||
"format:fix": "prettier --write .", | ||
"preview": "vite preview", | ||
"test": "vitest", | ||
"test:watch": "vitest --watch" | ||
Comment on lines
+7
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add coverage report command |
||
}, | ||
"dependencies": { | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.14.0", | ||
"@testing-library/jest-dom": "^6.6.3", | ||
"@testing-library/react": "^16.0.1", | ||
"@types/react": "^18.3.12", | ||
"@types/react-dom": "^18.3.1", | ||
"@typescript-eslint/eslint-plugin": "^8.13.0", | ||
"@typescript-eslint/parser": "^8.13.0", | ||
"@vitejs/plugin-react": "^4.3.3", | ||
"eslint": "^8.57.1", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-jest": "^28.8.3", | ||
"eslint-plugin-jsx-a11y": "^6.10.2", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-react": "^7.37.2", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-refresh": "^0.4.14", | ||
"globals": "^15.11.0", | ||
"jsdom": "^25.0.1", | ||
"prettier": "^3.3.3", | ||
"typescript": "~5.6.2", | ||
"typescript-eslint": "^8.11.0", | ||
"vite": "^5.4.10", | ||
"vitest": "^2.1.4" | ||
}, | ||
"volta": { | ||
"node": "20.0.0", | ||
"pnpm": "8.0.0" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a time out