create-bc-app 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +7 -0
  2. package/dist/index.mjs +49 -0
  3. package/index.js +3 -0
  4. package/package.json +30 -0
  5. package/template-vue-js/.gitlab-ci.yml +41 -0
  6. package/template-vue-js/README.md +5 -0
  7. package/template-vue-js/eslint.config.js +11 -0
  8. package/template-vue-js/index.html +13 -0
  9. package/template-vue-js/package-lock.json +4280 -0
  10. package/template-vue-js/package.json +34 -0
  11. package/template-vue-js/public/group.svg +3 -0
  12. package/template-vue-js/src/App.vue +29 -0
  13. package/template-vue-js/src/assets/bochui.svg +7 -0
  14. package/template-vue-js/src/assets/group.svg +3 -0
  15. package/template-vue-js/src/components/ExampleComponent.vue +28 -0
  16. package/template-vue-js/src/main.js +12 -0
  17. package/template-vue-js/src/style.css +19 -0
  18. package/template-vue-js/test/App.test.ts +16 -0
  19. package/template-vue-js/test/Example.test.ts +21 -0
  20. package/template-vue-js/vite.config.js +14 -0
  21. package/template-vue-ts/.eslintrc.cjs +201 -0
  22. package/template-vue-ts/.gitlab-ci.yml +41 -0
  23. package/template-vue-ts/README.md +16 -0
  24. package/template-vue-ts/image.png +0 -0
  25. package/template-vue-ts/index.html +13 -0
  26. package/template-vue-ts/package-lock.json +4917 -0
  27. package/template-vue-ts/package.json +37 -0
  28. package/template-vue-ts/public/group.svg +3 -0
  29. package/template-vue-ts/src/App.vue +29 -0
  30. package/template-vue-ts/src/assets/bochui.svg +7 -0
  31. package/template-vue-ts/src/assets/group.svg +3 -0
  32. package/template-vue-ts/src/components/Example.vue +28 -0
  33. package/template-vue-ts/src/main.ts +12 -0
  34. package/template-vue-ts/src/style.css +19 -0
  35. package/template-vue-ts/src/vite-env.d.ts +1 -0
  36. package/template-vue-ts/test/App.test.ts +16 -0
  37. package/template-vue-ts/test/Example.test.ts +15 -0
  38. package/template-vue-ts/tsconfig.json +33 -0
  39. package/template-vue-ts/tsconfig.node.json +11 -0
  40. package/template-vue-ts/vite.config.ts +15 -0
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "template-vue-js",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview",
10
+ "build:test": "vite build --mode test",
11
+ "build:prod": "vite build --mode prod",
12
+ "lint": "eslint",
13
+ "test": "vitest",
14
+ "test:ui": "vitest --ui"
15
+ },
16
+ "dependencies": {
17
+ "@fscut/bochui": "^0.1.4",
18
+ "@fsdev/element-plus": "^2.7.3",
19
+ "vue": "^3.4.29"
20
+ },
21
+ "devDependencies": {
22
+ "@eslint/js": "^9.6.0",
23
+ "@vitejs/plugin-vue": "^5.0.5",
24
+ "@vitest/ui": "^1.6.0",
25
+ "@vue/test-utils": "^2.4.6",
26
+ "eslint": "^9.6.0",
27
+ "eslint-plugin-vue": "^9.27.0",
28
+ "globals": "^15.8.0",
29
+ "happy-dom": "^14.12.3",
30
+ "less": "^4.2.0",
31
+ "vite": "^5.3.1",
32
+ "vitest": "^1.6.0"
33
+ }
34
+ }
@@ -0,0 +1,3 @@
1
+ <svg width="279" height="279" viewBox="0 0 279 279" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M139.498 0C62.5761 0 0 62.5761 0 139.498C0 216.42 62.5761 278.996 139.498 278.996C216.42 278.996 278.996 216.42 278.996 139.498C278.996 62.5761 216.42 0 139.498 0ZM30.1684 194.987C49.5097 191.592 78.7184 189.352 118.336 212.68C148.529 227.936 174.416 233.793 191.665 234.605C201.385 235.048 210.515 234.507 218.709 233.03C197.325 251.166 169.691 262.141 139.498 262.141C91.8341 262.141 50.4694 234.777 30.1684 194.987ZM255.866 178.156C242.873 191.567 225.746 196.858 206.381 200.057C180.199 204.387 145.576 199.786 118.065 192.084C100.127 187.064 83.6153 183.102 63.9295 180.937C46.9505 179.067 31.9648 178.55 23.2292 178.427C19.1198 166.172 16.8559 153.081 16.8559 139.474C16.8559 71.853 71.8776 16.8313 139.498 16.8313C142.008 16.8313 144.518 16.9297 146.979 17.0774C142.082 22.8847 133.396 33.3427 126.235 42.9888C115.432 57.5562 102.317 72.7881 102.341 96.0665C102.366 109.699 113.292 126.235 124.709 136.472C133.248 144.149 135.069 151.113 132.067 159.652C130.467 164.204 121.535 178.008 110.437 183.668L131.673 189.082C131.673 189.082 147.594 179.263 157.732 164.081C167.92 148.8 164.745 129.434 150.744 116.614C137.111 104.138 125.275 90.8744 126.358 80.0472C127.465 69.22 130.787 59.6971 143.165 41.783C150.941 30.5129 156.871 22.4664 159.824 18.5292C217.798 28.2491 262.14 78.743 262.14 139.449C262.14 153.008 259.901 166 255.866 178.156Z" fill="#1D46CC"/>
3
+ </svg>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import Example from './components/Example.vue'
3
+ </script>
4
+
5
+ <template>
6
+ <a href="https://wiki.fsdev.cn/frontend/storybook" target="_blank">
7
+ <img src="/group.svg" class="logo" alt="Vite logo">
8
+ </a>
9
+ <a href="https://wiki.fsdev.cn/frontend/storybook" target="_blank">
10
+ <img src="./assets/bochui.svg" class="logo vue" alt="Vue logo">
11
+ </a>
12
+ <Example msg="Vite + Vue + TS example project" />
13
+ </template>
14
+
15
+ <style scoped lang="less">
16
+
17
+ .logo {
18
+ height: 6em;
19
+ padding: 1.5em;
20
+ will-change: filter;
21
+ transition: filter 300ms;
22
+ }
23
+ .logo:hover {
24
+ filter: drop-shadow(0 0 2em #646cffaa);
25
+ }
26
+ .logo.vue:hover {
27
+ filter: drop-shadow(0 0 2em #42b883aa);
28
+ }
29
+ </style>
@@ -0,0 +1,7 @@
1
+ <svg width="735" height="136" viewBox="0 0 735 136" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M650.965 135.526C637.945 135.526 627.034 133.046 618.23 128.086C609.55 123.003 603.412 115.935 599.816 106.883C596.22 97.7069 595.6 87.043 597.956 74.8911L612.464 2.72406H649.291L634.969 74.3332C633.977 79.5411 633.668 84.067 634.04 87.911C634.412 91.7549 635.466 94.9789 637.202 97.5829C639.061 100.187 641.479 102.109 644.455 103.349C647.555 104.465 651.213 105.023 655.429 105.023C660.513 105.023 664.915 104.031 668.635 102.047C672.479 99.9388 675.641 96.6529 678.121 92.1889C680.725 87.601 682.709 81.6491 684.073 74.3332L698.395 2.72406H734.664L719.97 76.5651C716.126 95.9089 708.439 110.603 696.907 120.647C685.375 130.566 670.061 135.526 650.965 135.526Z" fill="#1D46CC"/>
3
+ <path d="M550.589 2.72406H587.417L561.377 132.922H524.549L550.589 2.72406ZM474.516 132.922H437.688L463.728 2.72406H500.556L474.516 132.922ZM537.383 82.1451H482.142L488.28 51.6414H543.521L537.383 82.1451Z" fill="#1D46CC"/>
4
+ <path d="M371.421 135.526C358.153 135.526 346.559 133.108 336.639 128.272C326.843 123.437 319.28 116.741 313.948 108.185C308.616 99.5049 305.95 89.523 305.95 78.2391C305.95 66.9553 307.934 56.5394 311.902 46.9915C315.87 37.4436 321.45 29.1977 328.641 22.2538C335.833 15.1859 344.389 9.73 354.309 5.88604C364.353 2.04209 375.451 0.120117 387.603 0.120117C399.631 0.120117 410.294 2.22809 419.594 6.44404C428.894 10.66 435.838 16.7359 440.426 24.6718L413.828 45.8755C410.852 40.9156 406.946 37.1336 402.111 34.5297C397.399 31.9257 391.757 30.6237 385.185 30.6237C378.861 30.6237 373.095 31.7397 367.887 33.9717C362.803 36.2037 358.401 39.3656 354.681 43.4576C350.961 47.5495 348.109 52.3855 346.125 57.9654C344.141 63.4213 343.149 69.3732 343.149 75.8212C343.149 81.6491 344.389 86.795 346.869 91.2589C349.473 95.5989 353.131 99.0089 357.843 101.489C362.679 103.845 368.383 105.023 374.955 105.023C380.783 105.023 386.363 103.845 391.695 101.489C397.151 99.1329 402.172 95.2889 406.76 89.957L428.522 111.347C421.206 120.151 412.774 126.413 403.226 130.132C393.679 133.728 383.077 135.526 371.421 135.526Z" fill="#1D46CC"/>
5
+ <path d="M213.378 135.526C199.986 135.526 188.454 133.108 178.782 128.272C169.111 123.313 161.671 116.555 156.463 107.999C151.255 99.4428 148.651 89.523 148.651 78.2391C148.651 66.8313 150.635 56.4154 154.603 46.9915C158.571 37.4436 164.151 29.1977 171.343 22.2538C178.535 15.1859 187.09 9.73 197.01 5.88604C207.054 2.04209 218.028 0.120117 229.932 0.120117C243.324 0.120117 254.856 2.60008 264.527 7.56002C274.199 12.396 281.639 19.0919 286.847 27.6478C292.055 36.2037 294.659 46.1235 294.659 57.4074C294.659 68.8152 292.675 79.2931 288.707 88.841C284.739 98.2649 279.159 106.511 271.967 113.579C264.775 120.523 256.158 125.917 246.114 129.76C236.194 133.604 225.282 135.526 213.378 135.526ZM216.54 105.023C222.988 105.023 228.692 103.845 233.652 101.489C238.736 99.1329 243.014 95.8469 246.486 91.631C250.082 87.291 252.81 82.3931 254.67 76.9371C256.53 71.4812 257.46 65.7153 257.46 59.6394C257.46 53.8114 256.22 48.7275 253.74 44.3876C251.384 40.0476 247.912 36.6996 243.324 34.3437C238.86 31.8637 233.342 30.6237 226.77 30.6237C220.446 30.6237 214.742 31.8017 209.658 34.1577C204.574 36.5136 200.234 39.8616 196.638 44.2015C193.166 48.4175 190.5 53.2534 188.64 58.7094C186.78 64.1653 185.85 69.9312 185.85 76.0071C185.85 81.7111 187.028 86.795 189.384 91.2589C191.864 95.5989 195.336 99.0089 199.8 101.489C204.388 103.845 209.968 105.023 216.54 105.023Z" fill="#1D46CC"/>
6
+ <path d="M0.121826 132.922L26.1615 2.72406H92.0047C106.76 2.72406 117.982 5.39003 125.67 10.722C133.358 15.9299 137.202 23.4318 137.202 33.2277C137.202 41.2876 134.97 48.1075 130.506 53.6874C126.042 59.2673 120.028 63.5453 112.464 66.5212C104.9 69.3732 96.4066 70.7992 86.9827 70.7992L92.1907 61.8713C104.219 61.8713 113.766 64.4753 120.834 69.6832C127.902 74.8911 131.436 82.207 131.436 91.6309C131.436 101.055 128.77 108.805 123.438 114.881C118.23 120.957 111.1 125.483 102.049 128.458C93.1206 131.434 83.0148 132.922 71.7309 132.922H0.121826ZM41.7853 106.325H73.7769C80.2248 106.325 85.3087 105.023 89.0287 102.419C92.8726 99.8148 94.7946 95.9709 94.7946 90.8869C94.7946 87.043 93.3686 84.253 90.5167 82.517C87.6647 80.7811 84.0068 79.9131 79.5428 79.9131H44.0173L49.0392 54.4314H78.6128C82.9528 54.4314 86.6107 53.8734 89.5867 52.7574C92.6867 51.6414 94.9806 49.9675 96.4686 47.7355C97.9566 45.5035 98.7006 42.7756 98.7006 39.5516C98.7006 35.9556 97.3366 33.3517 94.6086 31.7397C91.8807 30.1277 88.0987 29.3217 83.2628 29.3217H57.2231L41.7853 106.325Z" fill="#1D46CC"/>
7
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="279" height="279" viewBox="0 0 279 279" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M139.498 0C62.5761 0 0 62.5761 0 139.498C0 216.42 62.5761 278.996 139.498 278.996C216.42 278.996 278.996 216.42 278.996 139.498C278.996 62.5761 216.42 0 139.498 0ZM30.1684 194.987C49.5097 191.592 78.7184 189.352 118.336 212.68C148.529 227.936 174.416 233.793 191.665 234.605C201.385 235.048 210.515 234.507 218.709 233.03C197.325 251.166 169.691 262.141 139.498 262.141C91.8341 262.141 50.4694 234.777 30.1684 194.987ZM255.866 178.156C242.873 191.567 225.746 196.858 206.381 200.057C180.199 204.387 145.576 199.786 118.065 192.084C100.127 187.064 83.6153 183.102 63.9295 180.937C46.9505 179.067 31.9648 178.55 23.2292 178.427C19.1198 166.172 16.8559 153.081 16.8559 139.474C16.8559 71.853 71.8776 16.8313 139.498 16.8313C142.008 16.8313 144.518 16.9297 146.979 17.0774C142.082 22.8847 133.396 33.3427 126.235 42.9888C115.432 57.5562 102.317 72.7881 102.341 96.0665C102.366 109.699 113.292 126.235 124.709 136.472C133.248 144.149 135.069 151.113 132.067 159.652C130.467 164.204 121.535 178.008 110.437 183.668L131.673 189.082C131.673 189.082 147.594 179.263 157.732 164.081C167.92 148.8 164.745 129.434 150.744 116.614C137.111 104.138 125.275 90.8744 126.358 80.0472C127.465 69.22 130.787 59.6971 143.165 41.783C150.941 30.5129 156.871 22.4664 159.824 18.5292C217.798 28.2491 262.14 78.743 262.14 139.449C262.14 153.008 259.901 166 255.866 178.156Z" fill="#1D46CC"/>
3
+ </svg>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FsCard v-bind="curArgs" v-model="value">
3
+ <h1>{{ msg }}</h1>
4
+ </FsCard>
5
+ </template>
6
+ <script setup>
7
+ import { computed, ref } from 'vue'
8
+
9
+ defineOptions({
10
+ name: 'ExampleComponent'
11
+ })
12
+
13
+ defineProps<{ msg: string }>()
14
+
15
+ const value = ref(true)
16
+ const curArgs = computed(() => ({
17
+ type: 'content',
18
+ title: 'BOCHUI卡片标题',
19
+ isCardFold: true,
20
+ showSwitch: true,
21
+ switchOpenText: '开',
22
+ switchCloseText: '关'
23
+ }))
24
+ </script>
25
+
26
+ <style scoped lang="less">
27
+
28
+ </style>
@@ -0,0 +1,12 @@
1
+ import { createApp } from 'vue'
2
+ import './style.css'
3
+ import App from './App.vue'
4
+ import ElementPlus from '@fsdev/element-plus'
5
+ import '@fsdev/element-plus/dist/index.css'
6
+ import BochUI from '@fscut/bochui'
7
+ import '@fscut/bochui/lib/style.css'
8
+
9
+ createApp(App)
10
+ .use(ElementPlus)
11
+ .use(BochUI)
12
+ .mount('#app')
@@ -0,0 +1,19 @@
1
+ :root {
2
+ font-family: var(--font-family);
3
+ }
4
+
5
+ body {
6
+ margin : 0;
7
+ display : flex;
8
+ justify-content: center;
9
+ place-items : center;
10
+ min-width : 320px;
11
+ min-height : 100vh;
12
+ }
13
+
14
+ #app {
15
+ max-width : 1280px;
16
+ margin : 0 auto;
17
+ padding : 2rem;
18
+ text-align: center;
19
+ }
@@ -0,0 +1,16 @@
1
+ import { mount } from '@vue/test-utils'
2
+ import { describe, it, expect } from 'vitest'
3
+ import Example from '../src/components/ExampleComponent.vue'
4
+ import App from '../src/App.vue'
5
+
6
+ describe('App.vue', () => {
7
+ it('text app.vue', () => {
8
+ const wrapper = mount(App)
9
+ // 渲染app.vue组件
10
+ const example = wrapper.findComponent(Example)
11
+ // 检查 example 组件是否存在
12
+ expect(example.exists()).toBe(true)
13
+ // 检查props 对不对
14
+ expect(example.props('msg')).toBe('Vite + Vue + JS example project')
15
+ })
16
+ })
@@ -0,0 +1,21 @@
1
+ import { mount } from '@vue/test-utils'
2
+ import { describe, it, expect } from 'vitest'
3
+ import Example from '../src/components/ExampleComponent.vue'
4
+
5
+ describe('Example.vue', () => {
6
+ it('render this correct text', () => {
7
+ const wrapper = mount(Example, {
8
+ props: {
9
+ msg: 'Vite + Vue + TS example project'
10
+ }
11
+ })
12
+ expect(wrapper.find('h1').text()).toBe('Vite + Vue + TS example project')
13
+ })
14
+
15
+ it('increments the count whine button is clicked', async() => {
16
+ const wrapper = mount(Example)
17
+ await wrapper.find('fs-button').trigger('click')
18
+ expect(wrapper.find('div').text()).toBe('Count: 1')
19
+ })
20
+ })
21
+
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+
4
+ // https://vitejs.dev/config/
5
+ export default defineConfig({
6
+ plugins: [vue()],
7
+ test: {
8
+ global: true,
9
+ environment: 'happy-dom',
10
+ deps: {
11
+ inline: ['@vue']
12
+ }
13
+ }
14
+ })
@@ -0,0 +1,201 @@
1
+ /* eslint-env node */
2
+ require('@rushstack/eslint-patch/modern-module-resolution')
3
+
4
+ module.exports = {
5
+ root: true,
6
+ extends: [
7
+ 'plugin:vue/recommended',
8
+ 'plugin:vue/vue3-essential',
9
+ 'plugin:vue/vue3-strongly-recommended',
10
+ 'plugin:@typescript-eslint/recommended',
11
+ 'eslint:recommended'
12
+ ],
13
+ globals: {
14
+ 'process': true
15
+ },
16
+ parser: 'vue-eslint-parser',
17
+ parserOptions: {
18
+ ecmaVersion: 'latest',
19
+ parser: '@typescript-eslint/parser'
20
+ },
21
+ rules: {
22
+ '@typescript-eslint/no-unused-vars': 'error',
23
+ '@typescript-eslint/no-explicit-any': 'off',
24
+ '@typescript-eslint/ban-ts-comment': 'off',
25
+ 'vue/multi-word-component-names': ['off'],
26
+ 'vue/no-v-for-template-key': 'off',
27
+ 'vue/no-multiple-template-root': 'off',
28
+ 'vue/no-v-model-argument': 'off',
29
+ 'vue/max-attributes-per-line': ['error', {
30
+ 'singleline': {
31
+ 'max': 3
32
+ },
33
+ 'multiline': {
34
+ 'max': 3
35
+ }
36
+ }],
37
+ 'accessor-pairs': 2,
38
+ 'arrow-spacing': [2, {
39
+ 'before': true,
40
+ 'after': true
41
+ }],
42
+ 'block-spacing': [2, 'always'],
43
+ 'brace-style': [2, '1tbs', {
44
+ 'allowSingleLine': true
45
+ }],
46
+ 'camelcase': [2, {
47
+ 'properties': 'always'
48
+ }],
49
+ 'comma-dangle': [2, 'never'],
50
+ 'comma-spacing': [2, {
51
+ 'before': false,
52
+ 'after': true
53
+ }],
54
+ 'comma-style': [2, 'last'],
55
+ 'constructor-super': 2,
56
+ 'curly': [2, 'multi-line'],
57
+ 'dot-location': [2, 'property'],
58
+ 'eol-last': 2,
59
+ 'eqeqeq': [2, 'allow-null'],
60
+ 'generator-star-spacing': [2, {
61
+ 'before': true,
62
+ 'after': true
63
+ }],
64
+ 'handle-callback-err': [2, '^(err|error)$'],
65
+ 'indent': [1, 2, {
66
+ 'SwitchCase': 1
67
+ }],
68
+ 'jsx-quotes': [2, 'prefer-single'],
69
+ 'key-spacing': [2, {
70
+ 'beforeColon': false,
71
+ 'afterColon': true
72
+ }],
73
+ 'keyword-spacing': [2, {
74
+ 'before': true,
75
+ 'after': true
76
+ }],
77
+ 'new-cap': [2, {
78
+ 'newIsCap': true,
79
+ 'capIsNew': false
80
+ }],
81
+ 'new-parens': 2,
82
+ 'no-array-constructor': 2,
83
+ 'no-caller': 2,
84
+ 'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
85
+ 'no-class-assign': 2,
86
+ 'no-cond-assign': 2,
87
+ 'no-const-assign': 2,
88
+ 'no-control-regex': 0,
89
+ 'no-delete-var': 2,
90
+ 'no-dupe-args': 2,
91
+ 'no-dupe-class-members': 2,
92
+ 'no-dupe-keys': 2,
93
+ 'no-duplicate-case': 2,
94
+ 'no-empty-character-class': 2,
95
+ 'no-empty-pattern': 2,
96
+ 'no-eval': 2,
97
+ 'no-ex-assign': 2,
98
+ 'no-extend-native': 2,
99
+ 'no-extra-bind': 2,
100
+ 'no-extra-boolean-cast': 2,
101
+ 'no-extra-parens': [2, 'functions'],
102
+ 'no-fallthrough': 2,
103
+ 'no-floating-decimal': 2,
104
+ 'no-func-assign': 2,
105
+ 'no-implied-eval': 2,
106
+ 'no-inner-declarations': [2, 'functions'],
107
+ 'no-invalid-regexp': 2,
108
+ 'no-irregular-whitespace': 2,
109
+ 'no-iterator': 2,
110
+ 'no-label-var': 2,
111
+ 'no-labels': [2, {
112
+ 'allowLoop': false,
113
+ 'allowSwitch': false
114
+ }],
115
+ 'no-lone-blocks': 2,
116
+ 'no-mixed-spaces-and-tabs': 2,
117
+ 'no-multi-spaces': 2,
118
+ 'no-multi-str': 2,
119
+ 'no-multiple-empty-lines': [2, {
120
+ 'max': 1
121
+ }],
122
+ 'no-native-reassign': 2,
123
+ 'no-negated-in-lhs': 2,
124
+ 'no-new-object': 2,
125
+ 'no-new-require': 2,
126
+ 'no-new-symbol': 2,
127
+ 'no-new-wrappers': 2,
128
+ 'no-obj-calls': 2,
129
+ 'no-octal': 2,
130
+ 'no-octal-escape': 2,
131
+ 'no-path-concat': 2,
132
+ 'no-proto': 2,
133
+ 'no-redeclare': 2,
134
+ 'no-regex-spaces': 2,
135
+ 'no-return-assign': [2, 'except-parens'],
136
+ 'no-self-assign': 2,
137
+ 'no-self-compare': 2,
138
+ 'no-sequences': 2,
139
+ 'no-shadow-restricted-names': 2,
140
+ 'no-spaced-func': 2,
141
+ 'no-sparse-arrays': 2,
142
+ 'no-this-before-super': 2,
143
+ 'no-throw-literal': 2,
144
+ 'no-trailing-spaces': 2,
145
+ 'no-undef': 2,
146
+ 'no-undef-init': 2,
147
+ 'no-unexpected-multiline': 2,
148
+ 'no-unmodified-loop-condition': 2,
149
+ 'no-unneeded-ternary': [2, {
150
+ 'defaultAssignment': false
151
+ }],
152
+ 'no-unreachable': 2,
153
+ 'no-unsafe-finally': 2,
154
+ 'no-unused-vars': 'off',
155
+ 'no-useless-call': 2,
156
+ 'no-useless-computed-key': 2,
157
+ 'no-useless-constructor': 2,
158
+ 'no-useless-escape': 1,
159
+ 'no-whitespace-before-property': 2,
160
+ 'no-with': 2,
161
+ 'one-var': [2, {
162
+ 'initialized': 'never'
163
+ }],
164
+ 'operator-linebreak': [2, 'after', {
165
+ 'overrides': {
166
+ '?': 'before',
167
+ ':': 'before'
168
+ }
169
+ }],
170
+ 'padded-blocks': [2, 'never'],
171
+ 'quotes': [1, 'single', {
172
+ 'avoidEscape': true,
173
+ 'allowTemplateLiterals': true
174
+ }],
175
+ 'semi': [2, 'never'],
176
+ 'semi-spacing': [2, {
177
+ 'before': false,
178
+ 'after': true
179
+ }],
180
+ 'space-before-blocks': [2, 'always'],
181
+ 'space-in-parens': [2, 'never'],
182
+ 'space-infix-ops': 2,
183
+ 'space-unary-ops': [2, {
184
+ 'words': true,
185
+ 'nonwords': false
186
+ }],
187
+ 'spaced-comment': ['error', 'always', { 'markers': ['/'] }],
188
+ 'template-curly-spacing': [2, 'never'],
189
+ 'use-isnan': 2,
190
+ 'valid-typeof': 2,
191
+ 'wrap-iife': [2, 'any'],
192
+ 'yield-star-spacing': [2, 'both'],
193
+ 'yoda': [2, 'never'],
194
+ 'prefer-const': 0,
195
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
196
+ 'object-curly-spacing': [2, 'always', {
197
+ objectsInObjects: false
198
+ }],
199
+ 'array-bracket-spacing': [2, 'never']
200
+ }
201
+ }
@@ -0,0 +1,41 @@
1
+ stages:
2
+ - install
3
+ - eslint
4
+ - notify
5
+
6
+ cache:
7
+ key: '$CI_COMMIT_REF_SLUG'
8
+
9
+ install:
10
+ stage: install
11
+ cache:
12
+ paths:
13
+ - node_modules/
14
+ script:
15
+ - cnpm install
16
+ tags:
17
+ - sonar
18
+
19
+ eslint:
20
+ stage: eslint
21
+ cache:
22
+ paths:
23
+ - node_modules/
24
+ script:
25
+ - npm run lint
26
+ tags:
27
+ - sonar
28
+
29
+ notify-fail:
30
+ stage: notify
31
+ cache:
32
+ paths:
33
+ - node_modules/
34
+ script:
35
+ - >
36
+ curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=需要找企业微信管理员或斌斌'
37
+ -H 'Content-Type: application/json'
38
+ -d "{\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"项目构建结果:<font color=\\"warning\\">失败</font>\n>本次构建由: $GITLAB_USER_NAME 触发\n>项目名称:$CI_PROJECT_NAME\n>提交号:$CI_COMMIT_SHA\n>提交日志:$CI_COMMIT_MESSAGE\n>构建分支: $CI_COMMIT_REF_NAME\n>流水线地址:[$CI_PIPELINE_URL]($CI_PIPELINE_URL)\"}}"
39
+ when: on_failure
40
+ tags:
41
+ - sonar
@@ -0,0 +1,16 @@
1
+ # 这是一个 Vue 3 + TypeScript + Vite 的示例项目
2
+ 该项目已经配置:
3
+ - eslint
4
+ - less
5
+ - bochui
6
+ - eslint gitlab 代码检查流水线
7
+ - 单元测试
8
+ - vitest 官方文档
9
+ ![alt text](image.png)
10
+
11
+
12
+ 你可能需要配置:
13
+ - vue-router
14
+ - pinia
15
+ - fs-utils
16
+ - axios
Binary file
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/group.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>example project</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>