-
- Downloads
refactor: use prettier instead of eslint-plugin-prettier (#864)
Having eslint flag prettier "errors" in editors can be rather painful. Also chose against linting staged files for prettier because I like to stage partials. Instead: - Recommended to use plugins for editors to format on save, e.g. `prettier-atom` - Prettier will be run as part of `npm test`
.prettierignore
0 → 100644
... | @@ -11,11 +11,12 @@ | ... | @@ -11,11 +11,12 @@ |
"lint-fix": "eslint --fix lib test", | "lint-fix": "eslint --fix lib test", | ||
"lint": "eslint lib test", | "lint": "eslint lib test", | ||
"prepublishOnly": "npm run build", | "prepublishOnly": "npm run build", | ||
"prettier": "prettier '**/*.{js,json}' --write", | |||
"start": "node dist/renovate", | "start": "node dist/renovate", | ||
"start-babel": "babel-node lib/renovate", | "start-babel": "babel-node lib/renovate", | ||
"start-raw": "node lib/renovate", | "start-raw": "node lib/renovate", | ||
"test-dirty": "git diff --exit-code", | "test-dirty": "git diff --exit-code", | ||
"test": "npm run lint && npm run jest", | "test": "npm run prettier -- --list-different && npm run lint && npm run jest", | ||
"transpile": "rimraf dist && mkdirp dist && babel lib --out-dir dist", | "transpile": "rimraf dist && mkdirp dist && babel lib --out-dir dist", | ||
"update-docs": "npm run build && bash bin/update-docs.sh", | "update-docs": "npm run build && bash bin/update-docs.sh", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | "semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
... | @@ -85,7 +86,6 @@ | ... | @@ -85,7 +86,6 @@ |
"eslint-config-airbnb-base": "12.0.1", | "eslint-config-airbnb-base": "12.0.1", | ||
"eslint-config-prettier": "2.6.0", | "eslint-config-prettier": "2.6.0", | ||
"eslint-plugin-import": "2.7.0", | "eslint-plugin-import": "2.7.0", | ||
"eslint-plugin-prettier": "2.3.1", | |||
"eslint-plugin-promise": "3.5.0", | "eslint-plugin-promise": "3.5.0", | ||
"jest": "20.0.4", | "jest": "20.0.4", | ||
"mkdirp": "0.5.1", | "mkdirp": "0.5.1", | ||
... | @@ -114,6 +114,10 @@ | ... | @@ -114,6 +114,10 @@ |
], | ], | ||
"setupTestFrameworkScriptFile": "./test/chai.js" | "setupTestFrameworkScriptFile": "./test/chai.js" | ||
}, | }, | ||
"prettier": { | |||
"singleQuote": true, | |||
"trailingComma": "es5" | |||
}, | |||
"renovate": { | "renovate": { | ||
"extends": [ | "extends": [ | ||
":app", | ":app", | ||
... | ... |
Please sign in to comment