diff --git a/packages/angular-workspace/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts b/packages/angular-workspace/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts index f68b7d3335..b8a47bc89c 100644 --- a/packages/angular-workspace/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts +++ b/packages/angular-workspace/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts @@ -51,7 +51,6 @@ export class NimbleLabelProviderTableDirective { } // Renaming because property should have camel casing, but attribute should not - // eslint-disable-next-line @angular-eslint/no-input-rename @Input('collapse-all') public set collapseAll(value: string | undefined) { this.renderer.setProperty(this.elementRef.nativeElement, 'collapseAll', value); } diff --git a/packages/angular-workspace/nimble-angular/src/directives/dialog/nimble-dialog.directive.ts b/packages/angular-workspace/nimble-angular/src/directives/dialog/nimble-dialog.directive.ts index 815f3c0521..9ebdfc55d3 100644 --- a/packages/angular-workspace/nimble-angular/src/directives/dialog/nimble-dialog.directive.ts +++ b/packages/angular-workspace/nimble-angular/src/directives/dialog/nimble-dialog.directive.ts @@ -17,7 +17,6 @@ export { dialogTag }; @Directive({ selector: 'nimble-dialog' }) -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type export class NimbleDialogDirective { public get preventDismiss(): boolean { return this.elementRef.nativeElement.preventDismiss; diff --git a/packages/angular-workspace/nimble-angular/src/directives/drawer/nimble-drawer.directive.ts b/packages/angular-workspace/nimble-angular/src/directives/drawer/nimble-drawer.directive.ts index 0a82305589..f6c77dd762 100644 --- a/packages/angular-workspace/nimble-angular/src/directives/drawer/nimble-drawer.directive.ts +++ b/packages/angular-workspace/nimble-angular/src/directives/drawer/nimble-drawer.directive.ts @@ -19,7 +19,6 @@ export { DrawerLocation }; @Directive({ selector: 'nimble-drawer' }) -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type export class NimbleDrawerDirective { public get location(): DrawerLocation { return this.elementRef.nativeElement.location; diff --git a/packages/angular-workspace/nimble-angular/src/testing/async-helpers.ts b/packages/angular-workspace/nimble-angular/src/testing/async-helpers.ts index 1e4831f797..b981eada42 100644 --- a/packages/angular-workspace/nimble-angular/src/testing/async-helpers.ts +++ b/packages/angular-workspace/nimble-angular/src/testing/async-helpers.ts @@ -1,6 +1,5 @@ // This is a workaround until nimble-angular exposes `testing` entrypoints: // https://github.com/ni/nimble/issues/172#issuecomment-1529958809 -// eslint-disable-next-line no-restricted-imports import { processUpdates, waitForUpdatesAsync as waitForUpdatesAsyncOriginal } from '@ni/nimble-components/dist/esm/testing/async-helpers'; export { processUpdates }; diff --git a/packages/angular-workspace/package.json b/packages/angular-workspace/package.json index af457beb4e..ea782698d6 100644 --- a/packages/angular-workspace/package.json +++ b/packages/angular-workspace/package.json @@ -14,6 +14,7 @@ "generate-icons:bundle": "rollup --bundleConfigAsCjs --config nimble-angular/build/generate-icons/rollup.config.js", "generate-icons:run": "node nimble-angular/build/generate-icons/dist/index.js", "lint": "eslint . && ng lint", + "format": "eslint . --fix && ng lint --fix", "pack": "npm run pack:nimble && npm run pack:spright && npm run pack:ok && npm run pack:application", "pack:nimble": "cd dist/nimble-angular && npm pack", "pack:spright": "cd dist/spright-angular && npm pack", @@ -30,8 +31,7 @@ "test": "ng test --watch=false", "test-nimble": "ng test @ni/nimble-angular --watch=false", "test-spright": "ng test @ni/spright-angular --watch=false", - "test-ok": "ng test @ni/ok-angular --watch=false", - "format": "ng lint --fix" + "test-ok": "ng test @ni/ok-angular --watch=false" }, "dependencies": { "@angular/animations": "^18.2.13", diff --git a/packages/nimble-components/src/anchor/types.ts b/packages/nimble-components/src/anchor/types.ts index cf5f4417af..3e89e37da1 100644 --- a/packages/nimble-components/src/anchor/types.ts +++ b/packages/nimble-components/src/anchor/types.ts @@ -6,5 +6,4 @@ export const AnchorAppearance = { default: undefined, prominent: 'prominent' } as const; -export type AnchorAppearance = - (typeof AnchorAppearance)[keyof typeof AnchorAppearance]; +export type AnchorAppearance = (typeof AnchorAppearance)[keyof typeof AnchorAppearance]; diff --git a/packages/nimble-components/src/banner/index.ts b/packages/nimble-components/src/banner/index.ts index 5075d0aae5..9a24092863 100644 --- a/packages/nimble-components/src/banner/index.ts +++ b/packages/nimble-components/src/banner/index.ts @@ -70,7 +70,7 @@ export class Banner extends FoundationElement { } } -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface Banner extends ARIAGlobalStatesAndProperties {} applyMixins(Banner, ARIAGlobalStatesAndProperties); diff --git a/packages/nimble-components/src/banner/types.ts b/packages/nimble-components/src/banner/types.ts index 54d7142889..aeb30c5633 100644 --- a/packages/nimble-components/src/banner/types.ts +++ b/packages/nimble-components/src/banner/types.ts @@ -9,8 +9,7 @@ export const BannerSeverity = { information: 'information' } as const; -export type BannerSeverity = - (typeof BannerSeverity)[keyof typeof BannerSeverity]; +export type BannerSeverity = (typeof BannerSeverity)[keyof typeof BannerSeverity]; /** * The type of the detail associated with the `toggle` diff --git a/packages/nimble-components/src/breadcrumb/breadcrumb.foundation.spec.ts b/packages/nimble-components/src/breadcrumb/breadcrumb.foundation.spec.ts index 2553b183b2..bf4fd3da8d 100644 --- a/packages/nimble-components/src/breadcrumb/breadcrumb.foundation.spec.ts +++ b/packages/nimble-components/src/breadcrumb/breadcrumb.foundation.spec.ts @@ -94,7 +94,9 @@ describe('Breadcrumb', () => { }); it('should set the `aria-current` on the internal, last node, anchor when `href` is passed', async () => { - const { element, connect, disconnect, item1, item2, item3 } = await setup(); + const { + element, connect, disconnect, item1, item2, item3 + } = await setup(); const anchor1 = document.createElement('a'); anchor1.href = '#'; @@ -119,7 +121,9 @@ describe('Breadcrumb', () => { }); it('should remove aria-current from any prior Breadcrumb Item children with hrefs when a new node is appended', async () => { - const { element, connect, disconnect, item1, item2, item3 } = await setup(); + const { + element, connect, disconnect, item1, item2, item3 + } = await setup(); item1.setAttribute('href', '#'); item2.setAttribute('href', '#'); @@ -155,7 +159,9 @@ describe('Breadcrumb', () => { }); it('should remove aria-current from any prior Breadcrumb Item children with child anchors when a new node is appended', async () => { - const { element, connect, disconnect, item1, item2, item3 } = await setup(); + const { + element, connect, disconnect, item1, item2, item3 + } = await setup(); const anchor1 = document.createElement('a'); anchor1.href = '#'; diff --git a/packages/nimble-components/src/breadcrumb/types.ts b/packages/nimble-components/src/breadcrumb/types.ts index e9bed6fcac..805f53ebb7 100644 --- a/packages/nimble-components/src/breadcrumb/types.ts +++ b/packages/nimble-components/src/breadcrumb/types.ts @@ -6,5 +6,4 @@ export const BreadcrumbAppearance = { default: undefined, prominent: 'prominent' } as const; -export type BreadcrumbAppearance = - (typeof BreadcrumbAppearance)[keyof typeof BreadcrumbAppearance]; +export type BreadcrumbAppearance = (typeof BreadcrumbAppearance)[keyof typeof BreadcrumbAppearance]; diff --git a/packages/nimble-components/src/chip/index.ts b/packages/nimble-components/src/chip/index.ts index e0a189c452..366ef4c6b1 100644 --- a/packages/nimble-components/src/chip/index.ts +++ b/packages/nimble-components/src/chip/index.ts @@ -20,9 +20,9 @@ declare global { } } -export type ChipOptions = FoundationElementDefinition & - StartOptions & - EndOptions; +export type ChipOptions = FoundationElementDefinition + & StartOptions + & EndOptions; /** * A Nimble chip component diff --git a/packages/nimble-components/src/chip/types.ts b/packages/nimble-components/src/chip/types.ts index 5ebc68327c..76b460868c 100644 --- a/packages/nimble-components/src/chip/types.ts +++ b/packages/nimble-components/src/chip/types.ts @@ -2,5 +2,4 @@ export const ChipAppearance = { outline: 'outline', block: 'block' } as const; -export type ChipAppearance = - (typeof ChipAppearance)[keyof typeof ChipAppearance]; +export type ChipAppearance = (typeof ChipAppearance)[keyof typeof ChipAppearance]; diff --git a/packages/nimble-components/src/combobox/models/combobox-form-associated.ts b/packages/nimble-components/src/combobox/models/combobox-form-associated.ts index eb841622e4..4048612a65 100644 --- a/packages/nimble-components/src/combobox/models/combobox-form-associated.ts +++ b/packages/nimble-components/src/combobox/models/combobox-form-associated.ts @@ -4,7 +4,7 @@ import { FormAssociated, ListboxElement } from '@ni/fast-foundation'; // eslint-disable-next-line jsdoc/require-jsdoc class Combobox extends ListboxElement {} -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type interface Combobox extends FormAssociated {} /** diff --git a/packages/nimble-components/src/combobox/tests/combobox.foundation.spec.ts b/packages/nimble-components/src/combobox/tests/combobox.foundation.spec.ts index 4f761d9c1b..38119d9853 100644 --- a/packages/nimble-components/src/combobox/tests/combobox.foundation.spec.ts +++ b/packages/nimble-components/src/combobox/tests/combobox.foundation.spec.ts @@ -450,7 +450,9 @@ describe('Combobox', () => { }); it("should set the control's `aria-activedescendant` property to the ID of the currently selected option while open", async () => { - const { connect, disconnect, element, option1, option2, option3 } = await setup(); + const { + connect, disconnect, element, option1, option2, option3 + } = await setup(); await connect(); diff --git a/packages/nimble-components/src/combobox/tests/types.ts b/packages/nimble-components/src/combobox/tests/types.ts index 18ccc7da6a..465025f579 100644 --- a/packages/nimble-components/src/combobox/tests/types.ts +++ b/packages/nimble-components/src/combobox/tests/types.ts @@ -3,5 +3,4 @@ export const ExampleOptionsType = { wideOptions: 'WideOptions', manyOptions: 'ManyOptions' } as const; -export type ExampleOptionsType = - (typeof ExampleOptionsType)[keyof typeof ExampleOptionsType]; +export type ExampleOptionsType = (typeof ExampleOptionsType)[keyof typeof ExampleOptionsType]; diff --git a/packages/nimble-components/src/dialog/index.ts b/packages/nimble-components/src/dialog/index.ts index 45ba0e5512..5878c177bd 100644 --- a/packages/nimble-components/src/dialog/index.ts +++ b/packages/nimble-components/src/dialog/index.ts @@ -20,7 +20,6 @@ declare global { /** * A nimble-styled dialog. */ -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type export class Dialog extends FoundationElement { // We want the member to match the name of the constant // eslint-disable-next-line @typescript-eslint/naming-convention @@ -146,7 +145,7 @@ export class Dialog extends FoundationElement { } } -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface Dialog extends ARIAGlobalStatesAndProperties {} applyMixins(Dialog, ARIAGlobalStatesAndProperties); diff --git a/packages/nimble-components/src/dialog/tests/dialog.spec.ts b/packages/nimble-components/src/dialog/tests/dialog.spec.ts index eee140094c..65c6a1066e 100644 --- a/packages/nimble-components/src/dialog/tests/dialog.spec.ts +++ b/packages/nimble-components/src/dialog/tests/dialog.spec.ts @@ -4,7 +4,6 @@ import { Dialog, dialogTag, UserDismissed } from '..'; import { waitForUpdatesAsync } from '../../testing/async-helpers'; import { buttonTag } from '../../button'; -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type async function setup( preventDismiss = false ): Promise>> { diff --git a/packages/nimble-components/src/drawer/index.ts b/packages/nimble-components/src/drawer/index.ts index 34d7b9437d..abb599ec85 100644 --- a/packages/nimble-components/src/drawer/index.ts +++ b/packages/nimble-components/src/drawer/index.ts @@ -23,7 +23,6 @@ declare global { * Drawer control. Shows content in a panel on the left / right side of the screen, * which animates to be visible with a slide-in / slide-out animation. */ -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type export class Drawer extends FoundationElement { // We want the member to match the name of the constant // eslint-disable-next-line @typescript-eslint/naming-convention @@ -164,7 +163,7 @@ export class Drawer extends FoundationElement { } } -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface Drawer extends ARIAGlobalStatesAndProperties {} applyMixins(Drawer, ARIAGlobalStatesAndProperties); diff --git a/packages/nimble-components/src/drawer/tests/drawer.spec.ts b/packages/nimble-components/src/drawer/tests/drawer.spec.ts index 076caa62a6..0a3ffa0d52 100644 --- a/packages/nimble-components/src/drawer/tests/drawer.spec.ts +++ b/packages/nimble-components/src/drawer/tests/drawer.spec.ts @@ -9,7 +9,6 @@ import { } from '../../testing/async-helpers'; import { buttonTag } from '../../button'; -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type async function setup( preventDismiss = false ): Promise>> { diff --git a/packages/nimble-components/src/drawer/tests/types.ts b/packages/nimble-components/src/drawer/tests/types.ts index 47b1ecbf06..eb881baddf 100644 --- a/packages/nimble-components/src/drawer/tests/types.ts +++ b/packages/nimble-components/src/drawer/tests/types.ts @@ -2,8 +2,7 @@ export const ExampleContentType = { simpleTextContent: 'SimpleTextContent', headerContentFooter: 'HeaderContentFooter' } as const; -export type ExampleContentType = - (typeof ExampleContentType)[keyof typeof ExampleContentType]; +export type ExampleContentType = (typeof ExampleContentType)[keyof typeof ExampleContentType]; export const DrawerWidthOptions = { default: 'Default', @@ -11,5 +10,4 @@ export const DrawerWidthOptions = { medium500: 'Medium500', fitContent: 'FitContent' } as const; -export type DrawerWidthOptions = - (typeof DrawerWidthOptions)[keyof typeof DrawerWidthOptions]; +export type DrawerWidthOptions = (typeof DrawerWidthOptions)[keyof typeof DrawerWidthOptions]; diff --git a/packages/nimble-components/src/drawer/types.ts b/packages/nimble-components/src/drawer/types.ts index 5f5f6b01a2..f65a7f5573 100644 --- a/packages/nimble-components/src/drawer/types.ts +++ b/packages/nimble-components/src/drawer/types.ts @@ -2,5 +2,4 @@ export const DrawerLocation = { left: 'left', right: 'right' } as const; -export type DrawerLocation = - (typeof DrawerLocation)[keyof typeof DrawerLocation]; +export type DrawerLocation = (typeof DrawerLocation)[keyof typeof DrawerLocation]; diff --git a/packages/nimble-components/src/mapping/icon/index.ts b/packages/nimble-components/src/mapping/icon/index.ts index 629018a16f..ea25eac650 100644 --- a/packages/nimble-components/src/mapping/icon/index.ts +++ b/packages/nimble-components/src/mapping/icon/index.ts @@ -49,7 +49,7 @@ export class MappingIcon extends Mapping { // Clear the current resolution while waiting for async resolution this.resolvedIcon = undefined; await customElements.whenDefined(icon); - } catch (ex) { + } catch (_ex) { // If any error (i.e. invalid custom element name) don't continue // Don't update the resolvedIcon as it was already set to undefined before async resolution // (in case other async resolutions were started) diff --git a/packages/nimble-components/src/menu-button/types.ts b/packages/nimble-components/src/menu-button/types.ts index 4d2371dee1..3d918509b7 100644 --- a/packages/nimble-components/src/menu-button/types.ts +++ b/packages/nimble-components/src/menu-button/types.ts @@ -15,8 +15,7 @@ export const MenuButtonPosition = { below: 'below', auto: 'auto' } as const; -export type MenuButtonPosition = - (typeof MenuButtonPosition)[keyof typeof MenuButtonPosition]; +export type MenuButtonPosition = (typeof MenuButtonPosition)[keyof typeof MenuButtonPosition]; /** * The type of the detail associated with the `toggle` and `beforetoggle` diff --git a/packages/nimble-components/src/number-field/types.ts b/packages/nimble-components/src/number-field/types.ts index 823b15fd4e..f5a2617480 100644 --- a/packages/nimble-components/src/number-field/types.ts +++ b/packages/nimble-components/src/number-field/types.ts @@ -8,5 +8,4 @@ export const NumberFieldAppearance = { frameless: 'frameless' } as const; -export type NumberFieldAppearance = - (typeof NumberFieldAppearance)[keyof typeof NumberFieldAppearance]; +export type NumberFieldAppearance = (typeof NumberFieldAppearance)[keyof typeof NumberFieldAppearance]; diff --git a/packages/nimble-components/src/patterns/button/types.ts b/packages/nimble-components/src/patterns/button/types.ts index d3d1b64bb2..c1cf08a918 100644 --- a/packages/nimble-components/src/patterns/button/types.ts +++ b/packages/nimble-components/src/patterns/button/types.ts @@ -40,8 +40,7 @@ export const ButtonAppearance = { ghost: 'ghost', block: 'block' } as const; -export type ButtonAppearance = - (typeof ButtonAppearance)[keyof typeof ButtonAppearance]; +export type ButtonAppearance = (typeof ButtonAppearance)[keyof typeof ButtonAppearance]; /** * Types of button appearance variants. @@ -52,5 +51,4 @@ export const ButtonAppearanceVariant = { primary: 'primary', accent: 'accent' } as const; -export type ButtonAppearanceVariant = - (typeof ButtonAppearanceVariant)[keyof typeof ButtonAppearanceVariant]; +export type ButtonAppearanceVariant = (typeof ButtonAppearanceVariant)[keyof typeof ButtonAppearanceVariant]; diff --git a/packages/nimble-components/src/patterns/dropdown/types.ts b/packages/nimble-components/src/patterns/dropdown/types.ts index 4e64f1d7ce..9ac859d1ab 100644 --- a/packages/nimble-components/src/patterns/dropdown/types.ts +++ b/packages/nimble-components/src/patterns/dropdown/types.ts @@ -13,8 +13,7 @@ export const DropdownPosition = { above: 'above', below: 'below' } as const; -export type DropdownPosition = - (typeof DropdownPosition)[keyof typeof DropdownPosition]; +export type DropdownPosition = (typeof DropdownPosition)[keyof typeof DropdownPosition]; export const DropdownAppearance = { underline: 'underline', @@ -22,8 +21,7 @@ export const DropdownAppearance = { block: 'block', frameless: 'frameless' } as const; -export type DropdownAppearance = - (typeof DropdownAppearance)[keyof typeof DropdownAppearance]; +export type DropdownAppearance = (typeof DropdownAppearance)[keyof typeof DropdownAppearance]; /** * @internal diff --git a/packages/nimble-components/src/radio-group/tests/radio-group.foundation.spec.ts b/packages/nimble-components/src/radio-group/tests/radio-group.foundation.spec.ts index edf468c7f6..f3b1aefee7 100644 --- a/packages/nimble-components/src/radio-group/tests/radio-group.foundation.spec.ts +++ b/packages/nimble-components/src/radio-group/tests/radio-group.foundation.spec.ts @@ -483,7 +483,9 @@ describe('Radio Group', () => { }); it('should allow resetting of elements by the parent form', async () => { - const { element, connect, disconnect, parent, radio1, radio2, radio3 } = await setup(); + const { + element, connect, disconnect, parent, radio1, radio2, radio3 + } = await setup(); radio2.setAttribute('checked', ''); diff --git a/packages/nimble-components/src/rich-text-mention/base/models/mention-validator.ts b/packages/nimble-components/src/rich-text-mention/base/models/mention-validator.ts index c4a75c0d2f..ae7416c3a3 100644 --- a/packages/nimble-components/src/rich-text-mention/base/models/mention-validator.ts +++ b/packages/nimble-components/src/rich-text-mention/base/models/mention-validator.ts @@ -4,7 +4,7 @@ import { type ValidityObject } from '../../../utilities/models/validator'; -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface RichTextMentionValidity extends ValidityObject {} type FlagNames = T extends readonly (infer U)[] ? U : never; @@ -122,7 +122,7 @@ export class RichTextMentionValidator< // eslint-disable-next-line no-new new URL(url); return false; - } catch (error) { + } catch (_error) { return true; } } @@ -133,7 +133,7 @@ export class RichTextMentionValidator< // eslint-disable-next-line no-new new RegExp(pattern); return false; - } catch (error) { + } catch (_error) { return true; } } diff --git a/packages/nimble-components/src/rich-text/editor/index.ts b/packages/nimble-components/src/rich-text/editor/index.ts index 7c69798fac..fe920ee7fe 100644 --- a/packages/nimble-components/src/rich-text/editor/index.ts +++ b/packages/nimble-components/src/rich-text/editor/index.ts @@ -718,7 +718,7 @@ export class RichTextEditor extends mixinErrorPattern(RichText) { } } -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface RichTextEditor extends ARIAGlobalStatesAndProperties {} applyMixins(RichTextEditor, ARIAGlobalStatesAndProperties); diff --git a/packages/nimble-components/src/rich-text/editor/testing/types.ts b/packages/nimble-components/src/rich-text/editor/testing/types.ts index b250073b75..5eab27d37f 100644 --- a/packages/nimble-components/src/rich-text/editor/testing/types.ts +++ b/packages/nimble-components/src/rich-text/editor/testing/types.ts @@ -19,11 +19,9 @@ export const ArrowKeyButton = { left: keyArrowLeft, right: keyArrowRight } as const; -export type ArrowKeyButton = - (typeof ArrowKeyButton)[keyof typeof ArrowKeyButton]; +export type ArrowKeyButton = (typeof ArrowKeyButton)[keyof typeof ArrowKeyButton]; -export type LabelProvider = - | 'toggleBold' +export type LabelProvider = 'toggleBold' | 'toggleItalics' | 'toggleBulletedList' | 'toggleNumberedList'; diff --git a/packages/nimble-components/src/rich-text/editor/types.ts b/packages/nimble-components/src/rich-text/editor/types.ts index c48728c9e0..b2c5c440d1 100644 --- a/packages/nimble-components/src/rich-text/editor/types.ts +++ b/packages/nimble-components/src/rich-text/editor/types.ts @@ -9,8 +9,7 @@ export const TipTapNodeName = { numberedList: 'orderedList' } as const; -export type TipTapNodeName = - (typeof TipTapNodeName)[keyof typeof TipTapNodeName]; +export type TipTapNodeName = (typeof TipTapNodeName)[keyof typeof TipTapNodeName]; export interface MentionExtensionConfig { name: string; diff --git a/packages/nimble-components/src/select/models/select-form-associated.ts b/packages/nimble-components/src/select/models/select-form-associated.ts index 3b64020cd8..f7f05ee29c 100644 --- a/packages/nimble-components/src/select/models/select-form-associated.ts +++ b/packages/nimble-components/src/select/models/select-form-associated.ts @@ -4,7 +4,7 @@ import { FormAssociated, ListboxElement } from '@ni/fast-foundation'; // eslint-disable-next-line jsdoc/require-jsdoc class Select extends ListboxElement {} -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type interface Select extends FormAssociated {} /** diff --git a/packages/nimble-components/src/select/tests/select.foundation.spec.ts b/packages/nimble-components/src/select/tests/select.foundation.spec.ts index f5f9fb695a..efaac9bbef 100644 --- a/packages/nimble-components/src/select/tests/select.foundation.spec.ts +++ b/packages/nimble-components/src/select/tests/select.foundation.spec.ts @@ -131,7 +131,9 @@ describe('Select', () => { }); it('should set its value to the first enabled option', async () => { - const { element, connect, disconnect, option1, option2, option3 } = await setup(); + const { + element, connect, disconnect, option1, option2, option3 + } = await setup(); await connect(); @@ -146,7 +148,9 @@ describe('Select', () => { }); it('should set its value to the first enabled option when disabled', async () => { - const { element, connect, disconnect, option1, option2, option3 } = await setup(); + const { + element, connect, disconnect, option1, option2, option3 + } = await setup(); element.disabled = true; await connect(); @@ -162,7 +166,9 @@ describe('Select', () => { }); it('should select the first option with a `selected` attribute', async () => { - const { element, connect, disconnect, option1, option2, option3 } = await setup(); + const { + element, connect, disconnect, option1, option2, option3 + } = await setup(); option2.setAttribute('selected', ''); @@ -179,7 +185,9 @@ describe('Select', () => { }); it('should select the first option with a `selected` attribute when disabled', async () => { - const { element, connect, disconnect, option1, option2, option3 } = await setup(); + const { + element, connect, disconnect, option1, option2, option3 + } = await setup(); element.disabled = true; option2.setAttribute('selected', ''); @@ -895,7 +903,9 @@ describe('Select', () => { }); it('should set the `aria-activedescendant` attribute to the ID of the currently selected option', async () => { - const { connect, disconnect, element, option1, option2, option3 } = await setup(); + const { + connect, disconnect, element, option1, option2, option3 + } = await setup(); await connect(); diff --git a/packages/nimble-components/src/select/tests/select.spec.ts b/packages/nimble-components/src/select/tests/select.spec.ts index c8de8547e9..32a28c2173 100644 --- a/packages/nimble-components/src/select/tests/select.spec.ts +++ b/packages/nimble-components/src/select/tests/select.spec.ts @@ -29,8 +29,7 @@ type SelectFilterInputEventHandler = ( type CustomEventHandler = (evt: CustomEvent) => void; -type OptionInitialState = - | 'selected' +type OptionInitialState = 'selected' | 'disabled' | 'disabled selected' | 'disabled hidden' diff --git a/packages/nimble-components/src/spinner/types.ts b/packages/nimble-components/src/spinner/types.ts index 585a2d72d8..92fd5521f5 100644 --- a/packages/nimble-components/src/spinner/types.ts +++ b/packages/nimble-components/src/spinner/types.ts @@ -6,5 +6,4 @@ export const SpinnerAppearance = { default: undefined, accent: 'accent' } as const; -export type SpinnerAppearance = - (typeof SpinnerAppearance)[keyof typeof SpinnerAppearance]; +export type SpinnerAppearance = (typeof SpinnerAppearance)[keyof typeof SpinnerAppearance]; diff --git a/packages/nimble-components/src/table-column/base/cell-view/template.ts b/packages/nimble-components/src/table-column/base/cell-view/template.ts index eb0a0e7af3..2e5e3d4d98 100644 --- a/packages/nimble-components/src/table-column/base/cell-view/template.ts +++ b/packages/nimble-components/src/table-column/base/cell-view/template.ts @@ -7,7 +7,7 @@ const validateCellViewTemplate = (cellViewTag: string): void => { let instance; try { instance = document.createElement(cellViewTag); - } catch (ex) { + } catch (_ex) { // Swallow construction error to report a better one } if (!(instance instanceof TableCellView)) { diff --git a/packages/nimble-components/src/table-column/base/group-header-view/template.ts b/packages/nimble-components/src/table-column/base/group-header-view/template.ts index 0ea2ba90f2..6e360c4879 100644 --- a/packages/nimble-components/src/table-column/base/group-header-view/template.ts +++ b/packages/nimble-components/src/table-column/base/group-header-view/template.ts @@ -6,7 +6,7 @@ const validateGroupHeaderViewTemplate = (groupHeaderViewTag: string): void => { let instance; try { instance = document.createElement(groupHeaderViewTag); - } catch (ex) { + } catch (_ex) { // Swallow construction error to report a better one } if (!(instance instanceof TableGroupHeaderView)) { diff --git a/packages/nimble-components/src/table-column/base/tests/types.ts b/packages/nimble-components/src/table-column/base/tests/types.ts index 1c575126ac..b0a131a84f 100644 --- a/packages/nimble-components/src/table-column/base/tests/types.ts +++ b/packages/nimble-components/src/table-column/base/tests/types.ts @@ -7,8 +7,7 @@ export const ExampleSortType = { firstColumnAscendingSecondColumnDisabled: 'FirstColumnAscendingSecondColumnDisabled' } as const; -export type ExampleSortType = - (typeof ExampleSortType)[keyof typeof ExampleSortType]; +export type ExampleSortType = (typeof ExampleSortType)[keyof typeof ExampleSortType]; export const ExampleGroupType = { none: 'None', @@ -17,15 +16,13 @@ export const ExampleGroupType = { firstThenLastName: 'FirstThenLastName', lastThenFirstName: 'LastThenFirstName' } as const; -export type ExampleGroupType = - (typeof ExampleGroupType)[keyof typeof ExampleGroupType]; +export type ExampleGroupType = (typeof ExampleGroupType)[keyof typeof ExampleGroupType]; export const ExampleGroupingDisabledType = { firstName: 'FirstName', lastName: 'LastName' } as const; -export type ExampleGroupingDisabledType = - (typeof ExampleGroupingDisabledType)[keyof typeof ExampleGroupingDisabledType]; +export type ExampleGroupingDisabledType = (typeof ExampleGroupingDisabledType)[keyof typeof ExampleGroupingDisabledType]; export const ExampleColumnFractionalWidthType = { default: 'Default', @@ -33,5 +30,4 @@ export const ExampleColumnFractionalWidthType = { firstColumTwiceSize: 'FirstColumnTwiceSize', thirdColumnHalfFourthColumnTwice: 'ThirdColumnHalfFourthColumnTwice' } as const; -export type ExampleColumnFractionalWidthType = - (typeof ExampleColumnFractionalWidthType)[keyof typeof ExampleColumnFractionalWidthType]; +export type ExampleColumnFractionalWidthType = (typeof ExampleColumnFractionalWidthType)[keyof typeof ExampleColumnFractionalWidthType]; diff --git a/packages/nimble-components/src/table-column/base/types.ts b/packages/nimble-components/src/table-column/base/types.ts index c7ebb215bc..7afd26183a 100644 --- a/packages/nimble-components/src/table-column/base/types.ts +++ b/packages/nimble-components/src/table-column/base/types.ts @@ -5,7 +5,7 @@ import type { ValidityObject } from '../../utilities/models/validator'; * An object whose fields are defined by a particular TableColumn, which is used by the column's * cellTemplate implementation. */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface TableCellRecord extends TableRecord {} export interface TableCellState< @@ -38,10 +38,9 @@ export const TableColumnSortOperation = { */ localeAwareCaseSensitive: 'localeAwareCaseSensitive' } as const; -export type TableColumnSortOperation = - (typeof TableColumnSortOperation)[keyof typeof TableColumnSortOperation]; +export type TableColumnSortOperation = (typeof TableColumnSortOperation)[keyof typeof TableColumnSortOperation]; -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface TableColumnValidity extends ValidityObject {} const columnIconSize = 16; // `iconSize` token diff --git a/packages/nimble-components/src/table-column/date-text/index.ts b/packages/nimble-components/src/table-column/date-text/index.ts index b9dc805e16..b6fcff5ba5 100644 --- a/packages/nimble-components/src/table-column/date-text/index.ts +++ b/packages/nimble-components/src/table-column/date-text/index.ts @@ -254,7 +254,7 @@ export class TableColumnDateText extends mixinTextBase( } try { return new Intl.DateTimeFormat(lang.getValueFor(this), options); - } catch (e) { + } catch (_e) { return undefined; } } diff --git a/packages/nimble-components/src/table-column/date-text/models/format-helper.ts b/packages/nimble-components/src/table-column/date-text/models/format-helper.ts index be0ba0eab4..6d5d047a3c 100644 --- a/packages/nimble-components/src/table-column/date-text/models/format-helper.ts +++ b/packages/nimble-components/src/table-column/date-text/models/format-helper.ts @@ -7,7 +7,7 @@ export function formatNumericDate( if (typeof date === 'number') { try { return formatter.format(date); - } catch (e) { + } catch (_e) { return ''; } } else { diff --git a/packages/nimble-components/src/table-column/date-text/types.ts b/packages/nimble-components/src/table-column/date-text/types.ts index d8f7e1c39d..51c8649d80 100644 --- a/packages/nimble-components/src/table-column/date-text/types.ts +++ b/packages/nimble-components/src/table-column/date-text/types.ts @@ -5,11 +5,9 @@ export const DateTextFormat = { default: undefined, custom: 'custom' } as const; -export type DateTextFormat = - (typeof DateTextFormat)[keyof typeof DateTextFormat]; +export type DateTextFormat = (typeof DateTextFormat)[keyof typeof DateTextFormat]; -export type LocaleMatcherAlgorithm = - Intl.DateTimeFormatOptions['localeMatcher']; +export type LocaleMatcherAlgorithm = Intl.DateTimeFormatOptions['localeMatcher']; export type WeekdayFormat = Intl.DateTimeFormatOptions['weekday']; export type EraFormat = Intl.DateTimeFormatOptions['era']; export type YearFormat = Intl.DateTimeFormatOptions['year']; @@ -19,8 +17,7 @@ export type HourFormat = Intl.DateTimeFormatOptions['hour']; export type MinuteFormat = Intl.DateTimeFormatOptions['minute']; export type SecondFormat = Intl.DateTimeFormatOptions['second']; export type TimeZoneNameFormat = Intl.DateTimeFormatOptions['timeZoneName']; -export type FormatMatcherAlgorithm = - Intl.DateTimeFormatOptions['formatMatcher']; +export type FormatMatcherAlgorithm = Intl.DateTimeFormatOptions['formatMatcher']; export type DayPeriodFormat = Intl.DateTimeFormatOptions['dayPeriod']; export type DateStyle = Intl.DateTimeFormatOptions['dateStyle']; export type TimeStyle = Intl.DateTimeFormatOptions['timeStyle']; diff --git a/packages/nimble-components/src/table-column/enum-base/index.ts b/packages/nimble-components/src/table-column/enum-base/index.ts index a705125ec1..2a5a3f8b52 100644 --- a/packages/nimble-components/src/table-column/enum-base/index.ts +++ b/packages/nimble-components/src/table-column/enum-base/index.ts @@ -19,8 +19,7 @@ import { resolveKeyWithType } from './models/mapping-key-resolver'; import type { TableColumnEnumBaseValidator } from './models/table-column-enum-base-validator'; import type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view'; -export type TableColumnEnumCellRecord = - | TableStringField<'value'> +export type TableColumnEnumCellRecord = TableStringField<'value'> | TableBooleanField<'value'> | TableNumberField<'value'>; export type MappingConfigs = Map; diff --git a/packages/nimble-components/src/table-column/enum-base/types.ts b/packages/nimble-components/src/table-column/enum-base/types.ts index 6159447ebc..e5d7b53397 100644 --- a/packages/nimble-components/src/table-column/enum-base/types.ts +++ b/packages/nimble-components/src/table-column/enum-base/types.ts @@ -7,5 +7,4 @@ export const MappingKeyType = { number: 'number', boolean: 'boolean' } as const; -export type MappingKeyType = - (typeof MappingKeyType)[keyof typeof MappingKeyType]; +export type MappingKeyType = (typeof MappingKeyType)[keyof typeof MappingKeyType]; diff --git a/packages/nimble-components/src/table-column/mapping/types.ts b/packages/nimble-components/src/table-column/mapping/types.ts index 6b8502a416..098a43bb06 100644 --- a/packages/nimble-components/src/table-column/mapping/types.ts +++ b/packages/nimble-components/src/table-column/mapping/types.ts @@ -5,5 +5,4 @@ export const TableColumnMappingWidthMode = { default: undefined, iconSize: 'icon-size' } as const; -export type TableColumnMappingWidthMode = - (typeof TableColumnMappingWidthMode)[keyof typeof TableColumnMappingWidthMode]; +export type TableColumnMappingWidthMode = (typeof TableColumnMappingWidthMode)[keyof typeof TableColumnMappingWidthMode]; diff --git a/packages/nimble-components/src/table-column/menu-button/tests/table-column-menu-button.spec.ts b/packages/nimble-components/src/table-column/menu-button/tests/table-column-menu-button.spec.ts index 24f63f1dcd..e05ea41583 100644 --- a/packages/nimble-components/src/table-column/menu-button/tests/table-column-menu-button.spec.ts +++ b/packages/nimble-components/src/table-column/menu-button/tests/table-column-menu-button.spec.ts @@ -500,11 +500,11 @@ describe('TableColumnMenuButton', () => { async function openMenuAndListenForColumnToggleEvents( menuButtonToOpen: MenuButtonPageObject ): Promise<{ - column1BeforeToggleEmitCount: number, - column1ToggleEmitCount: number, - column2BeforeToggleEmitCount: number, - column2ToggleEmitCount: number - }> { + column1BeforeToggleEmitCount: number, + column1ToggleEmitCount: number, + column2BeforeToggleEmitCount: number, + column2ToggleEmitCount: number + }> { const column1BeforeToggleSpy = jasmine.createSpy(); elementReferences.column1.addEventListener( 'menu-button-column-beforetoggle', diff --git a/packages/nimble-components/src/table-column/mixins/custom-sort-order.ts b/packages/nimble-components/src/table-column/mixins/custom-sort-order.ts index bd93ca979d..07b012da45 100644 --- a/packages/nimble-components/src/table-column/mixins/custom-sort-order.ts +++ b/packages/nimble-components/src/table-column/mixins/custom-sort-order.ts @@ -101,7 +101,6 @@ export function mixinCustomSortOrderColumnAPI< } attr({ attribute: 'sort-by-field-name' })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument CustomSortOrderColumn.prototype, 'sortByFieldName' ); diff --git a/packages/nimble-components/src/table-column/mixins/fractional-width-column.ts b/packages/nimble-components/src/table-column/mixins/fractional-width-column.ts index 878591775d..630b24f5ae 100644 --- a/packages/nimble-components/src/table-column/mixins/fractional-width-column.ts +++ b/packages/nimble-components/src/table-column/mixins/fractional-width-column.ts @@ -32,12 +32,10 @@ export function mixinFractionalWidthColumnAPI< } attr({ attribute: 'fractional-width', converter: nullableNumberConverter })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument FractionalWidthColumn.prototype, 'fractionalWidth' ); attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument FractionalWidthColumn.prototype, 'minPixelWidth' ); diff --git a/packages/nimble-components/src/table-column/mixins/groupable-column.ts b/packages/nimble-components/src/table-column/mixins/groupable-column.ts index a74783bca7..58cf2b2223 100644 --- a/packages/nimble-components/src/table-column/mixins/groupable-column.ts +++ b/packages/nimble-components/src/table-column/mixins/groupable-column.ts @@ -30,12 +30,10 @@ export function mixinGroupableColumnAPI< } } attr({ attribute: 'grouping-disabled', mode: 'boolean' })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument GroupableColumn.prototype, 'groupingDisabled' ); attr({ attribute: 'group-index', converter: nullableNumberConverter })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument GroupableColumn.prototype, 'groupIndex' ); diff --git a/packages/nimble-components/src/table-column/mixins/placeholder.ts b/packages/nimble-components/src/table-column/mixins/placeholder.ts index e0d3e974a7..87eb20ca11 100644 --- a/packages/nimble-components/src/table-column/mixins/placeholder.ts +++ b/packages/nimble-components/src/table-column/mixins/placeholder.ts @@ -24,7 +24,6 @@ export function mixinColumnWithPlaceholderAPI< public abstract placeholderChanged(): void; } attr({ attribute: 'placeholder' })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument ColumnWithPlaceholder.prototype, 'placeholder' ); diff --git a/packages/nimble-components/src/table-column/mixins/sortable-column.ts b/packages/nimble-components/src/table-column/mixins/sortable-column.ts index 7c49d1fa4e..aa55f3043b 100644 --- a/packages/nimble-components/src/table-column/mixins/sortable-column.ts +++ b/packages/nimble-components/src/table-column/mixins/sortable-column.ts @@ -51,17 +51,14 @@ export function mixinSortableColumnAPI< } } attr({ attribute: 'sorting-disabled', mode: 'boolean' })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument SortableColumn.prototype, 'sortingDisabled' ); attr({ attribute: 'sort-index', converter: nullableNumberConverter })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument SortableColumn.prototype, 'sortIndex' ); attr({ attribute: 'sort-direction' })( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument SortableColumn.prototype, 'sortDirection' ); diff --git a/packages/nimble-components/src/table-column/number-text/models/number-text-unit-format.ts b/packages/nimble-components/src/table-column/number-text/models/number-text-unit-format.ts index 3b9cb18429..e0774316d4 100644 --- a/packages/nimble-components/src/table-column/number-text/models/number-text-unit-format.ts +++ b/packages/nimble-components/src/table-column/number-text/models/number-text-unit-format.ts @@ -12,8 +12,8 @@ export interface NumberTextUnitFormatOptions extends UnitFormatOptions { decimalDigits?: number; decimalMaximumDigits?: number; } -type ResolvedNumberTextUnitFormatOptions = NumberTextUnitFormatOptions & - Required; +type ResolvedNumberTextUnitFormatOptions = NumberTextUnitFormatOptions + & Required; /** * Format for numbers (with optional units) in a number-text table column. diff --git a/packages/nimble-components/src/table-column/number-text/types.ts b/packages/nimble-components/src/table-column/number-text/types.ts index a8d9261465..b12f8305c1 100644 --- a/packages/nimble-components/src/table-column/number-text/types.ts +++ b/packages/nimble-components/src/table-column/number-text/types.ts @@ -5,8 +5,7 @@ export const NumberTextFormat = { default: undefined, decimal: 'decimal' } as const; -export type NumberTextFormat = - (typeof NumberTextFormat)[keyof typeof NumberTextFormat]; +export type NumberTextFormat = (typeof NumberTextFormat)[keyof typeof NumberTextFormat]; /** * The aligment of the value in the number-text table column. @@ -17,5 +16,4 @@ export const NumberTextAlignment = { left: 'left', right: 'right' } as const; -export type NumberTextAlignment = - (typeof NumberTextAlignment)[keyof typeof NumberTextAlignment]; +export type NumberTextAlignment = (typeof NumberTextAlignment)[keyof typeof NumberTextAlignment]; diff --git a/packages/nimble-components/src/table-column/text-base/cell-view/index.ts b/packages/nimble-components/src/table-column/text-base/cell-view/index.ts index 54ccd70f9e..be584e2c30 100644 --- a/packages/nimble-components/src/table-column/text-base/cell-view/index.ts +++ b/packages/nimble-components/src/table-column/text-base/cell-view/index.ts @@ -18,10 +18,8 @@ export interface TableColumnTextBaseColumnConfig { * The cell view base class for displaying fields of any type as text. */ export abstract class TableColumnTextCellViewBase< - TCellRecord extends TableColumnTextBaseCellRecord = - TableColumnTextBaseCellRecord, - TColumnConfig extends TableColumnTextBaseColumnConfig = - TableColumnTextBaseColumnConfig + TCellRecord extends TableColumnTextBaseCellRecord = TableColumnTextBaseCellRecord, + TColumnConfig extends TableColumnTextBaseColumnConfig = TableColumnTextBaseColumnConfig > extends TableCellView { /** @internal */ @observable diff --git a/packages/nimble-components/src/table-column/text-base/group-header-view/index.ts b/packages/nimble-components/src/table-column/text-base/group-header-view/index.ts index ca232eee21..9321319db4 100644 --- a/packages/nimble-components/src/table-column/text-base/group-header-view/index.ts +++ b/packages/nimble-components/src/table-column/text-base/group-header-view/index.ts @@ -31,18 +31,18 @@ export abstract class TableColumnTextGroupHeaderViewBase< private readonly noValuePlaceholderLabelSubscriber: DesignTokenSubscriber< typeof tableGroupRowPlaceholderNoValueLabel > = { - handleChange: () => { - this.applyPlaceholderTextIfNeeded(); - } - }; + handleChange: () => { + this.applyPlaceholderTextIfNeeded(); + } + }; private readonly emptyPlaceholderLabelSubscriber: DesignTokenSubscriber< typeof tableGroupRowPlaceholderEmptyLabel > = { - handleChange: () => { - this.applyPlaceholderTextIfNeeded(); - } - }; + handleChange: () => { + this.applyPlaceholderTextIfNeeded(); + } + }; public override connectedCallback(): void { super.connectedCallback(); diff --git a/packages/nimble-components/src/table-column/text-base/index.ts b/packages/nimble-components/src/table-column/text-base/index.ts index c42768a586..bcfd905369 100644 --- a/packages/nimble-components/src/table-column/text-base/index.ts +++ b/packages/nimble-components/src/table-column/text-base/index.ts @@ -30,7 +30,7 @@ type TableColumnBaseConstructor< ...args: any[] ) => TableColumnTextBase; -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/no-explicit-any +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type export function mixinTextBase< TBase extends TableColumnBaseConstructor, TColumnConfig, diff --git a/packages/nimble-components/src/table-column/text/index.ts b/packages/nimble-components/src/table-column/text/index.ts index 2f3735ce21..d15cd0fbdc 100644 --- a/packages/nimble-components/src/table-column/text/index.ts +++ b/packages/nimble-components/src/table-column/text/index.ts @@ -13,7 +13,7 @@ import { TableColumnTextValidator } from './models/table-column-text-validator'; export type TableColumnTextCellRecord = TableStringField<'value'>; -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface TableColumnTextColumnConfig extends TableColumnTextBaseColumnConfig {} declare global { diff --git a/packages/nimble-components/src/table/components/row/index.ts b/packages/nimble-components/src/table/components/row/index.ts index 6f98be270c..83fa7d58bd 100644 --- a/packages/nimble-components/src/table/components/row/index.ts +++ b/packages/nimble-components/src/table/components/row/index.ts @@ -35,7 +35,7 @@ declare global { } /** Represents a single row (element) in the Table's data */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface TableDataRecord extends TableRecord {} /** diff --git a/packages/nimble-components/src/table/index.ts b/packages/nimble-components/src/table/index.ts index d4066a08cc..1f65360f2a 100644 --- a/packages/nimble-components/src/table/index.ts +++ b/packages/nimble-components/src/table/index.ts @@ -290,18 +290,18 @@ export class Table< private readonly borderWidthSubscriber: DesignTokenSubscriber< typeof borderWidth > = { - handleChange: () => { - this.updateRowHeight(); - } - }; + handleChange: () => { + this.updateRowHeight(); + } + }; private readonly controlHeightSubscriber: DesignTokenSubscriber< typeof controlHeight > = { - handleChange: () => { - this.updateRowHeight(); - } - }; + handleChange: () => { + this.updateRowHeight(); + } + }; private actionMenuSlots: string[] = []; @@ -1321,10 +1321,10 @@ export class Table< } private calculateTanStackRowIdFunction(): - | (( - originalRow: TableNode, - index: number, - parent?: TanStackRow> + (( + originalRow: TableNode, + index: number, + parent?: TanStackRow> ) => string) | undefined { return this.idFieldName === null || this.idFieldName === undefined diff --git a/packages/nimble-components/src/table/tests/table-delegated-events.spec.ts b/packages/nimble-components/src/table/tests/table-delegated-events.spec.ts index 1c433dc027..f3da4035f1 100644 --- a/packages/nimble-components/src/table/tests/table-delegated-events.spec.ts +++ b/packages/nimble-components/src/table/tests/table-delegated-events.spec.ts @@ -22,7 +22,6 @@ const columnName = uniqueElementName(); @customElement({ name: columnName }) -// eslint-disable-next-line @typescript-eslint/no-unused-vars class TestTableColumn extends TableColumn { protected override getColumnInternalsOptions(): ColumnInternalsOptions { return { diff --git a/packages/nimble-components/src/table/tests/table-keyboard-navigation.spec.ts b/packages/nimble-components/src/table/tests/table-keyboard-navigation.spec.ts index 23fc12e027..54b6884e91 100644 --- a/packages/nimble-components/src/table/tests/table-keyboard-navigation.spec.ts +++ b/packages/nimble-components/src/table/tests/table-keyboard-navigation.spec.ts @@ -1238,7 +1238,6 @@ describe('Table keyboard navigation', () => { name: interactiveCellViewName, template: html`Test` }) - // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestInteractiveCellView extends TableCellView { @observable public spanElement!: HTMLSpanElement; diff --git a/packages/nimble-components/src/table/tests/table.spec.ts b/packages/nimble-components/src/table/tests/table.spec.ts index 47c8ef7603..2ee14b78b8 100644 --- a/packages/nimble-components/src/table/tests/table.spec.ts +++ b/packages/nimble-components/src/table/tests/table.spec.ts @@ -697,7 +697,6 @@ describe('Table', () => { >${x => x.text}` }) - // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestFocusableCellView extends TableColumnTextCellView { public override get tabbableChildren(): HTMLElement[] { return [this.shadowRoot!.firstElementChild as HTMLElement]; diff --git a/packages/nimble-components/src/table/tests/types.ts b/packages/nimble-components/src/table/tests/types.ts index 630b657a68..36c9ebd9f5 100644 --- a/packages/nimble-components/src/table/tests/types.ts +++ b/packages/nimble-components/src/table/tests/types.ts @@ -3,5 +3,4 @@ export const ExampleDataType = { largeDataSet: 'LargeDataSet', hierarchicalDataSet: 'HierarchicalDataSet' } as const; -export type ExampleDataType = - (typeof ExampleDataType)[keyof typeof ExampleDataType]; +export type ExampleDataType = (typeof ExampleDataType)[keyof typeof ExampleDataType]; diff --git a/packages/nimble-components/src/table/types.ts b/packages/nimble-components/src/table/types.ts index 66051684b0..d1d650db97 100644 --- a/packages/nimble-components/src/table/types.ts +++ b/packages/nimble-components/src/table/types.ts @@ -101,8 +101,7 @@ export const TableRecordDelayedHierarchyState = { canLoadChildren: 'can-load-children', loadingChildren: 'loading-children' } as const; -export type TableRecordDelayedHierarchyState = - (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState]; +export type TableRecordDelayedHierarchyState = (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState]; export interface TableActionMenuToggleEventDetail { newState: boolean; @@ -119,8 +118,7 @@ export const TableColumnSortDirection = { ascending: 'ascending', descending: 'descending' } as const; -export type TableColumnSortDirection = - (typeof TableColumnSortDirection)[keyof typeof TableColumnSortDirection]; +export type TableColumnSortDirection = (typeof TableColumnSortDirection)[keyof typeof TableColumnSortDirection]; /** * The selection modes of rows in the table. @@ -130,8 +128,7 @@ export const TableRowSelectionMode = { single: 'single', multiple: 'multiple' } as const; -export type TableRowSelectionMode = - (typeof TableRowSelectionMode)[keyof typeof TableRowSelectionMode]; +export type TableRowSelectionMode = (typeof TableRowSelectionMode)[keyof typeof TableRowSelectionMode]; /** * @internal @@ -143,8 +140,7 @@ export const TableRowSelectionState = { selected: 'selected', partiallySelected: 'partially-selected' } as const; -export type TableRowSelectionState = - (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState]; +export type TableRowSelectionState = (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState]; /** * @internal @@ -227,8 +223,7 @@ export const TableColumnAlignment = { left: 'left', right: 'right' } as const; -export type TableColumnAlignment = - (typeof TableColumnAlignment)[keyof typeof TableColumnAlignment]; +export type TableColumnAlignment = (typeof TableColumnAlignment)[keyof typeof TableColumnAlignment]; /** * Table keyboard focus types @@ -243,8 +238,7 @@ export const TableFocusType = { cellActionMenu: 'cellActionMenu', cellContent: 'cellContent' } as const; -export type TableFocusType = - (typeof TableFocusType)[keyof typeof TableFocusType]; +export type TableFocusType = (typeof TableFocusType)[keyof typeof TableFocusType]; /** * @internal diff --git a/packages/nimble-components/src/text-area/types.ts b/packages/nimble-components/src/text-area/types.ts index 3a4f5c8f10..1a96de66f0 100644 --- a/packages/nimble-components/src/text-area/types.ts +++ b/packages/nimble-components/src/text-area/types.ts @@ -6,5 +6,4 @@ export const TextAreaAppearance = { outline: 'outline', block: 'block' } as const; -export type TextAreaAppearance = - (typeof TextAreaAppearance)[keyof typeof TextAreaAppearance]; +export type TextAreaAppearance = (typeof TextAreaAppearance)[keyof typeof TextAreaAppearance]; diff --git a/packages/nimble-components/src/text-field/types.ts b/packages/nimble-components/src/text-field/types.ts index bf4c7d6f98..30a5ef7248 100644 --- a/packages/nimble-components/src/text-field/types.ts +++ b/packages/nimble-components/src/text-field/types.ts @@ -15,5 +15,4 @@ export const TextFieldAppearance = { frameless: 'frameless' } as const; -export type TextFieldAppearance = - (typeof TextFieldAppearance)[keyof typeof TextFieldAppearance]; +export type TextFieldAppearance = (typeof TextFieldAppearance)[keyof typeof TextFieldAppearance]; diff --git a/packages/nimble-components/src/theme-provider/design-token-values.ts b/packages/nimble-components/src/theme-provider/design-token-values.ts index 61f42f185e..bf9dd752e8 100644 --- a/packages/nimble-components/src/theme-provider/design-token-values.ts +++ b/packages/nimble-components/src/theme-provider/design-token-values.ts @@ -483,12 +483,11 @@ function createThemeColor(light: string, dark: string, color: string): ThemeColo } as const; } -type Font = - { - [K in `${T}Font` | `${T}FontFamily` | `${T}FontWeight` | `${T}FontSize` | `${T}FontLineHeight`]: string; - } & { - [K in `${T}FontColor` | `${T}DisabledFontColor`]: ThemeColor; - }; +type Font = { + [K in `${T}Font` | `${T}FontFamily` | `${T}FontWeight` | `${T}FontSize` | `${T}FontLineHeight`]: string; +} & { + [K in `${T}FontColor` | `${T}DisabledFontColor`]: ThemeColor; +}; function createFont( token: T, diff --git a/packages/nimble-components/src/theme-provider/design-tokens.ts b/packages/nimble-components/src/theme-provider/design-tokens.ts index c0ca501bd6..7dd7d0d9ef 100644 --- a/packages/nimble-components/src/theme-provider/design-tokens.ts +++ b/packages/nimble-components/src/theme-provider/design-tokens.ts @@ -561,14 +561,14 @@ function createFontTokens( fontSize: string, fontLineHeight: string ): readonly [ - CSSDesignToken, - CSSDesignToken, - CSSDesignToken, - CSSDesignToken, - CSSDesignToken, - CSSDesignToken, - CSSDesignToken - ] { + CSSDesignToken, + CSSDesignToken, + CSSDesignToken, + CSSDesignToken, + CSSDesignToken, + CSSDesignToken, + CSSDesignToken +] { const fontNameParts = fontTokenName.split('-font'); const tokenPrefixWithoutFont = fontNameParts[0]; const fontFamilyWithFallback = `${fontFamily}, ${fontFamily} Fallback`; diff --git a/packages/nimble-components/src/theme-provider/index.ts b/packages/nimble-components/src/theme-provider/index.ts index dc1d589156..0aa0793351 100644 --- a/packages/nimble-components/src/theme-provider/index.ts +++ b/packages/nimble-components/src/theme-provider/index.ts @@ -25,7 +25,7 @@ function isValidLang(value: string): boolean { // eslint-disable-next-line no-new new Intl.Locale(value); return true; - } catch (e) { + } catch (_e) { return false; } } diff --git a/packages/nimble-components/src/theme-provider/tests/types.ts b/packages/nimble-components/src/theme-provider/tests/types.ts index e1afcd356d..8f415e0709 100644 --- a/packages/nimble-components/src/theme-provider/tests/types.ts +++ b/packages/nimble-components/src/theme-provider/tests/types.ts @@ -2,5 +2,4 @@ export const PropertyFormat = { scss: 'SCSS', css: 'CSS' } as const; -export type PropertyFormat = - (typeof PropertyFormat)[keyof typeof PropertyFormat]; +export type PropertyFormat = (typeof PropertyFormat)[keyof typeof PropertyFormat]; diff --git a/packages/nimble-components/src/tooltip/types.ts b/packages/nimble-components/src/tooltip/types.ts index 28c11e38da..e7eabcaaba 100644 --- a/packages/nimble-components/src/tooltip/types.ts +++ b/packages/nimble-components/src/tooltip/types.ts @@ -8,5 +8,4 @@ export const TooltipSeverity = { information: 'information' } as const; -export type TooltipSeverity = - (typeof TooltipSeverity)[keyof typeof TooltipSeverity]; +export type TooltipSeverity = (typeof TooltipSeverity)[keyof typeof TooltipSeverity]; diff --git a/packages/nimble-components/src/tree-view/types.ts b/packages/nimble-components/src/tree-view/types.ts index 2854079141..88b14d1aaa 100644 --- a/packages/nimble-components/src/tree-view/types.ts +++ b/packages/nimble-components/src/tree-view/types.ts @@ -6,5 +6,4 @@ export const TreeViewSelectionMode = { leavesOnly: 'leaves-only', none: 'none' } as const; -export type TreeViewSelectionMode = - (typeof TreeViewSelectionMode)[keyof typeof TreeViewSelectionMode]; +export type TreeViewSelectionMode = (typeof TreeViewSelectionMode)[keyof typeof TreeViewSelectionMode]; diff --git a/packages/nimble-components/src/utilities/style/tests/types.ts b/packages/nimble-components/src/utilities/style/tests/types.ts index 3e6d027381..f76039206c 100644 --- a/packages/nimble-components/src/utilities/style/tests/types.ts +++ b/packages/nimble-components/src/utilities/style/tests/types.ts @@ -3,5 +3,4 @@ export const TestAppearance = { awesome: 'awesome', best: 'best' } as const; -export type TestAppearance = - (typeof TestAppearance)[keyof typeof TestAppearance]; +export type TestAppearance = (typeof TestAppearance)[keyof typeof TestAppearance]; diff --git a/packages/nimble-components/src/utilities/unit-format/default-unit-format.ts b/packages/nimble-components/src/utilities/unit-format/default-unit-format.ts index e4abc8d59c..d2c1022dbb 100644 --- a/packages/nimble-components/src/utilities/unit-format/default-unit-format.ts +++ b/packages/nimble-components/src/utilities/unit-format/default-unit-format.ts @@ -9,7 +9,7 @@ import { passthroughUnitScale } from './unit-scale/passthrough-unit-scale'; const signDisplay = 'negative' as Intl.NumberFormatOptions['signDisplay']; // Allow consistent pattern for defining Options and ResolvedOptions -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-object-type interface DefaultUnitFormatOptions extends UnitFormatOptions {} type ResolvedDefaultUnitFormatOptions = Required; diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index 76c8031150..125599de39 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -7,8 +7,7 @@ export const WaferMapOriginLocation = { topRight: 'top-right' } as const; -export type WaferMapOriginLocation = - (typeof WaferMapOriginLocation)[keyof typeof WaferMapOriginLocation]; +export type WaferMapOriginLocation = (typeof WaferMapOriginLocation)[keyof typeof WaferMapOriginLocation]; export const WaferMapOrientation = { top: 'top', @@ -17,24 +16,21 @@ export const WaferMapOrientation = { right: 'right' } as const; -export type WaferMapOrientation = - (typeof WaferMapOrientation)[keyof typeof WaferMapOrientation]; +export type WaferMapOrientation = (typeof WaferMapOrientation)[keyof typeof WaferMapOrientation]; export const HoverDieOpacity = { show: 'show', hide: 'hide' } as const; -export type HoverDieOpacity = - (typeof HoverDieOpacity)[keyof typeof HoverDieOpacity]; +export type HoverDieOpacity = (typeof HoverDieOpacity)[keyof typeof HoverDieOpacity]; export const WaferMapColorScaleMode = { linear: 'linear', ordinal: 'ordinal' } as const; -export type WaferMapColorScaleMode = - (typeof WaferMapColorScaleMode)[keyof typeof WaferMapColorScaleMode]; +export type WaferMapColorScaleMode = (typeof WaferMapColorScaleMode)[keyof typeof WaferMapColorScaleMode]; export interface WaferMapDie { value: string; diff --git a/packages/react-workspace/react-client-app/package.json b/packages/react-workspace/react-client-app/package.json index 7e67ea5d1d..4102551253 100644 --- a/packages/react-workspace/react-client-app/package.json +++ b/packages/react-workspace/react-client-app/package.json @@ -8,7 +8,7 @@ "check": "tsc -b", "build": "npm run check && vite build", "lint": "eslint .", - "format": "eslint --fix .", + "format": "eslint . --fix", "preview": "vite preview" }, "dependencies": { diff --git a/packages/spright-components/src/chat/conversation/types.ts b/packages/spright-components/src/chat/conversation/types.ts index c191383b17..a9ed83aeb2 100644 --- a/packages/spright-components/src/chat/conversation/types.ts +++ b/packages/spright-components/src/chat/conversation/types.ts @@ -7,5 +7,4 @@ export const ChatConversationAppearance = { overlay: 'overlay' } as const; -export type ChatConversationAppearance = - (typeof ChatConversationAppearance)[keyof typeof ChatConversationAppearance]; +export type ChatConversationAppearance = (typeof ChatConversationAppearance)[keyof typeof ChatConversationAppearance]; diff --git a/packages/spright-components/src/chat/message/types.ts b/packages/spright-components/src/chat/message/types.ts index e332d86832..f4f93e0ba8 100644 --- a/packages/spright-components/src/chat/message/types.ts +++ b/packages/spright-components/src/chat/message/types.ts @@ -8,5 +8,4 @@ export const ChatMessageType = { inbound: 'inbound' } as const; -export type ChatMessageType = - (typeof ChatMessageType)[keyof typeof ChatMessageType]; +export type ChatMessageType = (typeof ChatMessageType)[keyof typeof ChatMessageType]; diff --git a/packages/storybook/src/docs/types.ts b/packages/storybook/src/docs/types.ts index c1ff0eb19c..3480f1f6da 100644 --- a/packages/storybook/src/docs/types.ts +++ b/packages/storybook/src/docs/types.ts @@ -3,5 +3,4 @@ export const ComponentFrameworkStatus = { incubating: 'incubating', doesNotExist: 'does_not_exist' } as const; -export type ComponentFrameworkStatus = - (typeof ComponentFrameworkStatus)[keyof typeof ComponentFrameworkStatus]; +export type ComponentFrameworkStatus = (typeof ComponentFrameworkStatus)[keyof typeof ComponentFrameworkStatus]; diff --git a/packages/storybook/src/nimble/breadcrumb/types.ts b/packages/storybook/src/nimble/breadcrumb/types.ts index ac1d2d4280..f3433c0442 100644 --- a/packages/storybook/src/nimble/breadcrumb/types.ts +++ b/packages/storybook/src/nimble/breadcrumb/types.ts @@ -3,5 +3,4 @@ export const ExampleBreadcrumbItemsType = { many: 'many', wide: 'wide' } as const; -export type ExampleBreadcrumbItemsType = - (typeof ExampleBreadcrumbItemsType)[keyof typeof ExampleBreadcrumbItemsType]; +export type ExampleBreadcrumbItemsType = (typeof ExampleBreadcrumbItemsType)[keyof typeof ExampleBreadcrumbItemsType]; diff --git a/packages/storybook/src/nimble/combobox/combobox-opened-matrix.stories.ts b/packages/storybook/src/nimble/combobox/combobox-opened-matrix.stories.ts index cfb7646400..650cab21de 100644 --- a/packages/storybook/src/nimble/combobox/combobox-opened-matrix.stories.ts +++ b/packages/storybook/src/nimble/combobox/combobox-opened-matrix.stories.ts @@ -17,6 +17,7 @@ const metadata: Meta = { export default metadata; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const positionStates = Object.values(DropdownPosition); type PositionState = (typeof positionStates)[number]; diff --git a/packages/storybook/src/nimble/dialog/types.ts b/packages/storybook/src/nimble/dialog/types.ts index 853f20fec3..6dccd3adc6 100644 --- a/packages/storybook/src/nimble/dialog/types.ts +++ b/packages/storybook/src/nimble/dialog/types.ts @@ -2,19 +2,16 @@ export const ExampleContentType = { shortContent: 'ShortContent', longContent: 'LongContent' } as const; -export type ExampleContentType = - (typeof ExampleContentType)[keyof typeof ExampleContentType]; +export type ExampleContentType = (typeof ExampleContentType)[keyof typeof ExampleContentType]; export const ExampleFooterContentType = { text: 'text', buttons: 'buttons' } as const; -export type ExampleFooterContentType = - (typeof ExampleFooterContentType)[keyof typeof ExampleFooterContentType]; +export type ExampleFooterContentType = (typeof ExampleFooterContentType)[keyof typeof ExampleFooterContentType]; export const DialogSizeOptions = { smallGrowable: 'Small growable', largeFixed: 'Large growable' } as const; -export type DialogSizeOptions = - (typeof DialogSizeOptions)[keyof typeof DialogSizeOptions]; +export type DialogSizeOptions = (typeof DialogSizeOptions)[keyof typeof DialogSizeOptions]; diff --git a/packages/storybook/src/nimble/patterns/tabs/types.ts b/packages/storybook/src/nimble/patterns/tabs/types.ts index 52261e472a..55effb2caa 100644 --- a/packages/storybook/src/nimble/patterns/tabs/types.ts +++ b/packages/storybook/src/nimble/patterns/tabs/types.ts @@ -4,5 +4,4 @@ export const ExampleTabsType = { manyTabs: 'ManyTabs', wideTabs: 'WideTabs' } as const; -export type ExampleTabsType = - (typeof ExampleTabsType)[keyof typeof ExampleTabsType]; +export type ExampleTabsType = (typeof ExampleTabsType)[keyof typeof ExampleTabsType]; diff --git a/packages/storybook/src/nimble/rich-text/editor/rich-text-editor.stories.ts b/packages/storybook/src/nimble/rich-text/editor/rich-text-editor.stories.ts index 68f5a97832..c3b59af95e 100644 --- a/packages/storybook/src/nimble/rich-text/editor/rich-text-editor.stories.ts +++ b/packages/storybook/src/nimble/rich-text/editor/rich-text-editor.stories.ts @@ -27,7 +27,6 @@ import { validityDescription } from '../../../utilities/storybook'; -// eslint-disable-next-line @typescript-eslint/no-empty-interface interface RichTextEditorArgs extends LabelUserArgs { data: ExampleDataType; mentionData: MentionDataType; diff --git a/packages/storybook/src/nimble/select/select-opened-matrix.stories.ts b/packages/storybook/src/nimble/select/select-opened-matrix.stories.ts index 0ca3178ee1..b3ad798987 100644 --- a/packages/storybook/src/nimble/select/select-opened-matrix.stories.ts +++ b/packages/storybook/src/nimble/select/select-opened-matrix.stories.ts @@ -19,6 +19,7 @@ const metadata: Meta = { export default metadata; +/* eslint-disable @typescript-eslint/no-unused-vars */ const positionStates = Object.values(DropdownPosition); type PositionState = (typeof positionStates)[number]; @@ -36,6 +37,7 @@ type GroupedState = (typeof groupedStates)[number]; const optionsOutsideGroupStates = [false, true] as const; type OptionsOutsideGroupState = (typeof optionsOutsideGroupStates)[number]; +/* eslint-enable @typescript-eslint/no-unused-vars */ interface SelectMatrixStoryOptions { positionState: PositionState; diff --git a/packages/storybook/src/nimble/select/types.ts b/packages/storybook/src/nimble/select/types.ts index 3c0b1e9310..97167d422a 100644 --- a/packages/storybook/src/nimble/select/types.ts +++ b/packages/storybook/src/nimble/select/types.ts @@ -5,5 +5,4 @@ export const ExampleOptionsType = { manyOptions: 'ManyOptions', groupedOptions: 'GroupedOptions' } as const; -export type ExampleOptionsType = - (typeof ExampleOptionsType)[keyof typeof ExampleOptionsType]; +export type ExampleOptionsType = (typeof ExampleOptionsType)[keyof typeof ExampleOptionsType]; diff --git a/packages/storybook/src/nimble/table-column/base/table-column-stories-utils.ts b/packages/storybook/src/nimble/table-column/base/table-column-stories-utils.ts index bcc9e4fec1..ac8df93d48 100644 --- a/packages/storybook/src/nimble/table-column/base/table-column-stories-utils.ts +++ b/packages/storybook/src/nimble/table-column/base/table-column-stories-utils.ts @@ -31,10 +31,10 @@ export const sharedTableArgTypes = { export const sharedTableArgs = ( data: readonly TableRecord[] ): { - selectionMode: keyof typeof TableRowSelectionMode, - tableRef: undefined, - updateData: (x: SharedTableArgs) => void - } => { + selectionMode: keyof typeof TableRowSelectionMode, + tableRef: undefined, + updateData: (x: SharedTableArgs) => void +} => { return { selectionMode: 'none', tableRef: undefined, diff --git a/packages/storybook/src/nimble/table/table-matrix.stories.ts b/packages/storybook/src/nimble/table/table-matrix.stories.ts index 7abd216d3c..a8cb8d26ed 100644 --- a/packages/storybook/src/nimble/table/table-matrix.stories.ts +++ b/packages/storybook/src/nimble/table/table-matrix.stories.ts @@ -83,6 +83,7 @@ const data = [ } ] as const; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const selectionModeStates = Object.values(TableRowSelectionMode); type SelectionModeState = (typeof selectionModeStates)[number]; diff --git a/packages/storybook/src/utilities/matrix.ts b/packages/storybook/src/utilities/matrix.ts index 73d7b8803d..4ed55f4b1c 100644 --- a/packages/storybook/src/utilities/matrix.ts +++ b/packages/storybook/src/utilities/matrix.ts @@ -42,11 +42,6 @@ export function cartesianProduct( ): void => { if (currentDimensions && currentDimensions.length >= 1) { const [currentDimensionOrUndefined, ...remainingDimensions] = currentDimensions; - - // TypeScript and ESLint disagree about whether this can be null or undefined. - // This was the only type strangeness noticed after the storybook build was changed - // to rely on component source directly so the workaround was allowed. - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion const currentDimension = currentDimensionOrUndefined!; for (const currentState of currentDimension) { recurseDimensions(remainingDimensions, ...states, currentState); diff --git a/packages/storybook/src/utilities/states.ts b/packages/storybook/src/utilities/states.ts index 6662dba7cd..ddf8f50d79 100644 --- a/packages/storybook/src/utilities/states.ts +++ b/packages/storybook/src/utilities/states.ts @@ -90,11 +90,9 @@ export const manipulationState = { export const manipulationDisabledAbsentStates = manipulationStates.filter( (state: (typeof manipulationStates)[number]) => state[2] === false ); -export type ManipulationDisabledAbsentState = - (typeof manipulationDisabledAbsentStates)[number]; +export type ManipulationDisabledAbsentState = (typeof manipulationDisabledAbsentStates)[number]; export const manipulationReadOnlyAbsentStates = manipulationStates.filter( (state: (typeof manipulationStates)[number]) => state[1] === false ); -export type ManipulationReadOnlyAbsentState = - (typeof manipulationReadOnlyAbsentStates)[number]; +export type ManipulationReadOnlyAbsentState = (typeof manipulationReadOnlyAbsentStates)[number]; diff --git a/packages/xliff-to-json-converter/src/xliff.d.ts b/packages/xliff-to-json-converter/src/xliff.d.ts index 46c044b6cf..d91551a5d4 100644 --- a/packages/xliff-to-json-converter/src/xliff.d.ts +++ b/packages/xliff-to-json-converter/src/xliff.d.ts @@ -6,7 +6,6 @@ declare module 'xliff' { // eslint-disable-next-line @typescript-eslint/naming-convention readonly Standalone: { readonly id: string, - // eslint-disable-next-line @typescript-eslint/naming-convention readonly 'equiv-text': string }; }