Skip to content

Commit 563c4a6

Browse files
committed
Move the repo back from the private GitLab
1 parent cec38c2 commit 563c4a6

File tree

268 files changed

+18491
-20324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+18491
-20324
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.next
2+
node_modules
3+
build

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/*.bs.js

.eslintrc.js

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
// eslint-disable-next-line import/no-extraneous-dependencies
2+
const appRootPath = require('app-root-path').path;
3+
4+
// Не даем eslint самому фиксить эти правила
5+
const fixRulesOverride = {
6+
'react-hooks/exhaustive-deps': 'off',
7+
};
8+
9+
// Отключаем некоторые правила, что сложно исправить, чтобы пройти проверку на прекомит хук
10+
const cliRulesOverride = {};
11+
12+
// Временно отключаем старые ошибки, чтобы можно было хоть как-то запускать в ci
13+
const ciRulesOverride = {};
14+
15+
module.exports = {
16+
plugins: ['optimize-regex', 'sonarjs', 'no-loops', 'no-use-extend-native', 'prettier'],
17+
extends: ['airbnb', 'airbnb/hooks', 'plugin:sonarjs/recommended', 'plugin:prettier/recommended'],
18+
env: {
19+
es6: true,
20+
browser: true,
21+
},
22+
root: true,
23+
settings: {
24+
react: {
25+
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
26+
},
27+
// This loads <rootdir>/jsconfig.json to eslint
28+
'import/resolver': {
29+
alias: {
30+
map: [
31+
['@', `${appRootPath}/src`],
32+
['public', `${appRootPath}/public`],
33+
],
34+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
35+
},
36+
},
37+
},
38+
rules: {
39+
'optimize-regex/optimize-regex': 'warn',
40+
'no-loops/no-loops': 'warn',
41+
'prettier/prettier': 'warn',
42+
43+
'react/react-in-jsx-scope': 'off',
44+
'react/prop-types': 'off',
45+
'react/jsx-filename-extension': [
46+
'warn',
47+
{
48+
extensions: ['.jsx', '.tsx'],
49+
},
50+
],
51+
'react/jsx-fragments': 'off',
52+
'jsx-a11y/anchor-is-valid': [
53+
'error',
54+
{
55+
components: ['Link'],
56+
specialLink: ['hrefLeft', 'hrefRight'],
57+
aspects: ['invalidHref', 'preferButton'],
58+
},
59+
],
60+
61+
// Используем объекты вместо ошибок
62+
'prefer-promise-reject-errors': 'off',
63+
64+
// Этому правилу нереально следовать
65+
'sonarjs/cognitive-complexity': 'off',
66+
67+
// компромисы с prettier
68+
'react/jsx-wrap-multilines': [
69+
'error',
70+
{
71+
declaration: false,
72+
assignment: false,
73+
},
74+
],
75+
'react/jsx-one-expression-per-line': 'off',
76+
77+
'prefer-destructuring': 'off',
78+
'linebreak-style': 'off',
79+
'no-underscore-dangle': 'off',
80+
camelcase: 'off',
81+
'prefer-rest-params': 'off',
82+
curly: ['error', 'all'],
83+
'arrow-body-style': ['error', 'always'],
84+
'no-implicit-coercion': ['error', { allow: [] }],
85+
'no-extra-boolean-cast': ['error', { enforceForLogicalOperands: true }],
86+
'no-console': ['error', { allow: ['error'] }],
87+
'no-restricted-syntax': ['error', 'SequenceExpression'],
88+
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
89+
90+
// Для работы с immer
91+
'no-param-reassign': [
92+
'error',
93+
{ props: true, ignorePropertyModificationsForRegex: ['[dD]raft|it'] },
94+
],
95+
96+
// Стараемся избегать использования default export
97+
'import/prefer-default-export': 'off',
98+
'import/extensions': 'off',
99+
// Задаём строгий порядок импортов
100+
'import/order': [
101+
'error',
102+
{
103+
groups: ['object', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
104+
pathGroups: [
105+
// Разделяем основные компоненты приложение, чтобы не было нагромаждения,
106+
// все остальные папки из src будут импортироваться вплотную.
107+
{ pattern: '{@/constants,@/constants/**}', group: 'internal', position: 'after' },
108+
{ pattern: '{@/utils,@/utils/**}', group: 'internal', position: 'after' },
109+
{ pattern: '{@/components,@/components/**}', group: 'internal', position: 'after' },
110+
{ pattern: '{@/hooks,@/hooks/**}', group: 'internal', position: 'after' },
111+
{ pattern: '@/**', group: 'internal', position: 'after' },
112+
113+
{ pattern: './*.module.scss', group: 'index', position: 'after' },
114+
],
115+
'newlines-between': 'always',
116+
pathGroupsExcludedImportTypes: ['builtin'],
117+
alphabetize: { order: 'asc', caseInsensitive: true },
118+
},
119+
],
120+
121+
...(process.env.ESLINT_MODE_CI ? ciRulesOverride : {}),
122+
...(process.env.ESLINT_MODE_CLI ? cliRulesOverride : {}),
123+
...(process.env.ESLINT_MODE_FIX ? fixRulesOverride : {}),
124+
},
125+
};

.eslintrc.json

Lines changed: 0 additions & 45 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,9 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
1+
# Favicon
2+
favicon/output
73

8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
4+
.next
135

14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
6+
node_modules
167

17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
36-
node_modules/
37-
jspm_packages/
38-
39-
# Typescript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# dotenv environment variable files
55-
.env*
56-
57-
# gatsby files
58-
.cache/
59-
public
60-
61-
# Mac files
62-
.DS_Store
63-
64-
# Yarn
65-
yarn-error.log
66-
.pnp/
67-
.pnp.js
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# IDEs
72-
.vscode
8+
# Rescript
9+
lib

.gitlab-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
stages:
2+
- prebuild
3+
- verify
4+
- build
5+
6+
prebuild:
7+
stage: prebuild
8+
extends:
9+
- .prebuild
10+
rules:
11+
- !reference [.prepare-app-rules, rules]
12+
13+
verify:
14+
stage: verify
15+
needs:
16+
- prebuild
17+
extends:
18+
- .verify
19+
rules:
20+
- !reference [.prepare-app-rules, rules]
21+
22+
build:
23+
stage: build
24+
needs:
25+
- prebuild
26+
- verify
27+
extends:
28+
- .build
29+
rules:
30+
- !reference [.prepare-app-rules, rules]
31+
32+
include:
33+
- local: .gitlab/ci/*.gitlab-ci.yml

.prettierignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.cache
2-
31
main.scss
4-
abstracts.scss
2+
abstracts.scss
3+
4+
**/*.bs.js

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM node:18.14.0 AS dependencies
2+
3+
RUN mkdir -p /workspace && chown 1000:1000 /workspace
4+
WORKDIR /workspace
5+
USER 1000
6+
7+
ENV NEXT_TELEMETRY_DISABLED=1
8+
9+
COPY --chown=1000:1000 package*.json ./
10+
RUN npm ci --force
11+
12+
FROM dependencies AS prebuild
13+
14+
COPY --chown=1000:1000 . .
15+
16+
RUN npm run res:build
17+
18+
FROM prebuild as build
19+
20+
ENV NODE_ENV=production
21+
22+
RUN npm run build
23+
24+
CMD ["npm", "run", "start"]

LICENSE

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
> Moved to GitLab: https://gitlab.com/pantheon-fun/core
1+
> Moved back from GitLab: https://gitlab.com/pantheon-fun/core
22
33
# pantheon.fun
44

0 commit comments

Comments
 (0)