Commit a1753146 authored by Zakhar Shulha's avatar Zakhar Shulha
Browse files

initialize-project

parent 9a878b01
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
module.exports = {
env: {
jest: true,
browser: true,
es2020: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'@typescript-eslint',
'react',
'jest',
'prettier',
'sort-imports-es6-autofix',
],
extends: [
'airbnb',
'airbnb/hooks',
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
],
settings: {
react: {
version: 'detect', // latest
},
},
rules: {
camelcase: 'off',
'max-len': ['error', { code: 120 }],
'no-bitwise': 'off',
'import/namespace': 'off',
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
},
],
'import/no-cycle': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
'import/extensions': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-plusplus': 'off',
'react/prop-types': 'off',
'@typescript-eslint/member-delimiter-style': [
2,
{
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: true,
},
},
],
// 'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }],
'react/jsx-props-no-spreading': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description',
minimumDescriptionLength: 10,
},
],
'react/no-unused-prop-types': 'off',
'react/default-props-match-prop-types': 'off',
'no-use-before-define': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
'import/no-named-as-default': 0,
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
// 'global-require': 'off',
// '@typescript-eslint/no-unsafe-assignment': 'off',
// 'import/prefer-default-export': 'off',
// 'react/react-in-jsx-scope': 'off',
// 'jsx-a11y/no-static-element-interactions': 'off',
// 'jsx-a11y/accessible-emoji': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
// 'react/no-unescaped-entities': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'import/no-extraneous-dependencies': 'off',
'object-curly-newline': 'off',
'no-confusing-arrow': 'off',
'react/jsx-fragments': 'off',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
};
......@@ -14,10 +14,17 @@
# misc
.DS_Store
.env.local
.env.stage
.env.dev
.env.development.local
.env.test.local
.env.production
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
/.husky/.gitignore
.env
.env.*
{
"parser": "typescript",
"useTabs": false,
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"semi": false
}
{
"plugins": [
"stylelint-scss"
],
"rules": {
"at-rule-empty-line-before": [
"always", {
"ignoreAtRules": [ "else"]
}
],
"block-opening-brace-space-before": "always",
"block-closing-brace-newline-after": [
"always", {
"ignoreAtRules": [ "if", "else"]
}
],
"at-rule-name-space-after": "always",
"rule-empty-line-before": "always",
"scss/at-else-closing-brace-newline-after": "always-last-in-chain",
"scss/at-else-closing-brace-space-after": "always-intermediate",
"scss/at-else-empty-line-before": "never",
"scss/at-if-closing-brace-newline-after": "always-last-in-chain",
"scss/at-if-closing-brace-space-after": "always-intermediate"
}
}
This diff is collapsed.
......@@ -3,6 +3,32 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@popperjs/core": "^2.11.5",
"@sentry/react": "^7.0.0",
"@sentry/tracing": "^7.0.0",
"@types/yup": "^0.29.14",
"amazon-cognito-identity-js": "^5.2.9",
"axios": "^0.27.2",
"clsx": "^1.1.1",
"connected-react-router": "^6.9.2",
"env-cmd": "^10.1.0",
"formik": "^2.2.9",
"history": "^5.3.0",
"http-proxy-middleware": "^2.0.6",
"moment": "^2.29.3",
"react-popper": "^2.3.0",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-select": "^5.3.2",
"react-tiny-popover": "^7.0.1",
"react-verification-code-input": "^1.2.9",
"redux": "^4.2.0",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"sass": "^1.52.1",
"stylelint": "^14.8.5",
"stylelint-scss": "^4.2.0",
"yup": "^0.32.11",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
......@@ -17,10 +43,20 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "env-cmd -f .env.local react-scripts start",
"start:stage": "env-cmd -f .env.stage react-scripts start",
"start:dev": "env-cmd -f .env.dev react-scripts start",
"start:prod": "env-cmd -f .env.production react-scripts start",
"build": "env-cmd -f .env react-scripts build",
"build:local": "env-cmd -f .env.local react-scripts build",
"build:stage": "env-cmd -f .env.stage react-scripts build",
"build:dev": "env-cmd -f .env.dev react-scripts build",
"build:prod": "env-cmd -f .env.production react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"precommit": "lint-staged",
"eject": "react-scripts eject",
"lint": "eslint --fix --ext **/*.ts **/*.tsx & stylelint --fix src/**/*.scss",
"stylelint": "stylelint --fix src/**/*.scss"
},
"eslintConfig": {
"extends": [
......@@ -28,16 +64,33 @@
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"browserslist": [
"> .2% or last 2 versions",
"not dead"
],
"devDependencies": {
"@babel/core": "^7.12.13",
"@testing-library/jest-dom": "^5.14.1",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"@types/react-redux": "^7.1.24",
"@types/react-router-dom": "^5.3.3",
"@types/redux-logger": "^3.0.9",
"@typescript-eslint/eslint-plugin": "5.27.0",
"@typescript-eslint/parser": "5.27.0",
"eslint": "8.16.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.4.6",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"lint-staged": "^13.0.0",
"prettier": "^2.6.2",
"redux-saga-test-plan": "^4.0.5"
}
}
......@@ -8,7 +8,11 @@ function App() {
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
Edit
{' '}
<code>src/App.tsx</code>
{' '}
and save to reload.
</p>
<a
className="App-link"
......
......@@ -5,12 +5,13 @@ import App from './App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
document.getElementById('root') as HTMLElement,
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);
// If you want to start measuring performance in your app, pass a function
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment