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
Comment conversions in `src/converters/comments/convertComments.ts` are the last root-level converter to be run.
4
+
The `ruleEquivalents` map it receives is filled out with the rule equivalents from earlier converters, i.e. lint rule converters.
5
+
6
+
In general, its flow is:
7
+
8
+
1. If no comments are requested to be converted, immediately report it out and mark this as passed.
9
+
2. Create the list of include and possibly exclude globs to search on.
10
+
3. Search for files matching those globs to have their comments converted.
11
+
4. Convert comments in the contents of each file, storing equivalents in a cache.
12
+
5. Report out the results of converting the unique globbed file paths.
13
+
14
+
## File Manipulations
15
+
16
+
Source files are parsed into TypeScript files by `src/comments/parseFileComments.ts`, which then extracts their comment nodes.
17
+
Those comments are parsed for TSLint rule disable or enable comments.
18
+
19
+
Comments that match will be rewritten in their their file to their new ESLint rule equivalent in `src/comments/replaceFileComments.ts`, as determined by:
20
+
21
+
1. First, if the `ruleEquivalents` cache received from configuration convertion has the TSLint rule's ESLint equivalents listed, those are used.
22
+
2. Failing that, a comment-specific `ruleCommentsCache` is populated with rules converted ad-hoc with no arguments.
Copy file name to clipboardExpand all lines: docs/Architecture/README.md
-11
Original file line number
Diff line number
Diff line change
@@ -51,17 +51,6 @@ 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
-
65
54
## Editor Configuration Conversion
66
55
67
56
Editor lint configurations are converted by `src/editorSettings/convertEditorSettings.ts`.
0 commit comments