Implementing Lint Rules
flint-fyi/flint
Implements ESLint-style lint rules with proper AST handling, targeted reporting, and comprehensive unit tests.
Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools.
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install SAP/open-ux-tools eslint-rule-development --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/eslint-rule-development .claude/skills/eslint-rule-development && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "eslint-rule-development" agent skill from https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-development into .claude/skills/eslint-rule-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "eslint-rule-development", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-developmentType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install SAP/open-ux-tools eslint-rule-development --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/eslint-rule-development .agents/skills/eslint-rule-development && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "eslint-rule-development" agent skill from https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-development into .agents/skills/eslint-rule-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "eslint-rule-development", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install SAP/open-ux-tools eslint-rule-development --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/eslint-rule-development .cursor/skills/eslint-rule-development && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "eslint-rule-development" agent skill from https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-development into .cursor/skills/eslint-rule-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "eslint-rule-development", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/SAP/open-ux-tools.git --path .agents/skills/eslint-rule-development--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install SAP/open-ux-tools eslint-rule-development --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/eslint-rule-development .gemini/skills/eslint-rule-development && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "eslint-rule-development" agent skill from https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-development into .gemini/skills/eslint-rule-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "eslint-rule-development", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install SAP/open-ux-tools eslint-rule-developmentInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/eslint-rule-development .github/skills/eslint-rule-development && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "eslint-rule-development" agent skill from https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-development into .github/skills/eslint-rule-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "eslint-rule-development", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install SAP/open-ux-tools eslint-rule-development --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/eslint-rule-development .opencode/skills/eslint-rule-development && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "eslint-rule-development" agent skill from https://github.com/SAP/open-ux-tools/tree/main/.agents/skills/eslint-rule-development into .opencode/skills/eslint-rule-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "eslint-rule-development", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
eslint-rule-developmentDevelop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools.
Eslint Rule Development is an agent skill from SAP/open-ux-tools, published by the product's own GitHub organization. Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools. Always use this skill when adding any rule to the plugin, implementing manifest.json/XML/CDS/flex-change validation, writing rule tests with project context, or creating rule documentation — even if the request sounds simple or the user doesn't mention 'ESLint' explicitly. Guides through the complete workflow: diagnostics constant, rule implementation, unit tests, docs, and registration.
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/annotation.md`, `references/flex-change.md` and `references/js-ts-rule.md`). Compatibility notes: Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+.
It sits in Development, covering Linting and formatting. It works with ESLint. The repository describes itself as: Enable community collaboration to jointly promote and facilitate best in class tooling capabilities. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 849bc84. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmnpxbashFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm and npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+.
From compatibility in the SKILL.md frontmatter.
Eslint Rule Development loads about 3k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 120 tokens; SKILL.md has 1,114 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from SAP/open-ux-tools at commit 849bc84, republished under its Apache-2.0 licence (© SAP). 1,114 words, ~3,000 tokens.
.claude/skills/eslint-rule-development/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Add a new ESLint rule to @sap-ux/eslint-plugin-fiori-tools following the established patterns in the monorepo.
Read tool directly — never Bash cat or spawn Explore subagents for file readingNODE_OPTIONS="--experimental-vm-modules" npx jest --testPathPatterns="sap-[rule-name]" --no-coverage| Type | Use when | Reference file |
|---|---|---|
| Annotation rule | Validates UI.* OData annotations in .xml / .cds files. Also, covers rules where text, that is, a label, title, or description, can be an i18n binding | references/annotation.md |
| Manifest JSON rule | Validates manifest.json properties | references/manifest-json.md |
| Flex change file rule | Validates webapp/changes/*.change (Applicable only to OData V2 flex change properties) | references/flex-change.md |
| JavaScript / TypeScript rule | Validates JS/TS application source code (UI5 patterns, global variables, deprecated APIs) | references/js-ts-rule.md |
Infer from the request:
sap-[kebab-case-name] patternerror or warn. Rules in recommended-for-s4hana MUST be warn.OData version determines the linker file — always follow the stated version:
| OData version | Linker file | Manifest root |
|---|---|---|
| V2 only | src/project-context/linker/fe-v2.ts | sap.ui.generic.app.pages.* |
| V4 only | src/project-context/linker/fe-v4.ts | sap.ui5.routing.targets.* |
| Both | both linker files | both roots |
Read the matching reference file immediately, then read all the files it lists in a single parallel batch. If the rule spans multiple types (e.g. annotations + manifest, or manifest + flex changes), read all matching reference files and combine their templates and access patterns.
In packages/eslint-plugin-fiori-tools/src/language/diagnostics.ts:
export const MY_RULE = 'sap-my-new-rule';
export interface MyRuleDiagnostic {
type: typeof MY_RULE;
// ... fields from the reference file's "Required diagnostic fields" table
}
// Add MyRuleDiagnostic to the Diagnostic union at the bottomUse the template from the reference file for your rule type.
Code quality requirements for every new or modified function:
@param, @returns) to every new function. When modifying an existing function, update its JSDoc to reflect any signature or behaviour changes.sonarjs/cognitive-complexity. If a function exceeds 15, extract branches or loops into well-named helper functions until the complexity falls within the limit. Do not inline complex logic in a single function to avoid this.// ✅ Correct — code values in backticks
message: "The `UI.LineItem` annotation is missing the required `Criticality` property."src/rules/index.ts — add import + entry (alphabetical order):
import sapMyNewRule from './sap-my-new-rule.js';
// ...
[MY_RULE]: sapMyNewRule,src/index.ts — add to fioriLanguageConfig rules (Fiori language rules) or baseFioriToolsRules (JS/TS rules):
'@sap-ux/fiori-tools/sap-my-new-rule': 'warn',If the rule should also apply to S/4HANA projects, add it to the recommended-for-s4hana config in src/index.ts as well. Rules in this config must use 'warn' severity:
// In the recommended-for-s4hana config rules object:
'@sap-ux/fiori-tools/sap-my-new-rule': 'warn',Use the test template from the reference file; run only the new test file (see efficiency rules at the top).
Always check message, never messageId, in errors arrays. When a rule message contains interpolated data (e.g. {{tableType}}), checking only messageId would accept any value for that placeholder and miss regressions. Use the fully resolved string instead:
// ✅ Correct — verifies the interpolated value
errors: [
{
message:
'"TreeTable" is not supported in the flexible column layout with a draft-enabled service.'
}
]
// ❌ Wrong — does not verify the data interpolated into the message
errors: [{ messageId: 'sap-my-new-rule' }]If tests show 0 errors when violations are expected, check the debug checklist at the bottom of the reference file.
Create packages/eslint-plugin-fiori-tools/docs/rules/sap-[rule-name].md.
Read packages/eslint-plugin-fiori-tools/docs/rules/TEMPLATE.md for structure. Key sections:
In packages/eslint-plugin-fiori-tools/README.md, do two things:
Add your new rule at the top of the rules table with new in the version column:
| new | [sap-my-new-rule](docs/rules/sap-my-new-rule.md) | Short description | | ✅ |Backfill any pending new versions: if any rows still show new from prior rule additions that have since been released, look up each rule's release version in packages/eslint-plugin-fiori-tools/CHANGELOG.md and replace new with that version. After this cleanup, your newly added rule should be the only row showing new.
Run lint:fix to auto-fix ESLint errors and apply Prettier formatting across all modified files, then verify no issues remain:
# Fix lint errors and apply Prettier formatting
pnpm --filter @sap-ux/eslint-plugin-fiori-tools lint:fix
# Verify no remaining issues
pnpm --filter @sap-ux/eslint-plugin-fiori-tools lintIf lint reports errors after lint:fix:
sonarjs/cognitive-complexity — resolve per the cognitive complexity guidance in Step 3.prettier/prettier — a formatting issue could not be auto-fixed. Apply the suggested change manually (usually a line that is too long or a multiline expression that needs restructuring).@typescript-eslint/no-unsafe-* — replace any casts or untyped values with proper interfaces or unknown + type guards.Do not proceed to Step 9 until pnpm lint exits with code 0.
Then confirm all tests still pass:
pnpm --filter @sap-ux/eslint-plugin-fiori-tools testpnpm csetSelect @sap-ux/eslint-plugin-fiori-tools, choose minor for new rules:
FEAT: add sap-my-new-rule rule for [short description]Summarize what was done:
minor), summary line| Purpose | Path |
|---|---|
| Rule implementation | packages/eslint-plugin-fiori-tools/src/rules/sap-[name].ts |
| Rule registry | packages/eslint-plugin-fiori-tools/src/rules/index.ts |
| Plugin config & exports | packages/eslint-plugin-fiori-tools/src/index.ts |
| Diagnostic constants | packages/eslint-plugin-fiori-tools/src/language/diagnostics.ts |
| Annotation helper utilities | packages/eslint-plugin-fiori-tools/src/project-context/linker/annotations.ts |
i18n helper utilities (extractI18nKey, getAttrOrChildText, collectSectionLabelKeys, for example) | packages/eslint-plugin-fiori-tools/src/project-context/linker/i18n.ts |
| Annotation index key format | packages/eslint-plugin-fiori-tools/src/project-context/parser/service.ts (lines 50-57) |
| Linker types | packages/eslint-plugin-fiori-tools/src/project-context/linker/types.ts |
| V2 linker | packages/eslint-plugin-fiori-tools/src/project-context/linker/fe-v2.ts |
| V4 linker | packages/eslint-plugin-fiori-tools/src/project-context/linker/fe-v4.ts |
| Rule factory | packages/eslint-plugin-fiori-tools/src/language/rule-factory.ts |
| Rule fixer | packages/eslint-plugin-fiori-tools/src/language/rule-fixer.ts |
| Test helper | packages/eslint-plugin-fiori-tools/test/test-helper.ts |
| Rule docs template | packages/eslint-plugin-fiori-tools/docs/rules/TEMPLATE.md |
| README rules table | packages/eslint-plugin-fiori-tools/README.md |
check() context access by rule type| Rule type | Use in check() | Why |
|---|---|---|
| Annotation | linkedModel.apps for page iteration; index.apps[appKey] for getIndexedServiceForMainService | Only check annotations referenced from pages — never scan all entity annotations. pageNames must list only pages that reference the specific annotation. See annotation.md for access patterns and the page-annotation-map template. When text can be an i18n binding, use the two-pass design in annotation.md#when-the-text-field-can-be-an-i18n-binding. |
| Manifest JSON | linkedModel.apps for page iteration; index.apps[appKey] for parsedApp (manifest URI, manifestObject) | Requires linked pages to find manifest config paths |
| Flex change | context.sourceCode.projectContext.linkedModel.apps | Guard on FioriChangeSourceCode first; linked model provides change file config via page.lookup['table'] |
| JavaScript / TypeScript | Standard ESLint context — no projectContext | JS/TS rules don't use the Fiori project model; use Rule.RuleModule, not createFioriRule |
© SAP, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in .agents/skills/eslint-rule-development of SAP/open-ux-tools.
Open the folder on GitHubat commit 849bc84
Eslint Rule Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Eslint Rule Development this skillSAP/open-ux-tools | 158 | — | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Implementing Lint Rulesflint-fyi/flint | 312 | — | ~857 | Automated safety check: Pass | MIT | |
| Static Code Analysis Typescriptjaktestowac/awesome-copilot-for-testers | 116 | — | ~4.2k | Automated safety check: Pass | MIT | |
| Npx CLIjwynia/agent-skills | 166 | — | ~2.4k | Automated safety check: Pass | None | |
| Javascript ToolingHoangNguyen0403/agent-skills-standard | 571 | — | ~446 | Automated safety check: Pass | MIT | |
| Typescript ToolingHoangNguyen0403/agent-skills-standard | 571 | — | ~688 | Automated safety check: Pass | MIT |
flint-fyi/flint
Implements ESLint-style lint rules with proper AST handling, targeted reporting, and comprehensive unit tests.
jaktestowac/awesome-copilot-for-testers
Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint, tsconfig, Prettier, import sorting, Husky…
jwynia/agent-skills
Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.
HoangNguyen0403/agent-skills-standard
Configure development tools, linting, formatting, and test runners for existing JavaScript projects.
HoangNguyen0403/agent-skills-standard
Development tools, linting, and build config for TypeScript.
lobehub/lobehub
Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.
SAP/open-ux-tools
A skill your agent uses when writing, fixing, extending, or reviewing OPA5 integration tests for SAP Fiori Elements applications - whether the app uses OData V4 (sap.fe.test library) or OData V2…
SAP/open-ux-tools
Sync odata-vocabularies package — update all vocabulary resource files to their latest published versions, and optionally add a new vocabulary given its JSON URL.
SAP/open-ux-tools
Add visual filters (chart-based) to SAP Fiori Elements filter bar or value help using CAP or ABAP RAP.
SAP/open-ux-tools
Add analytical chart (chart + table hybrid) to SAP Fiori Elements List Report using aggregated data.
SAP/open-ux-tools
Guidelines for SAP Fiori app development for CAP and standalone projects.
SAP/open-ux-tools
Configure, migrate, or run ESLint with @sap-ux/eslint-plugin-fiori-tools in SAP Fiori projects (standalone or CAP).
Works with
Categories
Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools. Eslint Rule Development is an agent skill from SAP/open-ux-tools, published by the product's own GitHub organization. Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools.
Eslint Rule Development fits situations like: adding any rule to the plugin; implementing manifest.json/XML/CDS/flex-change validation; writing rule tests with project context; creating rule documentation — even if the request sounds simple.
Run `npx skills add SAP/open-ux-tools --skill eslint-rule-development -a claude-code`. Or copy the skill folder (.agents/skills/eslint-rule-development in SAP/open-ux-tools) into .claude/skills/eslint-rule-development in your project. Claude Code loads it when a task matches its description.
Run `npx skills add SAP/open-ux-tools --skill eslint-rule-development -a codex`. Or copy the skill folder (.agents/skills/eslint-rule-development in SAP/open-ux-tools) into .agents/skills/eslint-rule-development in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SAP/open-ux-tools --skill eslint-rule-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/eslint-rule-development, .gemini/skills/eslint-rule-development, .github/skills/eslint-rule-development and .opencode/skills/eslint-rule-development in your project.
Going by SKILL.md and its folder, Eslint Rule Development needs the command-line tools its instructions call (pnpm, npx and bash). Our summary lists: Node.js. Compatibility (from SKILL.md): Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+..
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Eslint Rule Development is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Eslint Rule Development: Implementing Lint Rules (flint-fyi/flint, 312 stars), Static Code Analysis Typescript (jaktestowac/awesome-copilot-for-testers, 116 stars), Npx CLI (jwynia/agent-skills, 166 stars) and Javascript Tooling (HoangNguyen0403/agent-skills-standard, 571 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
SAP (a GitHub organization, an official publisher) maintains it in SAP/open-ux-tools, which has 158 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.
Source: SAP/open-ux-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.