Skip to content

Commit 111c850

Browse files
committed
Tweaks
1 parent f2c81dd commit 111c850

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import noDestructure from "./rules/no-destructure";
88
import noInnerHTML from "./rules/no-innerhtml";
99
import noReactSpecificProps from "./rules/no-react-specific-props";
1010
import noUnknownNamespaces from "./rules/no-unknown-namespaces";
11-
// import noUselessKeys from './rules/no-useless-keys';
1211
import preferClasslist from "./rules/prefer-classlist";
1312
import preferFor from "./rules/prefer-for";
1413
import preferShow from "./rules/prefer-show";

src/rules/jsx-no-script-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const isJavaScriptProtocol =
1313
/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i; // eslint-disable-line no-control-regex
1414

1515
/**
16-
* This rule is adapted from eslint-plugin-reacts' jsx-no-script-url rule under the MIT license.
16+
* This rule is adapted from eslint-plugin-react's jsx-no-script-url rule under the MIT license.
1717
* Thank you for your work!
1818
*/
1919
const rule: TSESLint.RuleModule<"noJSURL", []> = {

src/rules/self-closing-comp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const rule: TSESLint.RuleModule<
119119
// Represents the last character of the JSXOpeningElement, the '>' character
120120
const selfCloseEnding = node.range[1];
121121
// Replace ' />' or '/>' with '></${tagName}>'
122-
const lastTokens = sourceCode.getLastTokens(node, { count: 3 });
122+
const lastTokens = sourceCode.getLastTokens(node, { count: 3 }); // JSXIdentifier, '/', '>'
123123
const isSpaceBeforeSelfClose = sourceCode.isSpaceBetween?.(
124124
lastTokens[0],
125125
lastTokens[1]

src/rules/validate-jsx-nesting.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

0 commit comments

Comments
 (0)