Skip to content

Commit 7cc8c02

Browse files
committed
chore: init project
0 parents  commit 7cc8c02

File tree

486 files changed

+34708
-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.

486 files changed

+34708
-0
lines changed

.editorconfig

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Matches multiple files with brace expansion notation
12+
# Set default charset
13+
[*.{js,py}]
14+
charset = utf-8
15+
16+
# 4 space indentation
17+
[*.py]
18+
indent_style = space
19+
indent_size = 4
20+
21+
# 2 space indentation
22+
[*.{vue,scss,ts}]
23+
indent_style = space
24+
indent_size = 2
25+
26+
# Tab indentation (no size specified)
27+
[Makefile]
28+
indent_style = tab
29+
30+
# Indentation override for all JS under lib directory
31+
[lib/**.js]
32+
indent_style = space
33+
indent_size = 2
34+
35+
# Matches the exact files either package.json or .travis.yml
36+
[{package.json,.travis.yml}]
37+
indent_style = space
38+
indent_size = 2

.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
AUTH_ORIGIN=http://localhost:3000
2+
AUTH_SECRET=yoursecret
3+
NUXT_PUBLIC_API_BASE_URL=/api

.eslintrc.cjs

+259
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
6+
extends: [
7+
'@antfu/eslint-config-vue',
8+
'plugin:vue/vue3-recommended',
9+
'plugin:import/recommended',
10+
'plugin:import/typescript',
11+
'plugin:promise/recommended',
12+
'plugin:sonarjs/recommended',
13+
'plugin:@typescript-eslint/recommended',
14+
'plugin:case-police/recommended',
15+
16+
// 'plugin:unicorn/recommended',
17+
],
18+
parser: 'vue-eslint-parser',
19+
parserOptions: {
20+
ecmaVersion: 13,
21+
parser: '@typescript-eslint/parser',
22+
sourceType: 'module',
23+
},
24+
plugins: [
25+
'vue',
26+
'@typescript-eslint',
27+
'regex',
28+
],
29+
ignorePatterns: ['plugins/iconify/*.js', 'node_modules', 'dist', '*.d.ts', 'vendor'],
30+
rules: {
31+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
32+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
33+
34+
// indentation (Already present in TypeScript)
35+
'comma-spacing': ['error', { before: false, after: true }],
36+
'key-spacing': ['error', { afterColon: true }],
37+
'n/prefer-global/process': ['off'],
38+
'sonarjs/cognitive-complexity': ['off'],
39+
40+
'vue/first-attribute-linebreak': ['error', {
41+
singleline: 'beside',
42+
multiline: 'below',
43+
}],
44+
45+
'antfu/top-level-function': 'off',
46+
'@typescript-eslint/no-explicit-any': 'off',
47+
48+
// indentation (Already present in TypeScript)
49+
'indent': ['error', 2],
50+
51+
// Enforce trailing comma (Already present in TypeScript)
52+
'comma-dangle': ['error', 'always-multiline'],
53+
54+
// Enforce consistent spacing inside braces of object (Already present in TypeScript)
55+
'object-curly-spacing': ['error', 'always'],
56+
57+
// Enforce camelCase naming convention
58+
'camelcase': 'error',
59+
60+
// Disable max-len
61+
'max-len': 'off',
62+
63+
// we don't want it
64+
'semi': ['error', 'never'],
65+
66+
'quotes': 'off',
67+
'quote-props': ['error', 'consistent'],
68+
69+
// add parens ony when required in arrow function
70+
'arrow-parens': ['error', 'as-needed'],
71+
72+
// add new line above comment
73+
'newline-before-return': 'error',
74+
75+
// add new line above comment
76+
'lines-around-comment': [
77+
'error',
78+
{
79+
beforeBlockComment: true,
80+
beforeLineComment: true,
81+
allowBlockStart: true,
82+
allowClassStart: true,
83+
allowObjectStart: true,
84+
allowArrayStart: true,
85+
86+
// We don't want to add extra space above closing SECTION
87+
ignorePattern: '!SECTION',
88+
},
89+
],
90+
91+
// Ignore _ as unused variable
92+
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_+$', argsIgnorePattern: '^_+$' }],
93+
94+
'@typescript-eslint/quotes': 'error',
95+
96+
'array-element-newline': ['error', 'consistent'],
97+
'array-bracket-newline': ['error', 'consistent'],
98+
99+
'vue/multi-word-component-names': 'off',
100+
101+
'padding-line-between-statements': [
102+
'error',
103+
{ blankLine: 'always', prev: 'expression', next: 'const' },
104+
{ blankLine: 'always', prev: 'const', next: 'expression' },
105+
{ blankLine: 'always', prev: 'multiline-const', next: '*' },
106+
{ blankLine: 'always', prev: '*', next: 'multiline-const' },
107+
],
108+
109+
// Plugin: eslint-plugin-import
110+
'import/prefer-default-export': 'off',
111+
'import/newline-after-import': ['error', { count: 1 }],
112+
'no-restricted-imports': ['error', 'vuetify/components', {
113+
name: 'vue3-apexcharts',
114+
message: 'apexcharts are autoimported',
115+
}],
116+
117+
// For omitting extension for ts files
118+
'import/extensions': [
119+
'error',
120+
'ignorePackages',
121+
{
122+
js: 'never',
123+
jsx: 'never',
124+
ts: 'never',
125+
tsx: 'never',
126+
},
127+
],
128+
129+
// ignore virtual files
130+
'import/no-unresolved': [2, {
131+
ignore: [
132+
'~pages$',
133+
'virtual:generated-layouts',
134+
135+
// Ignore vite's ?raw imports
136+
'.*\?raw',
137+
138+
// Ignore nuxt auth in nuxt version
139+
'#auth$',
140+
],
141+
}],
142+
143+
// Thanks: https://stackoverflow.com/a/63961972/10796681
144+
'no-shadow': 'off',
145+
'@typescript-eslint/no-shadow': ['error'],
146+
147+
'@typescript-eslint/consistent-type-imports': 'error',
148+
149+
// Plugin: eslint-plugin-promise
150+
'promise/always-return': 'off',
151+
'promise/catch-or-return': 'off',
152+
153+
// ESLint plugin vue
154+
'vue/block-tag-newline': 'error',
155+
'vue/component-api-style': 'error',
156+
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false, ignores: ['/^swiper-/'] }],
157+
'vue/custom-event-name-casing': ['error', 'camelCase', {
158+
ignores: [
159+
'/^(click):[a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?/',
160+
],
161+
}],
162+
'vue/define-macros-order': 'error',
163+
'vue/html-comment-content-newline': 'error',
164+
'vue/html-comment-content-spacing': 'error',
165+
'vue/html-comment-indent': 'error',
166+
'vue/match-component-file-name': 'error',
167+
'vue/no-child-content': 'error',
168+
'vue/require-default-prop': 'off',
169+
170+
'vue/no-duplicate-attr-inheritance': 'error',
171+
'vue/no-empty-component-block': 'error',
172+
'vue/no-multiple-objects-in-class': 'error',
173+
'vue/no-reserved-component-names': 'error',
174+
'vue/no-template-target-blank': 'error',
175+
'vue/no-useless-mustaches': 'error',
176+
'vue/no-useless-v-bind': 'error',
177+
'vue/padding-line-between-blocks': 'error',
178+
'vue/prefer-separate-static-class': 'error',
179+
'vue/prefer-true-attribute-shorthand': 'error',
180+
'vue/v-on-function-call': 'error',
181+
'vue/no-restricted-class': ['error', '/^(p|m)(l|r)-/'],
182+
'vue/valid-v-slot': ['error', {
183+
allowModifiers: true,
184+
}],
185+
186+
// -- Extension Rules
187+
'vue/no-irregular-whitespace': 'error',
188+
'vue/template-curly-spacing': 'error',
189+
190+
// -- Sonarlint
191+
'sonarjs/no-duplicate-string': 'off',
192+
'sonarjs/no-nested-template-literals': 'off',
193+
194+
// -- Unicorn
195+
// 'unicorn/filename-case': 'off',
196+
// 'unicorn/prevent-abbreviations': ['error', {
197+
// replacements: {
198+
// props: false,
199+
// },
200+
// }],
201+
202+
// https://github.com/gmullerb/eslint-plugin-regex
203+
'regex/invalid': [
204+
'error',
205+
[
206+
{
207+
regex: '@/assets/images',
208+
replacement: '@images',
209+
message: 'Use \'@images\' path alias for image imports',
210+
},
211+
{
212+
regex: '@/assets/styles',
213+
replacement: '@styles',
214+
message: 'Use \'@styles\' path alias for importing styles from \'assets/styles\'',
215+
},
216+
217+
{
218+
id: 'Disallow icon of icon library',
219+
regex: '(mdi|tabler)-\\w',
220+
message: 'Only \'remix\' icons are allowed',
221+
},
222+
223+
{
224+
regex: '@core/\\w',
225+
message: 'You can\'t use @core when you are in @layouts module',
226+
files: {
227+
inspect: '@layouts/.*',
228+
},
229+
},
230+
{
231+
regex: 'useLayouts\\(',
232+
message: '`useLayouts` composable is only allowed in @layouts & @core directory. Please use `useThemeConfig` composable instead.',
233+
files: {
234+
inspect: '^(?!.*(@core|@layouts)).*',
235+
},
236+
},
237+
],
238+
239+
// Ignore files
240+
'\.eslintrc\.cjs',
241+
],
242+
},
243+
override: [
244+
{
245+
files: ['*.json'],
246+
rules: {
247+
'@typescript-eslint/quotes': 'off',
248+
},
249+
},
250+
],
251+
settings: {
252+
'import/resolver': {
253+
node: true,
254+
typescript: {
255+
project: './.nuxt/tsconfig.json',
256+
},
257+
},
258+
},
259+
}

.gitignore

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example
25+
26+
# 👉 Custom Git ignores
27+
28+
# Editor directories and files
29+
.vscode/*
30+
!.vscode/extensions.json
31+
!.vscode/settings.json
32+
!.vscode/*.code-snippets
33+
!.vscode/tours
34+
.idea
35+
*.suo
36+
*.ntvs*
37+
*.njsproj
38+
*.sln
39+
*.sw?
40+
.yarn
41+
42+
# iconify dist files
43+
plugins/iconify/icons.css
44+
45+
# Ignore MSW script
46+
public/mockServiceWorker.js
47+
48+
# Env files
49+
.env*
50+
!.env.example

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
auto-install-peers=true
2+
shamefully-hoist=true

0 commit comments

Comments
 (0)