Skip to content

Commit

Permalink
chore: use eslint directly
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Nov 13, 2024
1 parent cc2b8df commit 789dacc
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 102 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@
"predev:incremental": "node-gyp configure build -C test --debug",
"dev:incremental": "node test",
"doc": "doxygen doc/Doxyfile",
"lint": "node tools/eslint-format && node tools/clang-format",
"lint:fix": "node tools/clang-format --fix && node tools/eslint-format --fix"
"lint": "eslint && node tools/clang-format",
"lint:fix": "eslint --fix && node tools/clang-format --fix"
},
"pre-commit": "lint",
"version": "8.2.2",
Expand Down
2 changes: 1 addition & 1 deletion test/array_buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function test (binding) {
'ArrayBuffer updates data pointer and length when detached',
() => {
// Detach the ArrayBuffer in JavaScript.
// eslint-disable-next-line no-undef

const mem = new WebAssembly.Memory({ initial: 1 });
binding.arraybuffer.checkDetachUpdatesData(mem.buffer, () => mem.grow(1));

Expand Down
4 changes: 2 additions & 2 deletions test/async_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function makeCallbackWithResource (binding) {
{
eventName: 'init',
type: 'async_context_test',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { foo: 'foo' }
},
{ eventName: 'before' },
Expand All @@ -95,7 +95,7 @@ async function makeCallbackWithoutResource (binding) {
{
eventName: 'init',
type: 'async_context_no_res_test',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { }
},
{ eventName: 'before' },
Expand Down
6 changes: 3 additions & 3 deletions test/async_progress_queue_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function asyncProgressWorkerCallbackOverloads (bindingFunction) {
{
eventName: 'init',
type: 'cbResources',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: {}
},
{ eventName: 'before' },
Expand Down Expand Up @@ -90,7 +90,7 @@ async function asyncProgressWorkerRecvOverloads (bindingFunction) {
{
eventName: 'init',
type: asyncResName,
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: asyncResObject
},
{ eventName: 'before' },
Expand Down Expand Up @@ -131,7 +131,7 @@ async function asyncProgressWorkerNoCbOverloads (bindingFunction) {
{
eventName: 'init',
type: asyncResName,
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: asyncResObject
},
{ eventName: 'before' },
Expand Down
6 changes: 3 additions & 3 deletions test/async_progress_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function asyncProgressWorkerCallbackOverloads (bindingFunction) {
{
eventName: 'init',
type: 'cbResources',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: {}
},
{ eventName: 'before' },
Expand Down Expand Up @@ -92,7 +92,7 @@ async function asyncProgressWorkerRecvOverloads (bindingFunction) {
{
eventName: 'init',
type: asyncResName,
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: asyncResObject
},
{ eventName: 'before' },
Expand Down Expand Up @@ -133,7 +133,7 @@ async function asyncProgressWorkerNoCbOverloads (bindingFunction) {
{
eventName: 'init',
type: asyncResName,
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: asyncResObject
},
{ eventName: 'before' },
Expand Down
10 changes: 5 additions & 5 deletions test/async_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async function test (binding) {
{
eventName: 'init',
type: 'TestResource',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { foo: 'fooBar' }
},
{ eventName: 'before' },
Expand Down Expand Up @@ -167,7 +167,7 @@ async function test (binding) {
{
eventName: 'init',
type: 'TestResource',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { }
},
{ eventName: 'before' },
Expand All @@ -194,7 +194,7 @@ async function test (binding) {
{
eventName: 'init',
type: 'TestResource',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { foo: 'foo' }
},
{ eventName: 'before' },
Expand Down Expand Up @@ -224,7 +224,7 @@ async function test (binding) {
{
eventName: 'init',
type: 'TestResource',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { foo: 'foo' }
},
{ eventName: 'before' },
Expand Down Expand Up @@ -252,7 +252,7 @@ async function test (binding) {
{
eventName: 'init',
type: 'TestResource',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: { foo: 'foo' }
},
{ eventName: 'before' },
Expand Down
2 changes: 1 addition & 1 deletion test/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function test (binding) {

assert.deepStrictEqual(binding.valueCallback(), { foo: 'bar' });

/* eslint-disable-next-line no-new, new-cap */
/* eslint-disable-next-line new-cap */
assert.strictEqual(new binding.newTargetCallback(), binding.newTargetCallback);
assert.strictEqual(binding.newTargetCallback(), undefined);

Expand Down
4 changes: 2 additions & 2 deletions test/function_reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function canCallAsyncFunctionWithDifferentOverloads (binding) {
{
eventName: 'init',
type: 'func_ref_resources',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: {}
},
{ eventName: 'before' },
Expand All @@ -113,7 +113,7 @@ async function canCallAsyncFunctionWithDifferentOverloads (binding) {
{
eventName: 'init',
type: 'func_ref_resources',
triggerAsyncId: triggerAsyncId,
triggerAsyncId,
resource: {}
},
{ eventName: 'before' },
Expand Down
7 changes: 3 additions & 4 deletions test/type_taggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ function testTypeTaggable ({ typeTaggedInstance, checkTypeTag }) {
assert.strictEqual(checkTypeTag(4, obj3), false);
}

// eslint-disable-next-line camelcase
function test ({ type_taggable }) {
testTypeTaggable(type_taggable.external);
testTypeTaggable(type_taggable.object);
function test (binding) {
testTypeTaggable(binding.type_taggable.external);
testTypeTaggable(binding.type_taggable.object);
}
79 changes: 0 additions & 79 deletions tools/eslint-format.js

This file was deleted.

0 comments on commit 789dacc

Please sign in to comment.