@so1ve/eslint-plugin 0.35.0 → 0.35.2
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 +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -246,7 +246,9 @@ const spaceBetweenGenericAndParen = createEslintRule({
|
|
|
246
246
|
const postSpace = post.match(/^(\s*)/)?.[0];
|
|
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 postBracket = text.slice(spaceStartRange + postSpace.length).match(/^(\{|\[])/)?.[0];
|
|
251
|
+
if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark && !postBracket) {
|
|
250
252
|
context.report({
|
|
251
253
|
loc: {
|
|
252
254
|
start: {
|
package/dist/index.mjs
CHANGED
|
@@ -244,7 +244,9 @@ const spaceBetweenGenericAndParen = createEslintRule({
|
|
|
244
244
|
const postSpace = post.match(/^(\s*)/)?.[0];
|
|
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 postBracket = text.slice(spaceStartRange + postSpace.length).match(/^(\{|\[])/)?.[0];
|
|
249
|
+
if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark && !postBracket) {
|
|
248
250
|
context.report({
|
|
249
251
|
loc: {
|
|
250
252
|
start: {
|