style: format luna charts source

This commit is contained in:
2026-08-02 15:38:45 +02:00
parent 75d4632052
commit 3b9a78bf9d
15 changed files with 82 additions and 104 deletions
+52 -52
View File
@@ -1,68 +1,68 @@
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { HTMLStencilElement, JSXBase } from '@stencil/core/internal';
export namespace Components {
interface MyComponent {
/**
* The first name
*/
"first"?: string;
/**
* The last name
*/
"last"?: string;
/**
* The middle name
*/
"middle"?: string;
}
interface MyComponent {
/**
* The first name
*/
first?: string;
/**
* The last name
*/
last?: string;
/**
* The middle name
*/
middle?: string;
}
}
declare global {
interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {
}
var HTMLMyComponentElement: {
prototype: HTMLMyComponentElement;
new (): HTMLMyComponentElement;
};
interface HTMLElementTagNameMap {
"my-component": HTMLMyComponentElement;
}
interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {}
var HTMLMyComponentElement: {
prototype: HTMLMyComponentElement;
new (): HTMLMyComponentElement;
};
interface HTMLElementTagNameMap {
'my-component': HTMLMyComponentElement;
}
}
declare namespace LocalJSX {
interface MyComponent {
/**
* The first name
*/
"first"?: string;
/**
* The last name
*/
"last"?: string;
/**
* The middle name
*/
"middle"?: string;
}
interface MyComponent {
/**
* The first name
*/
first?: string;
/**
* The last name
*/
last?: string;
/**
* The middle name
*/
middle?: string;
}
interface MyComponentAttributes {
"first": string;
"middle": string;
"last": string;
}
interface MyComponentAttributes {
first: string;
middle: string;
last: string;
}
interface IntrinsicElements {
"my-component": Omit<MyComponent, keyof MyComponentAttributes> & { [K in keyof MyComponent & keyof MyComponentAttributes]?: MyComponent[K] } & { [K in keyof MyComponent & keyof MyComponentAttributes as `attr:${K}`]?: MyComponentAttributes[K] } & { [K in keyof MyComponent & keyof MyComponentAttributes as `prop:${K}`]?: MyComponent[K] };
}
interface IntrinsicElements {
'my-component': Omit<MyComponent, keyof MyComponentAttributes> & { [K in keyof MyComponent & keyof MyComponentAttributes]?: MyComponent[K] } & {
[K in keyof MyComponent & keyof MyComponentAttributes as `attr:${K}`]?: MyComponentAttributes[K];
} & { [K in keyof MyComponent & keyof MyComponentAttributes as `prop:${K}`]?: MyComponent[K] };
}
}
export { LocalJSX as JSX };
declare module "@stencil/core" {
export namespace JSX {
interface IntrinsicElements {
"my-component": LocalJSX.IntrinsicElements["my-component"] & JSXBase.HTMLAttributes<HTMLMyComponentElement>;
}
declare module '@stencil/core' {
export namespace JSX {
interface IntrinsicElements {
'my-component': LocalJSX.IntrinsicElements['my-component'] & JSXBase.HTMLAttributes<HTMLMyComponentElement>;
}
}
}
@@ -26,7 +26,7 @@ export const Primary: Story = {
last: 'Doe',
middle: 'Michael',
},
render: (props) => <my-component {...props} />,
render: props => <my-component {...props} />,
};
/**
@@ -38,4 +38,4 @@ export const Secondary: Story = {
last: 'Smith',
middle: 'Marie',
},
};
};
@@ -1,10 +1,7 @@
# my-component
<!-- Auto Generated Below -->
## Properties
| Property | Attribute | Description | Type | Default |
@@ -13,7 +10,6 @@
| `last` | `last` | The last name | `string \| undefined` | `undefined` |
| `middle` | `middle` | The middle name | `string \| undefined` | `undefined` |
---
----------------------------------------------
*Built with [StencilJS](https://stenciljs.com/)*
_Built with [StencilJS](https://stenciljs.com/)_
+1 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
@@ -9,13 +9,13 @@ export const axeCoreChecker: A11yChecker = {
return {
checkerName: 'axe-core',
violations: results.violations.map((violations) => ({
violations: results.violations.map(violations => ({
id: violations.id,
impact: violations.impact ?? null,
description: violations.help,
helpUrl: violations.helpUrl,
nodes: violations.nodes.map((node) => node.target.join(' ')),
nodes: violations.nodes.map(node => node.target.join(' ')),
})),
};
},
};
};
@@ -14,4 +14,4 @@ export interface A11yCheckResult {
export interface A11yChecker {
name: string;
run(root: Element): Promise<A11yCheckResult>;
}
}
@@ -1,12 +1,10 @@
import type { A11yChecker, A11yCheckResult } from './checkers/types';
import { axeCoreChecker } from './checkers/axe-core.checker';
const a11yCheckerRegistry: A11yChecker[] = [
axeCoreChecker,
];
const a11yCheckerRegistry: A11yChecker[] = [axeCoreChecker];
export async function runA11yChecks(rootElement: Element): Promise<A11yCheckResult[]> {
return Promise.all(a11yCheckerRegistry.map((a11yChecker) => a11yChecker.run(rootElement)));
return Promise.all(a11yCheckerRegistry.map(a11yChecker => a11yChecker.run(rootElement)));
}
export type { A11yChecker, A11yCheckResult, A11yViolation } from './checkers/types';
export type { A11yChecker, A11yCheckResult, A11yViolation } from './checkers/types';
@@ -3,7 +3,7 @@ import type { A11yCheckResult } from './checkers/types';
expect.extend({
toHaveNoA11yViolations(results: A11yCheckResult[]) {
const failing = results.filter((results) => results.violations.length > 0);
const failing = results.filter(results => results.violations.length > 0);
if (failing.length === 0) {
return {
@@ -14,11 +14,9 @@ expect.extend({
const message = failing
.map(
(results) =>
results =>
`[${results.checkerName}] ${results.violations.length} violation(s):\n` +
results.violations
.map((validation) => ` - ${validation.id} (${validation.impact}): ${validation.description}\n affected: ${validation.nodes.join(', ')}`)
.join('\n')
results.violations.map(validation => ` - ${validation.id} (${validation.impact}): ${validation.description}\n affected: ${validation.nodes.join(', ')}`).join('\n'),
)
.join('\n\n');
@@ -33,4 +31,4 @@ declare module 'vitest' {
interface Assertion {
toHaveNoA11yViolations(): void;
}
}
}