xo 0.50.0 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/cli.js +1 -1
  2. package/index.js +7 -2
  3. package/lib/report.js +3 -1
  4. package/node_modules/@typescript-eslint/eslint-plugin/README.md +1 -145
  5. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +1 -0
  6. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
  7. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +1 -0
  8. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
  9. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +87 -0
  10. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -0
  11. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +1 -1
  12. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js.map +1 -1
  13. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +2 -0
  14. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
  15. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +1 -1
  16. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map +1 -1
  17. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +9 -1
  18. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -1
  19. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +38 -8
  20. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
  21. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +4 -3
  22. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -1
  23. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js +16 -30
  24. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js.map +1 -1
  25. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +3 -138
  26. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +0 -4
  27. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +0 -4
  28. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +0 -4
  29. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +31 -8
  30. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +0 -4
  31. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +1 -1
  32. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +82 -0
  33. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +0 -5
  34. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +0 -4
  35. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +0 -4
  36. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +3 -4
  37. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +0 -4
  38. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +0 -4
  39. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +0 -4
  40. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +0 -4
  41. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +0 -4
  42. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +0 -4
  43. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +0 -1
  44. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +0 -6
  45. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +0 -4
  46. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +0 -4
  47. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +0 -4
  48. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +0 -4
  49. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +0 -4
  50. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +0 -4
  51. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +0 -4
  52. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +18 -24
  53. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +0 -4
  54. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +0 -4
  55. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +0 -4
  56. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +0 -4
  57. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +0 -4
  58. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +0 -1
  59. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +0 -1
  60. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +0 -1
  61. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +0 -1
  62. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +0 -1
  63. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +0 -4
  64. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +0 -4
  65. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +0 -4
  66. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +0 -4
  67. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +0 -4
  68. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +2 -2
  69. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +0 -4
  70. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +0 -4
  71. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +0 -4
  72. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +0 -1
  73. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +0 -5
  74. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +0 -4
  75. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +1 -5
  76. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +0 -4
  77. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +0 -4
  78. package/node_modules/@typescript-eslint/eslint-plugin/package.json +5 -5
  79. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +4 -0
  80. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +20 -0
  81. package/node_modules/@typescript-eslint/parser/package.json +6 -5
  82. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
  83. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +6 -4
  84. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
  85. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map +1 -1
  86. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +13 -7
  87. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
  88. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  89. package/node_modules/@typescript-eslint/type-utils/package.json +4 -4
  90. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +1732 -0
  91. package/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +5 -0
  92. package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +3 -0
  93. package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +35 -0
  94. package/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +9 -0
  95. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +21 -19
  96. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  97. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
  98. package/node_modules/@typescript-eslint/types/package.json +3 -2
  99. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +9 -0
  100. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +11 -0
  101. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +157 -0
  102. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +13 -0
  103. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +12 -0
  104. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +9 -0
  105. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +11 -0
  106. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +5 -0
  107. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +19 -0
  108. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +5 -0
  109. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +22 -0
  110. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +13 -0
  111. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +10 -0
  112. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +2 -0
  113. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +230 -0
  114. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +188 -0
  115. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +25 -0
  116. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +13 -0
  117. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +9 -0
  118. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +175 -0
  119. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +4 -0
  120. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +18 -0
  121. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +3 -0
  122. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
  123. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +7 -0
  124. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  125. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts +3 -0
  126. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
  127. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +21 -1
  128. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
  129. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +1 -1
  130. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
  131. package/node_modules/@typescript-eslint/typescript-estree/package.json +6 -5
  132. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +1 -1
  133. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +1 -1
  134. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +1 -1
  135. package/node_modules/@typescript-eslint/utils/package.json +5 -5
  136. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +4 -0
  137. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +3 -0
  138. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +6 -0
  139. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +1 -1
  140. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
  141. package/node_modules/@typescript-eslint/visitor-keys/package.json +4 -3
  142. package/package.json +1 -1
@@ -65,7 +65,8 @@ exports.default = util.createRule({
65
65
  },
66
66
  ],
67
67
  messages: {
68
- noShadow: "'{{name}}' is already declared in the upper scope.",
68
+ noShadow: "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",
69
+ noShadowGlobal: "'{{name}}' is already a global variable.",
69
70
  },
70
71
  },
71
72
  defaultOptions: [
@@ -385,6 +386,26 @@ exports.default = util.createRule({
385
386
  !outerDef ||
386
387
  outerDef.node.type !== utils_1.AST_NODE_TYPES.FunctionDeclaration));
387
388
  }
389
+ /**
390
+ * Get declared line and column of a variable.
391
+ * @param variable The variable to get.
392
+ * @returns The declared line and column of the variable.
393
+ */
394
+ function getDeclaredLocation(variable) {
395
+ const identifier = variable.identifiers[0];
396
+ if (identifier) {
397
+ return {
398
+ global: false,
399
+ line: identifier.loc.start.line,
400
+ column: identifier.loc.start.column + 1,
401
+ };
402
+ }
403
+ else {
404
+ return {
405
+ global: true,
406
+ };
407
+ }
408
+ }
388
409
  /**
389
410
  * Checks the current context for shadowed variables.
390
411
  * @param {Scope} scope Fixme
@@ -447,13 +468,22 @@ exports.default = util.createRule({
447
468
  !(options.ignoreOnInitialization &&
448
469
  isInitPatternNode(variable, shadowed)) &&
449
470
  !(options.hoist !== 'all' && isInTdz(variable, shadowed))) {
450
- context.report({
451
- node: variable.identifiers[0],
452
- messageId: 'noShadow',
453
- data: {
454
- name: variable.name,
455
- },
456
- });
471
+ const location = getDeclaredLocation(shadowed);
472
+ context.report(Object.assign({ node: variable.identifiers[0] }, (location.global
473
+ ? {
474
+ messageId: 'noShadowGlobal',
475
+ data: {
476
+ name: variable.name,
477
+ },
478
+ }
479
+ : {
480
+ messageId: 'noShadow',
481
+ data: {
482
+ name: variable.name,
483
+ shadowedLine: location.line,
484
+ shadowedColumn: location.column,
485
+ },
486
+ })));
457
487
  }
458
488
  }
459
489
  }
@@ -1 +1 @@
1
- {"version":3,"file":"no-shadow.js","sourceRoot":"","sources":["../../src/rules/no-shadow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAKkC;AAClC,oEAK0C;AAC1C,8CAAgC;AAchC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,qFAAqF;YACvF,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,cAAc,EAAE;wBACd,IAAI,EAA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AK,EAAE,CAAC;gBAE9C,OAAO,KAAK,CAAC,MAAM,EAAE;oBACnB,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;oBAE3B,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;oBACjC,eAAe,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -329,10 +329,11 @@ exports.default = util.createRule({
329
329
  for (const unusedVar of unusedVars) {
330
330
  // Report the first declaration.
331
331
  if (unusedVar.defs.length > 0) {
332
+ const writeReferences = unusedVar.references.filter(ref => ref.isWrite() &&
333
+ ref.from.variableScope === unusedVar.scope.variableScope);
332
334
  context.report({
333
- node: unusedVar.references.length
334
- ? unusedVar.references[unusedVar.references.length - 1]
335
- .identifier
335
+ node: writeReferences.length
336
+ ? writeReferences[writeReferences.length - 1].identifier
336
337
  : unusedVar.identifiers[0],
337
338
  messageId: 'unusedVar',
338
339
  data: unusedVar.references.some(ref => ref.isWrite())
@@ -1 +1 @@
1
- {"version":3,"file":"no-unused-vars.js","sourceRoot":"","sources":["../../src/rules/no-unused-vars.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA8E;AAC9E,oEAAkE;AAClE,8CAAgC;AA6BhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,2BAA2B;YACxC,WAAW,EAAE,MAAM;YACnB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE;YACN;gBACE,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;qBACvB;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,IAAI,EAAE;gCACJ,IAAI,EAAE,CAAC,KA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AAI,mBAAmB,IAAI,KAAK,CAAC,KAAK,EAAE;gBAC7C,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;aACrB;YAED,KAAK,MAAM,EAAE,IAAI,WAAW,EAAE;gBAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;gBACxC,IAAI,QAAQ,EAAE;oBACZ,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;iBAC5B;aACF;QACH,CAAC;QAED,SAAS,YAAY,CACnB,IAAmB,EACnB,EAAuC;YAEvC,MAAM,OAAO,GAAG,IAAI,8BAAc,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACjD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCE"}
@@ -52,10 +52,9 @@ exports.default = util.createRule({
52
52
  create(context) {
53
53
  const rules = baseRule.create(context);
54
54
  const sourceCode = context.getSourceCode();
55
- const report = (node, operator) => {
55
+ function report(operator) {
56
56
  context.report({
57
- node: node,
58
- loc: operator.loc,
57
+ node: operator,
59
58
  messageId: 'missingSpace',
60
59
  data: {
61
60
  operator: operator.value,
@@ -74,13 +73,12 @@ exports.default = util.createRule({
74
73
  return fixer.replaceText(operator, fixString);
75
74
  },
76
75
  });
77
- };
76
+ }
78
77
  function isSpaceChar(token) {
79
- return (token.type === utils_1.AST_TOKEN_TYPES.Punctuator &&
80
- /^[=|?|:]$/.test(token.value));
78
+ return (token.type === utils_1.AST_TOKEN_TYPES.Punctuator && /^[=?:]$/.test(token.value));
81
79
  }
82
- function checkAndReportAssignmentSpace(node, leftNode, rightNode) {
83
- if (!rightNode) {
80
+ function checkAndReportAssignmentSpace(leftNode, rightNode) {
81
+ if (!rightNode || !leftNode) {
84
82
  return;
85
83
  }
86
84
  const operator = sourceCode.getFirstTokenBetween(leftNode, rightNode, isSpaceChar);
@@ -88,7 +86,7 @@ exports.default = util.createRule({
88
86
  const next = sourceCode.getTokenAfter(operator);
89
87
  if (!sourceCode.isSpaceBetween(prev, operator) ||
90
88
  !sourceCode.isSpaceBetween(operator, next)) {
91
- report(node, operator);
89
+ report(operator);
92
90
  }
93
91
  }
94
92
  /**
@@ -96,12 +94,7 @@ exports.default = util.createRule({
96
94
  * @param node The node to report
97
95
  */
98
96
  function checkForEnumAssignmentSpace(node) {
99
- if (!node.initializer) {
100
- return;
101
- }
102
- const leftNode = sourceCode.getTokenByRangeStart(node.id.range[0]);
103
- const rightNode = sourceCode.getTokenByRangeStart(node.initializer.range[0]);
104
- checkAndReportAssignmentSpace(node, leftNode, rightNode);
97
+ checkAndReportAssignmentSpace(node.id, node.initializer);
105
98
  }
106
99
  /**
107
100
  * Check if it has an assignment char and report if it's faulty
@@ -109,11 +102,10 @@ exports.default = util.createRule({
109
102
  */
110
103
  function checkForPropertyDefinitionAssignmentSpace(node) {
111
104
  var _a;
112
- const leftNode = sourceCode.getLastToken((_a = node.typeAnnotation) !== null && _a !== void 0 ? _a : node.key);
113
- const rightNode = node.value
114
- ? sourceCode.getTokenByRangeStart(node.value.range[0])
115
- : undefined;
116
- checkAndReportAssignmentSpace(node, leftNode, rightNode);
105
+ const leftNode = node.optional && !node.typeAnnotation
106
+ ? sourceCode.getTokenAfter(node.key)
107
+ : (_a = node.typeAnnotation) !== null && _a !== void 0 ? _a : node.key;
108
+ checkAndReportAssignmentSpace(leftNode, node.value);
117
109
  }
118
110
  /**
119
111
  * Check if it is missing spaces between type annotations chaining
@@ -131,7 +123,7 @@ exports.default = util.createRule({
131
123
  const next = sourceCode.getTokenAfter(operator);
132
124
  if (!sourceCode.isSpaceBetween(prev, operator) ||
133
125
  !sourceCode.isSpaceBetween(operator, next)) {
134
- report(typeAnnotation, operator);
126
+ report(operator);
135
127
  }
136
128
  }
137
129
  });
@@ -142,17 +134,11 @@ exports.default = util.createRule({
142
134
  */
143
135
  function checkForTypeAliasAssignment(node) {
144
136
  var _a;
145
- const leftNode = sourceCode.getLastToken((_a = node.typeParameters) !== null && _a !== void 0 ? _a : node.id);
146
- const rightNode = sourceCode.getFirstToken(node.typeAnnotation);
147
- checkAndReportAssignmentSpace(node, leftNode, rightNode);
137
+ checkAndReportAssignmentSpace((_a = node.typeParameters) !== null && _a !== void 0 ? _a : node.id, node.typeAnnotation);
148
138
  }
149
139
  function checkForTypeConditional(node) {
150
- const extendsLastToken = sourceCode.getLastToken(node.extendsType);
151
- const trueFirstToken = sourceCode.getFirstToken(node.trueType);
152
- const trueLastToken = sourceCode.getLastToken(node.trueType);
153
- const falseFirstToken = sourceCode.getFirstToken(node.falseType);
154
- checkAndReportAssignmentSpace(node, extendsLastToken, trueFirstToken);
155
- checkAndReportAssignmentSpace(node, trueLastToken, falseFirstToken);
140
+ checkAndReportAssignmentSpace(node.extendsType, node.trueType);
141
+ checkAndReportAssignmentSpace(node.trueType, node.falseType);
156
142
  }
157
143
  return Object.assign(Object.assign({}, rules), { TSEnumMember: checkForEnumAssignmentSpace, PropertyDefinition: checkForPropertyDefinitionAssignmentSpace, TSTypeAliasDeclaration: checkForTypeAliasAssignment, TSUnionType: checkForTypeAnnotationSpace, TSIntersectionType: checkForTypeAnnotationSpace, TSConditionalType: checkForTypeConditional });
158
144
  },
@@ -1 +1 @@
1
- {"version":3,"file":"space-infix-ops.js","sourceRoot":"","sources":["../../src/rules/space-infix-ops.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqE;AACrE,iEAA8D;AAC9D,8CAAgC;AAEhC,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,iBAAiB,CAAC,CAAC;AAKtD,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1B,k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e,CAAC,QAAQ,EAAE,IAAK,CAAC,EAC5C;wBACA,MAAM,CAAC,QAAQ,CAAC,CAAC;qBAClB;iBACF;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED;;;WAGG;QACH,SAAS,2BAA2B,CAClC,IAAqC;;YAErC,6BAA6B,CAC3B,MAAA,IAAI,CAAC,cAAc,mCAAI,IAAI,CAAC,EAAE,EAC9B,IAAI,CAAC,cAAc,CACpB,CAAC;QACJ,CAAC;QAED,SAAS,uBAAuB,CAAC,IAAgC;YAC/D,6BAA6B,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC/D,6BAA6B,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/D,CAAC;QAED,uCACK,KAAK,KACR,YAAY,EAAE,2BAA2B,EACzC,kBAAkB,EAAE,yCAAyC,EAC7D,sBAAsB,EAAE,2BAA2B,EACnD,WAAW,EAAE,2BAA2B,EACxC,kBAAkB,EAAE,2BAA2B,EAC/C,iBAAiB,EAAE,uBAAuB,IAC1C;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -11,148 +11,13 @@ See [Configs](/docs/linting/configs) for how to enable recommended rules using c
11
11
 
12
12
  ## Supported Rules
13
13
 
14
- <!-- begin base rule list -->
14
+ import RulesTable from "@site/src/components/RulesTable";
15
15
 
16
- **Key**: :white_check_mark: = recommended, :lock: = strict, :wrench: = fixable, :thought_balloon: = requires type information
17
-
18
- | Name | Description | :white_check_mark::lock: | :wrench: | :thought_balloon: |
19
- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------ | -------- | ----------------- |
20
- | [`@typescript-eslint/adjacent-overload-signatures`](./adjacent-overload-signatures.md) | Require that member overloads be consecutive | :white_check_mark: | | |
21
- | [`@typescript-eslint/array-type`](./array-type.md) | Require using either `T[]` or `Array<T>` for arrays | :lock: | :wrench: | |
22
- | [`@typescript-eslint/await-thenable`](./await-thenable.md) | Disallow awaiting a value that is not a Thenable | :white_check_mark: | | :thought_balloon: |
23
- | [`@typescript-eslint/ban-ts-comment`](./ban-ts-comment.md) | Disallow `@ts-<directive>` comments or require descriptions after directive | :white_check_mark: | | |
24
- | [`@typescript-eslint/ban-tslint-comment`](./ban-tslint-comment.md) | Disallow `// tslint:<rule-flag>` comments | :lock: | :wrench: | |
25
- | [`@typescript-eslint/ban-types`](./ban-types.md) | Disallow certain types | :white_check_mark: | :wrench: | |
26
- | [`@typescript-eslint/class-literal-property-style`](./class-literal-property-style.md) | Enforce that literals on classes are exposed in a consistent style | :lock: | :wrench: | |
27
- | [`@typescript-eslint/consistent-indexed-object-style`](./consistent-indexed-object-style.md) | Require or disallow the `Record` type | :lock: | :wrench: | |
28
- | [`@typescript-eslint/consistent-type-assertions`](./consistent-type-assertions.md) | Enforce consistent usage of type assertions | :lock: | | |
29
- | [`@typescript-eslint/consistent-type-definitions`](./consistent-type-definitions.md) | Enforce type definitions to consistently use either `interface` or `type` | :lock: | :wrench: | |
30
- | [`@typescript-eslint/consistent-type-exports`](./consistent-type-exports.md) | Enforce consistent usage of type exports | | :wrench: | :thought_balloon: |
31
- | [`@typescript-eslint/consistent-type-imports`](./consistent-type-imports.md) | Enforce consistent usage of type imports | | :wrench: | |
32
- | [`@typescript-eslint/explicit-function-return-type`](./explicit-function-return-type.md) | Require explicit return types on functions and class methods | | | |
33
- | [`@typescript-eslint/explicit-member-accessibility`](./explicit-member-accessibility.md) | Require explicit accessibility modifiers on class properties and methods | | :wrench: | |
34
- | [`@typescript-eslint/explicit-module-boundary-types`](./explicit-module-boundary-types.md) | Require explicit return and argument types on exported functions' and classes' public class methods | | | |
35
- | [`@typescript-eslint/member-delimiter-style`](./member-delimiter-style.md) | Require a specific member delimiter style for interfaces and type literals | | :wrench: | |
36
- | [`@typescript-eslint/member-ordering`](./member-ordering.md) | Require a consistent member declaration order | | | |
37
- | [`@typescript-eslint/method-signature-style`](./method-signature-style.md) | Enforce using a particular method signature syntax | | :wrench: | |
38
- | [`@typescript-eslint/naming-convention`](./naming-convention.md) | Enforce naming conventions for everything across a codebase | | | :thought_balloon: |
39
- | [`@typescript-eslint/no-base-to-string`](./no-base-to-string.md) | Require `.toString()` to only be called on objects which provide useful information when stringified | :lock: | | :thought_balloon: |
40
- | [`@typescript-eslint/no-confusing-non-null-assertion`](./no-confusing-non-null-assertion.md) | Disallow non-null assertion in locations that may be confusing | :lock: | :wrench: | |
41
- | [`@typescript-eslint/no-confusing-void-expression`](./no-confusing-void-expression.md) | Require expressions of type void to appear in statement position | | :wrench: | :thought_balloon: |
42
- | [`@typescript-eslint/no-duplicate-enum-values`](./no-duplicate-enum-values.md) | Disallow duplicate enum member values | :lock: | | |
43
- | [`@typescript-eslint/no-dynamic-delete`](./no-dynamic-delete.md) | Disallow using the `delete` operator on computed key expressions | :lock: | :wrench: | |
44
- | [`@typescript-eslint/no-empty-interface`](./no-empty-interface.md) | Disallow the declaration of empty interfaces | :white_check_mark: | :wrench: | |
45
- | [`@typescript-eslint/no-explicit-any`](./no-explicit-any.md) | Disallow the `any` type | :white_check_mark: | :wrench: | |
46
- | [`@typescript-eslint/no-extra-non-null-assertion`](./no-extra-non-null-assertion.md) | Disallow extra non-null assertion | :white_check_mark: | :wrench: | |
47
- | [`@typescript-eslint/no-extraneous-class`](./no-extraneous-class.md) | Disallow classes used as namespaces | :lock: | | |
48
- | [`@typescript-eslint/no-floating-promises`](./no-floating-promises.md) | Require Promise-like statements to be handled appropriately | :white_check_mark: | | :thought_balloon: |
49
- | [`@typescript-eslint/no-for-in-array`](./no-for-in-array.md) | Disallow iterating over an array with a for-in loop | :white_check_mark: | | :thought_balloon: |
50
- | [`@typescript-eslint/no-inferrable-types`](./no-inferrable-types.md) | Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean | :white_check_mark: | :wrench: | |
51
- | [`@typescript-eslint/no-invalid-void-type`](./no-invalid-void-type.md) | Disallow `void` type outside of generic or return types | :lock: | | |
52
- | [`@typescript-eslint/no-meaningless-void-operator`](./no-meaningless-void-operator.md) | Disallow the `void` operator except when used to discard a value | :lock: | :wrench: | :thought_balloon: |
53
- | [`@typescript-eslint/no-misused-new`](./no-misused-new.md) | Enforce valid definition of `new` and `constructor` | :white_check_mark: | | |
54
- | [`@typescript-eslint/no-misused-promises`](./no-misused-promises.md) | Disallow Promises in places not designed to handle them | :white_check_mark: | | :thought_balloon: |
55
- | [`@typescript-eslint/no-namespace`](./no-namespace.md) | Disallow custom TypeScript modules and namespaces | :white_check_mark: | | |
56
- | [`@typescript-eslint/no-non-null-asserted-nullish-coalescing`](./no-non-null-asserted-nullish-coalescing.md) | Disallow non-null assertions in the left operand of a nullish coalescing operator | :lock: | | |
57
- | [`@typescript-eslint/no-non-null-asserted-optional-chain`](./no-non-null-asserted-optional-chain.md) | Disallow non-null assertions after an optional chain expression | :white_check_mark: | | |
58
- | [`@typescript-eslint/no-non-null-assertion`](./no-non-null-assertion.md) | Disallow non-null assertions using the `!` postfix operator | :white_check_mark: | | |
59
- | [`@typescript-eslint/no-redundant-type-constituents`](./no-redundant-type-constituents.md) | Disallow members of unions and intersections that do nothing or override type information | | | :thought_balloon: |
60
- | [`@typescript-eslint/no-require-imports`](./no-require-imports.md) | Disallow invocation of `require()` | | | |
61
- | [`@typescript-eslint/no-this-alias`](./no-this-alias.md) | Disallow aliasing `this` | :white_check_mark: | | |
62
- | [`@typescript-eslint/no-type-alias`](./no-type-alias.md) | Disallow type aliases | | | |
63
- | [`@typescript-eslint/no-unnecessary-boolean-literal-compare`](./no-unnecessary-boolean-literal-compare.md) | Disallow unnecessary equality comparisons against boolean literals | :lock: | :wrench: | :thought_balloon: |
64
- | [`@typescript-eslint/no-unnecessary-condition`](./no-unnecessary-condition.md) | Disallow conditionals where the type is always truthy or always falsy | :lock: | :wrench: | :thought_balloon: |
65
- | [`@typescript-eslint/no-unnecessary-qualifier`](./no-unnecessary-qualifier.md) | Disallow unnecessary namespace qualifiers | | :wrench: | :thought_balloon: |
66
- | [`@typescript-eslint/no-unnecessary-type-arguments`](./no-unnecessary-type-arguments.md) | Disallow type arguments that are equal to the default | :lock: | :wrench: | :thought_balloon: |
67
- | [`@typescript-eslint/no-unnecessary-type-assertion`](./no-unnecessary-type-assertion.md) | Disallow type assertions that do not change the type of an expression | :white_check_mark: | :wrench: | :thought_balloon: |
68
- | [`@typescript-eslint/no-unnecessary-type-constraint`](./no-unnecessary-type-constraint.md) | Disallow unnecessary constraints on generic types | :white_check_mark: | | |
69
- | [`@typescript-eslint/no-unsafe-argument`](./no-unsafe-argument.md) | Disallow calling a function with a value with type `any` | :white_check_mark: | | :thought_balloon: |
70
- | [`@typescript-eslint/no-unsafe-assignment`](./no-unsafe-assignment.md) | Disallow assigning a value with type `any` to variables and properties | :white_check_mark: | | :thought_balloon: |
71
- | [`@typescript-eslint/no-unsafe-call`](./no-unsafe-call.md) | Disallow calling a value with type `any` | :white_check_mark: | | :thought_balloon: |
72
- | [`@typescript-eslint/no-unsafe-member-access`](./no-unsafe-member-access.md) | Disallow member access on a value with type `any` | :white_check_mark: | | :thought_balloon: |
73
- | [`@typescript-eslint/no-unsafe-return`](./no-unsafe-return.md) | Disallow returning a value with type `any` from a function | :white_check_mark: | | :thought_balloon: |
74
- | [`@typescript-eslint/no-useless-empty-export`](./no-useless-empty-export.md) | Disallow empty exports that don't change anything in a module file | | :wrench: | |
75
- | [`@typescript-eslint/no-var-requires`](./no-var-requires.md) | Disallow `require` statements except in import statements | :white_check_mark: | | |
76
- | [`@typescript-eslint/non-nullable-type-assertion-style`](./non-nullable-type-assertion-style.md) | Enforce non-null assertions over explicit type casts | :lock: | :wrench: | :thought_balloon: |
77
- | [`@typescript-eslint/parameter-properties`](./parameter-properties.md) | Require or disallow parameter properties in class constructors | | | |
78
- | [`@typescript-eslint/prefer-as-const`](./prefer-as-const.md) | Enforce the use of `as const` over literal type | :white_check_mark: | :wrench: | |
79
- | [`@typescript-eslint/prefer-enum-initializers`](./prefer-enum-initializers.md) | Require each enum member value to be explicitly initialized | | | |
80
- | [`@typescript-eslint/prefer-for-of`](./prefer-for-of.md) | Enforce the use of `for-of` loop over the standard `for` loop where possible | :lock: | | |
81
- | [`@typescript-eslint/prefer-function-type`](./prefer-function-type.md) | Enforce using function types instead of interfaces with call signatures | :lock: | :wrench: | |
82
- | [`@typescript-eslint/prefer-includes`](./prefer-includes.md) | Enforce `includes` method over `indexOf` method | :lock: | :wrench: | :thought_balloon: |
83
- | [`@typescript-eslint/prefer-literal-enum-member`](./prefer-literal-enum-member.md) | Require all enum members to be literal values | :lock: | | |
84
- | [`@typescript-eslint/prefer-namespace-keyword`](./prefer-namespace-keyword.md) | Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules | :white_check_mark: | :wrench: | |
85
- | [`@typescript-eslint/prefer-nullish-coalescing`](./prefer-nullish-coalescing.md) | Enforce using the nullish coalescing operator instead of logical chaining | :lock: | | :thought_balloon: |
86
- | [`@typescript-eslint/prefer-optional-chain`](./prefer-optional-chain.md) | Enforce using concise optional chain expressions instead of chained logical ands | :lock: | | |
87
- | [`@typescript-eslint/prefer-readonly`](./prefer-readonly.md) | Require private members to be marked as `readonly` if they're never modified outside of the constructor | | :wrench: | :thought_balloon: |
88
- | [`@typescript-eslint/prefer-readonly-parameter-types`](./prefer-readonly-parameter-types.md) | Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs | | | :thought_balloon: |
89
- | [`@typescript-eslint/prefer-reduce-type-parameter`](./prefer-reduce-type-parameter.md) | Enforce using type parameter when calling `Array#reduce` instead of casting | :lock: | :wrench: | :thought_balloon: |
90
- | [`@typescript-eslint/prefer-regexp-exec`](./prefer-regexp-exec.md) | Enforce `RegExp#exec` over `String#match` if no global flag is provided | | :wrench: | :thought_balloon: |
91
- | [`@typescript-eslint/prefer-return-this-type`](./prefer-return-this-type.md) | Enforce that `this` is used when only `this` type is returned | :lock: | :wrench: | :thought_balloon: |
92
- | [`@typescript-eslint/prefer-string-starts-ends-with`](./prefer-string-starts-ends-with.md) | Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings | :lock: | :wrench: | :thought_balloon: |
93
- | [`@typescript-eslint/prefer-ts-expect-error`](./prefer-ts-expect-error.md) | Enforce using `@ts-expect-error` over `@ts-ignore` | :lock: | :wrench: | |
94
- | [`@typescript-eslint/promise-function-async`](./promise-function-async.md) | Require any function or method that returns a Promise to be marked async | | :wrench: | :thought_balloon: |
95
- | [`@typescript-eslint/require-array-sort-compare`](./require-array-sort-compare.md) | Require `Array#sort` calls to always provide a `compareFunction` | | | :thought_balloon: |
96
- | [`@typescript-eslint/restrict-plus-operands`](./restrict-plus-operands.md) | Require both operands of addition to have type `number` or `string` | :white_check_mark: | | :thought_balloon: |
97
- | [`@typescript-eslint/restrict-template-expressions`](./restrict-template-expressions.md) | Enforce template literal expressions to be of `string` type | :white_check_mark: | | :thought_balloon: |
98
- | [`@typescript-eslint/sort-type-union-intersection-members`](./sort-type-union-intersection-members.md) | Enforce members of a type union/intersection to be sorted alphabetically | | :wrench: | |
99
- | [`@typescript-eslint/strict-boolean-expressions`](./strict-boolean-expressions.md) | Disallow certain types in boolean expressions | | :wrench: | :thought_balloon: |
100
- | [`@typescript-eslint/switch-exhaustiveness-check`](./switch-exhaustiveness-check.md) | Require switch-case statements to be exhaustive with union type | | | :thought_balloon: |
101
- | [`@typescript-eslint/triple-slash-reference`](./triple-slash-reference.md) | Disallow certain triple slash directives in favor of ES6-style import declarations | :white_check_mark: | | |
102
- | [`@typescript-eslint/type-annotation-spacing`](./type-annotation-spacing.md) | Require consistent spacing around type annotations | | :wrench: | |
103
- | [`@typescript-eslint/typedef`](./typedef.md) | Require type annotations in certain places | | | |
104
- | [`@typescript-eslint/unbound-method`](./unbound-method.md) | Enforce unbound methods are called with their expected scope | :white_check_mark: | | :thought_balloon: |
105
- | [`@typescript-eslint/unified-signatures`](./unified-signatures.md) | Disallow two overloads that could be unified into one with a union or an optional/rest parameter | :lock: | | |
106
-
107
- <!-- end base rule list -->
16
+ <RulesTable />
108
17
 
109
18
  ## Extension Rules
110
19
 
111
20
  In some cases, ESLint provides a rule itself, but it doesn't support TypeScript syntax; either it crashes, or it ignores the syntax, or it falsely reports against it.
112
21
  In these cases, we create what we call an extension rule; a rule within our plugin that has the same functionality, but also supports TypeScript.
113
22
 
114
- <!-- begin extension rule list -->
115
-
116
- **Key**: :white_check_mark: = recommended, :lock: = strict, :wrench: = fixable, :thought_balloon: = requires type information
117
-
118
- | Name | Description | :white_check_mark::lock: | :wrench: | :thought_balloon: |
119
- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------ | -------- | ----------------- |
120
- | [`@typescript-eslint/brace-style`](./brace-style.md) | Enforce consistent brace style for blocks | | :wrench: | |
121
- | [`@typescript-eslint/comma-dangle`](./comma-dangle.md) | Require or disallow trailing commas | | :wrench: | |
122
- | [`@typescript-eslint/comma-spacing`](./comma-spacing.md) | Enforce consistent spacing before and after commas | | :wrench: | |
123
- | [`@typescript-eslint/default-param-last`](./default-param-last.md) | Enforce default parameters to be last | | | |
124
- | [`@typescript-eslint/dot-notation`](./dot-notation.md) | Enforce dot notation whenever possible | :lock: | :wrench: | :thought_balloon: |
125
- | [`@typescript-eslint/func-call-spacing`](./func-call-spacing.md) | Require or disallow spacing between function identifiers and their invocations | | :wrench: | |
126
- | [`@typescript-eslint/indent`](./indent.md) | Enforce consistent indentation | | :wrench: | |
127
- | [`@typescript-eslint/init-declarations`](./init-declarations.md) | Require or disallow initialization in variable declarations | | | |
128
- | [`@typescript-eslint/keyword-spacing`](./keyword-spacing.md) | Enforce consistent spacing before and after keywords | | :wrench: | |
129
- | [`@typescript-eslint/lines-between-class-members`](./lines-between-class-members.md) | Require or disallow an empty line between class members | | :wrench: | |
130
- | [`@typescript-eslint/no-array-constructor`](./no-array-constructor.md) | Disallow generic `Array` constructors | :white_check_mark: | :wrench: | |
131
- | [`@typescript-eslint/no-dupe-class-members`](./no-dupe-class-members.md) | Disallow duplicate class members | | | |
132
- | [`@typescript-eslint/no-empty-function`](./no-empty-function.md) | Disallow empty functions | :white_check_mark: | | |
133
- | [`@typescript-eslint/no-extra-parens`](./no-extra-parens.md) | Disallow unnecessary parentheses | | :wrench: | |
134
- | [`@typescript-eslint/no-extra-semi`](./no-extra-semi.md) | Disallow unnecessary semicolons | :white_check_mark: | :wrench: | |
135
- | [`@typescript-eslint/no-implied-eval`](./no-implied-eval.md) | Disallow the use of `eval()`-like methods | :white_check_mark: | | :thought_balloon: |
136
- | [`@typescript-eslint/no-invalid-this`](./no-invalid-this.md) | Disallow `this` keywords outside of classes or class-like objects | | | |
137
- | [`@typescript-eslint/no-loop-func`](./no-loop-func.md) | Disallow function declarations that contain unsafe references inside loop statements | | | |
138
- | [`@typescript-eslint/no-loss-of-precision`](./no-loss-of-precision.md) | Disallow literal numbers that lose precision | :white_check_mark: | | |
139
- | [`@typescript-eslint/no-magic-numbers`](./no-magic-numbers.md) | Disallow magic numbers | | | |
140
- | [`@typescript-eslint/no-redeclare`](./no-redeclare.md) | Disallow variable redeclaration | | | |
141
- | [`@typescript-eslint/no-restricted-imports`](./no-restricted-imports.md) | Disallow specified modules when loaded by `import` | | | |
142
- | [`@typescript-eslint/no-shadow`](./no-shadow.md) | Disallow variable declarations from shadowing variables declared in the outer scope | | | |
143
- | [`@typescript-eslint/no-throw-literal`](./no-throw-literal.md) | Disallow throwing literals as exceptions | :lock: | | :thought_balloon: |
144
- | [`@typescript-eslint/no-unused-expressions`](./no-unused-expressions.md) | Disallow unused expressions | | | |
145
- | [`@typescript-eslint/no-unused-vars`](./no-unused-vars.md) | Disallow unused variables | :white_check_mark: | | |
146
- | [`@typescript-eslint/no-use-before-define`](./no-use-before-define.md) | Disallow the use of variables before they are defined | | | |
147
- | [`@typescript-eslint/no-useless-constructor`](./no-useless-constructor.md) | Disallow unnecessary constructors | :lock: | | |
148
- | [`@typescript-eslint/object-curly-spacing`](./object-curly-spacing.md) | Enforce consistent spacing inside braces | | :wrench: | |
149
- | [`@typescript-eslint/padding-line-between-statements`](./padding-line-between-statements.md) | Require or disallow padding lines between statements | | :wrench: | |
150
- | [`@typescript-eslint/quotes`](./quotes.md) | Enforce the consistent use of either backticks, double, or single quotes | | :wrench: | |
151
- | [`@typescript-eslint/require-await`](./require-await.md) | Disallow async functions which have no `await` expression | :white_check_mark: | | :thought_balloon: |
152
- | [`@typescript-eslint/return-await`](./return-await.md) | Enforce consistent returning of awaited values | | :wrench: | :thought_balloon: |
153
- | [`@typescript-eslint/semi`](./semi.md) | Require or disallow semicolons instead of ASI | | :wrench: | |
154
- | [`@typescript-eslint/space-before-blocks`](./space-before-blocks.md) | Enforce consistent spacing before blocks | | :wrench: | |
155
- | [`@typescript-eslint/space-before-function-paren`](./space-before-function-paren.md) | Enforce consistent spacing before function parenthesis | | :wrench: | |
156
- | [`@typescript-eslint/space-infix-ops`](./space-infix-ops.md) | Require spacing around infix operators | | :wrench: | |
157
-
158
- <!-- end extension rule list -->
23
+ <RulesTable extensionRules />
@@ -100,7 +100,3 @@ This rule is not configurable.
100
100
  ## When Not To Use It
101
101
 
102
102
  If you don't care about the general structure of the code, then you will not need this rule.
103
-
104
- ## Related To
105
-
106
- - TSLint: [adjacent-overload-signatures](https://palantir.github.io/tslint/rules/adjacent-overload-signatures/)
@@ -118,7 +118,3 @@ This matrix lists all possible option combinations and their expected results fo
118
118
  | `generic` | `array` | `Array<number>` | `Array<Foo & Bar>` | `readonly number[]` | `readonly (Foo & Bar)[]` |
119
119
  | `generic` | `array-simple` | `Array<number>` | `Array<Foo & Bar>` | `readonly number[]` | `ReadonlyArray<Foo & Bar>` |
120
120
  | `generic` | `generic` | `Array<number>` | `Array<Foo & Bar>` | `ReadonlyArray<number>` | `ReadonlyArray<Foo & Bar>` |
121
-
122
- ## Related To
123
-
124
- - TSLint: [array-type](https://palantir.github.io/tslint/rules/array-type/)
@@ -46,7 +46,3 @@ This rule is not configurable.
46
46
 
47
47
  If you want to allow code to `await` non-Promise values.
48
48
  This is generally not preferred, but can sometimes be useful for visual consistency.
49
-
50
- ## Related To
51
-
52
- - TSLint: ['await-promise'](https://palantir.github.io/tslint/rules/await-promise)
@@ -22,11 +22,16 @@ By default, only `@ts-check` is allowed, as it enables rather than suppresses er
22
22
  The configuration looks like this:
23
23
 
24
24
  ```ts
25
+ type DirectiveConfig =
26
+ | boolean
27
+ | 'allow-with-description'
28
+ | { descriptionFormat: string };
29
+
25
30
  interface Options {
26
- 'ts-expect-error'?: boolean | 'allow-with-description';
27
- 'ts-ignore'?: boolean | 'allow-with-description';
28
- 'ts-nocheck'?: boolean | 'allow-with-description';
29
- 'ts-check'?: boolean | 'allow-with-description';
31
+ 'ts-expect-error'?: DirectiveConfig;
32
+ 'ts-ignore'?: DirectiveConfig;
33
+ 'ts-nocheck'?: DirectiveConfig;
34
+ 'ts-check'?: DirectiveConfig;
30
35
  minimumDescriptionLength?: number;
31
36
  }
32
37
 
@@ -105,6 +110,28 @@ if (false) {
105
110
  }
106
111
  ```
107
112
 
113
+ ### `descriptionFormat`
114
+
115
+ For each directive type, you can specify a custom format in the form of a regular expression. Only description that matches the pattern will be allowed.
116
+
117
+ For example, with `{ 'ts-expect-error': { descriptionFormat: '^: TS\\d+ because .+$' } }`:
118
+
119
+ <!--tabs-->
120
+
121
+ #### ❌ Incorrect
122
+
123
+ ```ts
124
+ // @ts-expect-error: the library definition is wrong
125
+ const a = doSomething('hello');
126
+ ```
127
+
128
+ #### ✅ Correct
129
+
130
+ ```ts
131
+ // @ts-expect-error: TS1234 because the library definition is wrong
132
+ const a = doSomething('hello');
133
+ ```
134
+
108
135
  ### `minimumDescriptionLength`
109
136
 
110
137
  Use `minimumDescriptionLength` to set a minimum length for descriptions when using the `allow-with-description` option for a directive.
@@ -138,7 +165,3 @@ If you want to use all of the TypeScript directives.
138
165
  ## Further Reading
139
166
 
140
167
  - TypeScript [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html)
141
-
142
- ## Related To
143
-
144
- - TSLint: [ban-ts-ignore](https://palantir.github.io/tslint/rules/ban-ts-ignore/)
@@ -197,7 +197,3 @@ const capitalObj2: { a: string } = { a: 'string' };
197
197
  const curly1: number = 1;
198
198
  const curly2: Record<'a', string> = { a: 'string' };
199
199
  ```
200
-
201
- ## Related To
202
-
203
- - TSLint: [ban-types](https://palantir.github.io/tslint/rules/ban-types)