Skip to content

Commit 4b0b640

Browse files
committed
Fix lint issues
1 parent 5a9318f commit 4b0b640

File tree

8 files changed

+22
-24
lines changed

8 files changed

+22
-24
lines changed

src/index.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@
1313
* limitations under the License.
1414
*/
1515

16-
export {
17-
formatNumber,
18-
formatCurrency,
19-
formatNumberToParts,
20-
formatCurrencyToParts,
21-
resolveNumberFormat,
22-
resolveCurrencyFormat,
23-
isNumberFormatSupported,
24-
isNumberFormatToPartsSupported,
25-
} from './lib/number-format/index.js';
16+
export { CURRENCIES } from './data/currencies.js';
2617
export {
2718
formatDate,
28-
formatTime,
2919
formatDateTime,
3020
formatDateTimeToParts,
31-
resolveDateTimeFormat,
21+
formatTime,
3222
isDateTimeFormatSupported,
3323
isDateTimeFormatToPartsSupported,
24+
resolveDateTimeFormat,
3425
} from './lib/date-time-format/index.js';
26+
export {
27+
formatCurrency,
28+
formatCurrencyToParts,
29+
formatNumber,
30+
formatNumberToParts,
31+
isNumberFormatSupported,
32+
isNumberFormatToPartsSupported,
33+
resolveCurrencyFormat,
34+
resolveNumberFormat,
35+
} from './lib/number-format/index.js';
3536
export {
3637
formatRelativeTime,
3738
formatRelativeTimeToParts,
38-
resolveRelativeTimeFormat,
3939
isRelativeTimeFormatSupported,
40+
resolveRelativeTimeFormat,
4041
} from './lib/relative-time-format/index.js';
41-
export { CURRENCIES } from './data/currencies.js';

src/lib/date-time-format/tests/format-to-parts.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
// biome-ignore lint/suspicious/noShadowRestrictedNames:
16+
// biome-ignore lint/suspicious/noShadowRestrictedNames: Necessary for the polyfill to work
1717
import { Intl } from 'temporal-polyfill';
1818
import { describe, expect, it } from 'vitest';
1919

src/lib/date-time-format/tests/format.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
// biome-ignore lint/suspicious/noShadowRestrictedNames:
16+
// biome-ignore lint/suspicious/noShadowRestrictedNames: Necessary for the polyfill to work
1717
import { Intl } from 'temporal-polyfill';
1818
import { describe, expect, it } from 'vitest';
1919

src/lib/date-time-format/tests/resolve-format.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
// biome-ignore lint/suspicious/noShadowRestrictedNames:
16+
// biome-ignore lint/suspicious/noShadowRestrictedNames: Necessary for the polyfill to work
1717
import { Intl } from 'temporal-polyfill';
1818
import { describe, expect, it } from 'vitest';
1919

src/lib/date-time-format/tests/unsupported-styles.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
// biome-ignore lint/suspicious/noShadowRestrictedNames:
16+
// biome-ignore lint/suspicious/noShadowRestrictedNames: Necessary for the polyfill to work
1717
import { Intl } from 'temporal-polyfill';
1818
import { describe, expect, it, vi } from 'vitest';
1919

src/lib/memoize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
// biome-ignore lint/suspicious/noExplicitAny:
16+
// biome-ignore lint/suspicious/noExplicitAny: A more specific type doesn't work here
1717
type Constructor<T> = new (...args: any[]) => T;
1818

1919
export function memoize<

src/lib/number-format/currencies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ import type { Currency, Locale, NumericOptions } from '../../types/index.js';
2323

2424
import { resolveLocale } from './intl.js';
2525

26-
export function extractCountry(locale: string): string {
26+
function extractCountry(locale: string): string {
2727
if (locale.length === 2) {
2828
return locale.toUpperCase();
2929
}
3030
const country = locale.split('-')[1];
3131
return country?.toUpperCase();
3232
}
3333

34-
export function resolveCurrency(locales?: Locale | Locale[]): Currency | null {
34+
function resolveCurrency(locales?: Locale | Locale[]): Currency | null {
3535
const inferredLocale = resolveLocale(locales);
3636
const localesArray =
3737
typeof inferredLocale === 'string' ? [inferredLocale] : inferredLocale;

src/lib/number-format/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export { isNumberFormatSupported, isNumberFormatToPartsSupported };
3333

3434
type GetOptions = (
3535
locales: Locale | Locale[],
36-
// biome-ignore lint/suspicious/noExplicitAny:
36+
// biome-ignore lint/suspicious/noExplicitAny: A more specific type doesn't work here
3737
...args: any[]
3838
) => NumericOptions;
3939

@@ -155,7 +155,6 @@ export const formatNumberToParts = formatNumberToPartsFactory(
155155
options?: Intl.NumberFormatOptions,
156156
) => Intl.NumberFormatPart[];
157157

158-
/* eslint-disable no-irregular-whitespace */
159158
/**
160159
* Formats a number in the country's official currency
161160
* with support for various [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
@@ -206,7 +205,6 @@ export const formatCurrencyToParts = formatNumberToPartsFactory(
206205
currency?: Currency,
207206
options?: Intl.NumberFormatOptions,
208207
) => Intl.NumberFormatPart[];
209-
/* eslint-enable no-irregular-whitespace */
210208

211209
function formatNumberToPartsFactory<T extends GetOptions>(
212210
getOptions: T,

0 commit comments

Comments
 (0)