@ephesoft/prettier-config
v1.7.0
Published
Prettier configuration for Ephesoft apps
Downloads
20
Keywords
Readme
@ephesoft/prettier-config
Prettier configuration for Ephesoft apps. Use together with @ephesoft/eslint-plugin.
Installation
npm install --save-dev eslint prettier @ephesoft/eslint-plugin @ephesoft/prettier-config
Configuration
Add the following to package.json
.
{
...
"scripts": {
"lint": "eslint --ignore-path .gitignore --ext .ts .",
"lint:fix": "npm run lint -- --fix",
"lint:report": "npm run lint -- -f json -o ./lint/lint_report.json"
},
"eslintConfig": {
"extends": [
"plugin:@ephesoft/typescript"
],
"parserOptions": {
"project": [
"tsconfig.json",
"test/tsconfig.json"
]
}
},
"prettier": "@ephesoft/prettier-config",
Git hooks
You can also use this package with husky
and lint-staged
to lint files before committing.
npm install --save-dev husky lint-staged
Add the following to package.json
.
{
...
"lint-staged": {
"*.ts": "eslint --fix"
},
...
}