Skip to content

Commit 84a0465

Browse files
author
alokVishu
committed
refactor: updated to latest
1 parent f79df2e commit 84a0465

File tree

313 files changed

+22944
-20225
lines changed

Some content is hidden

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

313 files changed

+22944
-20225
lines changed

javascript-version/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ PUSHER_PORT=443
5151
PUSHER_SCHEME=https
5252
PUSHER_APP_CLUSTER=mt1
5353

54+
VITE_APP_NAME="${APP_NAME}"
5455
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
5556
VITE_PUSHER_HOST="${PUSHER_HOST}"
5657
VITE_PUSHER_PORT="${PUSHER_PORT}"
5758
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
5859
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
60+
VITE_API_BASE_URL=

javascript-version/.eslintrc-auto-import.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
"ComponentPublicInstance": true,
55
"ComputedRef": true,
66
"EffectScope": true,
7+
"ExtractDefaultPropTypes": true,
8+
"ExtractPropTypes": true,
9+
"ExtractPublicPropTypes": true,
710
"InjectionKey": true,
811
"PropType": true,
912
"Ref": true,
1013
"VNode": true,
14+
"WritableComputedRef": true,
1115
"acceptHMRUpdate": true,
1216
"asyncComputed": true,
1317
"autoResetRef": true,
@@ -45,6 +49,7 @@
4549
"h": true,
4650
"ignorableWatch": true,
4751
"inject": true,
52+
"injectLocal": true,
4853
"isDefined": true,
4954
"isProxy": true,
5055
"isReactive": true,
@@ -82,6 +87,7 @@
8287
"onUpdated": true,
8388
"pausableWatch": true,
8489
"provide": true,
90+
"provideLocal": true,
8591
"reactify": true,
8692
"reactifyObject": true,
8793
"reactive": true,
@@ -113,6 +119,7 @@
113119
"toReactive": true,
114120
"toRef": true,
115121
"toRefs": true,
122+
"toValue": true,
116123
"triggerRef": true,
117124
"tryOnBeforeMount": true,
118125
"tryOnBeforeUnmount": true,
@@ -151,6 +158,7 @@
151158
"useCeil": true,
152159
"useClamp": true,
153160
"useClipboard": true,
161+
"useClipboardItems": true,
154162
"useCloned": true,
155163
"useColorMode": true,
156164
"useConfirmDialog": true,
@@ -257,7 +265,6 @@
257265
"useSpeechRecognition": true,
258266
"useSpeechSynthesis": true,
259267
"useStepper": true,
260-
"useStorage": true,
261268
"useStorageAsync": true,
262269
"useStyleTag": true,
263270
"useSum": true,
@@ -312,4 +319,4 @@
312319
"watchWithFilter": true,
313320
"whenever": true
314321
}
315-
}
322+
}

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

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
'plugin:import/recommended',
1010
'plugin:promise/recommended',
1111
'plugin:sonarjs/recommended',
12+
'plugin:case-police/recommended',
1213

1314
// 'plugin:unicorn/recommended',
1415
],
@@ -21,14 +22,16 @@ module.exports = {
2122
'vue',
2223
'regex',
2324
],
24-
ignorePatterns: ['resources/js/@iconify/*.js', 'node_modules', 'dist'],
25+
ignorePatterns: ['resources/js/plugins/iconify/*.js', 'node_modules', 'dist', '*.d.ts', 'vendor'],
2526
rules: {
2627
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
2728
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
2829

2930
// indentation (Already present in TypeScript)
3031
'comma-spacing': ['error', { before: false, after: true }],
3132
'key-spacing': ['error', { afterColon: true }],
33+
'n/prefer-global/process': ['off'],
34+
'sonarjs/cognitive-complexity': ['off'],
3235

3336
'vue/first-attribute-linebreak': ['error', {
3437
singleline: 'beside',
@@ -45,6 +48,9 @@ module.exports = {
4548
// Enforce consistent spacing inside braces of object (Already present in TypeScript)
4649
'object-curly-spacing': ['error', 'always'],
4750

51+
// Enforce camelCase naming convention
52+
'camelcase': 'error',
53+
4854
// Disable max-len
4955
'max-len': 'off',
5056

@@ -67,6 +73,9 @@ module.exports = {
6773
allowClassStart: true,
6874
allowObjectStart: true,
6975
allowArrayStart: true,
76+
77+
// We don't want to add extra space above closing SECTION
78+
ignorePattern: '!SECTION',
7079
},
7180
],
7281

@@ -88,7 +97,10 @@ module.exports = {
8897
// Plugin: eslint-plugin-import
8998
'import/prefer-default-export': 'off',
9099
'import/newline-after-import': ['error', { count: 1 }],
91-
'no-restricted-imports': ['error', 'vuetify/components'],
100+
'no-restricted-imports': ['error', 'vuetify/components', {
101+
name: 'vue3-apexcharts',
102+
message: 'apexcharts are autoimported',
103+
}],
92104

93105
// For omitting extension for ts files
94106
'import/extensions': [
@@ -124,7 +136,7 @@ module.exports = {
124136
// ESLint plugin vue
125137
'vue/block-tag-newline': 'error',
126138
'vue/component-api-style': 'error',
127-
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false }],
139+
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false, ignores: ['/^swiper-/'] }],
128140
'vue/custom-event-name-casing': ['error', 'camelCase', {
129141
ignores: [
130142
'/^(click):[a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?/',
@@ -138,8 +150,7 @@ module.exports = {
138150
'vue/no-child-content': 'error',
139151
'vue/require-default-prop': 'off',
140152

141-
// 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
142-
// 'vue/no-duplicate-attr-inheritance': 'error',
153+
'vue/no-duplicate-attr-inheritance': 'error',
143154
'vue/no-empty-component-block': 'error',
144155
'vue/no-multiple-objects-in-class': 'error',
145156
'vue/no-reserved-component-names': 'error',
@@ -171,6 +182,8 @@ module.exports = {
171182
// },
172183
// }],
173184

185+
// Internal Rules
186+
174187
// https://github.com/gmullerb/eslint-plugin-regex
175188
'regex/invalid': [
176189
'error',
@@ -181,16 +194,16 @@ module.exports = {
181194
message: 'Use \'@images\' path alias for image imports',
182195
},
183196
{
184-
regex: '@/styles',
197+
regex: '@/assets/styles',
185198
replacement: '@styles',
186-
message: 'Use \'@styles\' path alias for importing styles from \'resources/js/styles\'',
199+
message: 'Use \'@styles\' path alias for importing styles from \'resources/js/assets/styles\'',
187200
},
188201

189-
// {
190-
// id: 'Disallow icon of icon library',
191-
// regex: 'tabler-\\w',
192-
// message: 'Only \'mdi\' icons are allowed',
193-
// },
202+
{
203+
id: 'Disallow icon of icon library',
204+
regex: 'mdi-\\w',
205+
message: 'Only \'remix\' icons are allowed',
206+
},
194207

195208
{
196209
regex: '@core/\\w',
@@ -206,25 +219,34 @@ module.exports = {
206219
inspect: '^(?!.*(@core|@layouts)).*',
207220
},
208221
},
209-
{
210-
regex: 'import axios from \'axios\'',
211-
replacement: 'import axios from \'@axios\'',
212-
message: 'Use axios instances created in \'resources/js/plugin/axios.js\' instead of unconfigured axios',
213-
files: {
214-
ignore: '^.*plugins/axios.js.*',
215-
},
216-
},
217222
],
218223

219224
// Ignore files
220-
'\.eslintrc\.js',
225+
'\.eslintrc\.cjs',
221226
],
222227
},
223228
settings: {
224229
'import/resolver': {
225-
node: {
226-
extensions: ['.js', '.js', '.jsx', '.jsx', '.mjs', '.png', '.jpg'],
227-
}, alias: { 'extensions': ['.ts', '.js', '.tsx', '.jsx', '.mjs'], 'map': [["@", "./resources/js"], ["@core", "./resources/js/@core"], ["@layouts", "./resources/js/@layouts"], ["@images", "./resources/images/"], ["@styles", "./resources/styles/"], ["@configured-variables", "./resources/styles/variables/_template.scss"], ["@axios", "./resources/js/plugins/axios"], ["apexcharts", "node_modules/apexcharts-clevision"]] },
230+
node: true,
231+
'eslint-import-resolver-custom-alias': {
232+
'alias': {
233+
"@core-scss": "./resources/styles/@core",
234+
"@": "./resources/js",
235+
"@core": "./resources/js/@core",
236+
"@layouts": "./resources/js/@layouts",
237+
"@images": "./resources/images/",
238+
"@styles": "./resources/styles/",
239+
"@configured-variables": "./resources/styles/variables/_template.scss",
240+
},
241+
'extensions': [
242+
'.ts',
243+
'.js',
244+
'.tsx',
245+
'.jsx',
246+
'.mjs',
247+
],
248+
},
249+
typescript: {},
228250
},
229251
},
230252
}

javascript-version/.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ dist-ssr
3535
/cypress/videos/
3636
/cypress/screenshots/
3737

38+
# 👉 Custom Git ignores
39+
3840
# Editor directories and files
3941
.vscode/*
4042
!.vscode/extensions.json
@@ -50,4 +52,11 @@ dist-ssr
5052
.yarn
5153

5254
# iconify dist files
53-
resources/js/@iconify/icons-bundle.js
55+
resources/js/plugins/iconify/icons.css
56+
57+
# Ignore MSW script
58+
public/mockServiceWorker.js
59+
60+
# Env files
61+
.env*
62+
!.env.example

javascript-version/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
auto-install-peers=true
2+
shamefully-hoist=true

javascript-version/.nvmrc

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

javascript-version/.stylelintrc.json

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,45 @@
11
{
2-
"extends": [
3-
"stylelint-config-standard-scss",
4-
"stylelint-config-idiomatic-order"
5-
],
6-
"plugins": [
7-
"stylelint-use-logical-spec"
2+
"extends": [
3+
"stylelint-config-standard-scss",
4+
"stylelint-config-idiomatic-order"
5+
],
6+
"plugins": [
7+
"stylelint-use-logical-spec",
8+
"stylelint-codeguide"
9+
],
10+
"overrides": [
11+
{
12+
"files": [
13+
"**/*.scss"
14+
],
15+
"customSyntax": "postcss-scss"
16+
},
17+
{
18+
"files": [
19+
"**/*.vue"
20+
],
21+
"customSyntax": "postcss-html"
22+
}
23+
],
24+
"rules": {
25+
"codeguide/max-line-length": [
26+
120,
27+
{
28+
"ignore": "comments"
29+
}
830
],
9-
"overrides": [
10-
{
11-
"files": [
12-
"**/*.scss"
13-
],
14-
"customSyntax": "postcss-scss"
15-
},
16-
{
17-
"files": [
18-
"**/*.vue"
19-
],
20-
"customSyntax": "postcss-html"
21-
}
31+
"codeguide/indentation": 2,
32+
"liberty/use-logical-spec": true,
33+
"selector-class-pattern": null,
34+
"color-function-notation": null,
35+
"annotation-no-unknown": [
36+
true,
37+
{
38+
"ignoreAnnotations": [
39+
"default"
40+
]
41+
}
2242
],
23-
"rules": {
24-
"max-line-length": [
25-
120,
26-
{
27-
"ignore": "comments"
28-
}
29-
],
30-
"liberty/use-logical-spec": true,
31-
"selector-class-pattern": null,
32-
"color-function-notation": null
33-
}
43+
"media-feature-range-notation": null
44+
}
3445
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"recommendations": [
33
"dbaeumer.vscode-eslint",
4-
"mgmcdermott.vscode-language-babel",
54
"editorconfig.editorconfig",
65
"xabikos.javascriptsnippets",
76
"stylelint.vscode-stylelint",
@@ -10,6 +9,7 @@
109
"vue.volar",
1110
"antfu.iconify",
1211
"cipchk.cssrem",
13-
"matijao.vue-nuxt-snippets"
12+
"matijao.vue-nuxt-snippets",
13+
"dongido.sync-env"
1414
]
15-
}
15+
}

0 commit comments

Comments
 (0)