Skip to content

Commit 64673f2

Browse files
committed
refactor: remove nodeListToArray & add semi rule
1 parent 81a2ddd commit 64673f2

File tree

193 files changed

+6865
-6845
lines changed

Some content is hidden

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

193 files changed

+6865
-6845
lines changed

.eslintrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ module.exports = {
1717
},
1818
// add your custom rules here
1919
rules: {
20+
'prettier/prettier': [
21+
'error',
22+
{
23+
endOfLine: 'auto',
24+
semi: true,
25+
singleQuote: true,
26+
trailingComma: 'es5',
27+
},
28+
],
2029
// allow paren-less arrow functions
2130
'arrow-parens': 0,
2231
// allow async-await
@@ -26,4 +35,4 @@ module.exports = {
2635
'vue/multi-word-component-names': 0,
2736
'vue/no-v-html': 0,
2837
},
29-
}
38+
};

.prettierrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"semi": false,
2+
"semi": true,
33
"singleQuote": true,
4-
"endOfLine": "auto"
4+
"endOfLine": "auto",
5+
"trailingComma": "es5"
56
}

build/single.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { exec } = require('child_process')
1+
const { exec } = require('child_process');
22

33
const files = [
44
'services/notification/Notification.js',
@@ -33,33 +33,33 @@ const files = [
3333
'components/timepicker/TimePicker.vue',
3434
'components/tooltip/Tooltip.vue',
3535
'components/typeahead/Typeahead.vue',
36-
]
36+
];
3737

3838
function e(command, options) {
3939
return new Promise((resolve, reject) => {
4040
exec(command, options, (error, stdout, stderr) => {
4141
if (error) {
42-
console.error(`exec error: ${error}`)
43-
reject(error)
44-
process.exit(1)
42+
console.error(`exec error: ${error}`);
43+
reject(error);
44+
process.exit(1);
4545
}
46-
console.log(`stdout: ${stdout}`)
47-
console.error(`stderr: ${stderr}`)
48-
resolve()
49-
})
50-
})
46+
console.log(`stdout: ${stdout}`);
47+
console.error(`stderr: ${stderr}`);
48+
resolve();
49+
});
50+
});
5151
}
5252

53-
;(async function () {
53+
(async function () {
5454
for (const file of files) {
55-
const prefix = file.startsWith('directives') ? 'v_' : ''
55+
const prefix = file.startsWith('directives') ? 'v_' : '';
5656

5757
await e('npx vite build -c build/vite.config.js', {
5858
env: {
5959
...process.env,
6060
UIV_ENTRY: file,
6161
UIV_FILENAME: `${prefix + file.split('/').pop().split('.')[0]}.js`,
6262
},
63-
})
63+
});
6464
}
65-
})()
65+
})();

build/vite.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import vue from '@vitejs/plugin-vue'
2-
import vueJsx from '@vitejs/plugin-vue-jsx'
3-
import { defineConfig } from 'vite'
4-
import { resolve } from 'path'
1+
import vue from '@vitejs/plugin-vue';
2+
import vueJsx from '@vitejs/plugin-vue-jsx';
3+
import { defineConfig } from 'vite';
4+
import { resolve } from 'path';
55

6-
const { UIV_ENTRY, UIV_FILENAME } = process.env
6+
const { UIV_ENTRY, UIV_FILENAME } = process.env;
77

8-
console.log('env:', UIV_ENTRY, UIV_FILENAME)
8+
console.log('env:', UIV_ENTRY, UIV_FILENAME);
99

1010
// https://vitejs.dev/config/
1111
export default defineConfig({
@@ -31,4 +31,4 @@ export default defineConfig({
3131
},
3232
},
3333
},
34-
})
34+
});

docs/.vitepress/components/alert/auto-dismissing.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export default {
2020
return {
2121
alerts: [],
2222
duration: 2000,
23-
}
23+
};
2424
},
2525
methods: {
2626
addAutoDismissAlert() {
27-
this.alerts.push({ key: new Date().getTime() })
27+
this.alerts.push({ key: new Date().getTime() });
2828
},
2929
},
30-
}
30+
};
3131
</script>

docs/.vitepress/components/alert/dismissible.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export default {
2424
return {
2525
show: true,
2626
alerts: [],
27-
}
27+
};
2828
},
2929
methods: {
3030
addDismissibleAlert() {
31-
this.alerts.push({ key: new Date().getTime() })
31+
this.alerts.push({ key: new Date().getTime() });
3232
},
3333
},
34-
}
34+
};
3535
</script>

docs/.vitepress/components/alert/with-collapse.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
data() {
1515
return {
1616
show: true,
17-
}
17+
};
1818
},
19-
}
19+
};
2020
</script>

docs/.vitepress/components/breadcrumbs/example.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
{ text: 'Library', href: '#' },
1313
{ text: 'Data', href: '#' },
1414
],
15-
}
15+
};
1616
},
17-
}
17+
};
1818
</script>

docs/.vitepress/components/breadcrumbs/router-link.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
{ text: 'Home', to: '/', exact: true },
1212
{ text: 'Breadcrumbs', to: '/breadcrumbs' },
1313
],
14-
}
14+
};
1515
},
16-
}
16+
};
1717
</script>

docs/.vitepress/components/btn/checkbox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
data() {
2424
return {
2525
model: ['1'],
26-
}
26+
};
2727
},
28-
}
28+
};
2929
</script>

0 commit comments

Comments
 (0)