diff --git a/javascript-version/.editorconfig b/javascript-version/.editorconfig new file mode 100644 index 0000000..63c8c4c --- /dev/null +++ b/javascript-version/.editorconfig @@ -0,0 +1,38 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{js,py}] +charset = utf-8 + +# 4 space indentation +[*.py] +indent_style = space +indent_size = 4 + +# 2 space indentation +[*.{vue,scss,ts}] +indent_style = space +indent_size = 2 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + +# Indentation override for all JS under lib directory +[lib/**.js] +indent_style = space +indent_size = 2 + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/javascript-version/.eslintrc-auto-import.json b/javascript-version/.eslintrc-auto-import.json new file mode 100644 index 0000000..ad2b870 --- /dev/null +++ b/javascript-version/.eslintrc-auto-import.json @@ -0,0 +1,322 @@ +{ + "globals": { + "Component": true, + "ComponentPublicInstance": true, + "ComputedRef": true, + "EffectScope": true, + "ExtractDefaultPropTypes": true, + "ExtractPropTypes": true, + "ExtractPublicPropTypes": true, + "InjectionKey": true, + "PropType": true, + "Ref": true, + "VNode": true, + "WritableComputedRef": true, + "acceptHMRUpdate": true, + "asyncComputed": true, + "autoResetRef": true, + "computed": true, + "computedAsync": true, + "computedEager": true, + "computedInject": true, + "computedWithControl": true, + "controlledComputed": true, + "controlledRef": true, + "createApp": true, + "createEventHook": true, + "createGenericProjection": true, + "createGlobalState": true, + "createInjectionState": true, + "createPinia": true, + "createProjection": true, + "createReactiveFn": true, + "createReusableTemplate": true, + "createSharedComposable": true, + "createTemplatePromise": true, + "createUnrefFn": true, + "customRef": true, + "debouncedRef": true, + "debouncedWatch": true, + "defineAsyncComponent": true, + "defineComponent": true, + "defineStore": true, + "eagerComputed": true, + "effectScope": true, + "extendRef": true, + "getActivePinia": true, + "getCurrentInstance": true, + "getCurrentScope": true, + "h": true, + "ignorableWatch": true, + "inject": true, + "injectLocal": true, + "isDefined": true, + "isProxy": true, + "isReactive": true, + "isReadonly": true, + "isRef": true, + "logicAnd": true, + "logicNot": true, + "logicOr": true, + "makeDestructurable": true, + "mapActions": true, + "mapGetters": true, + "mapState": true, + "mapStores": true, + "mapWritableState": true, + "markRaw": true, + "nextTick": true, + "onActivated": true, + "onBeforeMount": true, + "onBeforeRouteLeave": true, + "onBeforeRouteUpdate": true, + "onBeforeUnmount": true, + "onBeforeUpdate": true, + "onClickOutside": true, + "onDeactivated": true, + "onErrorCaptured": true, + "onKeyStroke": true, + "onLongPress": true, + "onMounted": true, + "onRenderTracked": true, + "onRenderTriggered": true, + "onScopeDispose": true, + "onServerPrefetch": true, + "onStartTyping": true, + "onUnmounted": true, + "onUpdated": true, + "pausableWatch": true, + "provide": true, + "provideLocal": true, + "reactify": true, + "reactifyObject": true, + "reactive": true, + "reactiveComputed": true, + "reactiveOmit": true, + "reactivePick": true, + "readonly": true, + "ref": true, + "refAutoReset": true, + "refDebounced": true, + "refDefault": true, + "refThrottled": true, + "refWithControl": true, + "resolveComponent": true, + "resolveRef": true, + "resolveUnref": true, + "setActivePinia": true, + "setMapStoreSuffix": true, + "shallowReactive": true, + "shallowReadonly": true, + "shallowRef": true, + "storeToRefs": true, + "syncRef": true, + "syncRefs": true, + "templateRef": true, + "throttledRef": true, + "throttledWatch": true, + "toRaw": true, + "toReactive": true, + "toRef": true, + "toRefs": true, + "toValue": true, + "triggerRef": true, + "tryOnBeforeMount": true, + "tryOnBeforeUnmount": true, + "tryOnMounted": true, + "tryOnScopeDispose": true, + "tryOnUnmounted": true, + "unref": true, + "unrefElement": true, + "until": true, + "useAbs": true, + "useActiveElement": true, + "useAnimate": true, + "useArrayDifference": true, + "useArrayEvery": true, + "useArrayFilter": true, + "useArrayFind": true, + "useArrayFindIndex": true, + "useArrayFindLast": true, + "useArrayIncludes": true, + "useArrayJoin": true, + "useArrayMap": true, + "useArrayReduce": true, + "useArraySome": true, + "useArrayUnique": true, + "useAsyncQueue": true, + "useAsyncState": true, + "useAttrs": true, + "useAverage": true, + "useBase64": true, + "useBattery": true, + "useBluetooth": true, + "useBreakpoints": true, + "useBroadcastChannel": true, + "useBrowserLocation": true, + "useCached": true, + "useCeil": true, + "useClamp": true, + "useClipboard": true, + "useClipboardItems": true, + "useCloned": true, + "useColorMode": true, + "useConfirmDialog": true, + "useCounter": true, + "useCssModule": true, + "useCssVar": true, + "useCssVars": true, + "useCurrentElement": true, + "useCycleList": true, + "useDark": true, + "useDateFormat": true, + "useDebounce": true, + "useDebounceFn": true, + "useDebouncedRefHistory": true, + "useDeviceMotion": true, + "useDeviceOrientation": true, + "useDevicePixelRatio": true, + "useDevicesList": true, + "useDisplayMedia": true, + "useDocumentVisibility": true, + "useDraggable": true, + "useDropZone": true, + "useElementBounding": true, + "useElementByPoint": true, + "useElementHover": true, + "useElementSize": true, + "useElementVisibility": true, + "useEventBus": true, + "useEventListener": true, + "useEventSource": true, + "useEyeDropper": true, + "useFavicon": true, + "useFetch": true, + "useFileDialog": true, + "useFileSystemAccess": true, + "useFloor": true, + "useFocus": true, + "useFocusWithin": true, + "useFps": true, + "useFullscreen": true, + "useGamepad": true, + "useGeolocation": true, + "useIdle": true, + "useImage": true, + "useInfiniteScroll": true, + "useIntersectionObserver": true, + "useInterval": true, + "useIntervalFn": true, + "useKeyModifier": true, + "useLastChanged": true, + "useLink": true, + "useLocalStorage": true, + "useMagicKeys": true, + "useManualRefHistory": true, + "useMath": true, + "useMax": true, + "useMediaControls": true, + "useMediaQuery": true, + "useMemoize": true, + "useMemory": true, + "useMin": true, + "useMounted": true, + "useMouse": true, + "useMouseInElement": true, + "useMousePressed": true, + "useMutationObserver": true, + "useNavigatorLanguage": true, + "useNetwork": true, + "useNow": true, + "useObjectUrl": true, + "useOffsetPagination": true, + "useOnline": true, + "usePageLeave": true, + "useParallax": true, + "useParentElement": true, + "usePerformanceObserver": true, + "usePermission": true, + "usePointer": true, + "usePointerLock": true, + "usePointerSwipe": true, + "usePrecision": true, + "usePreferredColorScheme": true, + "usePreferredContrast": true, + "usePreferredDark": true, + "usePreferredLanguages": true, + "usePreferredReducedMotion": true, + "usePrevious": true, + "useProjection": true, + "useRafFn": true, + "useRefHistory": true, + "useResizeObserver": true, + "useRound": true, + "useRoute": true, + "useRouter": true, + "useScreenOrientation": true, + "useScreenSafeArea": true, + "useScriptTag": true, + "useScroll": true, + "useScrollLock": true, + "useSessionStorage": true, + "useShare": true, + "useSlots": true, + "useSorted": true, + "useSpeechRecognition": true, + "useSpeechSynthesis": true, + "useStepper": true, + "useStorageAsync": true, + "useStyleTag": true, + "useSum": true, + "useSupported": true, + "useSwipe": true, + "useTemplateRefsList": true, + "useTextDirection": true, + "useTextSelection": true, + "useTextareaAutosize": true, + "useThrottle": true, + "useThrottleFn": true, + "useThrottledRefHistory": true, + "useTimeAgo": true, + "useTimeout": true, + "useTimeoutFn": true, + "useTimeoutPoll": true, + "useTimestamp": true, + "useTitle": true, + "useToNumber": true, + "useToString": true, + "useToggle": true, + "useTransition": true, + "useTrunc": true, + "useUrlSearchParams": true, + "useUserMedia": true, + "useVModel": true, + "useVModels": true, + "useVibrate": true, + "useVirtualList": true, + "useWakeLock": true, + "useWebNotification": true, + "useWebSocket": true, + "useWebWorker": true, + "useWebWorkerFn": true, + "useWindowFocus": true, + "useWindowScroll": true, + "useWindowSize": true, + "watch": true, + "watchArray": true, + "watchAtMost": true, + "watchDebounced": true, + "watchDeep": true, + "watchEffect": true, + "watchIgnorable": true, + "watchImmediate": true, + "watchOnce": true, + "watchPausable": true, + "watchPostEffect": true, + "watchSyncEffect": true, + "watchThrottled": true, + "watchTriggerable": true, + "watchWithFilter": true, + "whenever": true + } +} diff --git a/javascript-version/.eslintrc.cjs b/javascript-version/.eslintrc.cjs new file mode 100644 index 0000000..b046dfd --- /dev/null +++ b/javascript-version/.eslintrc.cjs @@ -0,0 +1,238 @@ +module.exports = { + env: { + browser: true, + es2021: true, + }, + extends: [ + '.eslintrc-auto-import.json', + 'plugin:vue/vue3-recommended', + 'plugin:import/recommended', + 'plugin:promise/recommended', + 'plugin:sonarjs/recommended', + 'plugin:case-police/recommended', + 'plugin:regexp/recommended', + + // 'plugin:unicorn/recommended', + ], + parser: 'vue-eslint-parser', + parserOptions: { + ecmaVersion: 13, + sourceType: 'module', + }, + plugins: [ + 'vue', + 'regex', + 'regexp', + ], + ignorePatterns: ['plugins/iconify/*.js', 'node_modules', 'dist', '*.d.ts', 'vendor', '*.json'], + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + + // indentation (Already present in TypeScript) + 'comma-spacing': ['error', { before: false, after: true }], + 'key-spacing': ['error', { afterColon: true }], + 'n/prefer-global/process': ['off'], + 'sonarjs/cognitive-complexity': ['off'], + + 'vue/first-attribute-linebreak': ['error', { + singleline: 'beside', + multiline: 'below', + }], + + + // indentation (Already present in TypeScript) + 'indent': ['error', 2], + + // Enforce trailing comma (Already present in TypeScript) + 'comma-dangle': ['error', 'always-multiline'], + + // Enforce consistent spacing inside braces of object (Already present in TypeScript) + 'object-curly-spacing': ['error', 'always'], + + // Enforce camelCase naming convention + 'camelcase': 'error', + + // Disable max-len + 'max-len': 'off', + + // we don't want it + 'semi': ['error', 'never'], + + // add parens ony when required in arrow function + 'arrow-parens': ['error', 'as-needed'], + + // add new line above comment + 'newline-before-return': 'error', + + // add new line above comment + 'lines-around-comment': [ + 'error', + { + beforeBlockComment: true, + beforeLineComment: true, + allowBlockStart: true, + allowClassStart: true, + allowObjectStart: true, + allowArrayStart: true, + + // We don't want to add extra space above closing SECTION + ignorePattern: '!SECTION', + }, + ], + + // Ignore _ as unused variable + + 'array-element-newline': ['error', 'consistent'], + 'array-bracket-newline': ['error', 'consistent'], + + 'vue/multi-word-component-names': 'off', + + 'padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: 'expression', next: 'const' }, + { blankLine: 'always', prev: 'const', next: 'expression' }, + { blankLine: 'always', prev: 'multiline-const', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-const' }, + ], + + // Plugin: eslint-plugin-import + 'import/prefer-default-export': 'off', + 'import/newline-after-import': ['error', { count: 1 }], + 'no-restricted-imports': ['error', 'vuetify/components', { + name: 'vue3-apexcharts', + message: 'apexcharts are auto imported', + }], + + // For omitting extension for ts files + 'import/extensions': [ + 'error', + 'ignorePackages', + { + js: 'never', + jsx: 'never', + ts: 'never', + tsx: 'never', + }, + ], + + // ignore virtual files + 'import/no-unresolved': [2, { + ignore: [ + '~pages$', + 'virtual:generated-layouts', + '#auth$', + '#components$', + + // Ignore vite's ?raw imports + '.*\?raw', + ], + }], + + // Thanks: https://stackoverflow.com/a/63961972/10796681 + 'no-shadow': 'off', + + + // Plugin: eslint-plugin-promise + 'promise/always-return': 'off', + 'promise/catch-or-return': 'off', + + // ESLint plugin vue + 'vue/block-tag-newline': 'error', + 'vue/component-api-style': 'error', + 'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false, ignores: ['/^swiper-/'] }], + 'vue/custom-event-name-casing': ['error', 'camelCase', { + ignores: [ + '/^(click):[a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?/', + ], + }], + 'vue/define-macros-order': 'error', + 'vue/html-comment-content-newline': 'error', + 'vue/html-comment-content-spacing': 'error', + 'vue/html-comment-indent': 'error', + 'vue/match-component-file-name': 'error', + 'vue/no-child-content': 'error', + 'vue/require-default-prop': 'off', + + 'vue/no-duplicate-attr-inheritance': 'error', + 'vue/no-empty-component-block': 'error', + 'vue/no-multiple-objects-in-class': 'error', + 'vue/no-reserved-component-names': 'error', + 'vue/no-template-target-blank': 'error', + 'vue/no-useless-mustaches': 'error', + 'vue/no-useless-v-bind': 'error', + 'vue/padding-line-between-blocks': 'error', + 'vue/prefer-separate-static-class': 'error', + 'vue/prefer-true-attribute-shorthand': 'error', + 'vue/v-on-function-call': 'error', + 'vue/no-restricted-class': ['error', '/^(p|m)(l|r)-/'], + 'vue/valid-v-slot': ['error', { + allowModifiers: true, + }], + + // -- Extension Rules + 'vue/no-irregular-whitespace': 'error', + 'vue/template-curly-spacing': 'error', + + // -- Sonarlint + 'sonarjs/no-duplicate-string': 'off', + 'sonarjs/no-nested-template-literals': 'off', + + // -- Unicorn + // 'unicorn/filename-case': 'off', + // 'unicorn/prevent-abbreviations': ['error', { + // replacements: { + // props: false, + // }, + // }], + + // Internal Rules + + // https://github.com/gmullerb/eslint-plugin-regex + 'regex/invalid': [ + 'error', + [ + { + regex: '@/assets/images', + replacement: '@images', + message: 'Use \'@images\' path alias for image imports', + }, + { + regex: '@/assets/styles', + replacement: '@styles', + message: 'Use \'@styles\' path alias for importing styles from \'assets/styles\'', + }, + + { + id: 'Disallow icon of icon library', + regex: 'tabler-\\w', + message: 'Only \'mdi\' icons are allowed', + }, + + { + regex: '@core/\\w', + message: 'You can\'t use @core when you are in @layouts module', + files: { + inspect: '@layouts/.*', + }, + }, + { + regex: 'useLayouts\\(', + message: '`useLayouts` composable is only allowed in @layouts & @core directory. Please use `useThemeConfig` composable instead.', + files: { + inspect: '^(?!.*(@core|@layouts)).*', + }, + }, + ], + + // Ignore files + '\.eslintrc\.cjs', + ], + }, + settings: { + 'import/resolver': { + node: true, + typescript: { project: './jsconfig.json' }, + }, + }, +} diff --git a/javascript-version/.gitattributes b/javascript-version/.gitattributes new file mode 100644 index 0000000..93c1acf --- /dev/null +++ b/javascript-version/.gitattributes @@ -0,0 +1,207 @@ +## GITATTRIBUTES FOR WEB PROJECTS +# +# These settings are for any web project. +# +# Details per file setting: +# text These files should be normalized (i.e. convert CRLF to LF). +# binary These files are binary and should be left untouched. +# +# Note that binary is a macro for -text -diff. +###################################################################### + +# Auto detect +## Handle line endings automatically for files detected as +## text and leave all files detected as binary untouched. +## This will handle all files NOT defined below. +* text=auto + +# Source code +*.bash text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.coffee text +*.css text diff=css +*.htm text diff=html +*.html text diff=html +*.inc text +*.ini text +*.js text +*.json text +*.jsx text +*.less text +*.ls text +*.map text -diff +*.od text +*.onlydata text +*.php text diff=php +*.pl text +*.ps1 text eol=crlf +*.py text diff=python +*.rb text diff=ruby +*.sass text +*.scm text +*.scss text diff=css +*.sh text eol=lf +.husky/* text eol=lf +*.sql text +*.styl text +*.tag text +*.ts text +*.tsx text +*.xml text +*.xhtml text diff=html + +# Docker +Dockerfile text + +# Documentation +*.ipynb text eol=lf +*.markdown text diff=markdown +*.md text diff=markdown +*.mdwn text diff=markdown +*.mdown text diff=markdown +*.mkd text diff=markdown +*.mkdn text diff=markdown +*.mdtxt text +*.mdtext text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Templates +*.dot text +*.ejs text +*.erb text +*.haml text +*.handlebars text +*.hbs text +*.hbt text +*.jade text +*.latte text +*.mustache text +*.njk text +*.phtml text +*.svelte text +*.tmpl text +*.tpl text +*.twig text +*.vue text + +# Configs +*.cnf text +*.conf text +*.config text +.editorconfig text +.env text +.gitattributes text +.gitconfig text +.htaccess text +*.lock text -diff +package.json text eol=lf +package-lock.json text eol=lf -diff +pnpm-lock.yaml text eol=lf -diff +.prettierrc text +yarn.lock text -diff +*.toml text +*.yaml text +*.yml text +browserslist text +Makefile text +makefile text + +# Heroku +Procfile text + +# Graphics +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.gifv binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +# Audio +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +# Video +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.avi binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.ogv binary +*.swc binary +*.swf binary +*.webm binary + +# Archives +*.7z binary +*.gz binary +*.jar binary +*.rar binary +*.tar binary +*.zip binary + +# Fonts +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary + +# Executables +*.exe binary +*.pyc binary + +# RC files (like .babelrc or .eslintrc) +*.*rc text + +# Ignore files (like .npmignore or .gitignore) +*.*ignore text diff --git a/javascript-version/.gitignore b/javascript-version/.gitignore new file mode 100644 index 0000000..1034778 --- /dev/null +++ b/javascript-version/.gitignore @@ -0,0 +1,50 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc +.DS_Store +.fleet +.idea + +# Local env files +.env +.env.* +!.env.example + +# ๐Ÿ‘‰ Custom Git ignores + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +!.vscode/settings.json +!.vscode/*.code-snippets +!.vscode/tours +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.yarn + +# iconify dist files +plugins/iconify/icons.css + +# Ignore MSW script +public/mockServiceWorker.js + +# Env files +.env* +!.env.example diff --git a/javascript-version/.npmrc b/javascript-version/.npmrc new file mode 100644 index 0000000..4b10cef --- /dev/null +++ b/javascript-version/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers=true +shamefully-hoist=true diff --git a/javascript-version/.nvmrc b/javascript-version/.nvmrc new file mode 100644 index 0000000..b009dfb --- /dev/null +++ b/javascript-version/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/javascript-version/.stylelintrc.json b/javascript-version/.stylelintrc.json new file mode 100644 index 0000000..ecf5829 --- /dev/null +++ b/javascript-version/.stylelintrc.json @@ -0,0 +1,46 @@ +{ + "extends": [ + "stylelint-config-standard-scss", + "stylelint-config-idiomatic-order", + "@stylistic/stylelint-config" + ], + "plugins": [ + "stylelint-use-logical-spec", + "@stylistic/stylelint-plugin" + ], + "overrides": [ + { + "files": [ + "**/*.scss" + ], + "customSyntax": "postcss-scss" + }, + { + "files": [ + "**/*.vue" + ], + "customSyntax": "postcss-html" + } + ], + "rules": { + "@stylistic/max-line-length": [ + 220, + { + "ignore": "comments" + } + ], + "@stylistic/indentation": 2, + "liberty/use-logical-spec": true, + "selector-class-pattern": null, + "color-function-notation": null, + "annotation-no-unknown": [ + true, + { + "ignoreAnnotations": [ + "default" + ] + } + ], + "media-feature-range-notation": null + } +} diff --git a/javascript-version/.vscode/anchor-comments.code-snippets b/javascript-version/.vscode/anchor-comments.code-snippets new file mode 100644 index 0000000..7342c88 --- /dev/null +++ b/javascript-version/.vscode/anchor-comments.code-snippets @@ -0,0 +1,23 @@ +{ + "Add hand emoji": { + "prefix": "cm-hand-emoji", + "body": [ + "๐Ÿ‘‰" + ], + "description": "Add hand emoji" + }, + "Add info emoji": { + "prefix": "cm-info-emoji", + "body": [ + "โ„น๏ธ" + ], + "description": "Add info emoji" + }, + "Add warning emoji": { + "prefix": "cm-warning-emoji", + "body": [ + "โ—" + ], + "description": "Add warning emoji" + } +} diff --git a/javascript-version/.vscode/extensions.json b/javascript-version/.vscode/extensions.json new file mode 100644 index 0000000..27843f1 --- /dev/null +++ b/javascript-version/.vscode/extensions.json @@ -0,0 +1,15 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", + "xabikos.javascriptsnippets", + "stylelint.vscode-stylelint", + "fabiospampinato.vscode-highlight", + "github.vscode-pull-request-github", + "vue.volar", + "antfu.iconify", + "cipchk.cssrem", + "matijao.vue-nuxt-snippets", + "dongido.sync-env" + ] +} diff --git a/javascript-version/.vscode/settings.json b/javascript-version/.vscode/settings.json new file mode 100644 index 0000000..b0e0580 --- /dev/null +++ b/javascript-version/.vscode/settings.json @@ -0,0 +1,109 @@ +{ + "editor.formatOnSave": true, + "files.insertFinalNewline": true, + "javascript.updateImportsOnFileMove.enabled": "always", + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.autoClosingBrackets": "always" + }, + "[markdown]": { + "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" + }, + // SCSS + "[scss]": { + "editor.defaultFormatter": "stylelint.vscode-stylelint" + }, + // JSON + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + // Vue + "[vue]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + }, + // Extension: Volar + "volar.preview.port": 3000, + "volar.completion.preferredTagNameCase": "pascal", + // Extension: ESLint + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit", + "source.organizeImports": "explicit" + }, + "eslint.alwaysShowStatus": true, + "eslint.format.enable": true, + "eslint.packageManager": "pnpm", + // Extension: Stylelint + "stylelint.packageManager": "pnpm", + "stylelint.validate": [ + "css", + "scss", + "vue" + ], + // Extension: Spell Checker + "cSpell.words": [ + "Composables", + "Customizer", + "destr", + "flagpack", + "Iconify", + "ofetch", + "psudo", + "stylelint", + "touchless", + "triggerer", + "vuetify", + "nuxt" + ], + // Extension: Comment Anchors + "commentAnchors.tags.anchors": { + "โ„น๏ธ": { + "scope": "hidden", + // This color is taken from "Better Comments" Extension (?) + "highlightColor": "#3498DB", + "styleComment": true, + "isItalic": false, + }, + "๐Ÿ‘‰": { + "scope": "file", + // This color is taken from "Better Comments" Extension (*) + "highlightColor": "#98C379", + "styleComment": true, + "isItalic": false + }, + "โ—": { + "scope": "hidden", + // This color is taken from "Better Comments" Extension (*) + "highlightColor": "#FF2D00", + "styleComment": true, + "isItalic": false, + }, + }, + // Extension: fabiospampinato.vscode-highlight + "highlight.regexFlags": "gi", + "highlight.regexes": { + // We flaged this for enforcing logical CSS properties + "(100vh|translate|margin:|padding:|margin-left|margin-right|rotate|text-align|border-top|border-right|border-bottom|border-left|float|background-position|transform|width|height|top|left|bottom|right|float|clear|(p|m)(l|r)-|border-(start|end)-(start|end)-radius)": [ + { + // "rangeBehavior": 1, + "borderWidth": "1px", + "borderColor": "tomato", + "borderStyle": "solid" + } + ], + "(overflow-x:|overflow-y:)": [ + { + // "rangeBehavior": 1, + "borderWidth": "1px", + "borderColor": "green", + "borderStyle": "solid" + } + ] + } +} diff --git a/javascript-version/.vscode/vue-ts.code-snippets b/javascript-version/.vscode/vue-ts.code-snippets new file mode 100644 index 0000000..360713a --- /dev/null +++ b/javascript-version/.vscode/vue-ts.code-snippets @@ -0,0 +1,18 @@ +{ + "Vue TS - DefineProps": { + "prefix": "dprops", + "body": [ + "defineProps<${1:Props}>()" + ], + "description": "DefineProps in script setup" + }, + "Vue TS - Props interface": { + "prefix": "iprops", + "body": [ + "interface Props {", + " ${1}", + "}" + ], + "description": "Create props interface in script setup" + } +} diff --git a/javascript-version/.vscode/vue.code-snippets b/javascript-version/.vscode/vue.code-snippets new file mode 100644 index 0000000..814d167 --- /dev/null +++ b/javascript-version/.vscode/vue.code-snippets @@ -0,0 +1,63 @@ +{ + "script": { + "prefix": "vue-sfc-ts", + "body": [ + "", + "", + "", + "", + "", + "" + ], + "description": "Vue SFC Typescript" + }, + "template": { + "scope": "vue", + "prefix": "template", + "body": [ + "" + ], + "description": "Create