BREAKING CHANGE: Rewrite `ts-standard` to follow other `standard` engines usage
I found some free time to rewrite ts-standard.
Fixes #102 Fixes #204 Fixes #209 Fixes #216 Fixes #217 Fixes #171 Fixes #222
This PR is a major BREAKING CHANGE, and involves trade-offs and probably discussions about what features we want to have and how these changes are impacting ts-standard users. I will try to explain as much as possible choices and implementation details, feel free to disagree on certain points, and debate about how we want the future of ts-standard to look.
As the diff is quite large, it might be easier to review it directly file by file entirely first.
This PR is not complete but is ready for review and discussion, the changelog is missing, and we should write a easy to follow guide for our current users to migrate to this new version. We certainly should do first a prerelease of this version before making it stable, to ensure it works as we want.
Why the rewrite of ts-standard?
As discussed in https://github.com/standard/ts-standard/issues/171#issuecomment-921521437, ts-standard codebase is so different from other standard engines like standard, semistandard, standardx etc, that it is hard to keep up with changes.
When ESlint v8 was released, we had a hard time upgrading the whole standard ecosystem because ESLint v8 drop the old CLIEngine programmatic usage API, so we had to do a major refactor of standard-engine, as we did for standard-engine@15.
ts-standard currently redefines its own standard-engine, adds more CLI flags and the usage is different from standard.
We do this rewrite to ease the maintenance of ts-standard and keep the usage similar to other standard engines.
This PR also add support for ESLint v8, update eslint-config-standard-with-typescript to v22, and fixes many issues with recent version of TypeScript and ESLint with TypeScript. :smile:
Drawbacks/BREAKING CHANGE
We use the same options and CLI flags as standard-engine except --project to configure a tsconfig.json path.
That means options in package.json in ts-standard property like files and report are removed, if we want to add support for them, we'll implement them in standard-engine directly so the other standard engines benefit from them too, btw about the --report option, there is already an issue for it: https://github.com/standard/standard-engine/issues/174.