-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace standard and snazzy with neostandard (#3485)
* use neostandard, drop standard and snazzy * apply automated fixes * fix manually linting errors * adapt recommended changes * add neostandard badge * remove node_modules * remove no-lone-blocks * fix linting issues * disable jsx, use cache, remove jest env
- Loading branch information
Showing
68 changed files
with
704 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict' | ||
|
||
const neo = require('neostandard') | ||
|
||
module.exports = [ | ||
...neo({ | ||
ignores: [ | ||
'lib/llhttp', | ||
'test/fixtures/wpt', | ||
'undici-fetch.js' | ||
], | ||
noJsx: true, | ||
ts: true | ||
}), | ||
{ | ||
rules: { | ||
'@stylistic/comma-dangle': ['error', { | ||
arrays: 'never', | ||
objects: 'never', | ||
imports: 'never', | ||
exports: 'never', | ||
functions: 'never' | ||
}], | ||
'@typescript-eslint/no-redeclare': 'off' | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import { request } from '../../' | ||
import { expectType } from 'tsd' | ||
import { Dispatcher, request } from '../../' | ||
import { interceptors } from '../../' | ||
|
||
async function exampleCode() { | ||
async function exampleCode () { | ||
const retry = interceptors.retry() | ||
const rd = interceptors.redirect() | ||
const dump = interceptors.dump() | ||
|
||
expectType<Dispatcher.DispatcherComposeInterceptor>(retry) | ||
expectType<Dispatcher.DispatcherComposeInterceptor>(rd) | ||
expectType<Dispatcher.DispatcherComposeInterceptor>(dump) | ||
|
||
await request('http://localhost:3000/foo') | ||
} | ||
|
||
exampleCode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.