Skip to main content
Rate this page

Shared ESLint configuration

The SAP Cloud SDK provides a configuration with our recommended ESLint rules and plugin. 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.

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.

Rate this page