Skip to content
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
6 changes: 3 additions & 3 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
extends: '@mate-academy/eslint-config',
env: {
jest: true
jest: true,
},
rules: {
'no-proto': 0
'no-proto': 0,
},
plugins: ['jest']
plugins: ['jest'],
};
23 changes: 23 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ node_modules
# MacOS
.DS_Store

# env files
*.env
.env*
client/.env*
2 changes: 2 additions & 0 deletions client/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/node_modules
84 changes: 84 additions & 0 deletions client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module.exports = {
env: {
browser: true
},
extends: [
'plugin:react/recommended',
"plugin:react-hooks/recommended",
'plugin:prettier/recommended',
'plugin:cypress/recommended',
],
parserOptions: {
ecmaVersion: 2024,
sourceType: "module",
},
overrides: [
{
'files': ['**/*.spec.jsx'],
'rules': {
'react/jsx-filename-extension': ['off'],
}
}
],
plugins: [
'jsx-a11y',
'import',
'react-hooks',
'prettier'
],
rules: {
// JS
'semi': 'off',
'prefer-const': 2,
curly: [2, 'all'],
'max-len': ['error', {
ignoreTemplateLiterals: true,
ignoreComments: true,
}],
'no-redeclare': [2, {builtinGlobals: true}],
'no-console': 2,
'operator-linebreak': 0,
'brace-style': [2, '1tbs'],
'arrow-body-style': 0,
'arrow-parens': 0,
'no-param-reassign': [2, {props: true}],
'padding-line-between-statements': [
2,
{blankLine: 'always', prev: '*', next: 'return'},
{blankLine: 'always', prev: ['const', 'let', 'var'], next: '*'},
{blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var']},
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'always', prev: 'block-like', next: '*'},
],
'implicit-arrow-linebreak': 0,

// React
'react/prop-types': 0,
'react/require-default-props': 0,
'import/prefer-default-export': 0,
'standard/no-callback-literal': 0,
'react/jsx-filename-extension': [1, {extensions: ['.jsx']}],
'react/destructuring-assignment': 0,
'react/jsx-props-no-spreading': 0,
'react/state-in-constructor': [2, 'never'],
'react-hooks/rules-of-hooks': 2,
'jsx-a11y/label-has-associated-control': ["error", {
assert: "either",
}],
'jsx-a11y/label-has-for': [2, {
components: ['Label'],
required: {
some: ['id', 'nesting'],
},
allowChildren: true,
}],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off'
},
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts', 'src/vite-env.d.ts', 'cypress'],
settings: {
react: {
version: 'detect',
},
},
};
10 changes: 10 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.idea
.vscode
build
dist
node_modules
.DS_Store

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2 changes: 2 additions & 0 deletions client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/build
11 changes: 11 additions & 0 deletions client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"jsxSingleQuote": false,
"printWidth": 80,
"semi": true,
"bracketSpacing": true,
"bracketSameLine": false
}
1 change: 1 addition & 0 deletions client/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
4 changes: 4 additions & 0 deletions client/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: "@mate-academy/stylelint-config",
rules: {}
};
12 changes: 12 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Login App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading
Loading