Skip to content

Commit 4126daa

Browse files
author
goldtech119
committed
hotfix
0 parents  commit 4126daa

File tree

315 files changed

+57128
-0
lines changed

Some content is hidden

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

315 files changed

+57128
-0
lines changed

.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Dockerfile
2+
node_modules/
3+
dist/
4+
.*
5+
!.npmrc
6+
!.next

.eslintrc.js

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
const { rules } = require('eslint-config-xo-typescript');
2+
3+
/** @type {import('prettier').Config} */
4+
const prettierConfig = {
5+
singleQuote: true,
6+
jsxSingleQuote: false,
7+
trailingComma: 'all',
8+
endOfLine: 'auto',
9+
printWidth: 120,
10+
useTabs: true,
11+
arrowParens: 'avoid',
12+
}
13+
14+
/** @type {import('eslint').ESLint.ConfigData} */
15+
const config = {
16+
root: true,
17+
parser: '@typescript-eslint/parser',
18+
ignorePatterns: [
19+
'.eslintrc.js',
20+
'*.config.js',
21+
'node_modules/',
22+
'dist/',
23+
'locales/',
24+
'public/'
25+
],
26+
parserOptions: {
27+
project: 'tsconfig.json',
28+
tsconfigRootDir: __dirname,
29+
sourceType: 'module',
30+
},
31+
plugins: [
32+
'@typescript-eslint/eslint-plugin',
33+
'mui',
34+
'import',
35+
'prettier'
36+
],
37+
extends: [
38+
'next',
39+
'xo',
40+
'xo/browser',
41+
'xo-typescript',
42+
'plugin:import/errors',
43+
'plugin:import/warnings'
44+
],
45+
rules: {
46+
'prettier/prettier': ['error', prettierConfig],
47+
'@typescript-eslint/object-curly-spacing': [
48+
'error',
49+
'always'
50+
],
51+
'@typescript-eslint/no-confusing-void-expression': 'off',
52+
'@typescript-eslint/naming-convention': ['error',
53+
{
54+
selector: 'objectLiteralProperty',
55+
filter: '^&.*',
56+
format: null,
57+
},
58+
{
59+
selector: 'objectLiteralProperty',
60+
filter: '.*', // filter is a hack, required due to spreading default rules
61+
format: ['strictCamelCase', 'StrictPascalCase'],
62+
leadingUnderscore: 'allowSingleOrDouble',
63+
},
64+
{
65+
selector: 'variable',
66+
filter: '.*', // filter is a hack, required due to spreading default rules
67+
format: ['strictCamelCase', 'StrictPascalCase'],
68+
leadingUnderscore: 'allowSingleOrDouble',
69+
trailingUnderscore: 'forbid'
70+
},
71+
{
72+
selector: 'function',
73+
filter: '.*', // filter is a hack, required due to spreading default rules
74+
format: ['strictCamelCase', 'StrictPascalCase'],
75+
},
76+
...rules['@typescript-eslint/naming-convention'].slice(1),
77+
],
78+
'import/order': [
79+
'error',
80+
{
81+
'groups': ['builtin', 'external', 'parent', 'sibling', 'index'],
82+
'pathGroups': [
83+
{
84+
pattern: '@dynogg/**',
85+
group: 'builtin',
86+
position: 'after',
87+
},
88+
{
89+
pattern: 'react',
90+
group: 'external',
91+
position: 'before',
92+
},
93+
{
94+
pattern: '@mui/**',
95+
group: 'external',
96+
position: 'before',
97+
},
98+
],
99+
distinctGroup: false,
100+
'pathGroupsExcludedImportTypes': ['builtin'],
101+
'newlines-between': 'always',
102+
'alphabetize': {
103+
order: 'asc',
104+
caseInsensitive: false,
105+
},
106+
},
107+
],
108+
'jsx-quotes': ['error', 'prefer-double'],
109+
'no-restricted-imports': ['error', {
110+
'paths': [
111+
{
112+
'name': '@emotion/react',
113+
'message': 'Please use @mui/material instead.'
114+
}
115+
]
116+
}],
117+
'indent': [
118+
'error',
119+
'tab',
120+
{
121+
SwitchCase: 1,
122+
flatTernaryExpressions: true,
123+
FunctionDeclaration: {
124+
parameters: 'first',
125+
},
126+
FunctionExpression: {
127+
parameters: 'first',
128+
},
129+
ignoredNodes: ['PropertyDefinition']
130+
},
131+
],
132+
'@typescript-eslint/indent': 'off',
133+
'@typescript-eslint/naming-convention': 'off',
134+
'no-alert': 'warn',
135+
'indent': 'off',
136+
'no-mixed-spaces-and-tabs': 'off',
137+
'@typescript-eslint/no-explicit-any': 'error',
138+
'@typescript-eslint/ban-types': 'off',
139+
'capitalized-comments': 'off'
140+
},
141+
};
142+
143+
module.exports = config;

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
37+
.env
38+
39+
# Sentry
40+
.sentryclirc
41+
42+
# .npmrc
43+
.npmrc

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/prepare-commit-msg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
GITROOT=$(git rev-parse --show-toplevel)
5+
6+
bash $GITROOT/node_modules/@dynogg/devtools/hooks/prepare-commit-msg/jira-prefix $1

.storybook/main.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import type { StorybookConfig } from '@storybook/nextjs';
2+
3+
const config: StorybookConfig = {
4+
staticDirs: ['../public'],
5+
stories: ['./stories/**/*.mdx', './stories/**/*.stories.(ts|tsx)', '../components/**/*.stories.(ts|tsx)'],
6+
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-themes'],
7+
framework: {
8+
name: '@storybook/nextjs',
9+
options: {},
10+
},
11+
docs: {
12+
autodocs: true,
13+
},
14+
env: async (config) => ({ ...config, ...process.env }) as Record<string, string>,
15+
typescript: {
16+
check: false,
17+
checkOptions: {},
18+
reactDocgen: 'react-docgen-typescript',
19+
reactDocgenTypescriptOptions: {
20+
shouldExtractLiteralValuesFromEnum: true,
21+
shouldRemoveUndefinedFromOptional: true,
22+
shouldExtractValuesFromUnion: true,
23+
propFilter: (prop) => (prop.parent ? !/node_modules\/(?!@mui)/.test(prop.parent.fileName) : true),
24+
},
25+
},
26+
};
27+
28+
export default config;

.storybook/preview.tsx

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { CssBaseline, ThemeProvider } from '@mui/material';
2+
import { withThemeFromJSXProvider } from '@storybook/addon-themes';
3+
import type { Preview, ReactRenderer } from '@storybook/react';
4+
import themes from '../styles/theme';
5+
6+
const themeDecorator = withThemeFromJSXProvider<ReactRenderer>({
7+
themes,
8+
defaultTheme: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',
9+
Provider: ThemeProvider,
10+
GlobalStyles: CssBaseline,
11+
});
12+
13+
export default {
14+
parameters: {
15+
actions: { argTypesRegex: '^on[A-Z].*' },
16+
controls: {
17+
expanded: true,
18+
hideNoControlsWarning: true,
19+
matchers: {
20+
color: /(background|color)$/i,
21+
date: /Date$/,
22+
},
23+
},
24+
},
25+
decorators: [themeDecorator],
26+
} satisfies Preview;

0 commit comments

Comments
 (0)