diff --git a/frontend/package.json b/frontend/package.json index 5cd4c1f81ece93f589a05cda39b66540a62d5990..57dc9b6da20359fb2ddbfd2f84ed6f48c27b9da0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,9 @@ "release": "cross-env NODE_ENV=production node ./tool/build.js", "build": "cross-env NODE_ENV=dev node ./tool/build.js", "dev": "cross-env NODE_ENV=dev node tool/dev-server.js", - "lint": "./node_modules/fecs/bin/fecs --rule" + "lint": "./node_modules/fecs/bin/fecs --rule", + "precommit": "npm run lint", + "prepush": "npm run lint" }, "engines": { "node": ">= 6.4.0" @@ -52,6 +54,7 @@ "html-loader": "^0.4.4", "html-webpack-plugin": "^2.28.0", "http-proxy-middleware": "^0.17.4", + "husky": "^0.14.3", "json-loader": "^0.5.4", "opn": "^5.1.0", "optimize-css-assets-webpack-plugin": "^1.3.2", diff --git a/frontend/tool/build.js b/frontend/tool/build.js index 2590b88715b1f46b56117fb645f3bbd17c44a720..d8a67b1f106f82df771200a8c6bb096c441d77cc 100644 --- a/frontend/tool/build.js +++ b/frontend/tool/build.js @@ -1,4 +1,3 @@ -"use strict"; const webpack = require('webpack'); const rm = require('rimraf'); const ora = require('ora'); diff --git a/frontend/tool/entry.js b/frontend/tool/entry.js index aba7919bc8050be1642accdd0427192881622aef..78754c6a5dc394ade713c1522657690d9be3b3fc 100644 --- a/frontend/tool/entry.js +++ b/frontend/tool/entry.js @@ -1,4 +1,3 @@ -"use strict"; const path = require('path'); const projectPath = path.resolve(__dirname, '..'); const HtmlWebpackPlugin = require('html-webpack-plugin'); diff --git a/frontend/tool/webpack.config.js b/frontend/tool/webpack.config.js index 90115251fd425caf901731bc815c64b3426183f3..24764208c456bb784655b5934e7c272782abf101 100644 --- a/frontend/tool/webpack.config.js +++ b/frontend/tool/webpack.config.js @@ -1,4 +1,3 @@ -"use strict"; const webpack = require('webpack'); const path = require('path'); const projectPath = path.resolve(__dirname, '..'); diff --git a/frontend/tool/webpack.prod.config.js b/frontend/tool/webpack.prod.config.js index 3d8bbbbcbc06da2c3c2efbc8b9bf0c40593eafa0..fa73c7837ef2a7ea12803ba5d6885f01520bbc8b 100644 --- a/frontend/tool/webpack.prod.config.js +++ b/frontend/tool/webpack.prod.config.js @@ -1,4 +1,3 @@ -"use strict"; const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const path = require('path'); diff --git a/visualdl/python/test_storage.py b/visualdl/python/test_storage.py index 413ac306ce09fd4adfae5e3a751ae5e545ad9c73..328ee74efdacd4c429055ef0eff2d218360ba401 100644 --- a/visualdl/python/test_storage.py +++ b/visualdl/python/test_storage.py @@ -4,13 +4,15 @@ import unittest import random import time + class StorageTest(unittest.TestCase): def setUp(self): self.dir = "./tmp/storage_test" def test_read(self): print 'test write' - self.writer = storage.StorageWriter(self.dir, sync_cycle=1).as_mode("train") + self.writer = storage.StorageWriter( + self.dir, sync_cycle=1).as_mode("train") scalar = self.writer.scalar("model/scalar/min") # scalar.set_caption("model/scalar/min") for i in range(10):