File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ TSLint rules without ESLint equivalents will be wrapped with [eslint-plugin-tsli
39
39
Each of these flags is optional:
40
40
41
41
- ** [ ` config ` ] ( #config ) ** : Path to print the generated ESLint configuration file to.
42
+ - ** [ ` editor ` ] ( #editor ) ** : Path to an editor configuration file to convert linter settings within.
42
43
- ** [ ` eslint ` ] ( #eslint ) ** : Path to an ESLint configuration file to read settings from.
43
44
- ** [ ` package ` ] ( #package ) ** : Path to a package.json file to read dependencies from.
44
45
- ** [ ` tslint ` ] ( #tslint ) ** : Path to a TSLint configuration file to read settings from.
@@ -59,6 +60,17 @@ The file extension of this path will be used to determine the format of the crea
59
60
- ` .js ` file paths will be written ` module.exports = ... ` JavaScript
60
61
- Other file paths will default to JSON
61
62
63
+ #### ` editor `
64
+
65
+ ``` shell
66
+ npx tslint-to-eslint-config --editor ./path/to/.vscode/settings.json
67
+ ```
68
+
69
+ _ Default: ` .vscode/settings.json ` _
70
+
71
+ Path to an editor configuration file to convert settings settings within.
72
+ Any VS Code style editor settings for TSLint will be converted to their ESLint equivalents.
73
+
62
74
#### ` eslint `
63
75
64
76
``` shell
Original file line number Diff line number Diff line change 4
4
5
5
1 . CLI usage starts in ` bin/tslint-to-eslint-config ` , which immediately calls ` src/cli/main.ts ` .
6
6
2 . CLI settings are parsed and read in ` src/cli/runCli.ts ` .
7
- 3 . Application logic is run by ` src/conversion/convertConfig.ts ` .
7
+ 3 . Linter configuration conversion is run by ` src/conversion/convertConfig.ts ` .
8
+ 4 . Editor configuration conversion is run by ` src/conversion/convertEditorConfig.ts ` .
8
9
9
- ## Configuration Conversion
10
+ ## Linter Configuration Conversion
10
11
11
12
Within ` src/conversion/convertConfig.ts ` , the following steps occur:
12
13
@@ -46,3 +47,8 @@ It's possible that one ESLint rule will be output by multiple converters.
46
47
These are located in ` src/rules/mergers/ ` , and keyed under their names by the map in ` src/rules/mergers.ts ` .
47
48
48
49
For example, ` @typescript-eslint/ban-types ` spreads both arguments' ` types ` members into one large ` types ` object.
50
+
51
+ ## Editor Configuration Conversion
52
+
53
+ Editor lint configurations are converted by ` src/editorSettings/convertEditorSettings.ts ` .
54
+ Any setting that matches a known built-in TSLint setting will be replaced with the ESLint equivalent.
You can’t perform that action at this time.
0 commit comments