Browse Source

style: fix lint

Sendya 5 years ago
parent
commit
5e5385ada1
2 changed files with 2 additions and 3 deletions
  1. 1 2
      .eslintrc.js
  2. 1 1
      src/components/TextArea/index.jsx

+ 1 - 2
.eslintrc.js

@@ -8,7 +8,7 @@ module.exports = {
     '@vue/standard'
   ],
   rules: {
-    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    'no-console': 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
     'generator-star-spacing': 'off',
     'no-mixed-operators': 0,
@@ -32,7 +32,6 @@ module.exports = {
     'vue/no-use-v-if-with-v-for': 0,
     'vue/html-closing-bracket-newline': 0,
     'vue/no-parsing-error': 0,
-    'no-console': 0,
     'no-tabs': 0,
     'quotes': [
       2,

+ 1 - 1
src/components/TextArea/index.jsx

@@ -39,7 +39,7 @@ export default {
   methods: {
     handleChange (e) {
       const value = e.target.value
-      let len = getStrFullLength(value)
+      const len = getStrFullLength(value)
       if (len <= this.limit) {
         this.currentLimit = len
         this.$emit('change', value)