@@ -12,7 +12,7 @@ import { convertClassName } from "./converters/class-name";
12
12
import { convertCurly } from "./converters/curly" ;
13
13
import { convertCyclomaticComplexity } from "./converters/cyclomatic-complexity" ;
14
14
import { convertEofline } from "./converters/eofline" ;
15
- import { convertFileNameCasing } from "./converters/file-name-casing " ;
15
+ import { convertMemberAccess } from "./converters/member-access " ;
16
16
import { convertForin } from "./converters/forin" ;
17
17
import { convertFunctionConstructor } from "./converters/function-constructor" ;
18
18
import { convertIncrementDecrement } from "./converters/increment-decrement" ;
@@ -24,11 +24,9 @@ import { convertLinebreakStyle } from "./converters/linebreak-style";
24
24
import { convertMaxClassesPerFile } from "./converters/max-classes-per-file" ;
25
25
import { convertMaxFileLineCount } from "./converters/max-file-line-count" ;
26
26
import { convertMaxLineLength } from "./converters/max-line-length" ;
27
- import { convertMemberAccess } from "./converters/member-access" ;
28
27
import { convertMemberOrdering } from "./converters/member-ordering" ;
29
- import { convertNewParens } from "./converters/new-parens" ;
30
- import { convertNewlineBeforeReturn } from "./converters/newline-before-return" ;
31
28
import { convertNewlinePerChainedCall } from "./converters/newline-per-chained-call" ;
29
+ import { convertNewParens } from "./converters/new-parens" ;
32
30
import { convertNoAngleBracketTypeAssertion } from "./converters/no-angle-bracket-type-assertion" ;
33
31
import { convertNoArg } from "./converters/no-arg" ;
34
32
import { convertNoAsyncWithoutAwait } from "./converters/no-async-without-await" ;
@@ -41,7 +39,6 @@ import { convertNoConstantCondition } from "./converters/no-constant-condition";
41
39
import { convertNoConstruct } from "./converters/no-construct" ;
42
40
import { convertNoControlRegex } from "./converters/no-control-regex" ;
43
41
import { convertNoDebugger } from "./converters/no-debugger" ;
44
- import { convertNoDuplicateImports } from "./converters/no-duplicate-imports" ;
45
42
import { convertNoDuplicateSuper } from "./converters/no-duplicate-super" ;
46
43
import { convertNoDuplicateSwitchCase } from "./converters/no-duplicate-switch-case" ;
47
44
import { convertNoEmpty } from "./converters/no-empty" ;
@@ -98,19 +95,19 @@ import { convertPreferObjectSpread } from "./converters/prefer-object-spread";
98
95
import { convertPreferReadonly } from "./converters/prefer-readonly" ;
99
96
import { convertPreferTemplate } from "./converters/prefer-template" ;
100
97
import { convertPromiseFunctionAsync } from "./converters/promise-function-async" ;
101
- import { convertQuotemark } from "./converters/quotemark" ;
102
98
import { convertRadix } from "./converters/radix" ;
103
99
import { convertRestrictPlusOperands } from "./converters/restrict-plus-operands" ;
104
100
import { convertSpaceBeforeFunctionParen } from "./converters/space-before-function-paren" ;
105
101
import { convertSwitchDefault } from "./converters/switch-default" ;
106
- import { convertTripleEquals } from "./converters/triple-equals" ;
107
- import { convertTypeLiteralDelimiter } from "./converters/type-literal-delimiter" ;
108
102
import { convertTypedefWhitespace } from "./converters/typedef-whitespace" ;
103
+ import { convertTypeLiteralDelimiter } from "./converters/type-literal-delimiter" ;
109
104
import { convertTypeofCompare } from "./converters/typeof-compare" ;
110
105
import { convertUnifiedSignatures } from "./converters/unified-signatures" ;
111
106
import { convertUnnecessaryBind } from "./converters/unnecessary-bind" ;
112
107
import { convertUnnecessaryConstructor } from "./converters/unnecessary-constructor" ;
113
108
import { convertUseIsnan } from "./converters/use-isnan" ;
109
+ import { convertQuotemark } from "./converters/quotemark" ;
110
+ import { convertTripleEquals } from "./converters/triple-equals" ;
114
111
115
112
/**
116
113
* Keys TSLint rule names to their ESLint rule converters.
@@ -119,116 +116,113 @@ export const converters = new Map([
119
116
[ "adjacent-overload-signatures" , convertAdjacentOverloadSignatures ] ,
120
117
[ "array-type" , convertArrayType ] ,
121
118
[ "arrow-parens" , convertArrowParens ] ,
122
- [ "arrow-return-shorthand" , convertArrowReturnShorthand ] ,
123
119
[ "await-promise" , convertAwaitPromise ] ,
124
120
[ "ban-comma-operator" , convertBanCommaOperator ] ,
125
121
[ "ban-ts-ignore" , convertBanTsIgnore ] ,
126
122
[ "ban-types" , convertBanTypes ] ,
127
123
[ "binary-expression-operand-order" , convertBinaryExpressionOperandOrder ] ,
128
124
[ "callable-types" , convertCallableTypes ] ,
129
125
[ "class-name" , convertClassName ] ,
130
- [ "curly" , convertCurly ] ,
131
- [ "cyclomatic-complexity" , convertCyclomaticComplexity ] ,
132
126
[ "eofline" , convertEofline ] ,
133
- [ "file-name-casing" , convertFileNameCasing ] ,
134
127
[ "forin" , convertForin ] ,
135
128
[ "function-constructor" , convertFunctionConstructor ] ,
136
- [ "increment-decrement" , convertIncrementDecrement ] ,
137
129
[ "indent" , convertIndent ] ,
138
130
[ "interface-name" , convertInterfaceName ] ,
139
131
[ "interface-over-type-literal" , convertInterfaceOverTypeLiteral ] ,
140
132
[ "label-position" , convertLabelPosition ] ,
141
- [ "linebreak-style" , convertLinebreakStyle ] ,
142
- [ "max-classes-per-file" , convertMaxClassesPerFile ] ,
143
- [ "max-file-line-count" , convertMaxFileLineCount ] ,
144
- [ "max-line-length" , convertMaxLineLength ] ,
145
133
[ "member-access" , convertMemberAccess ] ,
146
134
[ "member-ordering" , convertMemberOrdering ] ,
147
135
[ "new-parens" , convertNewParens ] ,
148
- [ "newline-before-return" , convertNewlineBeforeReturn ] ,
149
136
[ "newline-per-chained-call" , convertNewlinePerChainedCall ] ,
150
137
[ "no-angle-bracket-type-assertion" , convertNoAngleBracketTypeAssertion ] ,
151
138
[ "no-any" , convertNoExplicitAny ] ,
152
139
[ "no-arg" , convertNoArg ] ,
153
140
[ "no-async-without-await" , convertNoAsyncWithoutAwait ] ,
154
- [ "no-banned-terms" , convertNoBannedTerms ] ,
155
141
[ "no-bitwise" , convertNoBitwise ] ,
156
142
[ "no-conditional-assignment" , convertNoConditionalAssignment ] ,
157
- [ "no-consecutive-blank-lines" , convertNoConsecutiveBlankLines ] ,
158
- [ "no-console" , convertNoConsole ] ,
159
- [ "no-constant-condition" , convertNoConstantCondition ] ,
160
143
[ "no-construct" , convertNoConstruct ] ,
161
- [ "no-control-regex" , convertNoControlRegex ] ,
162
144
[ "no-debugger" , convertNoDebugger ] ,
163
- [ "no-duplicate-imports" , convertNoDuplicateImports ] ,
164
145
[ "no-duplicate-super" , convertNoDuplicateSuper ] ,
165
146
[ "no-duplicate-switch-case" , convertNoDuplicateSwitchCase ] ,
166
147
[ "no-empty-interface" , convertNoEmptyInterface ] ,
167
- [ "no-empty" , convertNoEmpty ] ,
168
148
[ "no-eval" , convertNoEval ] ,
169
149
[ "no-floating-promises" , convertNoFloatingPromises ] ,
170
- [ "no-for-in-array" , convertNoForInArray ] ,
171
150
[ "no-for-in" , convertNoForIn ] ,
151
+ [ "no-for-in-array" , convertNoForInArray ] ,
172
152
[ "no-inferrable-types" , convertNoInferrableTypes ] ,
173
153
[ "no-internal-module" , convertNoInternalModule ] ,
174
- [ "no-invalid-regexp" , convertNoInvalidRegexp ] ,
175
- [ "no-invalid-template-strings" , convertNoInvalidTemplateStrings ] ,
176
- [ "no-invalid-this" , convertNoInvalidThis ] ,
177
154
[ "no-irregular-whitespace" , convertNoIrregularWhitespace ] ,
178
- [ "no-magic-numbers" , convertNoMagicNumbers ] ,
179
155
[ "no-misused-new" , convertNoMisusedNew ] ,
180
- [ "no-multiline-string" , convertNoMultilineString ] ,
181
156
[ "no-namespace" , convertNoNamespace ] ,
182
157
[ "no-non-null-assertion" , convertNoNonNullAssertion ] ,
183
158
[ "no-object-literal-type-assertion" , convertNoObjectLiteralTypeAssertion ] ,
184
- [ "no-octal-literal" , convertNoOctalLiteral ] ,
185
159
[ "no-parameter-properties" , convertNoParameterProperties ] ,
186
160
[ "no-parameter-reassignment" , convertNoParameterReassignment ] ,
187
161
[ "no-reference" , convertNoReference ] ,
188
- [ "no-regex-spaces" , convertNoRegexSpaces ] ,
189
162
[ "no-require-imports" , convertNoRequireImports ] ,
190
163
[ "no-return-await" , convertNoReturnAwait ] ,
191
164
[ "no-sparse-arrays" , convertNoSparseArrays ] ,
192
165
[ "no-string-literal" , convertNoStringLiteral ] ,
193
166
[ "no-string-throw" , convertNoStringThrow ] ,
194
167
[ "no-switch-case-fall-through" , convertNoSwitchCaseFallThrough ] ,
195
- [ "no-this-assignment" , convertNoThisAssignment ] ,
196
168
[ "no-trailing-whitespace" , convertNoTrailingWhitespace ] ,
169
+ [ "no-this-assignment" , convertNoThisAssignment ] ,
197
170
[ "no-unbound-method" , convertNoUnboundMethod ] ,
198
171
[ "no-unnecessary-class" , convertNoUnnecessaryClass ] ,
199
172
[ "no-unnecessary-initializer" , convertNoUnnecessaryInitializer ] ,
200
173
[ "no-unnecessary-qualifier" , convertNoUnnecessaryQualifier ] ,
201
- [ "no-unnecessary-semicolons" , convertNoUnnecessarySemicolons ] ,
202
174
[ "no-unnecessary-type-assertion" , convertNoUnnecessaryTypeAssertion ] ,
203
175
[ "no-unsafe-finally" , convertNoUnsafeFinally ] ,
204
176
[ "no-use-before-declare" , convertNoUseBeforeDeclare ] ,
205
177
[ "no-var-keyword" , convertNoVarKeyword ] ,
206
178
[ "no-var-requires" , convertNoVarRequires ] ,
207
179
[ "no-void-expression" , convertNoVoidExpression ] ,
208
- [ "object-literal-key-quotes" , convertObjectLiteralKeyQuotes ] ,
209
- [ "object-literal-shorthand" , convertObjectLiteralShorthand ] ,
210
- [ "one-variable-per-declaration" , convertOneVariablePerDeclaration ] ,
211
- [ "only-arrow-functions" , convertOnlyArrowFunctions ] ,
212
- [ "prefer-const" , convertPreferConst ] ,
213
180
[ "prefer-for-of" , convertPreferForOf ] ,
214
- [ "prefer-function-over-method" , convertPreferFunctionOverMethod ] ,
215
181
[ "prefer-object-spread" , convertPreferObjectSpread ] ,
216
- [ "prefer-readonly" , convertPreferReadonly ] ,
217
- [ "prefer-template" , convertPreferTemplate ] ,
218
182
[ "promise-function-async" , convertPromiseFunctionAsync ] ,
219
- [ "quotemark" , convertQuotemark ] ,
220
183
[ "radix" , convertRadix ] ,
221
184
[ "restrict-plus-operands" , convertRestrictPlusOperands ] ,
222
- [ "space-before-function-paren" , convertSpaceBeforeFunctionParen ] ,
223
- [ "switch-default" , convertSwitchDefault ] ,
224
- [ "triple-equals" , convertTripleEquals ] ,
225
185
[ "type-literal-delimiter" , convertTypeLiteralDelimiter ] ,
226
186
[ "typedef-whitespace" , convertTypedefWhitespace ] ,
227
187
[ "typeof-compare" , convertTypeofCompare ] ,
228
188
[ "unified-signatures" , convertUnifiedSignatures ] ,
229
189
[ "unnecessary-bind" , convertUnnecessaryBind ] ,
230
190
[ "unnecessary-constructor" , convertUnnecessaryConstructor ] ,
231
191
[ "use-isnan" , convertUseIsnan ] ,
192
+ [ "arrow-return-shorthand" , convertArrowReturnShorthand ] ,
193
+ [ "curly" , convertCurly ] ,
194
+ [ "cyclomatic-complexity" , convertCyclomaticComplexity ] ,
195
+ [ "increment-decrement" , convertIncrementDecrement ] ,
196
+ [ "linebreak-style" , convertLinebreakStyle ] ,
197
+ [ "max-classes-per-file" , convertMaxClassesPerFile ] ,
198
+ [ "max-file-line-count" , convertMaxFileLineCount ] ,
199
+ [ "max-line-length" , convertMaxLineLength ] ,
200
+ [ "no-consecutive-blank-lines" , convertNoConsecutiveBlankLines ] ,
201
+ [ "no-console" , convertNoConsole ] ,
202
+ [ "no-empty" , convertNoEmpty ] ,
203
+ [ "no-invalid-template-strings" , convertNoInvalidTemplateStrings ] ,
204
+ [ "no-invalid-this" , convertNoInvalidThis ] ,
205
+ [ "no-magic-numbers" , convertNoMagicNumbers ] ,
206
+ [ "object-literal-key-quotes" , convertObjectLiteralKeyQuotes ] ,
207
+ [ "object-literal-shorthand" , convertObjectLiteralShorthand ] ,
208
+ [ "one-variable-per-declaration" , convertOneVariablePerDeclaration ] ,
209
+ [ "only-arrow-functions" , convertOnlyArrowFunctions ] ,
210
+ [ "prefer-const" , convertPreferConst ] ,
211
+ [ "prefer-function-over-method" , convertPreferFunctionOverMethod ] ,
212
+ [ "prefer-readonly" , convertPreferReadonly ] ,
213
+ [ "prefer-template" , convertPreferTemplate ] ,
214
+ [ "space-before-function-paren" , convertSpaceBeforeFunctionParen ] ,
215
+ [ "switch-default" , convertSwitchDefault ] ,
216
+ [ "no-banned-terms" , convertNoBannedTerms ] ,
217
+ [ "no-constant-condition" , convertNoConstantCondition ] ,
218
+ [ "no-control-regex" , convertNoControlRegex ] ,
219
+ [ "no-multiline-string" , convertNoMultilineString ] ,
220
+ [ "no-invalid-regexp" , convertNoInvalidRegexp ] ,
221
+ [ "no-octal-literal" , convertNoOctalLiteral ] ,
222
+ [ "no-regex-spaces" , convertNoRegexSpaces ] ,
223
+ [ "no-unnecessary-semicolons" , convertNoUnnecessarySemicolons ] ,
224
+ [ "quotemark" , convertQuotemark ] ,
225
+ [ "triple-equals" , convertTripleEquals ] ,
232
226
233
227
// These converters are all for rules that need more complex option conversions.
234
228
// Some of them will likely need to have notices about changed lint behaviors...
@@ -238,9 +232,12 @@ export const converters = new Map([
238
232
// TSLint core rules:
239
233
// ["ban", convertBan], // no-restricted-properties
240
234
// ["import-blacklist", convertImportBlacklist], // no-restricted-imports
235
+ // ["newline-before-return", convertNewlineBeforeReturn],
241
236
// ["no-duplicate-variable", convertNoDuplicateVariable], // no-redeclare
242
237
// ["no-shadowed-variable", convertNoShadowedVariable], // no-shadow
238
+ // ["no-trailing-whitespace", convertNoTrailingWhitespace], // no-trailing-spaces
243
239
// ["no-unused-expression", convertNoUnusedExpression], // no-unused-expressions
240
+ // ["no-void-expression", convertNoVoidExpression], // (no exact equivalent)
244
241
// ["space-within-parens", convertSpaceWithinParens], // space-in-parens
245
242
// ["variable-name", convertVariableName], // a bunch of rules...
246
243
0 commit comments