blackcomb eslint rules
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-blackcomb-defaults
and required dependencies:
npm install eslint-plugin-blackcomb-defaults @stylistic/eslint-plugin eslint-plugin-import eslint-plugin-import-newlines --save-dev
As the "import" plugin does not officially support ESLint 9, the respective dependency must be overridden in the package.json:
"overrides": {
"eslint-plugin-import": {
"eslint": ">=9"
}
}
When using the typescript config, you will also need to install:
npm install typescript-eslint eslint-plugin-deprecation @eslint/compat --save-dev
As the "deprecation" plugin does not officially support ESLint 9, the respective dependency must be overridden in the package.json:
"overrides": {
"eslint-plugin-deprecation": {
"eslint": ">=9"
}
}
When using the angular config, you will also need to install:
npm install angular-eslint --save-dev
Add the desired blackcomb-defaults
configuration to your flat eslint.config.js
configuration file. When using typescript-eslint, this can look as follows:
// @ts-check
import tseslint from 'typescript-eslint';
import blackcombDefaults from 'eslint-plugin-blackcomb-defaults';
export default tseslint.config(
...blackcombDefaults.configs.typescript,
// ... Your other configs.
);
The following configurations are available:
- javascript
- typescript
- angular