Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit a55c088

Browse files
committed
Add Prettier for consistent code formatting
1 parent 141b98d commit a55c088

File tree

131 files changed

+15778
-16266
lines changed

Some content is hidden

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

131 files changed

+15778
-16266
lines changed

.eslintrc.js

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,69 @@
11
module.exports = {
22
root: true,
33
env: {
4-
node: true,
5-
"jest/globals": true
4+
'browser': true,
5+
'es6': true,
6+
'node': true,
7+
'jest/globals': true,
68
},
7-
extends: ["eslint:recommended", "plugin:vue/vue3-recommended", "@vue/typescript/recommended"],
9+
extends: [
10+
'eslint:recommended',
11+
'plugin:vue/vue3-recommended',
12+
'@vue/typescript/recommended',
13+
'prettier',
14+
],
815
parserOptions: {
916
ecmaVersion: 2021,
1017
},
11-
plugins: ["jest"],
18+
plugins: ['jest'],
1219
rules: {
13-
"no-alert": process.env.NODE_ENV === "production" ? "warn" : "off",
14-
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
15-
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
16-
"arrow-body-style": "warn",
17-
"arrow-parens": "warn",
18-
eqeqeq: "error",
19-
"generator-star-spacing": "warn",
20-
"grouped-accessor-pairs": "warn",
21-
"no-caller": "error",
22-
"no-duplicate-imports": "error",
23-
"no-else-return": "warn",
24-
"no-eval": "error",
25-
"no-extra-bind": "warn",
26-
"no-implied-eval": "error",
27-
"no-labels": "warn",
28-
"no-lone-blocks": "warn",
29-
"no-new-func": "error",
30-
"no-new-wrappers": "error",
31-
"no-return-await": "warn",
32-
"no-template-curly-in-string": "warn",
33-
"no-throw-literal": "error",
34-
"no-undef-init": "warn",
35-
"no-useless-call": "warn",
36-
"no-useless-constructor": "warn",
37-
"no-useless-rename": "warn",
38-
"no-useless-return": "warn",
39-
"no-var": "error",
40-
"object-shorthand": "warn",
41-
"prefer-const": "warn",
42-
"prefer-destructuring": "warn",
43-
"prefer-numeric-literals": "warn",
44-
"prefer-rest-params": "warn",
45-
"prefer-spread": "warn",
46-
"prefer-template": "warn",
47-
"require-atomic-updates": "warn",
48-
"rest-spread-spacing": "warn",
49-
"sort-imports": [
50-
"warn",
20+
'no-alert': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
21+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
22+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
23+
'arrow-body-style': 'warn',
24+
'arrow-parens': 'warn',
25+
'eqeqeq': 'error',
26+
'generator-star-spacing': 'warn',
27+
'grouped-accessor-pairs': 'warn',
28+
'no-caller': 'error',
29+
'no-duplicate-imports': 'error',
30+
'no-else-return': 'warn',
31+
'no-eval': 'error',
32+
'no-extra-bind': 'warn',
33+
'no-implied-eval': 'error',
34+
'no-labels': 'warn',
35+
'no-lone-blocks': 'warn',
36+
'no-new-func': 'error',
37+
'no-new-wrappers': 'error',
38+
'no-return-await': 'warn',
39+
'no-template-curly-in-string': 'warn',
40+
'no-throw-literal': 'error',
41+
'no-undef-init': 'warn',
42+
'no-useless-call': 'warn',
43+
'no-useless-constructor': 'warn',
44+
'no-useless-rename': 'warn',
45+
'no-useless-return': 'warn',
46+
'no-var': 'error',
47+
'object-shorthand': 'warn',
48+
'prefer-const': 'warn',
49+
'prefer-destructuring': 'warn',
50+
'prefer-numeric-literals': 'warn',
51+
'prefer-rest-params': 'warn',
52+
'prefer-spread': 'warn',
53+
'prefer-template': 'warn',
54+
'require-atomic-updates': 'warn',
55+
'rest-spread-spacing': 'warn',
56+
'sort-imports': [
57+
'warn',
5158
{
5259
ignoreCase: true,
5360
ignoreDeclarationSort: true,
5461
},
5562
],
56-
"template-curly-spacing": "warn",
57-
"yield-star-spacing": "warn",
58-
yoda: "warn",
59-
"@typescript-eslint/no-explicit-any": "off",
60-
"vue/no-dupe-keys": "warn",
61-
"vue/require-default-prop": "off"
63+
'template-curly-spacing': 'warn',
64+
'yield-star-spacing': 'warn',
65+
'yoda': 'warn',
66+
'@typescript-eslint/no-explicit-any': 'off',
67+
'vue/require-default-prop': 'off',
6268
},
63-
};
69+
}

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,3 @@ jobs:
121121

122122
- name: Test unit
123123
run: yarn run test:unit --coverage --maxWorkers=2
124-

.prettierrc.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
bracketSpacing: false
2+
printWidth: 100
3+
quoteProps: 'consistent'
4+
semi: false
5+
singleQuote: true
6+
trailingComma: 'es5'
7+
overrides:
8+
- files:
9+
- '**/*.css'
10+
- '**/*.scss'
11+
- '**/*.html'
12+
options:
13+
singleQuote: false

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ As you may suppose, this library is heavily inspired by **BootstrapVue**, as wel
4747
# Contribute & support 🙌
4848

4949
This project is still in **alpha version** so there is a lot of work to do. If you want to contribute you can:
50+
5051
- submit an [issue](https://github.com/cdmoro/bootstrap-vue-3/issues/new)
5152
- or better, a [pull request](https://github.com/cdmoro/bootstrap-vue-3/pulls)
5253
- or even better, visit [my patreon page](https://patreon.com/cdmoro) and support me 😄

babel.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
module.exports = {
2-
presets: [
3-
'@vue/cli-plugin-babel/preset'
4-
]
2+
presets: ['@vue/cli-plugin-babel/preset'],
53
}

docs/.vuepress/clientAppEnhance.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { defineClientAppEnhance } from '@vuepress/client'
1+
import {defineClientAppEnhance} from '@vuepress/client'
22
import 'bootstrap/dist/css/bootstrap.min.css'
33
import '../../dist/bootstrap-vue-3.css'
44

5-
6-
export default defineClientAppEnhance(async ({ app, router, siteData }) => {
5+
export default defineClientAppEnhance(async ({app, router, siteData}) => {
76
if (!__SSR__) {
87
const BootstrapVue = await import('../../dist/bootstrap-vue-3.es')
98
app.use(BootstrapVue.default)
109
}
11-
})
10+
})

docs/.vuepress/config.ts

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
1-
import { defineUserConfig } from 'vuepress'
2-
import type { DefaultThemeOptions } from 'vuepress'
1+
import {defineUserConfig} from 'vuepress'
2+
import type {DefaultThemeOptions} from 'vuepress'
33

44
export default defineUserConfig<DefaultThemeOptions>({
55
lang: 'en-US',
6-
base: '/bootstrap-vue-3/',
7-
title: 'BootstrapVue 3',
8-
head: [['link', { rel: 'icon', href: '/bootstrap-vue-3/favicon.ico' }]],
9-
themeConfig: {
10-
logo: '/logo.png',
11-
repo: 'https://github.com/cdmoro/bootstrap-vue-3',
12-
editLink: true,
13-
lastUpdated: true,
14-
navbar: [
15-
{ text: 'Home', link: '/' },
16-
{ text: 'Docs', link: '/getting-started/' },
17-
{ text: 'Reference', children: [
18-
{ text: 'Components', link: '/components/' },
19-
{ text: 'Types', link: '/reference/types.md' },
20-
{ text: 'Comparision with BootstrapVue', link: '/reference/parityList.md'}
21-
]}
6+
base: '/bootstrap-vue-3/',
7+
title: 'BootstrapVue 3',
8+
head: [['link', {rel: 'icon', href: '/bootstrap-vue-3/favicon.ico'}]],
9+
themeConfig: {
10+
logo: '/logo.png',
11+
repo: 'https://github.com/cdmoro/bootstrap-vue-3',
12+
editLink: true,
13+
lastUpdated: true,
14+
navbar: [
15+
{text: 'Home', link: '/'},
16+
{text: 'Docs', link: '/getting-started/'},
17+
{
18+
text: 'Reference',
19+
children: [
20+
{text: 'Components', link: '/components/'},
21+
{text: 'Types', link: '/reference/types.md'},
22+
{text: 'Comparision with BootstrapVue', link: '/reference/parityList.md'},
23+
],
24+
},
25+
],
26+
sidebar: {
27+
'/components/': [
28+
{
29+
text: 'Components',
30+
children: [
31+
'/components/README.md',
32+
'/components/Accordion.md',
33+
'/components/Badge.md',
34+
'/components/FormCheckbox.md',
35+
'/components/Progress.md',
36+
'/components/Spinners.md',
37+
],
38+
},
2239
],
23-
sidebar: {
24-
'/components/': [
25-
{
26-
text: 'Components',
27-
children: [
28-
'/components/README.md',
29-
'/components/Accordion.md',
30-
'/components/Badge.md',
31-
'/components/FormCheckbox.md',
32-
'/components/Progress.md',
33-
'/components/Spinners.md',
34-
]
35-
}
36-
]
37-
}
38-
}
39-
})
40+
},
41+
},
42+
})

docs/.vuepress/styles/index.scss

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,65 @@
11
:root {
2-
--content-width: 1200px;
2+
--content-width: 1200px;
33
}
44

55
body {
6-
font-family: var(--font-family) !important;
7-
background-color: var(--c-bg) !important;
8-
color: var(--c-text) !important;
9-
font-size: 16px !important;
6+
font-family: var(--font-family) !important;
7+
background-color: var(--c-bg) !important;
8+
color: var(--c-text) !important;
9+
font-size: 16px !important;
1010
}
1111

1212
a:not(.action-button) {
13-
color: var(--c-text-accent) !important;
13+
color: var(--c-text-accent) !important;
1414
}
1515

1616
.nav-link:not(.sidebar-item):not(.action-button) {
17-
padding: 0 !important;
17+
padding: 0 !important;
1818
}
1919

2020
.badge {
21-
height: auto;
21+
height: auto;
2222
}
2323

2424
.theme-container > .navbar {
25-
position: fixed;
25+
position: fixed;
2626
}
2727

2828
.theme-container > .navbar > span > a {
29-
text-decoration: none;
29+
text-decoration: none;
3030
}
3131

32-
code[class*="language-"], pre[class*="language-"] {
33-
font-size: 0.85em !important;
34-
font-family: var(--font-family-code) !important;
35-
line-height: 1.58 !important;
32+
code[class*="language-"],
33+
pre[class*="language-"] {
34+
font-size: 0.85em !important;
35+
font-family: var(--font-family-code) !important;
36+
line-height: 1.58 !important;
3637
}
3738

3839
p:not(.hero .description) {
39-
margin: 1rem 0 !important;
40+
margin: 1rem 0 !important;
4041
}
4142

4243
table:not(.table) {
43-
font-size: 0.85em;
44+
font-size: 0.85em;
4445
}
4546

4647
table:not(.table) td,
4748
table:not(.table) th {
48-
border: 1px solid var(--c-border);
49-
padding: 6px 13px;
49+
border: 1px solid var(--c-border);
50+
padding: 6px 13px;
5051
}
5152

5253
table:not(.table) tr:nth-child(2n) {
53-
background-color: var(--c-bg-lighter);
54+
background-color: var(--c-bg-lighter);
5455
}
5556

5657
code {
57-
background: transparent;
58-
padding: 0;
58+
background: transparent;
59+
padding: 0;
5960
}
6061

6162
h2.accordion-header {
62-
border-bottom: none;
63-
padding-bottom: 0;
64-
}
63+
border-bottom: none;
64+
padding-bottom: 0;
65+
}

0 commit comments

Comments
 (0)