cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CAP Adding custom linting rule for @sap/eslint-plugin-cds

DavidBrodmann
Explorer
0 Likes
411

Dear all

I am trying to create my own rule for eslint for linting *.cds files. The official package "@sap/eslint-plugin-cds" exposes a function "createRule()"  which seems to do exactly that. Unfortunately, I don't know how I can inject my new custom rule into the "cdsPlugin" eslint plugin, so that it gets executed, and I can configure it in eslint.config.mjs .

I did not find any documentation and I definitely don't want to expand the npm package @Sisn/eslint-plugin-cds by hand. Because of this exposed api and createRule() function I thought it should be possible to create a rule in a separate file and inject the rule back to the plugin, does anyone know how ?

Thank you so much for reading 🙂

Accepted Solutions (0)

Answers (0)