diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 09c2f4d..db1fb57 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -5,52 +5,52 @@ module.exports = { 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', - "prettier", + 'prettier', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parser: '@typescript-eslint/parser', plugins: ['import', 'react-refresh'], rules: { // Eslint - "import/no-unresolved": "error", - 'import/order': ["error", { - groups: ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"], - 'newlines-between': 'always' - }], + 'import/no-unresolved': 'error', + 'import/order': [ + 'error', + { + groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'], + 'newlines-between': 'always', + }, + ], // React - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], + 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], // Typescript - "@typescript-eslint/array-type": "error", - "@typescript-eslint/camelcase": [0], - "@typescript-eslint/unbound-method": ["off"], - "@typescript-eslint/no-floating-promises": ["off"], - "@typescript-eslint/explicit-function-return-type": ["off", { "allowExpressions": true }], - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/no-misused-promises": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-cal": "off", - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-unsafe-enum-comparison": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unused-vars": "off", + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/camelcase': [0], + '@typescript-eslint/unbound-method': ['off'], + '@typescript-eslint/no-floating-promises': ['off'], + '@typescript-eslint/explicit-function-return-type': ['off', { allowExpressions: true }], + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-cal': 'off', + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-unsafe-enum-comparison': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unused-vars': 'off', }, settings: { 'import/parsers': { - '@typescript-eslint/parser': [".ts", ".tsx"] + '@typescript-eslint/parser': ['.ts', '.tsx'], }, 'import/resolver': { - 'typescript': { - 'alwaysTryTypes': true - } - } - } -} + typescript: { + alwaysTryTypes: true, + }, + }, + }, +}; diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..dedf896 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,50 @@ +--- +exclude: | + (?x)^( + dist| + node_modules + )$ +default_language_version: + python: python3.9 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + exclude: ^.*\.md$ + - id: end-of-file-fixer + - id: no-commit-to-branch + - id: mixed-line-ending + args: [--fix=lf] + - id: check-merge-conflict + + - repo: https://github.com/pre-commit/mirrors-eslint + rev: v8.56.0 + hooks: + - id: eslint + files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx + types: [file] + additional_dependencies: + - eslint-config-prettier@9.0.0 + - eslint-import-resolver-typescript@3.6.1 + - eslint-plugin-import@2.29.0 + - eslint-plugin-react-hooks@4.6.0 + - eslint-plugin-react-refresh@0.4.3 + - eslint-plugin-simple-import-sort@10.0.0 + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + + - repo: https://github.com/adrienverge/yamllint + rev: v1.33.0 + hooks: + - id: yamllint + + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '80'] diff --git a/README.md b/README.md index 6716246..b120f98 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ This site helps streamers manage viewer requests for various types of auctions. ## Suggestions and bugreports -You can create an [issue](https://github.com/Pointauc/pointauc_frontend/issues) if you want to suggest something or tell about a bug. \ No newline at end of file +You can create an [issue](https://github.com/Pointauc/pointauc_frontend/issues) if you want to suggest something or tell about a bug. diff --git a/index.html b/index.html index f972887..5636e31 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,7 @@ Поинтовый аукцион - +
diff --git a/package.json b/package.json index d29b64a..7c74943 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "react-router": "^6.18.0", "react-router-dom": "^6.18.0", "react-transition-group": "^4.4.5", + "react-window": "^1.8.10", "redux": "^4.2.1", "redux-thunk": "^2.4.2", "socket.io-client": "^4.7.2", diff --git a/public/vite.svg b/public/vite.svg index e7b8dfb..ee9fada 100644 --- a/public/vite.svg +++ b/public/vite.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/App.scss b/src/App.scss index 79492c5..e856146 100644 --- a/src/App.scss +++ b/src/App.scss @@ -23,7 +23,6 @@ .nav { &-icon { - svg { width: 26px !important; height: 26px !important; @@ -31,4 +30,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/icons/DAAlert.svg b/src/assets/icons/DAAlert.svg index 7f96ada..61f19d6 100644 --- a/src/assets/icons/DAAlert.svg +++ b/src/assets/icons/DAAlert.svg @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/src/assets/icons/auction.svg b/src/assets/icons/auction.svg index 552ed20..6aa5d93 100644 --- a/src/assets/icons/auction.svg +++ b/src/assets/icons/auction.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/assets/index.html b/src/assets/index.html index 36f128e..ce61e8b 100644 --- a/src/assets/index.html +++ b/src/assets/index.html @@ -1,16 +1,18 @@ - + - + @@ -19,7 +21,7 @@ name="description" content="Сайт для удобного проведения поинтовых или денежных аукционов. Имеет интеграции такими сервисами как Twitch, Donation Alerts и DonatePay." /> - +