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

Commit addc5bc

Browse files
committed
style: add eslint configuration
1 parent d28bbe0 commit addc5bc

File tree

54 files changed

+1123
-361
lines changed

Some content is hidden

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

54 files changed

+1123
-361
lines changed

.eslintrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
parser: 'vue-eslint-parser',
3+
env: {
4+
'jest/globals': true,
5+
commonjs: true,
6+
es6: true,
7+
node: true
8+
},
9+
extends: ['vuetify'],
10+
plugins: ['jest'],
11+
parserOptions: {
12+
ecmaVersion: 2018,
13+
parser: 'babel-eslint',
14+
sourceType: 'module',
15+
},
16+
rules: {
17+
'template-curly-spacing' : 'off',
18+
'vue/require-default-prop': 'off',
19+
indent : "off",
20+
}
21+
}

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = api => {
2+
return {}
3+
}

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
],
55
"private": true,
66
"scripts": {
7+
"lint": "lerna run lint -- --fix",
78
"release": "lerna publish from-git"
89
},
910
"husky": {
@@ -12,11 +13,22 @@
1213
}
1314
},
1415
"devDependencies": {
16+
"babel-eslint": "^10.0.3",
17+
"eslint": "^6.8.0",
18+
"eslint-config-standard": "^14.1.0",
19+
"eslint-config-vuetify": "^0.4.1",
20+
"eslint-plugin-import": "^2.20.0",
21+
"eslint-plugin-jest": "^23.6.0",
22+
"eslint-plugin-node": "^11.0.0",
23+
"eslint-plugin-promise": "^4.2.1",
24+
"eslint-plugin-standard": "^4.0.1",
25+
"eslint-plugin-vue": "^6.1.2",
1526
"husky": "^3.1.0",
1627
"lerna": "^3.19.0",
1728
"lerna-changelog": "^0.8.3",
1829
"semver": "^6.3.0",
1930
"vue": "^2.6.4",
31+
"vue-eslint-parser": "^7.0.0",
2032
"vue-template-compiler": "^2.5.0",
2133
"vuetify": "^2.1.13",
2234
"webpack": "^4.0.0"

packages/cli-plugin-utils/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function injectGoogleFontLink (api, font) {
2525
const url = font.map(str => {
2626
const {
2727
family = str,
28-
weights = '100,300,400,500,700,900'
28+
weights = '100,300,400,500,700,900',
2929
} = str.split(':')
3030

3131
return `${family}:${weights}`
@@ -38,7 +38,7 @@ function injectGoogleFontLink (api, font) {
3838
function injectSassVariables (
3939
api,
4040
file,
41-
modules = ['vue-modules', 'vue', 'normal-modules', 'normal']
41+
modules = ['vue-modules', 'vue', 'normal-modules', 'normal'],
4242
) {
4343
api.chainWebpack(config => {
4444
modules.forEach(match => {
@@ -192,5 +192,5 @@ module.exports = {
192192
updateFile,
193193
updateVuetifyObject,
194194
VuetifyPresetGenerator,
195-
VuetifyPresetService
195+
VuetifyPresetService,
196196
}

packages/vue-cli-plugin-vuetify-essentials/generator/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@ module.exports = api => {
66
api.extendPackage({
77
devDependencies: {
88
'@mdi/js': '*',
9-
'axios': '*',
9+
axios: '*',
1010
'eslint-config-vuetify': '*',
1111
'vue-analytics': '*',
1212
'vue-meta': '*',
1313
'vuex-pathify': '*',
1414
'vuex-router-sync': '*',
15-
'webfontloader': '*',
16-
"lodash": "*",
15+
webfontloader: '*',
16+
lodash: '*',
1717
},
1818
eslintConfig: {
1919
env: { jest: true },
20-
extends: 'vuetify'
20+
extends: 'vuetify',
2121
},
2222
jest: {
2323
setupFiles: [
24-
'<rootDir>/tests/index.js'
25-
]
26-
}
24+
'<rootDir>/tests/index.js',
25+
],
26+
},
2727
})
2828

29-
api.injectImports(api.entryFile, `import './plugins'`)
29+
api.injectImports(api.entryFile, 'import \'./plugins\'')
3030

3131
api.onCreateComplete(() => {
3232
const packagePath = api.resolve('package.json')
33-
const package = require(packagePath)
33+
const projectPackage = require(packagePath)
3434

35-
package.scripts.deploy = 'yarn build && now'
35+
projectPackage.scripts.deploy = 'yarn build && now'
3636

37-
fs.writeFileSync(packagePath, JSON.stringify(package, null, 2))
37+
fs.writeFileSync(packagePath, JSON.stringify(projectPackage, null, 2))
3838

3939
try {
4040
fs.unlinkSync(api.resolve('src/views/About.vue'))

packages/vue-cli-plugin-vuetify-essentials/generator/template/src/layouts/admin/AppBar/AppBar.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { shallow, createLocalVue } from '@vue/test-utils'
88
const localVue = createLocalVue()
99

1010
describe('AppBar', () => {
11-
function mountFunction(options = {}) {
11+
function mountFunction (options = {}) {
1212
return shallow(AppBar, {
1313
localVue,
1414
...options,

packages/vue-cli-plugin-vuetify-essentials/generator/template/src/layouts/admin/Drawer/Drawer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { shallow, createLocalVue } from '@vue/test-utils'
88
const localVue = createLocalVue()
99

1010
describe('Drawer', () => {
11-
function mountFunction(options = {}) {
11+
function mountFunction (options = {}) {
1212
return shallow(Drawer, {
1313
localVue,
1414
...options,

packages/vue-cli-plugin-vuetify-essentials/generator/template/src/layouts/admin/View/View.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { shallow, createLocalVue } from '@vue/test-utils'
88
const localVue = createLocalVue()
99

1010
describe('View', () => {
11-
function mountFunction(options = {}) {
11+
function mountFunction (options = {}) {
1212
return shallow(View, {
1313
localVue,
1414
...options,

packages/vue-cli-plugin-vuetify-essentials/generator/template/src/layouts/frontend/AppBar/AppBar.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { shallow, createLocalVue } from '@vue/test-utils'
88
const localVue = createLocalVue()
99

1010
describe('AppBar', () => {
11-
function mountFunction(options = {}) {
11+
function mountFunction (options = {}) {
1212
return shallow(AppBar, {
1313
localVue,
1414
...options,

packages/vue-cli-plugin-vuetify-essentials/generator/template/src/layouts/frontend/Drawer/Drawer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { shallow, createLocalVue } from '@vue/test-utils'
88
const localVue = createLocalVue()
99

1010
describe('Drawer', () => {
11-
function mountFunction(options = {}) {
11+
function mountFunction (options = {}) {
1212
return shallow(Drawer, {
1313
localVue,
1414
...options,

0 commit comments

Comments
 (0)