Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

22 changes: 22 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
Comment thread
fengmk2 marked this conversation as resolved.
"env": {
"node": true
},
"categories": {
"correctness": "error",
"suspicious": "allow",
"pedantic": "allow",
"style": "allow",
"nursery": "allow",
"restriction": "allow"
},
"plugins": [
"oxc"
],
"rules": {
"no-extend-native": "warn",
"no-control-regex": "allow",
"no-unused-private-class-members": "allow"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "git://github.com/node-modules/urllib.git"
},
"scripts": {
"lint": "eslint src test --ext .ts --cache",
"lint": "oxlint src test",
"prebuild": "npm run clean",
"build": "tsc --version && tshy && tshy-after && npm run build:version",
"postbuild": "rm -rf *.tsbuildinfo",
Expand Down Expand Up @@ -55,6 +55,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.0",
"@eggjs/oxlint-config": "^1.0.0",
"@eggjs/tsconfig": "^2.0.0",
"@tsconfig/node18": "^18.2.1",
"@tsconfig/strictest": "^2.0.2",
Expand All @@ -69,9 +70,8 @@
"@vitest/coverage-v8": "^3.0.2",
"busboy": "^1.6.0",
"cross-env": "^10.0.0",
"eslint": "8",
"eslint-config-egg": "14",
"iconv-lite": "^0.6.3",
"oxlint": "^1.11.0",
"proxy": "^1.0.2",
"selfsigned": "^3.0.0",
"string.prototype.towellformed": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion test/options.dataType.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('options.dataType.test.ts', () => {
}, (err: any) => {
// console.error(err);
assert.equal(err.name, 'JSONResponseFormatError');
assert.match(err.message, /\" \.\.\.skip\.\.\. \"/);
assert.match(err.message, /" \.\.\.skip\.\.\. "/);
assert.equal(err.res.status, 200);
assert.equal(err.res.headers['content-type'], 'application/json');
return true;
Expand Down
2 changes: 1 addition & 1 deletion test/options.fixJSONCtlChars.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('options.fixJSONCtlChars.test.ts', () => {
assert.equal(response.status, 200);
// console.log(response.data);
assert.deepEqual(response.data, {
foo: '\b\f\n\r\tbar\u000e!1!\u0086!2\!\u0000\!3\!\u001f\!4\!\\\!5\!end\\\\',
foo: '\b\f\n\r\tbar\u000e!1!\u0086!2!\u0000!3!\u001f!4!\\\!5!end\\\\',
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/user-agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('keep-alive-header.test.ts', () => {
});
assert.equal(response.status, 200);
// console.log(response.data.headers);
assert.match(response.data.headers['user-agent'], /^node\-urllib\/VERSION Node\.js\/\d+\.\d+\.\d+ \(/);
assert.match(response.data.headers['user-agent'], /^node-urllib\/VERSION Node\.js\/\d+\.\d+\.\d+ \(/);
});

it('should return no user agent if user-agent header is set to empty string', async () => {
Expand Down
Loading