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