eslint-plugin-jest 24.5.1 → 24.5.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [24.5.2](https://github.com/jest-community/eslint-plugin-jest/compare/v24.5.1...v24.5.2) (2021-10-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **lowercase-name:** consider skip and only prefixes for ignores ([#923](https://github.com/jest-community/eslint-plugin-jest/issues/923)) ([8716c24](https://github.com/jest-community/eslint-plugin-jest/commit/8716c24678ea7dc7c9f692b573d1ea19a67efd84))
7
+
1
8
  ## [24.5.1](https://github.com/jest-community/eslint-plugin-jest/compare/v24.5.0...v24.5.1) (2021-10-04)
2
9
 
3
10
 
@@ -21,6 +21,24 @@ const findNodeNameAndArgument = node => {
21
21
  return [(0, _utils.getNodeName)(node).split('.')[0], node.arguments[0]];
22
22
  };
23
23
 
24
+ const populateIgnores = ignore => {
25
+ const ignores = [];
26
+
27
+ if (ignore.includes(_utils.DescribeAlias.describe)) {
28
+ ignores.push(...Object.keys(_utils.DescribeAlias));
29
+ }
30
+
31
+ if (ignore.includes(_utils.TestCaseName.test)) {
32
+ ignores.push(...Object.keys(_utils.TestCaseName));
33
+ }
34
+
35
+ if (ignore.includes(_utils.TestCaseName.it)) {
36
+ ignores.push(...Object.keys(_utils.TestCaseName));
37
+ }
38
+
39
+ return ignores;
40
+ };
41
+
24
42
  var _default = (0, _utils.createRule)({
25
43
  name: __filename,
26
44
  meta: {
@@ -70,6 +88,7 @@ var _default = (0, _utils.createRule)({
70
88
  allowedPrefixes = [],
71
89
  ignoreTopLevelDescribe
72
90
  }]) {
91
+ const ignores = populateIgnores(ignore);
73
92
  let numberOfDescribeBlocks = 0;
74
93
  return {
75
94
  CallExpression(node) {
@@ -96,7 +115,7 @@ var _default = (0, _utils.createRule)({
96
115
 
97
116
  const firstCharacter = description.charAt(0);
98
117
 
99
- if (!firstCharacter || firstCharacter === firstCharacter.toLowerCase() || ignore.includes(name)) {
118
+ if (!firstCharacter || firstCharacter === firstCharacter.toLowerCase() || ignores.includes(name)) {
100
119
  return;
101
120
  }
102
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest",
3
- "version": "24.5.1",
3
+ "version": "24.5.2",
4
4
  "description": "Eslint rules for Jest",
5
5
  "keywords": [
6
6
  "eslint",