Browse Source

fix lint errors

Yuki Takei 8 years ago
parent
commit
3227957179

+ 9 - 6
lib/models/revision.js

@@ -1,10 +1,13 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('growi:models:revision')
-    , mongoose = require('mongoose')
-    , Xss = require('../util/xss')
+  /* eslint-disable no-unused-vars */
+  const logger = require('@alias/logger')('growi:models:revision');
+  /* eslint-enable */
+
+  var mongoose = require('mongoose')
     , ObjectId = mongoose.Schema.Types.ObjectId
     , revisionSchema;
 
+
   revisionSchema = new mongoose.Schema({
     path: { type: String, required: true },
     body: { type: String, required: true },
@@ -47,12 +50,12 @@ module.exports = function(crowi) {
 
           return resolve(data);
         });
-      });
+    });
   };
 
   revisionSchema.statics.findRevisions = function(ids) {
     var Revision = this,
-        User = crowi.model('User');
+      User = crowi.model('User');
 
     if (!Array.isArray(ids)) {
       return Promise.reject('The argument was not Array.');
@@ -82,7 +85,7 @@ module.exports = function(crowi) {
 
   revisionSchema.statics.findRevisionList = function(path, options) {
     var Revision = this,
-        User = crowi.model('User');
+      User = crowi.model('User');
 
     return new Promise(function(resolve, reject) {
       Revision.find({path: path})

+ 1 - 1
lib/util/formUtil.js

@@ -5,7 +5,7 @@ module.exports = {
     return value
       .replace(/\r\n/g, '\n')
       .replace(/\r/g, '\n')
-      ;
+    ;
   },
   stringToArrayFilter: function(value) {
     if (!value || value === '') {

+ 2 - 3
resource/js/components/HeaderSearchBox/SearchForm.js

@@ -1,5 +1,4 @@
 import React from 'react';
-import PropTypes from 'prop-types';
 
 import FormGroup from 'react-bootstrap/es/FormGroup';
 import Button from 'react-bootstrap/es/Button';
@@ -47,8 +46,8 @@ export default class SearchForm extends React.Component {
 
   render() {
     const emptyLabel = (this.state.searchError !== null)
-        ? 'Error on searching.'
-        : 'No matches found on title... Hit [Enter] key so that search on contents.';
+      ? 'Error on searching.'
+      : 'No matches found on title... Hit [Enter] key so that search on contents.';
 
     return (
       <form