Duplicates the no-duplicate-type-constituents rule but makes sure to remove the first duplicates in stead of the last ones
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-cmaster11
:
npm install eslint-plugin-cmaster11 --save-dev
Add cmaster11
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"cmaster11"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"cmaster11/no-duplicate-type-constituents": 2
}
}
🔧 Automatically fixable by the --fix
CLI option.
💭 Requires type information.
Name | Description | 🔧 | 💭 |
---|---|---|---|
no-duplicate-type-constituents | Disallow duplicate constituents of union or intersection types | 🔧 | 💭 |