@so1ve/eslint-plugin 0.35.3 → 0.35.4
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.
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -247,8 +247,8 @@ const spaceBetweenGenericAndParen = createEslintRule({
|
|
|
247
247
|
const postEqual = post.slice(postSpace.length).match(/^(=)/)?.[0];
|
|
248
248
|
const postComma = text.slice(node.range[1]).match(/^(,)/)?.[0];
|
|
249
249
|
const postQuestionMark = text.slice(spaceStartRange + postSpace.length).match(/^(\?)/)?.[0];
|
|
250
|
-
const
|
|
251
|
-
if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark && !
|
|
250
|
+
const postOperatorOrAnyBracketOrKeyword = text.slice(spaceStartRange + postSpace.length).match(/^(\+|-|\*|\/|%|&|\||\^|<<|>>|>>>|<|>|<=|>=|==|!=|===|!==|=>|in|instanceof|\[|\(|as|extends|implements|keyof|new|readonly|typeof|unique|unknown)/)?.[0];
|
|
251
|
+
if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark && !postOperatorOrAnyBracketOrKeyword) {
|
|
252
252
|
context.report({
|
|
253
253
|
loc: {
|
|
254
254
|
start: {
|
package/dist/index.mjs
CHANGED
|
@@ -245,8 +245,8 @@ const spaceBetweenGenericAndParen = createEslintRule({
|
|
|
245
245
|
const postEqual = post.slice(postSpace.length).match(/^(=)/)?.[0];
|
|
246
246
|
const postComma = text.slice(node.range[1]).match(/^(,)/)?.[0];
|
|
247
247
|
const postQuestionMark = text.slice(spaceStartRange + postSpace.length).match(/^(\?)/)?.[0];
|
|
248
|
-
const
|
|
249
|
-
if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark && !
|
|
248
|
+
const postOperatorOrAnyBracketOrKeyword = text.slice(spaceStartRange + postSpace.length).match(/^(\+|-|\*|\/|%|&|\||\^|<<|>>|>>>|<|>|<=|>=|==|!=|===|!==|=>|in|instanceof|\[|\(|as|extends|implements|keyof|new|readonly|typeof|unique|unknown)/)?.[0];
|
|
249
|
+
if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark && !postOperatorOrAnyBracketOrKeyword) {
|
|
250
250
|
context.report({
|
|
251
251
|
loc: {
|
|
252
252
|
start: {
|