Skip to content

Commit a5ac70f

Browse files
committed
Fixed comments
1 parent 25e6afd commit a5ac70f

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

lib/rules/forbid-foreign-prop-types.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ module.exports = {
109109
&& !ast.isAssignmentLHS(node)
110110
&& !isAllowedAssignment(node)
111111
)) || (
112-
// The JSXText type is not present in the estree type definitions
113-
// @ts-expect-error
112+
// @ts-expect-error The JSXText type is not present in the estree type definitions
114113
(node.property.type === 'Literal' || node.property.type === 'JSXText') && node.property.value === 'propTypes'
115114
&& !ast.isAssignmentLHS(node)
116115
&& !isAllowedAssignment(node)

lib/rules/jsx-closing-bracket-location.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,9 @@ module.exports = {
196196
*/
197197
function getTokensLocations(node) {
198198
const sourceCode = context.getSourceCode();
199-
// The types differ between ASTNode and ESTree.Node.
200-
// @ts-expect-error
199+
// @ts-expect-error The JSXText type is not present in the estree type definitions
201200
const opening = sourceCode.getFirstToken(node).loc.start;
202-
// The types differ between ASTNode and ESTree.Node.
203-
// @ts-expect-error
201+
// @ts-expect-error The JSXText type is not present in the estree type definitions
204202
const closing = sourceCode.getLastTokens(node, node.selfClosing ? 2 : 1)[0].loc.start;
205203
const tag = sourceCode.getFirstToken(node.name).loc.start;
206204
let lastProp;

lib/rules/jsx-indent-props.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ module.exports = {
141141
* @return {Number} Indent
142142
*/
143143
function getNodeIndent(node) {
144-
// The types differ between ASTNode and ESTree.Node.
145-
// @ts-expect-error
144+
// @ts-expect-error The types differ between ASTNode and ESTree.Node.
146145
let src = context.getSourceCode().getText(node, node.loc.start.column + extraColumnStart);
147146
const lines = src.split('\n');
148147
src = lines[0];

0 commit comments

Comments
 (0)