2.0.0 ⢠Published 1 year ago
@ilo-org/eslint-config v2.0.0
@ilo-org/eslint-config
ESLint configuration for ILO Design System. These docs are a WIP
Getting started
npm install -D @ilo-org/eslint-configUsage
@ilo-org/eslint-config provides a list of ESLint flat configurations:
| Config Name | Description | Internal Extends |
|---|---|---|
| js | Base JavaScript config | ā |
| recommended | Recommended configuration js + ts | js |
| react | React Typescript config | ts -> js |
You can use any configuration you like by simply including it inside your eslint config
Just export it
import configs from "@ilo-org/eslint-config";
export default configs.recommended;or extend and add your own
import configs from "@ilo-org/eslint-config";
export default [
...configs.recommended,
{
rules: {
"no-console": "warn",
},
},
];Opinionated rules
šØ - Displayed as an error š§ - Displayed as a warning ā - Allowed
| Rule | Severity | Description |
|---|---|---|
| "prettier/prettier" | šØ | Is strong about formatting |
| "no-console" | š§ | Prevents the use of console.log but allows warn and error |
| "no-duplicate-imports" | š§ | Prevents duplicate imports |
| "no-await-in-loop" | š§ | Prevents await inside loops |
| "no-unused-vars" | š§ | Prevents unused variables but allows _ to be ignored |
| "@typescript-eslint/class-literal-property-style" | š§ | Normalizes class literal properties |
| "@typescript-eslint/no-duplicate-enum-values" | š§ | |
| "@typescript-eslint/prefer-for-of" | š§ | Enforces the use of for-of |
| "@typescript-eslint/consistent-type-definitions" | š§ | interface is preferred |
| "@typescript-eslint/ban-ts-comments" | ā | |
| "@typescript-eslint/ban-ts-ignores" | ā |
š License
Licensed under the Apache 2.0 License.