diff --git a/.all-contributorsrc b/.all-contributorsrc index 50212d6..4fb87be 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,7 +1,5 @@ { - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": false, "commitType": "docs", @@ -12,27 +10,21 @@ "name": "hyemyn2", "avatar_url": "https://avatars.githubusercontent.com/u/67949202?v=4", "profile": "https://github.com/hyemyn2", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "gingerbeerlime", "name": "Sumin", "avatar_url": "https://avatars.githubusercontent.com/u/89768065?v=4", "profile": "https://github.com/gingerbeerlime", - "contributions": [ - "code" - ], + "contributions": ["code"] }, { "login": "Seungwoo321", "name": "Seungwoo321", "avatar_url": "https://avatars.githubusercontent.com/u/13829929?v=4", "profile": "https://seungwoo321.github.io", - "contributions": [ - "code" - ] + "contributions": ["code"] } ], "contributorsPerLine": 7, diff --git a/.gitignore b/.gitignore index bcf3078..f0d9303 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ dist-ssr # Editor directories and files .vscode/* !.vscode/extensions.json +!.vscode/settings.json .idea .DS_Store *.suo diff --git a/.hintrc b/.hintrc index aa8de6b..d31c69c 100644 --- a/.hintrc +++ b/.hintrc @@ -1,5 +1,11 @@ { - "extends": [ - "development" - ] -} \ No newline at end of file + "extends": ["development"], + "hints": { + "compat-api/css": [ + "default", + { + "ignore": ["-webkit-text-size-adjust"] + } + ] + } +} diff --git a/.prettierrc.json b/.prettierrc.json index 59b2309..8edb240 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,12 +1,21 @@ { + "arrowParens": "always", + "bracketSpacing": true, + "endOfLine": "lf", + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "singleAttributePerLine": true, + "bracketSameLine": false, + "jsxSingleQuote": true, "printWidth": 80, - "tabWidth": 2, + "proseWrap": "preserve", + "quoteProps": "consistent", "semi": false, "singleQuote": true, + "tabWidth": 2, "trailingComma": "none", - "arrowParens": "avoid", - "endOfLine": "lf", - "bracketSameLine": false, - "jsxBracketSameLine": false, - "jsxSingleQuote": true + "useTabs": false, + "vueIndentScriptAndStyle": false, + "embeddedLanguageFormatting": "auto", + "experimentalTernaries": false } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ccc6383 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "prettier.requireConfig": true, + "prettier.configPath": ".prettierrc.json", + "[vue]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "prettier.singleAttributePerLine": true +} diff --git a/README.md b/README.md index 4e6460a..818723f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Vue 3 + Vite + + [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) + This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` - + - + diff --git a/src/components/pivottable-ui/VAggregatorCell.vue b/src/components/pivottable-ui/VAggregatorCell.vue index dd29660..7a94752 100644 --- a/src/components/pivottable-ui/VAggregatorCell.vue +++ b/src/components/pivottable-ui/VAggregatorCell.vue @@ -1,46 +1,46 @@ @@ -48,7 +48,12 @@ import { computed, useSlots } from 'vue' import VDropdown from './VDropdown.vue' const slots = useSlots() -const emit = defineEmits(['update:aggregatorName', 'update:rowOrder', 'update:colOrder', 'update:vals']) +const emit = defineEmits([ + 'update:aggregatorName', + 'update:rowOrder', + 'update:colOrder', + 'update:vals' +]) const props = defineProps({ aggregatorItems: { type: Object, @@ -62,14 +67,18 @@ const props = defineProps({ type: String, default: 'key_a_to_z', validator: function (value) { - return ['key_a_to_z', 'value_a_to_z', 'value_z_to_a'].indexOf(value) !== -1 + return ( + ['key_a_to_z', 'value_a_to_z', 'value_z_to_a'].indexOf(value) !== -1 + ) } }, colOrder: { type: String, default: 'key_a_to_z', validator: function (value) { - return ['key_a_to_z', 'value_a_to_z', 'value_z_to_a'].indexOf(value) !== -1 + return ( + ['key_a_to_z', 'value_a_to_z', 'value_z_to_a'].indexOf(value) !== -1 + ) } }, vals: { @@ -93,13 +102,21 @@ const sortIcons = { value_z_to_a: { rowSymbol: '↑', colSymbol: '←', next: 'key_a_to_z' } } const aggregatorOptions = computed(() => Object.keys(props.aggregatorItems)) -const valsOptions = computed(() => props.attributeNames.filter(item => !props.hiddenFromAggregators.includes(item))) -const numValsAllowed = computed(() => props.aggregatorItems[props.aggregatorName]([])().numInputs || 0) +const valsOptions = computed(() => + props.attributeNames.filter( + (item) => !props.hiddenFromAggregators.includes(item) + ) +) +const numValsAllowed = computed( + () => props.aggregatorItems[props.aggregatorName]([])().numInputs || 0 +) const currentRowSortIcon = computed(() => sortIcons[props.rowOrder].rowSymbol) const currentColSortIcon = computed(() => sortIcons[props.colOrder].colSymbol) const updateAggregatorName = (value) => emit('update:aggregatorName', value) -const updateRowOrder = (value) => emit('update:rowOrder', sortIcons[props.rowOrder].next) -const updateColOrder = (value) => emit('update:colOrder', sortIcons[props.colOrder].next) +const updateRowOrder = (value) => + emit('update:rowOrder', sortIcons[props.rowOrder].next) +const updateColOrder = (value) => + emit('update:colOrder', sortIcons[props.colOrder].next) const updateVals = (val, i) => { const newVals = [...props.vals] newVals[i] = val diff --git a/src/components/pivottable-ui/VDraggableAttribute.vue b/src/components/pivottable-ui/VDraggableAttribute.vue index 9d32ab1..28f2252 100644 --- a/src/components/pivottable-ui/VDraggableAttribute.vue +++ b/src/components/pivottable-ui/VDraggableAttribute.vue @@ -1,8 +1,19 @@