From f90d0d83f0681f668f877816b0238cc9c5746d4a Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Mon, 29 Sep 2025 21:09:53 +0200 Subject: [PATCH] Switch to neostandard and bump dev dependencies Restores linting of TypeScript files. Category: none --- .github/dependabot.yml | 4 ++-- eslint.config.js | 5 +++++ package.json | 13 +++++++------ tsconfig.json | 2 +- types/abstract-chained-batch.d.ts | 6 ++---- types/abstract-iterator.d.ts | 2 +- types/abstract-level.d.ts | 6 +++--- types/abstract-snapshot.d.ts | 2 +- types/interfaces.d.ts | 3 ++- 9 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 eslint.config.js diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e0fb910..16c81f8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,8 +5,8 @@ updates: schedule: interval: monthly ignore: - - dependency-name: standard - - dependency-name: ts-standard + - dependency-name: neostandard + - dependency-name: eslint - dependency-name: "@types/node" - dependency-name: voxpelli/tsconfig - dependency-name: typescript diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..e66d901 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = require('neostandard')({ + ts: true +}) diff --git a/package.json b/package.json index de628f0..5de860d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "index.js", "types": "./index.d.ts", "scripts": { - "test": "standard && hallmark && (nyc -s node test/self.js | tap-arc) && nyc report", + "test": "eslint && hallmark && (nyc -s node test/self.js | tap-arc) && nyc report", "test-pessimistic": "node test/self.js | tap-arc -pv", "test-browsers": "airtap --coverage test/self.js", "test-electron": "airtap -p electron --coverage test/self.js | tap-arc", @@ -34,20 +34,21 @@ "module-error": "^1.0.1" }, "devDependencies": { - "@babel/preset-env": "^7.26.0", - "@types/node": "^22.10.2", - "@voxpelli/tsconfig": "^15.1.0", + "@babel/preset-env": "^7.28.3", + "@types/node": "^24.6.0", + "@voxpelli/tsconfig": "^16.1.0", "airtap": "^5.0.0", "airtap-electron": "^1.0.0", "airtap-playwright": "^1.0.1", "babelify": "^10.0.0", "electron": "^33.2.1", + "eslint": "^9.36.0", "hallmark": "^5.0.1", + "neostandard": "^0.12.2", "nyc": "^17.1.0", - "standard": "^17.1.2", "tap-arc": "^1.3.2", "tape": "^5.9.0", - "typescript": "^5.7.2" + "typescript": "^5.9.2" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index 6c3b40a..0ea0ce0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@voxpelli/tsconfig/node16.json", + "extends": "@voxpelli/tsconfig/node18.json", "compilerOptions": { "checkJs": false }, diff --git a/types/abstract-chained-batch.d.ts b/types/abstract-chained-batch.d.ts index 613b9f5..d27c5f6 100644 --- a/types/abstract-chained-batch.d.ts +++ b/types/abstract-chained-batch.d.ts @@ -2,8 +2,7 @@ import * as Transcoder from 'level-transcoder' import { AbstractSublevel } from './abstract-sublevel' import { AbstractResource } from './interfaces' -export class AbstractChainedBatch - implements AbstractResource { +export class AbstractChainedBatch implements AbstractResource { constructor (db: TDatabase) /** @@ -59,7 +58,7 @@ export class AbstractChainedBatch /** * Close the batch. */ - [Symbol.asyncDispose](): Promise + [Symbol.asyncDispose] (): Promise } /** @@ -120,7 +119,6 @@ export interface AbstractChainedBatchDelOptions { /** * Options for the {@link AbstractChainedBatch.write} method. */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface AbstractChainedBatchWriteOptions { // There are no abstract options but implementations may add theirs. } diff --git a/types/abstract-iterator.d.ts b/types/abstract-iterator.d.ts index ac81b42..d4a5015 100644 --- a/types/abstract-iterator.d.ts +++ b/types/abstract-iterator.d.ts @@ -91,7 +91,7 @@ declare class CommonIterator implements AbstractResource { /** * Close the iterator. */ - [Symbol.asyncDispose](): Promise + [Symbol.asyncDispose] (): Promise } export class AbstractIterator extends CommonIterator { diff --git a/types/abstract-level.d.ts b/types/abstract-level.d.ts index 3371f1d..024e3be 100644 --- a/types/abstract-level.d.ts +++ b/types/abstract-level.d.ts @@ -72,7 +72,7 @@ declare class AbstractLevel /** * Close the database. */ - [Symbol.asyncDispose](): Promise + [Symbol.asyncDispose] (): Promise /** * Get a value from the database by {@link key}. @@ -321,12 +321,12 @@ declare class AbstractLevel * resources like iterators and sublevels, and is publicly exposed for custom * resources. */ - attachResource(resource: AbstractResource): void + attachResource (resource: AbstractResource): void /** * Stop tracking the given {@link resource}. */ - detachResource(resource: AbstractResource): void + detachResource (resource: AbstractResource): void } export { AbstractLevel } diff --git a/types/abstract-snapshot.d.ts b/types/abstract-snapshot.d.ts index a7df9dd..c362064 100644 --- a/types/abstract-snapshot.d.ts +++ b/types/abstract-snapshot.d.ts @@ -26,5 +26,5 @@ export class AbstractSnapshot implements AbstractResource { /** * Close the snapshot. */ - [Symbol.asyncDispose](): Promise + [Symbol.asyncDispose] (): Promise } diff --git a/types/interfaces.d.ts b/types/interfaces.d.ts index 702037b..875458e 100644 --- a/types/interfaces.d.ts +++ b/types/interfaces.d.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars import { AbstractLevel } from './abstract-level' import { AbstractSnapshot } from './abstract-snapshot' @@ -38,5 +39,5 @@ export interface AbstractResource extends AsyncDisposable { /** * Close the resource. Identical in functionality to {@link close}. */ - [Symbol.asyncDispose](): Promise + [Symbol.asyncDispose] (): Promise }