Skip to content

Commit 6d09c34

Browse files
authored
Admin vite (#22)
* admin v1.3.0 * ui kit react 1.3.0 * code move to new folder * admin vite package add * yml file add * some version change
1 parent edfdad0 commit 6d09c34

File tree

405 files changed

+20184
-2669
lines changed

Some content is hidden

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

405 files changed

+20184
-2669
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: npm Build
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the master branch
6+
push:
7+
branches: [stage*]
8+
9+
jobs:
10+
SFTP-deploy:
11+
name: 🪛 Build
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: 🚚 Get latest code
16+
uses: actions/checkout@v4
17+
18+
- name: Use Node.js 22
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "22"
22+
23+
- name: 🔨 Build Vite Admin - npm
24+
run: |
25+
cd admin
26+
cd vite
27+
npm i
28+
npm run build

admin/.env renamed to admin/nextjs/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Version
2-
NEXT_PUBLIC_VERSION=v1.2.0
2+
NEXT_PUBLIC_VERSION=v1.3.0
33

44
## Public URL
55
NEXT_PUBLIC_PATH=
File renamed without changes.
File renamed without changes.

admin/.prettierrc renamed to admin/nextjs/.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"singleQuote": true,
55
"trailingComma": "none",
66
"tabWidth": 2,
7-
"useTabs": false
7+
"useTabs": false,
8+
"endOfLine": "lf"
89
}
File renamed without changes.
Lines changed: 30 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import { fixupConfigRules } from '@eslint/compat';
12
import prettier from 'eslint-plugin-prettier';
2-
import typescriptEslint from '@typescript-eslint/eslint-plugin';
3-
import tsParser from '@typescript-eslint/parser';
3+
import react from 'eslint-plugin-react';
4+
import reactHooks from 'eslint-plugin-react-hooks';
5+
import jsxA11y from 'eslint-plugin-jsx-a11y';
6+
import js from '@eslint/js';
47
import path from 'node:path';
58
import { fileURLToPath } from 'node:url';
6-
import js from '@eslint/js';
79
import { FlatCompat } from '@eslint/eslintrc';
810

911
const __filename = fileURLToPath(import.meta.url);
@@ -15,36 +17,29 @@ const compat = new FlatCompat({
1517
});
1618

1719
export default [
18-
{
19-
ignores: ['**/node_modules/*', '**/.next/*']
20-
},
21-
...compat.extends('next/core-web-vitals', 'prettier'),
20+
...fixupConfigRules(compat.extends('prettier')),
21+
2222
{
2323
plugins: {
2424
prettier,
25-
'@typescript-eslint': typescriptEslint
25+
react,
26+
'react-hooks': reactHooks,
27+
'jsx-a11y': jsxA11y
2628
},
2729

2830
languageOptions: {
29-
parser: tsParser,
30-
ecmaVersion: 5,
31+
ecmaVersion: 2020,
3132
sourceType: 'module',
32-
3333
parserOptions: {
34-
project: './jsconfig.json',
35-
createDefaultProgram: true
34+
ecmaFeatures: {
35+
jsx: true
36+
}
3637
}
3738
},
3839

3940
settings: {
40-
'import/resolver': {
41-
node: {
42-
moduleDirectory: ['node_modules', 'src/']
43-
},
44-
45-
typescript: {
46-
alwaysTryTypes: true
47-
}
41+
react: {
42+
version: 'detect'
4843
}
4944
},
5045

@@ -59,19 +54,15 @@ export default [
5954
'import/order': 'off',
6055
'no-console': 'off',
6156
'no-shadow': 'off',
62-
'@typescript-eslint/naming-convention': 'off',
63-
'@typescript-eslint/no-explicit-any': 'warn',
6457
'import/no-cycle': 'off',
65-
'prefer-destructuring': 'off',
6658
'import/no-extraneous-dependencies': 'off',
67-
'react/display-name': 'off',
68-
69-
'import/no-unresolved': [
70-
'off',
71-
{
72-
caseSensitive: false
73-
}
74-
],
59+
'jsx-a11y/label-has-associated-control': 'off',
60+
'jsx-a11y/no-autofocus': 'off',
61+
'react/jsx-uses-react': 'off',
62+
'react/jsx-uses-vars': 'error',
63+
'react-hooks/rules-of-hooks': 'error',
64+
'react-hooks/exhaustive-deps': 'warn',
65+
'no-unused-vars': 'off',
7566

7667
'no-restricted-imports': [
7768
'error',
@@ -80,25 +71,19 @@ export default [
8071
}
8172
],
8273

83-
'@typescript-eslint/no-unused-vars': [
74+
'no-unused-vars': [
8475
'error',
8576
{
8677
vars: 'all',
8778
args: 'none'
8879
}
8980
],
9081

91-
'prettier/prettier': [
92-
'warn',
93-
{
94-
bracketSpacing: true,
95-
printWidth: 140,
96-
singleQuote: true,
97-
trailingComma: 'none',
98-
tabWidth: 2,
99-
useTabs: false
100-
}
101-
]
82+
'prettier/prettier': 'warn'
10283
}
84+
},
85+
{
86+
ignores: ['node_modules/**'],
87+
files: ['src/**/*.{js,jsx}']
10388
}
104-
];
89+
];
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)