Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
add lint:code command (enforce code style with prettier)
Browse files Browse the repository at this point in the history
  • Loading branch information
josmardias committed Jan 2, 2018
1 parent ffee435 commit c1ff603
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'prettier',
],
parserOptions: {
sourceType: 'module',
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'always',
printWidth: 80,
semi: false,
singleQuote: true,
trailingComma: 'all',
}
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
"rpg"
],
"scripts": {
"lint:code": "prettier --write \"./**/*.js\"",
"lint:error": "eslint . --max-warnings 0",
"lint:pack": "fixpack"
},
"devDependencies": {
"eslint": "^4.14.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.8.0",
"fixpack": "^2.3.1"
"fixpack": "^2.3.1",
"prettier": "^1.9.2"
}
}

0 comments on commit c1ff603

Please sign in to comment.