yarn add --dev eslint @palastri/eslint-plugin
Add @palastri
to the plugins section of your .eslintrc
configuration file.
{
"extends": ["@palastri/recommended"],
"plugins": ["@palastri"]
}
This plugin exports a recommended configuration that enforces good testing practices.
To enable this configuration, please use the extends
property in the .eslintrc
config file:
{
"extends": ["plugin:@palastri/recommended"]
}
This plugin also exports a configuration named stylistic
, which adds some extra stylistic rules. The rules considered to be best practice for modern TypeScript codebase, but that do not impact program logic.
To enable this configuration, please use the extends
property in the .eslintrc
config file:
{
"extends": ["plugin:@palastri/recommended", "plugin:@palastri/stylistic"]
}
This plugin includes the following plugins:
- @typescript-eslint/eslint-plugin
- eslint-config-prettier
- eslint-plugin-eslint-plugin
- eslint-plugin-import
- eslint-plugin-prettier
- eslint-plugin
One or more default rules from those plugins are overridden such as:
Name | Description | Rules |
---|---|---|
@typescript-eslint/array-type |
Require consistently using either T[] or Array<T> for arrays. |
["error", { default: "array-simple" }] |
@typescript-eslint/member-ordering |
Require a consistent member declaration order. | ["error", { default: { optionallyOrder: "required-first", order: "alphabetically" } }] |
Detailed changes for each release are documented in CHANGELOG.md