Skip to content

Commit

Permalink
chore: update lint dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisermann committed Sep 30, 2021
1 parent 60f7413 commit 7cda01e
Show file tree
Hide file tree
Showing 5 changed files with 534 additions and 242 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@kiwi/eslint-config": "^1.10.1",
"@kiwi/prettier-config": "^1.10.1",
"@kiwi/eslint-config": "^1.16.6",
"@kiwi/prettier-config": "^1.16.6",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-typescript": "^8.2.5",
"@types/dlv": "^1.1.2",
Expand All @@ -86,12 +86,12 @@
"babel-jest": "^26.3.0",
"conventional-changelog-cli": "^2.1.0",
"cross-env": "^7.0.2",
"eslint": "^7.9.0",
"eslint": "^7.32.0",
"full-icu": "^1.3.1",
"husky": "^4.3.0",
"jest": "^26.4.2",
"lint-staged": "^10.4.0",
"prettier": "^2.1.2",
"prettier": "^2.4.1",
"rollup": "^2.27.1",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-commonjs": "^10.1.0",
Expand Down
1 change: 1 addition & 0 deletions src/runtime/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export function getOptions() {

export function init(opts: ConfigureOptionsInit) {
const { formats, ...rest } = opts;
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const initialLocale = opts.initialLocale || opts.fallbackLocale;

Object.assign(options, rest, { initialLocale });
Expand Down
1 change: 1 addition & 0 deletions src/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function defineMessages(i: Record<string, MessageObject>) {
}

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!);
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/stores/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const formatMessage: MessageFormatter = (id, options = {}) => {
);
}

message = defaultValue || id;
message = defaultValue ?? id;
} else if (typeof message !== 'string') {
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.`,
Expand Down
Loading

0 comments on commit 7cda01e

Please sign in to comment.