chore: Update @antfu/eslint-config dependency to 2.11.4

This commit is contained in:
Joachim Van Herwegen 2024-03-29 10:18:21 +01:00
parent fa060b86f3
commit 7abca33b67
18 changed files with 2353 additions and 856 deletions

View File

@ -17,7 +17,7 @@ flowchart LR
ControlHandler --password--> PasswordControlHandler("<strong>PasswordControlHandler</strong><br>ControlHandler")
ControlHandler --"oidc"--> OidcControlHandler("<strong>OidcControlHandler</strong><br>OidcControlHandler")
ControlHandler --html--> HtmlControlHandler("<strong>HtmlControlHandler</strong><br>ControlHandler")
HtmlControlHandler --main--> MainHtmlControlHandler("<strong>MainHtmlControlHandler</strong><br>ControlHandler")
HtmlControlHandler --account--> AccountHtmlControlHandler("<strong>AccountHtmlControlHandler</strong><br>ControlHandler")
HtmlControlHandler --password--> PasswordHtmlControlHandler("<strong>PasswordHtmlControlHandler</strong><br>ControlHandler")

View File

@ -10,7 +10,7 @@ flowchart LR
Handler("<strong>IdentityProviderHandler</strong><br>RouterHandler")
ParsingHandler("<strong>IdentityProviderParsingHandler</strong><br>AuthorizingHttpHandler")
AuthorizingHandler("<strong>IdentityProviderAuthorizingHandler</strong><br>AuthorizingHttpHandler")
Handler --> ParsingHandler
ParsingHandler --> AuthorizingHandler
AuthorizingHandler --> HttpHandler("<strong>IdentityProviderHttpHandler</strong><br>IdentityProviderHttpHandler")
@ -26,12 +26,12 @@ flowchart TD
HttpHandler("<strong>IdentityProviderHttpHandler</strong><br>IdentityProviderHttpHandler")
HttpHandler --> InteractionHandler("<strong>InteractionHandler</strong><br>WaterfallHandler")
InteractionHandler --> InteractionHandlerArgs
subgraph InteractionHandlerArgs[" "]
HtmlViewHandler("<strong>HtmlViewHandler</strong><br>HtmlViewHandler")
LockingInteractionHandler("<strong>LockingInteractionHandler</strong><br>LockingInteractionHandler")
end
LockingInteractionHandler --> JsonConversionHandler("<strong>JsonConversionHandler</strong><br>JsonConversionHandler")
JsonConversionHandler --> VersionHandler("<strong>VersionHandler</strong><br>VersionHandler")
VersionHandler --> CookieInteractionHandler("<strong>CookieInteractionHandler</strong><br>CookieInteractionHandler")

View File

@ -114,15 +114,15 @@ It takes as input 2 components: a `HttpServerFactory` and a `ServerListener`.
flowchart TD
ServerInitializer("<strong>ServerInitializer</strong><br>ServerInitializer")
ServerInitializer --> ServerInitializerArgs
subgraph ServerInitializerArgs[" "]
direction LR
ServerFactory("<strong>ServerFactory</strong><br>BaseServerFactory")
ServerListener("<strong>ServerListener</strong><br>ParallelHandler")
end
ServerListener --> HandlerServerListener("<strong>HandlerServerListener</strong><br>HandlerServerListener")
HandlerServerListener --> HttpHandler("<strong>HttpHandler</strong><br><i>HttpHandler</i>")
```

View File

@ -78,7 +78,7 @@ flowchart TB
ResourceStore("<strong>ResourceStore</strong><br><i>ActivityEmitter</i>")
NotificationHandler("<strong>NotificationHandler</strong><br>WaterfallHandler")
end
NotificationHandler --> NotificationHandlerArgs
subgraph NotificationHandlerArgs[" "]
direction TB
@ -154,9 +154,9 @@ flowchart TB
NotificationChannelStorage("<strong>NotificationChannelStorage</strong><br>NotificationChannelStorage")
SequenceHandler("<br>SequenceHandler")
end
SequenceHandler --> SequenceHandlerArgs
subgraph SequenceHandlerArgs[" "]
direction TB
WebSocket2023Storer("<strong>WebSocket2023Storer</strong><br>WebSocket2023Storer")

View File

@ -27,15 +27,15 @@ flowchart LR
RdfPatcher("<strong>RdfPatcher</strong><br>RdfPatcher")
RdfPatcher --> RDFStore("<strong>PatchHandler_RDFStore</strong><br>WaterfallHandler")
RDFStore --> RDFStoreArgs
subgraph RDFStoreArgs[" "]
Immutable("<strong>PatchHandler_ImmutableMetadata</strong><br>ImmutableMetadataPatcher")
RDF("<strong>PatchHandler_RDF</strong><br>WaterfallHandler")
Immutable --> RDF
end
RDF --> RDFArgs
subgraph RDFArgs[" "]
direction LR
N3("<br>N3Patcher")

View File

@ -56,7 +56,7 @@ The next step generates the token and assumes you have an authorization value as
```ts
// Now that we are logged in, we need to request the updated controls from the server.
// These will now have more values than in the previous example.
const indexResponse = await fetch('http://localhost:3000/.account/', {
const indexResponse = await fetch('http://localhost:3000/.account/', {
headers: { authorization: `CSS-Account-Token ${authorization}` }
});
const { controls } = await indexResponse.json();

View File

@ -42,4 +42,10 @@ module.exports = antfu.default(
'unicorn/filename-case': 'off',
},
},
{
files: [ '**/*.md' ],
rules: {
'no-irregular-whitespace': 'off',
},
},
);

View File

@ -16,6 +16,10 @@ module.exports = {
kebabCase: true,
snakeCase: false,
},
ignore: [
// CODE_OF_CONDUCT.md, etc.
/[A-Z_]+\.md$/u,
],
}],
'unicorn/new-for-builtins': 'error',
'unicorn/no-array-for-each': 'error',

3151
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -143,7 +143,7 @@
"yup": "^1.3.2"
},
"devDependencies": {
"@antfu/eslint-config": "2.3.4",
"@antfu/eslint-config": "2.11.4",
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@inrupt/solid-client-authn-core": "^2.0.0",

View File

@ -300,7 +300,7 @@ export class RepresentationMetadata {
predicate: Term | string | null,
object: Term | string | null,
graph: Term | string | null) => boolean;
}).has(this.id, predicate, object, graph) as boolean;
}).has(this.id, predicate, object, graph);
}
/**

View File

@ -84,7 +84,7 @@ export class ExtensionBasedMapper extends BaseFileIdentifierMapper {
const extension = getExtension(filePath).toLowerCase();
return mime.lookup(extension) ||
this.customTypes[extension] ||
await super.getContentTypeFromPath(filePath);
await super.getContentTypeFromPath(filePath);
}
/**

View File

@ -55,7 +55,7 @@ function emitStoredErrors(this: Guarded, event: string, func: (error: Error) =>
if (event === 'error' && func !== guardingErrorListener) {
// Cancel an error timeout
if (this[guardedTimeout]) {
clearTimeout(this[guardedTimeout]!);
clearTimeout(this[guardedTimeout]);
this[guardedTimeout] = undefined;
}

View File

@ -7,8 +7,8 @@ export function isError(error: unknown): error is Error {
return types.isNativeError(error) ||
(Boolean(error) &&
typeof (error as Error).name === 'string' &&
typeof (error as Error).message === 'string' &&
(typeof (error as Error).stack === 'undefined' || typeof (error as Error).stack === 'string'));
typeof (error as Error).message === 'string' &&
(typeof (error as Error).stack === 'undefined' || typeof (error as Error).stack === 'string'));
}
/**

View File

@ -48,7 +48,7 @@ export class HttpError<T extends number = number> extends Error implements HttpE
public static isInstance(error: unknown): error is HttpError {
return isError(error) &&
typeof (error as HttpError).statusCode === 'number' &&
Boolean((error as HttpError).metadata);
Boolean((error as HttpError).metadata);
}
/**

View File

@ -17,7 +17,7 @@ describe('A RedirectingHttpHandler', (): void => {
beforeEach(async(): Promise<void> => {
targetExtractor = {
handleSafe: jest.fn(({ request: req }): ResourceIdentifier => ({ path: joinUrl(baseUrl, req.url!) })),
handleSafe: jest.fn(({ request: req }): ResourceIdentifier => ({ path: joinUrl(baseUrl, req.url) })),
} as any;
responseWriter = { handleSafe: jest.fn() } as any;

View File

@ -14,7 +14,7 @@ describe('A RouterHandler', (): void => {
request = { method: 'GET', url: '/test' } as any;
targetExtractor = {
handleSafe: jest.fn(({ request: req }): ResourceIdentifier => ({ path: joinUrl(baseUrl, req.url!) })),
handleSafe: jest.fn(({ request: req }): ResourceIdentifier => ({ path: joinUrl(baseUrl, req.url) })),
} as any;
handler = {

View File

@ -210,7 +210,7 @@ describe('PathUtil', (): void => {
beforeEach((): void => {
targetExtractor = {
handleSafe: jest.fn(({ request: req }): ResourceIdentifier => ({ path: joinUrl(baseUrl, req.url!) })),
handleSafe: jest.fn(({ request: req }): ResourceIdentifier => ({ path: joinUrl(baseUrl, req.url) })),
} as any;
});