mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-09-28 15:14:45 +02:00
chore: update lint dependencies
This commit is contained in:
parent
60f7413cf8
commit
7cda01ef1c
@ -72,8 +72,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.6",
|
"@babel/core": "^7.11.6",
|
||||||
"@babel/preset-env": "^7.11.5",
|
"@babel/preset-env": "^7.11.5",
|
||||||
"@kiwi/eslint-config": "^1.10.1",
|
"@kiwi/eslint-config": "^1.16.6",
|
||||||
"@kiwi/prettier-config": "^1.10.1",
|
"@kiwi/prettier-config": "^1.16.6",
|
||||||
"@rollup/plugin-commonjs": "^20.0.0",
|
"@rollup/plugin-commonjs": "^20.0.0",
|
||||||
"@rollup/plugin-typescript": "^8.2.5",
|
"@rollup/plugin-typescript": "^8.2.5",
|
||||||
"@types/dlv": "^1.1.2",
|
"@types/dlv": "^1.1.2",
|
||||||
@ -86,12 +86,12 @@
|
|||||||
"babel-jest": "^26.3.0",
|
"babel-jest": "^26.3.0",
|
||||||
"conventional-changelog-cli": "^2.1.0",
|
"conventional-changelog-cli": "^2.1.0",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"eslint": "^7.9.0",
|
"eslint": "^7.32.0",
|
||||||
"full-icu": "^1.3.1",
|
"full-icu": "^1.3.1",
|
||||||
"husky": "^4.3.0",
|
"husky": "^4.3.0",
|
||||||
"jest": "^26.4.2",
|
"jest": "^26.4.2",
|
||||||
"lint-staged": "^10.4.0",
|
"lint-staged": "^10.4.0",
|
||||||
"prettier": "^2.1.2",
|
"prettier": "^2.4.1",
|
||||||
"rollup": "^2.27.1",
|
"rollup": "^2.27.1",
|
||||||
"rollup-plugin-auto-external": "^2.0.0",
|
"rollup-plugin-auto-external": "^2.0.0",
|
||||||
"rollup-plugin-commonjs": "^10.1.0",
|
"rollup-plugin-commonjs": "^10.1.0",
|
||||||
|
@ -54,6 +54,7 @@ export function getOptions() {
|
|||||||
|
|
||||||
export function init(opts: ConfigureOptionsInit) {
|
export function init(opts: ConfigureOptionsInit) {
|
||||||
const { formats, ...rest } = opts;
|
const { formats, ...rest } = opts;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||||
const initialLocale = opts.initialLocale || opts.fallbackLocale;
|
const initialLocale = opts.initialLocale || opts.fallbackLocale;
|
||||||
|
|
||||||
Object.assign(options, rest, { initialLocale });
|
Object.assign(options, rest, { initialLocale });
|
||||||
|
@ -31,6 +31,7 @@ export function defineMessages(i: Record<string, MessageObject>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function waitLocale(locale?: string) {
|
export function waitLocale(locale?: string) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/prefer-nullish-coalescing
|
||||||
return flush(locale || getCurrentLocale() || getOptions().initialLocale!);
|
return flush(locale || getCurrentLocale() || getOptions().initialLocale!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ const formatMessage: MessageFormatter = (id, options = {}) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
message = defaultValue || id;
|
message = defaultValue ?? id;
|
||||||
} else if (typeof message !== 'string') {
|
} else if (typeof message !== 'string') {
|
||||||
console.warn(
|
console.warn(
|
||||||
`[svelte-i18n] Message with id "${id}" must be of type "string", found: "${typeof message}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`,
|
`[svelte-i18n] Message with id "${id}" must be of type "string", found: "${typeof message}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`,
|
||||||
|
Loading…
Reference in New Issue
Block a user