Skip to content

Commit d669e29

Browse files
committed
style: indent 4 -> 2
1 parent 0aa74e1 commit d669e29

18 files changed

+548
-549
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33
[*]
44
charset = utf-8
55
indent_style = space
6-
indent_size = 4
6+
indent_size = 2
77
end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
module.exports = {
2-
root: true,
3-
parserOptions: {
4-
parser: 'babel-eslint',
5-
sourceType: 'module',
6-
ecmaFeatures: {
7-
legacyDecorators: true,
8-
},
9-
},
10-
env: {
11-
es6: true,
12-
node: true,
13-
jest: true,
14-
browser: true,
15-
},
16-
extends: [
17-
'standard',
18-
'plugin:vue/essential',
19-
],
20-
plugins: ['vue'],
21-
rules: {
22-
indent: [2, 4],
23-
'promise/param-names': 0,
24-
'comma-dangle': [2, 'always-multiline'],
2+
root: true,
3+
parserOptions: {
4+
parser: 'babel-eslint',
5+
sourceType: 'module',
6+
ecmaFeatures: {
7+
legacyDecorators: true,
258
},
9+
},
10+
env: {
11+
es6: true,
12+
node: true,
13+
jest: true,
14+
browser: true,
15+
},
16+
extends: [
17+
'standard',
18+
'plugin:vue/essential',
19+
],
20+
plugins: ['vue'],
21+
rules: {
22+
'promise/param-names': 0,
23+
'comma-dangle': [2, 'always-multiline'],
24+
},
2625
}

babel.config.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
module.exports = {
2-
env: {
3-
test: {
4-
presets: [
5-
[
6-
'@babel/preset-env',
7-
{ targets: { node: 'current' } },
8-
],
9-
],
10-
},
11-
production: {
12-
presets: [
13-
[
14-
'@babel/preset-env',
15-
{ modules: false },
16-
],
17-
],
18-
plugins: [],
19-
},
2+
env: {
3+
test: {
4+
presets: [
5+
[
6+
'@babel/preset-env',
7+
{ targets: { node: 'current' } },
8+
],
9+
],
2010
},
11+
production: {
12+
presets: [
13+
[
14+
'@babel/preset-env',
15+
{ modules: false },
16+
],
17+
],
18+
plugins: [],
19+
},
20+
},
2121
}

commitlint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
// https://www.npmjs.com/package/@commitlint/config-conventional
3-
extends: ['@commitlint/config-conventional'],
4-
rules: {},
2+
// https://www.npmjs.com/package/@commitlint/config-conventional
3+
extends: ['@commitlint/config-conventional'],
4+
rules: {},
55
}

docs/.vuepress/config.js

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -7,95 +7,95 @@ const { name, description } = require('../../package.json')
77
* @type {import('../../src/').DemoCodePluginOptions}
88
*/
99
const demoCodeOptions = {
10-
cssLibs: [
11-
'https://unpkg.com/animate.css@3.7.0/animate.min.css',
12-
],
13-
showText: 'show more',
14-
hideText: 'hide',
10+
cssLibs: [
11+
'https://unpkg.com/animate.css@3.7.0/animate.min.css',
12+
],
13+
showText: 'show more',
14+
hideText: 'hide',
1515
}
1616

1717
module.exports = defineConfig({
18-
base: `/${name}/`,
19-
locales: {
20-
'/': { lang: 'en-US', title: 'demo-code', description },
21-
'/zh/': {
22-
lang: 'zh-CN',
23-
title: 'demo-code',
24-
description: '📝 同时展示 demo 和 code 的 vuepress 插件',
25-
},
18+
base: `/${name}/`,
19+
locales: {
20+
'/': { lang: 'en-US', title: 'demo-code', description },
21+
'/zh/': {
22+
lang: 'zh-CN',
23+
title: 'demo-code',
24+
description: '📝 同时展示 demo 和 code 的 vuepress 插件',
2625
},
27-
head: [
28-
['link', { rel: 'icon', href: '/favicon.ico' }],
29-
['link', { rel: 'stylesheet', href: 'https://unpkg.com/animate.css@3.7.0/animate.min.css' }],
30-
],
31-
plugins: [
32-
['smooth-scroll'],
33-
// @ts-ignore
34-
[demoCode, demoCodeOptions],
35-
],
36-
markdown: {
37-
extendMarkdown: (md) => {
38-
md.use(require('markdown-it-include'), {
39-
root: './docs/',
40-
includeRe: /<\[include\](.+)/i,
41-
bracesAreOptional: true,
42-
})
43-
},
26+
},
27+
head: [
28+
['link', { rel: 'icon', href: '/favicon.ico' }],
29+
['link', { rel: 'stylesheet', href: 'https://unpkg.com/animate.css@3.7.0/animate.min.css' }],
30+
],
31+
plugins: [
32+
['smooth-scroll'],
33+
// @ts-ignore
34+
[demoCode, demoCodeOptions],
35+
],
36+
markdown: {
37+
extendMarkdown: (md) => {
38+
md.use(require('markdown-it-include'), {
39+
root: './docs/',
40+
includeRe: /<\[include\](.+)/i,
41+
bracesAreOptional: true,
42+
})
4443
},
45-
evergreen: true,
46-
serviceWorker: true,
47-
themeConfig: {
48-
repo: 'BuptStEve/' + name,
49-
docsDir: 'docs',
50-
sidebarDepth: 2,
51-
editLinks: true,
52-
locales: {
53-
'/': {
54-
selectText: '🌍Languages',
55-
label: 'English',
56-
editLinkText: 'Edit this page on GitHub',
57-
nav: [
58-
{ text: '🌱Guide', link: '/' },
59-
{ text: '😎Example', link: '/example/' },
60-
{
61-
text: '🔥Ecosystem',
62-
items: [
63-
{ text: '📖markdown-it-vuese', link: 'https://buptsteve.github.io/markdown-it-vuese/' },
64-
],
65-
},
66-
],
67-
sidebar: {
68-
'/example/': [{
69-
title: '😎Example',
70-
collapsable: false,
71-
children: [''],
72-
}],
73-
'/': [['', '🌱Guide']],
74-
},
75-
},
76-
'/zh/': {
77-
selectText: '🌍选择语言',
78-
label: '简体中文',
79-
editLinkText: '在 GitHub 上编辑此页',
80-
nav: [
81-
{ text: '🌱指南', link: '/zh/' },
82-
{ text: '😎示例', link: '/zh/example/' },
83-
{
84-
text: '🔥生态系统',
85-
items: [
86-
{ text: '📖markdown-it-vuese', link: 'https://buptsteve.github.io/markdown-it-vuese/' },
87-
],
88-
},
89-
],
90-
sidebar: {
91-
'/zh/example/': [{
92-
title: '😎示例',
93-
collapsable: false,
94-
children: [''],
95-
}],
96-
'/zh/': [['', '🌱指南']],
97-
},
98-
},
44+
},
45+
evergreen: true,
46+
serviceWorker: true,
47+
themeConfig: {
48+
repo: 'BuptStEve/' + name,
49+
docsDir: 'docs',
50+
sidebarDepth: 2,
51+
editLinks: true,
52+
locales: {
53+
'/': {
54+
selectText: '🌍Languages',
55+
label: 'English',
56+
editLinkText: 'Edit this page on GitHub',
57+
nav: [
58+
{ text: '🌱Guide', link: '/' },
59+
{ text: '😎Example', link: '/example/' },
60+
{
61+
text: '🔥Ecosystem',
62+
items: [
63+
{ text: '📖markdown-it-vuese', link: 'https://buptsteve.github.io/markdown-it-vuese/' },
64+
],
65+
},
66+
],
67+
sidebar: {
68+
'/example/': [{
69+
title: '😎Example',
70+
collapsable: false,
71+
children: [''],
72+
}],
73+
'/': [['', '🌱Guide']],
74+
},
75+
},
76+
'/zh/': {
77+
selectText: '🌍选择语言',
78+
label: '简体中文',
79+
editLinkText: '在 GitHub 上编辑此页',
80+
nav: [
81+
{ text: '🌱指南', link: '/zh/' },
82+
{ text: '😎示例', link: '/zh/example/' },
83+
{
84+
text: '🔥生态系统',
85+
items: [
86+
{ text: '📖markdown-it-vuese', link: 'https://buptsteve.github.io/markdown-it-vuese/' },
87+
],
88+
},
89+
],
90+
sidebar: {
91+
'/zh/example/': [{
92+
title: '😎示例',
93+
collapsable: false,
94+
children: [''],
95+
}],
96+
'/zh/': [['', '🌱指南']],
9997
},
98+
},
10099
},
100+
},
101101
})

jest.config.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
module.exports = {
2-
verbose: false,
3-
testURL: 'http://localhost/',
4-
testEnvironment: 'jsdom',
5-
collectCoverage: true,
6-
collectCoverageFrom: [
7-
'src/**',
8-
'!src/icons/**',
9-
'!src/highlight.js',
10-
'!src/enhanceAppFile.js',
11-
],
12-
coveragePathIgnorePatterns: ['/__snapshots__/'],
13-
transform: {
14-
'^.+\\.vue$': 'vue-jest',
15-
'^.+\\.jsx?$': 'babel-jest',
16-
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
17-
},
18-
moduleNameMapper: {
19-
'@/(.*)$': '<rootDir>/src/$1',
20-
},
21-
moduleFileExtensions: ['js', 'vue'],
22-
snapshotSerializers: [
23-
'jest-serializer-vue',
24-
],
2+
verbose: false,
3+
testURL: 'http://localhost/',
4+
testEnvironment: 'jsdom',
5+
collectCoverage: true,
6+
collectCoverageFrom: [
7+
'src/**',
8+
'!src/icons/**',
9+
'!src/highlight.js',
10+
'!src/enhanceAppFile.js',
11+
],
12+
coveragePathIgnorePatterns: ['/__snapshots__/'],
13+
transform: {
14+
'^.+\\.vue$': 'vue-jest',
15+
'^.+\\.jsx?$': 'babel-jest',
16+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
17+
},
18+
moduleNameMapper: {
19+
'@/(.*)$': '<rootDir>/src/$1',
20+
},
21+
moduleFileExtensions: ['js', 'vue'],
22+
snapshotSerializers: [
23+
'jest-serializer-vue',
24+
],
2525
}

0 commit comments

Comments
 (0)