linterjs / core

Lint all the things... with one command
MIT License
4 stars 0 forks source link

Public API #2

Open zimme opened 6 years ago

zimme commented 6 years ago

Let's discuss the public api of this package. I see this as an internal package used by @linterjs/cli and the adapters.

zimme commented 6 years ago

This package should also be used by editor integrations.

zimme commented 6 years ago

I see the following functionality as needed, for now.

For cli, editors and other programmatic use cases.

For linter adapters

zimme commented 6 years ago

We will need a common lint output format so that the cli and editors can pretty print the output for all linters.

zimme commented 6 years ago

Working on a "light-weight" version of eslint's output with some additions from tslint's output, for LinterAdapterLintOutput.

cangoektas commented 6 years ago

What do you think about changing the naming to check/fix instead of lint/format? I've seen it in Google's ts-style project and I think it makes sense in here as well. Making the prettier adaptor i.e. expose a "lint" function seems a bit weird, doesn't it?

zimme commented 6 years ago

Worth thinking about, however the prettier provider will be using prettylint which make prettier work like a linter based on some of the exposed functionality fron eslint-plugin-prettier