Skip to content

Commit

Permalink
feat: create game
Browse files Browse the repository at this point in the history
  • Loading branch information
an-parubets committed Sep 10, 2023
0 parents commit 6548b0d
Show file tree
Hide file tree
Showing 138 changed files with 34,289 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src/'],
},
},
},
parser: '@typescript-eslint/parser',
extends: [
'react-app',
'react-app/jest',
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
plugins: ['@typescript-eslint', 'react', 'jsx-a11y', 'import'],
rules: {
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/no-extraneous-dependencies': ['error', { devDependencies: ['**/*.test.{js,jsx,ts,tsx}', '**/*.spec.{js,jsx,ts,tsx}', './src/setupTests.ts'] }],
'no-restricted-exports': 'off',
'import/prefer-default-export': 'off',
'consistent-return': 'off',
'no-shadow': 'off',
'no-param-reassign': 'off',
'react/require-default-props': 'off',
'react/jsx-props-no-spreading': 'off',
'react/state-in-constructor': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'@typescript-eslint/no-non-null-assertion': 'off',
// You can add or customize ESLint rules as needed
},
};
57 changes: 57 additions & 0 deletions .github/workflows/deploy-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build

- name: Run tests
run: npm run test

- name: Uploading production-ready build files
uses: actions/upload-artifact@v2
with:
name: production-files
path: ./build

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Downloading artifact
uses: actions/download-artifact@v2
with:
name: production-files
path: ./build

- name: Deploying to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.idea
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
[ -n "$CI" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

npm test -- --watchAll=false --changedSince=main
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
@types:registry=https://registry.npmjs.org/
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Who wants to be a millionaire?

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## How to run locally

1. Clone project `git clone <repo>`
2. Install dependencies `npm ci`
3. Start dev environment `npm start`
4. Open browser window (if it's closed)

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
Loading

0 comments on commit 6548b0d

Please sign in to comment.