npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-better-cap-config

v1.1.0

Published

ESLint plugin to detect deprecated SAP CAP configurations

Readme

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

| Rule | Description | | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | cds-cdsc-newparser | Disallow deprecated cds.cdsc.newparser: false configuration | | cds-drafts-cancellation-timeout | Disallow deprecated cds.drafts.cancellationTimeout configuration | | cds-features-async-handler-compat | Disallow deprecated cds.features.async_handler_compat configuration | | cds-features-base64-binaries | Disallow deprecated cds.features.base64_binaries configuration | | cds-features-bulk-inserts-via-rest | Disallow deprecated cds.features.bulk_inserts_via_rest: false configuration | | cds-features-cds-validate | Disallow deprecated cds.features.cds_validate configuration | | cds-features-compat-assert-not-null | Disallow deprecated cds.features.compat_assert_not_null configuration | | cds-features-compat-clone-appends | Disallow deprecated cds.features.compat_clone_appends configuration | | cds-features-compat-restrict-bound | Disallow deprecated cds.features.compat_restrict_bound configuration | | cds-features-compat-restrict-where | Disallow deprecated cds.features.compat_restrict_where configuration | | cds-features-compat-save-drafts | Disallow deprecated cds.features.compat_save_drafts configuration | | cds-features-compat-srv-getters | Disallow deprecated cds.features.compat_srv_getters configuration | | cds-features-compat-static-auth | Disallow deprecated cds.features.compat_static_auth configuration | | cds-features-compat-texts-entities | Disallow deprecated cds.features.compat_texts_entities configuration | | cds-features-compile-for-flows | Disallow deprecated cds.features.compile_for_flows configuration | | cds-features-consistent-params | Disallow deprecated cds.features.consistent_params: false configuration | | cds-features-keys-in-data-compat | Disallow deprecated cds.features.keys_in_data_compat configuration | | cds-features-kibana-formatter | Disallow deprecated cds.features.kibana_formatter configuration | | cds-features-legacy-srv-results | Disallow deprecated cds.features.legacy_srv_results: true configuration | | cds-features-new-draft-via-action | Disallow deprecated cds.features.new_draft_via_action configuration | | cds-features-odata-metadata-compat | Disallow deprecated cds.features.odata_metadata_compat configuration | | cds-features-odata-new-adapter | Disallow deprecated cds.features.odata_new_adapter configuration | | cds-features-serve-on-root | Disallow deprecated cds.features.serve_on_root: true configuration | | cds-features-service-level-restrictions | Disallow deprecated cds.features.service_level_restrictions: false configuration | | cds-features-stream-compat | Disallow deprecated cds.features.stream_compat configuration | | cds-features-xssec-compat | Disallow deprecated cds.features.xssec_compat configuration | | cds-fiori-calc-elements | Disallow deprecated cds.fiori.calc_elements configuration | | cds-fiori-draft-compat | Disallow deprecated cds.fiori.draft_compat configuration | | cds-fiori-direct-crud | Disallow deprecated cds.fiori.direct_crud configuration | | cds-fiori-lean-draft | Disallow deprecated cds.fiori.lean_draft: false configuration | | cds-i18n-fatjson | Disallow deprecated cds.i18n.fatjson configuration | | cds-log-kibana-custom-fields | Disallow deprecated cds.log.kibana_custom_fields configuration | | cds-mcp-auto-config | Disallow deprecated cds.mcp.autoConfig configuration (renamed to autoWired) | | cds-multitenant-client-cert-header | Disallow deprecated cds.multiTenancy.subscriptionManager.clientCertificateHeader configuration | | cds-remote-native-fetch | Disallow deprecated cds.remote.native_fetch configuration | | cds-requires-db-database | Disallow deprecated cds.requires.db.database configuration | | cds-requires-middlewares | Disallow deprecated cds.requires.middlewares: false configuration | | cds-sql-collate | Disallow deprecated cds.sql.collate configuration | | cds-sql-native-hana-associations | Disallow deprecated cds.sql.native_hana_associations: true configuration | | cds-sql-runtime-view-mode | Disallow deprecated cds.sql.runtimeView.mode: "resolve" configuration | | cds-sql-transitive-localized-views | Disallow 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",
    },
  },
];

Using the Recommended Configuration

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