Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

rule-options

Skill by SonarSource

Explains how to add or modify rule options in SonarJS, including the fields array, SonarQube UI visibility and Java check class configuration. Written for developers who work on SonarJS rule configurations.

  • Score 72
  • 1.3k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install rule-options

Built from the published package, never by AI.

git clone --depth 1 https://github.com/SonarSource/SonarJS /tmp/SonarJS && mkdir -p ~/.claude/skills && cp -r /tmp/SonarJS/.claude/skills/rule-options ~/.claude/skills/rule-options

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install rule-options in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill describes how rule options flow in SonarJS, from the SonarQube UI through a Java check class and the Node.js ESLint linter. It lists the key files for each rule, including rule.ts, meta.ts, config.ts and generated-meta.ts, and explains the properties of the fields array.

It shows that a field appears in the SonarQube UI only when it has a description, how array options entered as comma-separated text are handled, and how displayName maps SonarQube keys to ESLint option names. It also gives steps for adding an option to an existing rule and shows the Java configurations() method and a test to verify serialization. It is aimed at developers maintaining SonarJS rules.

Written from the project's SKILL.md and checked against it.

What it can do

  • Add rule optionsAdd a new option to a rule's fields array in config.ts.
  • SonarQube UI visibilityMake an option visible in SonarQube by adding a description to its field.
  • Key mappingMap a SonarQube parameter key to an ESLint option name with displayName.
  • Array optionsConfigure list options that users enter as comma-separated text in SonarQube.
  • Schema syncKeep the JSON Schema in meta.ts in sync with fields for original rules.
  • Java check configurationUpdate configurations() in a Java check class and verify it with a test.

What you need

  • Node.js and npm, for the generate-meta script
  • Java, for the generate-java-rule-classes script

Try asking

  • Add a new option to rule S107 and make it visible in SonarQube
  • Map a SonarQube parameter key to an ESLint option in config.ts
  • Check that my Java check class sends the right configurations()

Good to know

  • Options without a description are internal only and hidden from SonarQube.
  • For original rules, schema and fields must be kept in sync manually.
  • generated-meta.ts is auto-generated and should not be edited.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/rule-options/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to rule-options

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

rule-options: common questions

How do I make a rule option visible in SonarQube?

Add a description to the field in config.ts. Fields without a description are internal defaults that users cannot see.

What is the difference between JSON Schema and the fields array?

The JSON Schema in meta.ts is used by ESLint for validation at runtime. The fields array in config.ts controls the SonarQube UI, defaults and key mapping.

How are array options passed from SonarQube?

Comma-separated text entered in SonarQube is split and trimmed on the Java side, then sent to Node.js as protobuf lists.

How do I install rule-options?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is rule-options free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is rule-options safe to use?

It scores 72 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to rule-options?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

rule-options Install

Add to stack

Loading.