Skip to content

Commit c5381a7

Browse files
committed
style: update code style
1 parent 6656375 commit c5381a7

File tree

7 files changed

+21
-22
lines changed

7 files changed

+21
-22
lines changed

src/interpreter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ function evalNode(node: SyntaxNodeRef, input: string, args: any[]) {
722722
if (isNumber(value)) {
723723
filterFn.type = 'number';
724724
}
725-
} catch (err) {
725+
} catch (_err) {
726726

727727
// ignore
728728
}
@@ -1243,7 +1243,7 @@ function parseString(str: string) {
12431243
str = str.slice(0, -1);
12441244
}
12451245

1246-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1246+
12471247
return str.replace(/(\\")|(\\\\)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring: string, ...groups: any[]) {
12481248

12491249
const [

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ export class Range {
137137
start: string|number|null;
138138
end: string|number|null;
139139

140-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
140+
141141
map: <T> (fn: (val) => T) => T[];
142142

143-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
143+
144144
includes: (val) => boolean;
145145

146146
constructor(props: RangeProps) {

tasks/extract-tck-tests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/* eslint-env node */
2-
3-
/* eslint @typescript-eslint/no-var-requires: OFF */
1+
/* eslint @typescript-eslint/no-var-requires: off */
42

53
import path from 'path';
64
import fs from 'fs';
@@ -289,7 +287,9 @@ function parseTestFile(file) {
289287

290288
openElement(type, closeDelimiter);
291289

292-
printType && addToken(type);
290+
if (printType) {
291+
addToken(type);
292+
}
293293

294294
addToken(openDelimiter);
295295
}

test/builtins-spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ function expr(...args) {
722722
});
723723
}
724724

725-
// eslint-disable-next-line no-unused-vars
725+
726726
// eslint-disable-next-line @typescript-eslint/no-unused-vars
727727
function exprOnly(...args) {
728728
return createExprVerifier({
@@ -731,8 +731,8 @@ function exprOnly(...args) {
731731
});
732732
}
733733

734-
// eslint-disable-next-line no-unused-vars
735-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
734+
735+
736736
function exprSkip(...args) {
737737
return createExprVerifier({
738738
args,

test/interpreter-spec.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ describe('interpreter', function() {
545545

546546
describe('InstanceOfExpression', function() {
547547

548-
// eslint-disable-next-line @typescript-eslint/no-empty-function
548+
549549
function B() { }
550550

551551
expr('a instance of B', true, {
@@ -1284,7 +1284,7 @@ function expr(...args) {
12841284
});
12851285
}
12861286

1287-
// eslint-disable-next-line no-unused-vars
1287+
12881288
// eslint-disable-next-line @typescript-eslint/no-unused-vars
12891289
function exprOnly(...args) {
12901290
return createExprVerifier({
@@ -1293,16 +1293,15 @@ function exprOnly(...args) {
12931293
});
12941294
}
12951295

1296-
// eslint-disable-next-line no-unused-vars
1297-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1296+
12981297
function exprSkip(...args) {
12991298
return createExprVerifier({
13001299
args,
13011300
it: it.skip
13021301
});
13031302
}
13041303

1305-
// eslint-disable-next-line no-unused-vars
1304+
13061305
// eslint-disable-next-line @typescript-eslint/no-unused-vars
13071306
function unaryOnly(...args) {
13081307
return createUnaryVerifier({

test/reporters/tck.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
1+
/* eslint @typescript-eslint/no-require-imports: off */
22

33
const { inherits } = require('node:util');
44

test/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import {
66
import { expect } from 'chai';
77

88

9-
describe('types', () => {
9+
describe('types', function() {
1010

11-
describe('evaluate', () => {
11+
describe('evaluate', function() {
1212

13-
it('should evaluate', () => {
13+
it('should evaluate', function() {
1414

1515
// when
1616
const value = evaluate('hello', {
@@ -24,9 +24,9 @@ describe('types', () => {
2424
});
2525

2626

27-
describe('unaryTest', () => {
27+
describe('unaryTest', function() {
2828

29-
it('should test', () => {
29+
it('should test', function() {
3030

3131
// when
3232
const value = unaryTest('[10, 20]', {

0 commit comments

Comments
 (0)