microsoft / microsoft/boll

Allow rules to have the fix function

Open
#102 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
20
Forks
9
PR merge metrics
No merged PRs in 30d

Description

There are rules which we could potentially enable fixers for.

Imagine if the rule had an API such as...

const someRule = {
  check: async (filename, options) => {
    // make an errors array
    return errors;
  }, 
  fix: async (errors, options) => {
    // do some stuff to fix the error
  }
}

export const someRule;

This is similar to how manypkg works here...

And how eslint rules work as well such as here...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing rule API and the path that runs rule checks, then compare the proposed shape with the linked manypkg and ESLint examples. Define how a rule exposes a fixer, how errors and options are passed, and how the command invokes it; done means eligible rules can fix their reported errors without breaking check-only behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.