Shared ESLint configuration
The SAP Cloud SDK provides a configuration with recommended ESLint rules and plugins.
It extends the eslint:recommended
and @typescript-eslint/recommended
configurations.
It also uses the eslint-config-prettier
to avoid any formatting conflicts when using the highly recommended Prettier.
Install the @sap-cloud-sdk/eslint-config
package in your project.
To add the configuration please adjust your ESLint configuration (usually called .eslintrc
or .eslintrc.js
):
{
"extends": "@sap-cloud-sdk"
}
or if you want to combine this configuration with others:
{
"extends": ["example-config", "@sap-cloud-sdk"]
}
This configuration depends on plugins eslint-plugin-import
and eslint-plugin-unused-imports
, which need to be installed in your project.
ESLint merges these shareable configurations with your configuration.
Any rule configured in your .eslintrc.js
will overwrite the setting for this rule in the shareable configuration.