ESL Shared ESLint Configuration
Authors: Anastasiya Lesun, Alexey Stsefanovich (ala'n).
Packages maintained by ESL Team often use ESLint to ensure code quality and consistency. To simplify the process of configuring ESLint for these packages, we have developed a shared ESLint configuration. This configuration is designed to be used as a base for ESLint configuration in projects that use ESL package, or decide to follow ESL source code style.
To use ESL shared ESLint configuration, you need to install it as npm package:
npm install --save-dev @exadel/eslint-config-esl
Ensure that you have the ESLint package of version 9.0.0 or higher, shared configuration is distributed only as flat ESLint config.
Once installed, the configuration needs to be added in eslint configuration file:
module.exports = [
// ESLint configuration ...
// Apply ESL Shared ESLint Configuration
...require('@exadel/eslint-config-esl').typescript,
...require('@exadel/eslint-config-esl').recommended,
];
There are no additional configuration options for ESL Shared ESLint Configuration at that moment. Please be aware that we are in the process of standardizing rule list and are currently considering supporting EcmaScript in addition to TypeScript.
Still you are able to override any rule from the configuration in your project's ESLint configuration file
by declaring it in the rules
section of the configuration file after applying the shared configuration.
ESL Shared ESLint Configuration includes several inner plugins that are used to provide additional rules and configurations for ESLint. Here is the list of included plugins and their ESLint aliases:
@stylistic
- code style rules from @stylistic project.typescript-eslint
- TypeScript specific rules from TypeScript ESLint project.import
- rules for imports from eslint-plugin-import-x;tsdoc
- rules for TSDoc comments from eslint-plugin-tsdoc;sonarjs
- rules for code quality from eslint-plugin-sonarjs; Note: uses 1.. version of the plugin due to incompatibility with flat config.editorconfig
- rules for EditorConfig from eslint-plugin-editorconfig;
All mentioned plugins could be used from shared configuration without additional installation.