Build toolBuild tooltypeRuns at build time. Nothing of it ships in the deployed application.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

eslint-plugin-better-cap-config

A set of ESLint rules that read CAP configuration and flag the cds settings that have since been deprecated, putting that check in the linter a project already runs, with no dependencies of its own.

Deprecated cds configuration keeps working until it does not, and the compiler is not where you find out. This puts the check in the linter you already run, with zero dependencies of its own.

Facts

Latestv1.1.0ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
LintingCAPLintingcapabilityCatching in the editor what would otherwise be caught at deploy time, or not at all — problems in source code and models and in the project's configuration, found by rules rather than by review.
Flavors
Node.jsJavafrom its runtime

Who is behind it

Mauricio LaufferMauricio LaufferPersonMaintains this
In the atlas: maintains 16, contributes to 41, wrote 4
@mauriciolauffer
maintainer

What it declares

Every artifact

Type
Build tool
Origin
Independently maintained
Runtime
build time

As a build tool

Distributed through
npm

Connections1

eslint-plugin-better-cap-config connectionseslint-plugin-better-cap-configPROVIDES→ provides1provides authoredLinting

Install

npm add eslint-plugin-better-cap-config

Derived from the package name. No recipe recorded; the README has the configuration.

Learn more1

Readings
  1. Introducing eslint-plugin-better-cap-config an ESLint plugin to improve CAP configurationMauricio Lauffer, SAP Community

README

quoted from mauriciolauffer/eslint-plugin-better-cap-config under MIT, read
mauriciolauffer/eslint-plugin-better-cap-config/README.mdOn GitHub

ESLint Plugin Better CAP Config

npm test

An ESLint plugin for improving SAP CAP (Cloud Application Programming Model) configuration patterns in JSON files.

Features

  • Detects deprecated SAP CAP configuration patterns
  • Works with package.json, .cdsrc.json, and other CDS configuration files
  • Modern ESLint v9+ support with flat config

Installation

npm install --save-dev eslint  @eslint/json  eslint-plugin-better-cap-config

Rules

RuleDescription
cds-cdsc-newparserDisallow deprecated cds.cdsc.newparser: false configuration
cds-drafts-cancellation-timeoutDisallow deprecated cds.drafts.cancellationTimeout configuration
cds-features-async-handler-compatDisallow deprecated cds.features.async_handler_compat configuration
cds-features-base64-binariesDisallow deprecated cds.features.base64_binaries configuration
cds-features-bulk-inserts-via-restDisallow deprecated cds.features.bulk_inserts_via_rest: false configuration
cds-features-cds-validateDisallow deprecated cds.features.cds_validate configuration
cds-features-compat-assert-not-nullDisallow deprecated cds.features.compat_assert_not_null configuration
cds-features-compat-clone-appendsDisallow deprecated cds.features.compat_clone_appends configuration
cds-features-compat-restrict-boundDisallow deprecated cds.features.compat_restrict_bound configuration
cds-features-compat-restrict-whereDisallow deprecated cds.features.compat_restrict_where configuration
cds-features-compat-save-draftsDisallow deprecated cds.features.compat_save_drafts configuration
cds-features-compat-srv-gettersDisallow deprecated cds.features.compat_srv_getters configuration
cds-features-compat-static-authDisallow deprecated cds.features.compat_static_auth configuration
cds-features-compat-texts-entitiesDisallow deprecated cds.features.compat_texts_entities configuration
cds-features-compile-for-flowsDisallow deprecated cds.features.compile_for_flows configuration
cds-features-consistent-paramsDisallow deprecated cds.features.consistent_params: false configuration
cds-features-keys-in-data-compatDisallow deprecated cds.features.keys_in_data_compat configuration
cds-features-kibana-formatterDisallow deprecated cds.features.kibana_formatter configuration
cds-features-legacy-srv-resultsDisallow deprecated cds.features.legacy_srv_results: true configuration
cds-features-new-draft-via-actionDisallow deprecated cds.features.new_draft_via_action configuration
cds-features-odata-metadata-compatDisallow deprecated cds.features.odata_metadata_compat configuration
cds-features-odata-new-adapterDisallow deprecated cds.features.odata_new_adapter configuration
cds-features-serve-on-rootDisallow deprecated cds.features.serve_on_root: true configuration
cds-features-service-level-restrictionsDisallow deprecated cds.features.service_level_restrictions: false configuration
cds-features-stream-compatDisallow deprecated cds.features.stream_compat configuration
cds-features-xssec-compatDisallow deprecated cds.features.xssec_compat configuration
cds-fiori-calc-elementsDisallow deprecated cds.fiori.calc_elements configuration
cds-fiori-draft-compatDisallow deprecated cds.fiori.draft_compat configuration
cds-fiori-direct-crudDisallow deprecated cds.fiori.direct_crud configuration
cds-fiori-lean-draftDisallow deprecated cds.fiori.lean_draft: false configuration
cds-i18n-fatjsonDisallow deprecated cds.i18n.fatjson configuration
cds-log-kibana-custom-fieldsDisallow deprecated cds.log.kibana_custom_fields configuration
cds-mcp-auto-configDisallow deprecated cds.mcp.autoConfig configuration (renamed to autoWired)
cds-multitenant-client-cert-headerDisallow deprecated cds.multiTenancy.subscriptionManager.clientCertificateHeader configuration
cds-remote-native-fetchDisallow deprecated cds.remote.native_fetch configuration
cds-requires-db-databaseDisallow deprecated cds.requires.db.database configuration
cds-requires-middlewaresDisallow deprecated cds.requires.middlewares: false configuration
cds-sql-collateDisallow deprecated cds.sql.collate configuration
cds-sql-native-hana-associationsDisallow deprecated cds.sql.native_hana_associations: true configuration
cds-sql-runtime-view-modeDisallow deprecated cds.sql.runtimeView.mode: "resolve" configuration
cds-sql-transitive-localized-viewsDisallow deprecated cds.sql.transitive_localized_views: true configuration

Configuration

Add the plugin to your ESLint configuration:

ESLint v9+ (Flat Config)
import json from "@eslint/json";
import capConfig from "eslint-plugin-better-cap-config";

export default [
  {
    files: ["**/*.json"],
    plugins: {
      json,
      "cap-config": capConfig,
    },
    language: "json/json",
    rules: {
      "cap-config/cds-fiori-draft-compat": "error",
      "cap-config/cds-features-odata-new-adapter": "error",
      "cap-config/cds-features-cds-validate": "error",
    },
  },
];
import { defineConfig } from "eslint/config";
import json from "@eslint/json";
import capConfig from "eslint-plugin-better-cap-config";

export default defineConfig([
  {
    files: ["**/*.json"],
    plugins: {
      json,
    },
    language: "json/json",
    extends: [capConfig.configs.recommended],
  },
]);

Prerequisites

This plugin requires:

  • ESLint v9.0.0 or higher
  • Node.js v18.0.0 or higher
  • @eslint/json for JSON language support

Supported Files

The plugin works with:

  • package.json files
  • .cdsrc.json files
  • Any JSON files containing CDS configuration

Development

Building
pnpm build
Testing
pnpm test
pnpm test:watch
pnpm test:coverage
Linting
pnpm lint
pnpm lint:fix

License

MIT License

MIT, read

History

Latest

v1.1.0

Features 1

Notes
Features
  1. v1.0.0

    Features 4

    Notes
    Features
  2. v0.0.1

    Features 1

    Notes
    Added
    • Initial version
47downloads per week, npm
Weekly downloads for eslint-plugin-better-cap-config26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 47.27 Apr – 3 May: 334 May – 10 May: 14911 May – 17 May: 14218 May – 24 May: 20125 May – 31 May: 1611 Jun – 7 Jun: 2358 Jun – 14 Jun: 28315 Jun – 21 Jun: 31122 Jun – 28 Jun: 8329 Jun – 5 Jul: 1076 Jul – 12 Jul: 14213 Jul – 19 Jul: 15020 Jul – 26 Jul: 23227 Jul – 2 Aug: 733 Aug – 9 Aug: 3810 Aug – 16 Aug: 3417 Aug – 23 Aug: 2424 Aug – 30 Aug: 3731 Aug – 6 Sept: 167 Sept – 13 Sept: 4814 Sept – 20 Sept: 5221 Sept – 27 Sept: 10228 Sept – 4 Oct: 5935 Oct – 11 Oct: 14012 Oct – 18 Oct: 3019 Oct – 25 Oct: 47
Linting
  1. @cbs-consulting/cds-eslintESLint plugin with one consultancy's rules for CDS filesfrom CAP
  2. @cbs-consulting/toolsShared ESLint configuration for SAPUI5 and CAP projectsfrom CAP
  3. ui5plugin-linterCommand-line linter for UI5 classes, XML views and i18n filesfrom UI5
  4. ui5pluginSAPUI5 extension for Visual Studio Codefrom UI5
  5. hana-linterRegex naming rules for SAP HANA artifacts in a CAP projectfrom CAP
  6. @sap/eslint-plugin-cdsSAP's ESLint plugin for CDSfrom CAP
  7. @sap-ux/eslint-plugin-fiori-toolsESLint rules for projects the Fiori tools generators producefrom CAP
  8. vscode-ui5-language-assistantVS Code extension for SAPUI5 and OpenUI5 XML views and manifestfrom UI5
  9. @satiroglu/kaevRule-based checker for SAPUI5 and OpenUI5 projectsfrom UI5
  10. @ui5/linterStatic analysis tool for UI5 projectsfrom UI5

Details

Sources4
npm registrydiscovered here, keywords:sap-capchecked
npm registry, eslint-plugin-better-cap-configversion, releases, installschecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesbuild-time
latestv1.1.0
first release
releases and cadence4, ~42d median
discovered vianpm registry · keywords:sap-cap
first seen in the atlas
ecosystem and domaincap, developer-experience
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:mauriciolauffer-eslint-plugin-better-cap-config
JSON
/artifacts/mauriciolauffer-eslint-plugin-better-cap-config.json
MCP
Connecting an agent