Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

36 changes: 36 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"env": {
"node": true,
"mocha": true
},
"extends": [
"./node_modules/@eggjs/oxlint-config/.oxlintrc.json"
],
"rules": {
"promise/prefer-await-to-callbacks": "allow",
"promise/prefer-await-to-then": "allow",
"promise/avoid-new": "allow",
"promise/no-callback-in-promise": "allow",
"unicorn/numeric-separators-style": "allow",
"unicorn/escape-case": "allow",
"unicorn/consistent-assert": "allow",
"unicorn/no-array-for-each": "allow",
"unicorn/prefer-number-properties": "allow",
"unicorn/text-encoding-identifier-case": "allow",
"unicorn/prefer-optional-catch-binding": "allow",
"no-lonely-if": "allow",
"no-unused-vars": "allow",
"no-void": "allow",
"import/no-named-as-default": "allow",
"typescript/no-explicit-any": "allow"
},
"ignorePatterns": [
"test/fixtures",
"test/demo",
"logs",
"run",
"coverage",
"dist"
]
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"address": "^2.0.1"
},
"devDependencies": {
"@eggjs/oxlint-config": "^1.0.0",
"@eggjs/tsconfig": "^1.3.3",
"@types/mocha": "^10.0.6",
"@types/node": "^22.10.1",
"egg-bin": "^6.9.0",
"eslint": "^8.52.0",
"eslint-config-egg": "^13.0.0",
"execa": "^8.0.1",
"mm": "^3.4.0",
"oxlint": "^1.11.1",
"strip-ansi": "^7.1.0",
"tshy": "^3.0.2",
"tshy-after": "^1.0.0",
Expand All @@ -39,7 +39,7 @@
"scripts": {
"pretest": "npm run lint -- --fix && npm run prepublishOnly",
"test": "egg-bin test",
"lint": "eslint src test --ext ts",
"lint": "oxlint",
"ci": "npm run lint && npm run cov && npm run prepublishOnly",
"prepublishOnly": "tshy && tshy-after",
"precov": "npm run prepublishOnly",
Expand Down
2 changes: 1 addition & 1 deletion src/detect-port.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createServer, AddressInfo } from 'node:net';
import { createServer, type AddressInfo } from 'node:net';
import { debuglog } from 'node:util';
import { ip } from 'address';

Expand Down
3 changes: 1 addition & 2 deletions test/detect-port.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import net from 'node:net';
import { strict as assert } from 'node:assert';
import { ip } from 'address';
import mm from 'mm';
import detect from '../src/index.js';
import { detect as detect2, detectPort } from '../src/index.js';
import detect, { detect as detect2, detectPort } from '../src/index.js';

describe('test/detect-port.test.ts', () => {
afterEach(mm.restore);
Expand Down
2 changes: 1 addition & 1 deletion test/wait-port.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { once } from 'node:events';
import { createServer, Server } from 'node:net';
import { createServer, type Server } from 'node:net';
import { strict as assert } from 'node:assert';
import { waitPort, detectPort, WaitPortRetryError } from '../src/index.js';

Expand Down