added eslint prettier check to travis (#5701)

- "yarn eslint" will throw the error if there are any formatting issues
- "yarn format" will format the js file based on the project's
prettier configuration.
This commit is contained in:
Kanagaraj M
2018-03-24 00:11:10 +05:30
committed by Harshavardhana
parent 020cc8b669
commit 1c91c7b54d
8 changed files with 702 additions and 445 deletions

View File

@@ -7,7 +7,8 @@
"dev": "NODE_ENV=dev webpack-dev-server --devtool cheap-module-eval-source-map --progress --colors --hot --content-base dev",
"build": "NODE_ENV=dev node build.js",
"release": "NODE_ENV=production MINIO_UI_BUILD=RELEASE node build.js",
"format": "esformatter -i 'app/**/*.js'"
"format": "prettier --write 'app/**/*.js'",
"eslint": "eslint 'app/**/*.js'"
},
"jest": {
"setupTestFrameworkScriptFile": "./app/js/jest/setup.js",
@@ -31,6 +32,7 @@
"async": "^1.5.2",
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^22.1.0",
"babel-loader": "^7.1.2",
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
@@ -43,15 +45,15 @@
"css-loader": "^0.23.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"esformatter": "^0.10.0",
"esformatter-jsx": "^7.4.1",
"esformatter-jsx-ignore": "^1.0.6",
"eslint": "^4.19.1",
"eslint-plugin-prettier": "^2.6.0",
"html-webpack-plugin": "^2.30.1",
"jest": "^22.1.4",
"jest-enzyme": "^4.0.2",
"json-loader": "^0.5.4",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"prettier": "^1.11.1",
"purifycss-webpack-plugin": "^2.0.3",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",