OpenParable
Skip to content
← Back to skills

S2 Lint

Testing & Quality
s2-lint

S2 Lint is an Agent Skill for testing & quality published in the antvis/S2 repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

After modifying S2 project code, you must run lint to ensure there are no errors, avoiding issues when pushing to git.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/antvis/S2/blob/HEAD/.agent/skills/s2-lint/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/s2-lint, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

S2 Lint

When to use this skill

After modifying any code files in the packages/ directory, you must use this skill before finishing the task.

This includes but is not limited to:

  • Modifying .ts, .tsx, .vue files
  • Adding new source code files
  • Modifying type definition files (.d.ts)
  • Modifying import/export statements
  • Modifying .less style files
  • Modifying .md documentation files

Execution Steps

After completing all code modifications, run the following command in the project root:

pnpm lint

This command runs the following checks sequentially:

  • lint:type - TypeScript type checking
  • lint:script - ESLint code style checking
  • lint:style - Stylelint CSS/LESS checking
  • lint:docs - MarkdownLint documentation checking
  • lint:word - Case-police word casing checking

Handling Errors

If the command reports errors:

  1. Carefully read the error message to determine the location and cause of the error.
  2. Fix all errors to ensure code quality.
  3. Re-run pnpm lint to confirm all errors are fixed.
  4. The task is considered complete only after lint passes.

Notes

  • Do not ignore lint errors; they may cause build failures in the CI/CD pipeline.
  • If some errors are difficult to fix, inform the user and discuss solutions.
  • This check is a necessary step before pushing code to git.