1.0.0 • Published 6 years ago
@baloise/eslint-config-typescript v1.0.0
eslint-config-typescript
ESLint shareable config for the Baloise style.
Installation
yarn add -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser typescriptCreate a .eslintrc file with the following content.
{
"extends": [
"@baloise/eslint-config-typescript"
]
}Use prettier formatter
yarn add -D prettier eslint-config-prettierAdd prettier and prettier/@typescript-eslint to your .eslintrc file.
{
"extends": [
"@baloise/eslint-config-typescript",
"prettier",
"prettier/@typescript-eslint"
]
}Create a .prettierrc file with the following content.
{
"singleQuote": true,
"semi": false,
"trailingComma": "all"
}Open your package.json and add the following script command format.
"scripts": {
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
...
},