@ephesoft/eslint-plugin
v2.16.0
Published
ESLint configuration for Ephesoft apps
Downloads
10
Keywords
Readme
@ephesoft/eslint-plugin
ESLint configuration for Ephesoft apps. Use together with @ephesoft/prettier-config.
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"
}
...
}