@so1ve/eslint-plugin 0.35.0 → 0.35.1

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 CHANGED
@@ -246,7 +246,8 @@ 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
- if (postSpace && postSpace.length && !postEqual && !postComma) {
249
+ const postQuestionMark = text.slice(spaceStartRange + postSpace.length).match(/^(\?)/)?.[0];
250
+ if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark) {
250
251
  context.report({
251
252
  loc: {
252
253
  start: {
package/dist/index.mjs CHANGED
@@ -244,7 +244,8 @@ 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
- if (postSpace && postSpace.length && !postEqual && !postComma) {
247
+ const postQuestionMark = text.slice(spaceStartRange + postSpace.length).match(/^(\?)/)?.[0];
248
+ if (postSpace && postSpace.length && !postEqual && !postComma && !postQuestionMark) {
248
249
  context.report({
249
250
  loc: {
250
251
  start: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-plugin",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
5
5
  "contributors": [
6
6
  {