microsoft / boll

monorepo linting tool
https://microsoft.github.io/boll/
MIT License
15 stars 9 forks source link

Allow rules to have the fix function #102

Open jcreamer898 opened 1 year ago

jcreamer898 commented 1 year ago

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...

dannyvv commented 10 months ago

Yes, this will be invaluable to have.