Skip to content

Commit 993ffbd

Browse files
committed
fix: configure lint and fix lint errors
1 parent 09f173c commit 993ffbd

File tree

8 files changed

+27
-11
lines changed

8 files changed

+27
-11
lines changed

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:vue/essential',
8+
'eslint:recommended'
9+
],
10+
rules: {
11+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12+
'vue/return-in-computed-property': 'off',
13+
},
14+
parserOptions: {
15+
parser: 'babel-eslint'
16+
}
17+
}

build/createCustomStylesLibrary.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const fs = require('fs-extra')
22
fs.copy('src', 'tmp').then(() => {
33
fs.readdir('tmp/components', (e, directories) => {
4-
console.log('hehe')
54
directories.forEach((directory) => {
65
fs.readdir(`tmp/components/${directory}`, function(e, files) {
76
if (!files) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"createCustom": "node build/createCustomStylesLibrary.js",
5454
"buildCustom": "vue-cli-service build --target lib --name custom ./tmp/index.js",
5555
"deleteCustom": "node build/deleteTmpFolder.js",
56-
"lint": "vue-cli-service lint",
56+
"lint": "vue-cli-service lint --ignore-pattern **/*spec.js",
5757
"test": "vue-cli-service test:unit",
5858
"test:coverage": "vue-cli-service test:unit --coverage --collectCoverageFrom=src/**/*.{js,vue} --collectCoverageFrom=!**/index*",
5959
"test:e2e": "vue-cli-service test:e2e",

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import resolve from "rollup-plugin-node-resolve";
1010
import replace from "rollup-plugin-replace";
1111
import magicImporter from 'node-sass-magic-importer';
1212

13-
import { uglify } from "rollup-plugin-uglify";
13+
// import { uglify } from "rollup-plugin-uglify";
1414
import vue from "rollup-plugin-vue";
15-
import { minify } from "uglify-es";
15+
// import { minify } from "uglify-es";
1616

1717
import pack from "./package.json";
1818

src/components/Alert/CAlert.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
},
3434
dismissible: {
3535
type: [Boolean, String],
36-
validator: val => [false, true, 'disabled', 'customButton']
36+
validator: val => [false, true, 'disabled', 'customButton'].includes(val)
3737
},
3838
show: {
3939
type: [Boolean, Number],

src/components/Dropdown/CDropdown.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export default {
1212
visible: this.show
1313
}
1414
},
15-
mounted () {
16-
if(this.show)
17-
this.createPopper
18-
},
15+
// mounted () {
16+
// if(this.show)
17+
// this.createPopper
18+
// },
1919
props: {
2020
buttonHtml: {
2121
type: String,

src/directives/CPopover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Tooltip from 'tooltip.js'
33
export default {
44
name: 'c-popover',
55
tooltip: null,
6-
inserted (el, binding, vnode) {
6+
inserted (el, binding) {
77
const tooltip = new Tooltip(el, binding.def.getTooltipConfig(binding))
88
binding.def._tooltip = tooltip
99
if (binding.value.active)

src/directives/CTooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default {
3434
popperOptions: props.popperOptions
3535
}
3636
},
37-
getTemplate (title) {
37+
getTemplate () {
3838
return `<div class="c-tooltip c-bs-tooltip-auto c-fade c-show" role="tooltip">
3939
<div class="c-arrow"></div>
4040
<div class="c-tooltip-inner"></div>

0 commit comments

Comments
 (0)