Skip to content

Commit

Permalink
docs: standardize todos in code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Nov 28, 2024
1 parent 11d0506 commit a3d0b51
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginYml from 'eslint-plugin-yml';
import eslint from '@eslint/js';

const eslintPluginLyne = await import('./tools/eslint/index.ts');

const compat = new FlatCompat({
Expand Down Expand Up @@ -149,7 +150,7 @@ export default [
'newlines-between': 'always',
},
],
// TODO Discuss this with the team
// TODO: Discuss this with the team
'lit/no-invalid-html': 'off',
camelcase: 'off',
'@typescript-eslint/member-ordering': [
Expand Down
2 changes: 1 addition & 1 deletion src/elements/checkbox/checkbox-panel/checkbox-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SbbCheckboxPanelElement extends SbbPanelMixin(
) {
public static override styles: CSSResultGroup = [checkboxCommonStyle, panelCommonStyle];

// FIXME using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
// TODO: fix using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
public static readonly events = {
stateChange: 'stateChange',
panelConnected: 'panelConnected',
Expand Down
4 changes: 2 additions & 2 deletions src/elements/core/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export interface SbbConfig {

export function readConfig(): SbbConfig {
if (!('sbbConfig' in globalThis)) {
(globalThis as any).sbbConfig = {}; // FIXME any type
(globalThis as any).sbbConfig = {}; // TODO: fix any type
}
return (globalThis as any).sbbConfig as SbbConfig; // FIXME any type
return (globalThis as any).sbbConfig as SbbConfig; // TODO: fix any type
}

export function mergeConfig(config: Partial<SbbConfig>): void {
Expand Down
4 changes: 2 additions & 2 deletions src/elements/icon/icon.snapshot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe(`sbb-icon`, () => {
let interceptorCalled = false;
globalConfig.icon = {};

const sbbIconConfig: SbbIconConfig = (globalThis as any).sbbConfig.icon; // FIXME any type
const sbbIconConfig: SbbIconConfig = (globalThis as any).sbbConfig.icon; // TODO: fix any type
sbbIconConfig.namespaces = new Map<string, string>().set(
'kom',
'https://icons.app.sbb.ch/kom/',
Expand Down Expand Up @@ -154,7 +154,7 @@ describe(`sbb-icon`, () => {
expect(interceptorCalled).to.be.true;

// Reset icon config
delete (globalThis as any).sbbConfig.icon; // FIXME any type
delete (globalThis as any).sbbConfig.icon; // TODO: fix any type
});

testA11yTreeSnapshot(html`<sbb-icon name="app-icon-medium"></sbb-icon>`);
Expand Down
2 changes: 1 addition & 1 deletion src/elements/notification/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export
@customElement('sbb-notification')
@slotState()
class SbbNotificationElement extends LitElement {
// FIXME inheriting from SbbOpenCloseBaseElement requires: https://github.com/open-wc/custom-elements-manifest/issues/253
// TODO: fix inheriting from SbbOpenCloseBaseElement requires: https://github.com/open-wc/custom-elements-manifest/issues/253
public static override styles: CSSResultGroup = style;
public static readonly events = {
willOpen: 'willOpen',
Expand Down
2 changes: 1 addition & 1 deletion src/elements/overlay/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export
class SbbOverlayElement extends SbbOverlayBaseElement {
public static override styles: CSSResultGroup = style;

// FIXME using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
// TODO: fix using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
public static override readonly events = {
willOpen: 'willOpen',
didOpen: 'didOpen',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SbbRadioButtonPanelElement extends SbbPanelMixin(
) {
public static override styles: CSSResultGroup = [radioButtonCommonStyle, panelCommonStyle];

// FIXME using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
// TODO: fix using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
public static readonly events = {
stateChange: 'stateChange',
change: 'change',
Expand Down
2 changes: 1 addition & 1 deletion src/elements/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class SbbSelectElement extends SbbUpdateSchedulerMixin(
) {
public static override styles: CSSResultGroup = style;

// FIXME using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
// TODO: fix using ...super.events requires: https://github.com/sbb-design-systems/lyne-components/issues/2600
public static override readonly events = {
change: 'change',
input: 'input',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { type CSSResultGroup, isServer, type PropertyValues, type TemplateResult } from 'lit';
import { html, LitElement } from 'lit';
import {
type CSSResultGroup,
html,
isServer,
LitElement,
type PropertyValues,
type TemplateResult,
} from 'lit';
import { customElement, property, state } from 'lit/decorators.js';

import type { SbbCheckboxGroupElement, SbbCheckboxPanelElement } from '../checkbox.js';
Expand Down Expand Up @@ -29,7 +35,7 @@ export
@customElement('sbb-selection-expansion-panel')
@slotState()
class SbbSelectionExpansionPanelElement extends SbbHydrationMixin(LitElement) {
// FIXME inheriting from SbbOpenCloseBaseElement requires: https://github.com/open-wc/custom-elements-manifest/issues/253
// TODO: fix inheriting from SbbOpenCloseBaseElement requires: https://github.com/open-wc/custom-elements-manifest/issues/253
public static override styles: CSSResultGroup = style;
public static readonly events: Record<string, string> = {
willOpen: 'willOpen',
Expand Down

0 comments on commit a3d0b51

Please sign in to comment.