@tsslint/config 1.5.4 → 1.5.6

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.
@@ -169,26 +169,21 @@ function create(cmdOption, reportsUnusedComments) {
169
169
  reportedRules.push([error.code, line]);
170
170
  for (const code of [undefined, error.code]) {
171
171
  const states = comments.get(code);
172
- if (states) {
173
- if (mode === 'singleLine') {
174
- if (states.some(comment => comment.startLine === line)) {
175
- for (const state of states) {
176
- if (state.startLine === line) {
177
- state.used = true;
178
- break;
179
- }
180
- }
172
+ if (!states) {
173
+ continue;
174
+ }
175
+ if (mode === 'singleLine') {
176
+ for (const state of states) {
177
+ if (state.startLine === line) {
178
+ state.used = true;
181
179
  return false;
182
180
  }
183
181
  }
184
- else {
185
- if (states.some((comment => line >= comment.startLine && line <= (comment.endLine ?? Number.MAX_VALUE)))) {
186
- for (const state of states) {
187
- if (line >= state.startLine && line <= (state.endLine ?? Number.MAX_VALUE)) {
188
- state.used = true;
189
- break;
190
- }
191
- }
182
+ }
183
+ else {
184
+ for (const state of states) {
185
+ if (line >= state.startLine && line <= (state.endLine ?? Number.MAX_VALUE)) {
186
+ state.used = true;
192
187
  return false;
193
188
  }
194
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsslint/config",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,8 +12,8 @@
12
12
  "directory": "packages/config"
13
13
  },
14
14
  "dependencies": {
15
- "@tsslint/types": "1.5.4",
15
+ "@tsslint/types": "1.5.6",
16
16
  "ts-api-utils": "^2.0.0"
17
17
  },
18
- "gitHead": "02cbc403c85b4224b5ccd732dc96f7a0991a6ae2"
18
+ "gitHead": "3d0dfb208e94cfafa4bccfa75a2d98ffbd67d8e1"
19
19
  }