tslint-to-eslint-config is a heavily tested CLI app with application flow starting in bin/tslint-to-eslint-config
:
src/cli/main.ts
'smain
is called withprocess.argv
as the program arguments.- This file sets up all function dependencies and bound functions that call to each other.
src/cli/runCli.ts
'srunCli
is called with those bound dependencies and raw arguments.
See Dependencies.md for more info on functions and their dependencies are bound together.
Within runCli
:
- CLI options are parsed from the raw arguments into a commands object.
- If the version should be printed, we do that and stop execution.
- Any existing linter and TypeScript configurations are read from disk.
- Each converter is run, halting execution if it fails.
Within that flow, there are three "root-level" converters directly called by runCli
, in order:
- Linters.md: Converting from an original TSLint configuration to the equivalent TSLint configuration.
- Editors.md: Creating new IDE settings for ESLint equivalent to any existing TSLint settings.
- Comments.md: Converting inline
tslint:disable
lint disable comments to theireslint-disable
equivalents.