eslint-plugin-jest 29.15.3 → 29.15.5

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/README.md CHANGED
@@ -232,9 +232,7 @@ const jest = require('eslint-plugin-jest');
232
232
 
233
233
  module.exports = [
234
234
  {
235
- files: [
236
- /* glob matching your test files */
237
- ],
235
+ files: [/* glob matching your test files */],
238
236
  ...jest.configs['flat/recommended'],
239
237
  },
240
238
  ];
@@ -263,9 +261,7 @@ const jest = require('eslint-plugin-jest');
263
261
 
264
262
  module.exports = [
265
263
  {
266
- files: [
267
- /* glob matching your test files */
268
- ],
264
+ files: [/* glob matching your test files */],
269
265
  ...jest.configs['flat/style'],
270
266
  },
271
267
  ];
@@ -290,9 +286,7 @@ const jest = require('eslint-plugin-jest');
290
286
 
291
287
  module.exports = [
292
288
  {
293
- files: [
294
- /* glob matching your test files */
295
- ],
289
+ files: [/* glob matching your test files */],
296
290
  ...jest.configs['flat/all'],
297
291
  },
298
292
  ];
@@ -46,7 +46,7 @@ Examples of **incorrect** code for this rule with the above configuration
46
46
 
47
47
  ```js
48
48
  it('is false', () => {
49
- // if this has a modifer (i.e. `not.toBeFalsy`), it would be considered fine
49
+ // if this has a modifier (i.e. `not.toBeFalsy`), it would be considered fine
50
50
  expect(a).toBeFalsy();
51
51
  });
52
52
 
@@ -52,7 +52,10 @@ var _default = exports.default = (0, _utils2.createRule)({
52
52
  property
53
53
  } = object);
54
54
  }
55
- if ('name' in object && object.name === 'module' && property.type === _utils.AST_NODE_TYPES.Identifier && /^exports?$/u.test(property.name)) {
55
+ if (object.type !== _utils.AST_NODE_TYPES.Identifier || object.name !== 'module' || (0, _utils2.resolveScope)(context.sourceCode.getScope(object), 'module') !== null) {
56
+ return;
57
+ }
58
+ if (property.type === _utils.AST_NODE_TYPES.Identifier && /^exports?$/u.test(property.name)) {
56
59
  exportNodes.push(node);
57
60
  }
58
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest",
3
- "version": "29.15.3",
3
+ "version": "29.15.5",
4
4
  "description": "ESLint rules for Jest",
5
5
  "keywords": [
6
6
  "eslint",
@@ -125,7 +125,7 @@
125
125
  "@typescript-eslint/eslint-plugin": "^8.0.0",
126
126
  "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
127
127
  "jest": "*",
128
- "typescript": ">=4.8.4 <7.0.0"
128
+ "typescript": ">=4.8.4 <8.0.0"
129
129
  },
130
130
  "peerDependenciesMeta": {
131
131
  "@typescript-eslint/eslint-plugin": {