Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export { dialogTag };
@Directive({
selector: 'nimble-dialog'
})
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
export class NimbleDialogDirective<CloseReason = void> {
public get preventDismiss(): boolean {
return this.elementRef.nativeElement.preventDismiss;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export { DrawerLocation };
@Directive({
selector: 'nimble-drawer'
})
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
export class NimbleDrawerDirective<CloseReason = void> {
public get location(): DrawerLocation {
return this.elementRef.nativeElement.location;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 };
Expand Down
4 changes: 2 additions & 2 deletions packages/angular-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/anchor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
2 changes: 1 addition & 1 deletion packages/nimble-components/src/banner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/banner/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '#';
Expand All @@ -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', '#');
Expand Down Expand Up @@ -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 = '#';
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/breadcrumb/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
6 changes: 3 additions & 3 deletions packages/nimble-components/src/chip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ declare global {
}
}

export type ChipOptions = FoundationElementDefinition &
StartOptions &
EndOptions;
export type ChipOptions = FoundationElementDefinition
& StartOptions
& EndOptions;

/**
* A Nimble chip component
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/chip/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/combobox/tests/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
3 changes: 1 addition & 2 deletions packages/nimble-components/src/dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ declare global {
/**
* A nimble-styled dialog.
*/
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
export class Dialog<CloseReason = void> extends FoundationElement {
// We want the member to match the name of the constant
// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down Expand Up @@ -146,7 +145,7 @@ export class Dialog<CloseReason = void> 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);

Expand Down
1 change: 0 additions & 1 deletion packages/nimble-components/src/dialog/tests/dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CloseReason = void>(
preventDismiss = false
): Promise<Fixture<Dialog<CloseReason>>> {
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/drawer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CloseReason = void> extends FoundationElement {
// We want the member to match the name of the constant
// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down Expand Up @@ -164,7 +163,7 @@ export class Drawer<CloseReason = void> 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);

Expand Down
1 change: 0 additions & 1 deletion packages/nimble-components/src/drawer/tests/drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CloseReason = void>(
preventDismiss = false
): Promise<Fixture<Drawer<CloseReason>>> {
Expand Down
6 changes: 2 additions & 4 deletions packages/nimble-components/src/drawer/tests/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ 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',
small300: 'Small300',
medium500: 'Medium500',
fitContent: 'FitContent'
} as const;
export type DrawerWidthOptions =
(typeof DrawerWidthOptions)[keyof typeof DrawerWidthOptions];
export type DrawerWidthOptions = (typeof DrawerWidthOptions)[keyof typeof DrawerWidthOptions];
3 changes: 1 addition & 2 deletions packages/nimble-components/src/drawer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
2 changes: 1 addition & 1 deletion packages/nimble-components/src/mapping/icon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class MappingIcon extends Mapping<MappingKey> {
// 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)
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/menu-button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/number-field/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
6 changes: 2 additions & 4 deletions packages/nimble-components/src/patterns/button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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];
6 changes: 2 additions & 4 deletions packages/nimble-components/src/patterns/dropdown/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ 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',
outline: 'outline',
block: 'block',
frameless: 'frameless'
} as const;
export type DropdownAppearance =
(typeof DropdownAppearance)[keyof typeof DropdownAppearance];
export type DropdownAppearance = (typeof DropdownAppearance)[keyof typeof DropdownAppearance];

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> = T extends readonly (infer U)[] ? U : never;
Expand Down Expand Up @@ -122,7 +122,7 @@ export class RichTextMentionValidator<
// eslint-disable-next-line no-new
new URL(url);
return false;
} catch (error) {
} catch (_error) {
return true;
}
}
Expand All @@ -133,7 +133,7 @@ export class RichTextMentionValidator<
// eslint-disable-next-line no-new
new RegExp(pattern);
return false;
} catch (error) {
} catch (_error) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-components/src/rich-text/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions packages/nimble-components/src/rich-text/editor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

/**
Expand Down
Loading