You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Architecture.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Within `src/conversion/convertLintConfig.ts`, the following steps occur:
17
17
- 3a. If no output rules conflict with `eslint-config-prettier`, it's added in
18
18
- 3b. Any ESLint rules that are configured the same as an extended preset are trimmed
19
19
4. The summarized configuration is written to the output config file
20
-
5. Files to transform comments in have source text rewritten using the same rule conversion logic
20
+
5. Files to transform comments in have source text rewritten using the cached rule conversion results
21
21
6. A summary of the results is printed to the user's console
22
22
23
23
### Conversion Results
@@ -51,6 +51,17 @@ These are located in `src/rules/mergers/`, and keyed under their names by the ma
51
51
52
52
For example, `@typescript-eslint/ban-types` spreads both arguments' `types` members into one large `types` object.
53
53
54
+
## Comment Conversion
55
+
56
+
Comments are converted after rule conversion by `src/comments/convertComments.ts`.
57
+
Source files are parsed into TypeScript files by `src/comments/parseFileComments.ts`, which then extracts their comment nodes.
58
+
Those comments are parsed for TSLint rule disable or enable comments.
59
+
60
+
Comments that match will be rewritten in their their file to their new ESLint rule equivalent in `src/comments/replaceFileComments.ts`, as determined by:
61
+
62
+
1. First, if the `ruleEquivalents` cache received from configuration convertion has the TSLint rule's ESLint equivalents listed, those are used.
63
+
2. Failing that, a comment-specific `ruleCommentsCache` is populated with rules converted ad-hoc with no arguments.
64
+
54
65
## Editor Configuration Conversion
55
66
56
67
Editor lint configurations are converted by `src/editorSettings/convertEditorSettings.ts`.
0 commit comments