Skip to content

Commit

Permalink
feat: added prettier (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
priscilawebdev authored and ayusharma committed Aug 15, 2018
1 parent c3f5c97 commit 43bd622
Show file tree
Hide file tree
Showing 5 changed files with 326 additions and 30 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Expand Up @@ -9,7 +9,8 @@
"google",
"plugin:react/recommended",
"plugin:flowtype/recommended",
"plugin:jest/recommended"
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
Expand All @@ -30,6 +31,7 @@
"__APP_VERSION__": true
},
"rules": {
"prettier/prettier": ["error", null, "@prettier"],
"no-useless-escape": 2,
"react/no-deprecated": 1,
"react/jsx-no-target-blank": 1,
Expand Down
12 changes: 12 additions & 0 deletions .prettierrc
@@ -0,0 +1,12 @@
{
"useTabs": false,
"printWidth": 160,
"tabWidth": 2,
"singleQuote": true,
"requirePragma": true,
"bracketSpacing": false,
"jsxBracketSameLine": false,
"trailingComma": "es5",
"semi": true,
"parser": "flow"
}
21 changes: 16 additions & 5 deletions package.json
Expand Up @@ -37,6 +37,7 @@
"js-string-escape": "1.0.1",
"js-yaml": "3.12.0",
"jsonwebtoken": "8.3.0",
"lint-staged": "7.2.0",
"lockfile": "1.0.4",
"lodash": "4.17.10",
"lunr": "0.7.0",
Expand Down Expand Up @@ -77,20 +78,22 @@
"babel-register": "6.26.0",
"babel-runtime": "6.26.0",
"bundlesize": "0.17.0",
"cross-env": "5.1.4",
"codecov": "3.0.4",
"cross-env": "5.1.4",
"css-loader": "0.28.10",
"element-react": "1.4.8",
"element-theme-default": "1.4.13",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"eslint": "5.2.0",
"eslint-config-google": "0.9.1",
"eslint-loader": "2.1.0",
"eslint-plugin-babel": "5.1.0",
"eslint-plugin-flowtype": "2.50.0",
"eslint-config-prettier": "2.9.0",
"eslint-loader": "2.0.0",
"eslint-plugin-babel": "4.1.2",
"eslint-plugin-flowtype": "2.49.3",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-jest": "21.18.0",
"eslint-plugin-prettier": "2.6.2",
"eslint-plugin-react": "7.10.0",
"file-loader": "1.1.11",
"flow-bin": "0.77.0",
Expand All @@ -112,6 +115,7 @@
"normalize.css": "8.0.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "1.4.0",
"prettier": "1.13.7",
"prop-types": "15.6.1",
"puppeteer": "1.1.1",
"react": "16.2.0",
Expand Down Expand Up @@ -185,9 +189,16 @@
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint .",
"prettier --write",
"git add"
]
},
"bundlesize": [
{
"path": "./static/vendor*.js",
Expand Down
9 changes: 8 additions & 1 deletion src/webui/.eslintrc
Expand Up @@ -10,7 +10,14 @@
},
"rules": {
"require-jsdoc": 0,
"no-console": 2,
"no-console": [
1,
{
"allow": [
"log"
]
}
],
"no-unused-vars": [
2,
{
Expand Down

0 comments on commit 43bd622

Please sign in to comment.