add eslint

This commit is contained in:
cookfront 2017-02-10 16:25:28 +08:00
parent 6629dcce59
commit 71a5e0afa5
3 changed files with 16 additions and 16 deletions

View File

@ -16,7 +16,8 @@
"dev": "npm run bootstrap && npm run build:file",
"builddocs": "webpack --progress --hide-modules --config build/webpack.config.js && set NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js",
"docs": "npm run dev && webpack-dev-server --inline --hot --config build/webpack.config.js",
"clean": "rimraf lib && rimraf packages/*/lib"
"clean": "rimraf lib && rimraf packages/*/lib",
"lint": "eslint src/**/*.js packages/**/*.{js,vue} --quiet"
},
"repository": {
"type": "git",
@ -50,7 +51,7 @@
"cp-cli": "^1.0.2",
"cross-env": "^3.1.3",
"css-loader": "^0.24.0",
"eslint": "^3.10.2",
"eslint": "^3.15.0",
"eslint-config-standard": "^5.1.0",
"eslint-friendly-formatter": "^2.0.5",
"eslint-loader": "^1.3.0",

View File

@ -1,7 +1,7 @@
<template>
<div class="o2-switch" :class="['is-' + switchState]" @click="toggleState">
<div class="o2-switch" :class="['is-' + switchState]" @click="toggleState">
<div class="o2-switch-node"></div>
</div>
</div>
</template>
<script>
@ -17,8 +17,7 @@
* @example
* <o2-switch checked="true" disabled="false"></o2-switch>
*/
export default
{
export default {
name: 'o2-switch',
props: {
checked: {
@ -56,7 +55,7 @@ export default
* 开关状态交互
*/
toggleState: function() {
if(this.disabled || this.loading) return;
if (this.disabled || this.loading) return;
this.onChange(!this.checked);
},

View File

@ -1,6 +1,6 @@
import Sample from '../packages/sample';
import Button from '../packages/button';
import Switch from '../packages/switch';
import Sample from '../packages/sample/index.js';
import Button from '../packages/button/index.js';
import Switch from '../packages/switch/index.js';
// zenui
import '../packages/zenui/src/index.pcss';