Skip to content

Commit 3ce24b8

Browse files
committed
2 parents 6a61172 + 3ec2c8f commit 3ce24b8

File tree

105 files changed

+8547
-7995
lines changed

Some content is hidden

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

105 files changed

+8547
-7995
lines changed

.github/workflows/deploy-demos.yml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,37 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9+
- name: ⚙️ Setup pnpm
10+
uses: pnpm/action-setup@v3
11+
with:
12+
version: 8
13+
914
- name: ⚙️ Set BRAND_NAME environment variable from repo name
1015
run: echo BRAND_NAME=${{ github.event.repository.name }} | cut -d '-' -f1 >> $GITHUB_ENV
1116

12-
- name: ⬇️ Checkout template
13-
uses: actions/checkout@v3
17+
- name: ⬇️ Clone current repo under /<brand-name>/vue-free
18+
uses: actions/checkout@v4
19+
with:
20+
path: ${{ env.BRAND_NAME }}/vue-free
1421

15-
- name: ⬇️ Install packages
16-
run: yarn install
17-
working-directory: ./typescript-version
22+
- name: ⬇️ Clone automation scripts repo under /automation-scripts
23+
uses: actions/checkout@v4
24+
with:
25+
repository: themeselection/automation-scripts
26+
token: ${{ secrets.GH_PAT }}
27+
path: automation-scripts
28+
29+
- name: ⬇️ Install packages in automation-scripts dir
30+
working-directory: automation-scripts/vue
31+
run: pnpm install
32+
33+
- name: ⚙️ Prepare free demo
34+
working-directory: automation-scripts/vue
35+
run: pnpm tsx src/templates/${{ env.BRAND_NAME }}/scripts/prepareVueFreeDemo.ts
1836

1937
- name: 📦 Generate demo
20-
run: yarn build --base=/${{ env.BRAND_NAME }}-vuetify-vuejs-admin-template-free/demo/
21-
working-directory: ./typescript-version
38+
working-directory: ${{ env.BRAND_NAME }}/vue-free/typescript-version
39+
run: pnpm i && pnpm build --base=/${{ env.BRAND_NAME }}-vuetify-vuejs-admin-template-free/demo/
2240

2341
- name: 🚀 Upload demo
2442
uses: appleboy/scp-action@master
@@ -27,11 +45,7 @@ jobs:
2745
USERNAME: ${{ secrets.USERNAME }}
2846
PORT: ${{ secrets.PORT }}
2947
KEY: ${{ secrets.SSHKEY }}
30-
source: ./typescript-version/dist
48+
source: ${{ env.BRAND_NAME }}/vue-free/typescript-version/dist
3149
target: ${{ secrets.PROD_DIR }}/demo
32-
33-
# remove target folder before uploading data
3450
rm: true
35-
36-
# Setting it to `1` will upload all the files inside "dist" dir instead of "dist" dir itself
37-
strip_components: 3
51+
strip_components: 4

typescript-version/.eslintrc.js renamed to typescript-version/.eslintrc.cjs

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ module.exports = {
1111
'plugin:promise/recommended',
1212
'plugin:sonarjs/recommended',
1313
'plugin:@typescript-eslint/recommended',
14+
'plugin:case-police/recommended',
15+
'plugin:regexp/recommended',
1416

1517
// 'plugin:unicorn/recommended',
1618
],
@@ -24,22 +26,26 @@ module.exports = {
2426
'vue',
2527
'@typescript-eslint',
2628
'regex',
29+
'regexp',
2730
],
28-
ignorePatterns: ['src/@iconify/*.js', 'node_modules', 'dist', '*.d.ts'],
31+
ignorePatterns: ['src/plugins/iconify/*.js', 'node_modules', 'dist', '*.d.ts', 'vendor', '*.json'],
2932
rules: {
3033
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
3134
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
3235

3336
// indentation (Already present in TypeScript)
3437
'comma-spacing': ['error', { before: false, after: true }],
3538
'key-spacing': ['error', { afterColon: true }],
39+
'n/prefer-global/process': ['off'],
40+
'sonarjs/cognitive-complexity': ['off'],
3641

3742
'vue/first-attribute-linebreak': ['error', {
3843
singleline: 'beside',
3944
multiline: 'below',
4045
}],
4146

4247
'antfu/top-level-function': 'off',
48+
'@typescript-eslint/no-explicit-any': 'off',
4349

4450
// indentation (Already present in TypeScript)
4551
'indent': ['error', 2],
@@ -50,6 +56,9 @@ module.exports = {
5056
// Enforce consistent spacing inside braces of object (Already present in TypeScript)
5157
'object-curly-spacing': ['error', 'always'],
5258

59+
// Enforce camelCase naming convention
60+
'camelcase': 'error',
61+
5362
// Disable max-len
5463
'max-len': 'off',
5564

@@ -72,11 +81,14 @@ module.exports = {
7281
allowClassStart: true,
7382
allowObjectStart: true,
7483
allowArrayStart: true,
84+
85+
// We don't want to add extra space above closing SECTION
86+
ignorePattern: '!SECTION',
7587
},
7688
],
7789

7890
// Ignore _ as unused variable
79-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_+$' }],
91+
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_+$', argsIgnorePattern: '^_+$' }],
8092

8193
'array-element-newline': ['error', 'consistent'],
8294
'array-bracket-newline': ['error', 'consistent'],
@@ -94,7 +106,10 @@ module.exports = {
94106
// Plugin: eslint-plugin-import
95107
'import/prefer-default-export': 'off',
96108
'import/newline-after-import': ['error', { count: 1 }],
97-
'no-restricted-imports': ['error', 'vuetify/components'],
109+
'no-restricted-imports': ['error', 'vuetify/components', {
110+
name: 'vue3-apexcharts',
111+
message: 'apexcharts are auto imported',
112+
}],
98113

99114
// For omitting extension for ts files
100115
'import/extensions': [
@@ -113,6 +128,8 @@ module.exports = {
113128
ignore: [
114129
'~pages$',
115130
'virtual:generated-layouts',
131+
'#auth$',
132+
'#components$',
116133

117134
// Ignore vite's ?raw imports
118135
'.*\?raw',
@@ -132,7 +149,7 @@ module.exports = {
132149
// ESLint plugin vue
133150
'vue/block-tag-newline': 'error',
134151
'vue/component-api-style': 'error',
135-
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false }],
152+
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false, ignores: ['/^swiper-/'] }],
136153
'vue/custom-event-name-casing': ['error', 'camelCase', {
137154
ignores: [
138155
'/^(click):[a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?/',
@@ -146,8 +163,7 @@ module.exports = {
146163
'vue/no-child-content': 'error',
147164
'vue/require-default-prop': 'off',
148165

149-
// NOTE this rule only supported in SFC, Users of the unplugin-vue-define-options should disable that rule: https://github.com/vuejs/eslint-plugin-vue/issues/1886
150-
// 'vue/no-duplicate-attr-inheritance': 'error',
166+
'vue/no-duplicate-attr-inheritance': 'error',
151167
'vue/no-empty-component-block': 'error',
152168
'vue/no-multiple-objects-in-class': 'error',
153169
'vue/no-reserved-component-names': 'error',
@@ -191,16 +207,16 @@ module.exports = {
191207
message: 'Use \'@images\' path alias for image imports',
192208
},
193209
{
194-
regex: '@/styles',
210+
regex: '@/assets/styles',
195211
replacement: '@styles',
196-
message: 'Use \'@styles\' path alias for importing styles from \'src/styles\'',
212+
message: 'Use \'@styles\' path alias for importing styles from \'src/assets/styles\'',
197213
},
198214

199-
// {
200-
// id: 'Disallow icon of icon library',
201-
// regex: 'tabler-\\w',
202-
// message: 'Only \'mdi\' icons are allowed',
203-
// },
215+
{
216+
id: 'Disallow icon of icon library',
217+
regex: 'tabler-\\w',
218+
message: 'Only \'mdi\' icons are allowed',
219+
},
204220

205221
{
206222
regex: '@core/\\w',
@@ -216,25 +232,15 @@ module.exports = {
216232
inspect: '^(?!.*(@core|@layouts)).*',
217233
},
218234
},
219-
{
220-
regex: 'import axios from \'axios\'',
221-
replacement: 'import axios from \'@axios\'',
222-
message: 'Use axios instances created in \'src/plugin/axios.ts\' instead of unconfigured axios',
223-
files: {
224-
ignore: '^.*plugins/axios.ts.*',
225-
},
226-
},
227235
],
228236

229237
// Ignore files
230-
'\.eslintrc\.js',
238+
'\.eslintrc\.cjs',
231239
],
232240
},
233241
settings: {
234242
'import/resolver': {
235-
node: {
236-
extensions: ['.ts', '.js', '.tsx', '.jsx', '.mjs', '.png', '.jpg'],
237-
},
243+
node: true,
238244
typescript: {},
239245
},
240246
},

0 commit comments

Comments
 (0)