Authored by 李奇

代码检查配置文件添加

  1 +{
  2 + "presets": [
  3 + ["env", {
  4 + "targets": {
  5 + "browsers": [">1%", "android >=4", "ios >=8"]
  6 + }
  7 + }]
  8 + ]
  9 +}
  1 +root = true
  2 +
  3 +[*]
  4 +indent_style = space
  5 +indent_size = 4
  6 +end_of_line = lf
  7 +charset = utf-8
  8 +trim_trailing_whitespace = true
  9 +insert_final_newline = true
  10 +
  11 +[*.md]
  12 +trim_trailing_whitespace = false
  1 +**/bundle/**/*.js
  2 +**/dist/**/*.js
  3 +coverage
  4 +public/static/js-sdk
  5 +public/static/yas-jssdk
  6 +public/js/home/jquery.upload.js
  7 +public/js/activity/live
  1 +{
  2 + "extends": "yoho",
  3 + "parserOptions": {
  4 + "sourceType": "module"
  5 + },
  6 + "plugins": [
  7 + "html"
  8 + ],
  9 + "rules": {
  10 + "camelcase": "off"
  11 + }
  12 +
  13 +}
  1 +**/css/**/*.css
  2 +**/dist/**/*.css
  3 +**/scss/activity/_aslider.css
  4 +**/scss/layout/_swiper.css
  5 +**/scss/activity/trend/_map.css
  6 +**/scss/activity/live/*.css
  1 +{
  2 + "extends": "stylelint-config-yoho",
  3 + "processors": ["stylelint-processor-html"],
  4 + "rules": {
  5 + "string-quotes": "double",
  6 + "no-empty-source": null
  7 + }
  8 +}
@@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
3 * @author: leo 3 * @author: leo
4 * @date: 23/06/2017 4 * @date: 23/06/2017
5 */ 5 */
6 -const redis = require('redis');  
7 const redisCli = global.yoho.utils.redisCli; 6 const redisCli = global.yoho.utils.redisCli;
8 7
9 function getAll(req, res) { 8 function getAll(req, res) {
@@ -13,7 +12,7 @@ function getAll(req, res) { @@ -13,7 +12,7 @@ function getAll(req, res) {
13 data: { 12 data: {
14 total: +reply 13 total: +reply
15 } 14 }
16 - }) 15 + });
17 }); 16 });
18 } 17 }
19 18
@@ -4,11 +4,12 @@ @@ -4,11 +4,12 @@
4 * @date: 23/06/2017 4 * @date: 23/06/2017
5 */ 5 */
6 const express = require('express'); 6 const express = require('express');
7 -const router = express.Router(); 7 +const router = express.Router(); // eslint-disable-line
8 const vote = require('./controllers/vote'); 8 const vote = require('./controllers/vote');
9 9
10 router.get('/', vote.getAll); 10 router.get('/', vote.getAll);
11 router.post('/', vote.addOne); 11 router.post('/', vote.addOne);
  12 +
12 // router.get('/:vote_id', vote.getOne); 13 // router.get('/:vote_id', vote.getOne);
13 // router.put('/:vote_id', vote.putOne); 14 // router.put('/:vote_id', vote.putOne);
14 // router.delete('/:vote_id', vote.deleteOne); 15 // router.delete('/:vote_id', vote.deleteOne);