Skip to content

Commit

Permalink
chore: use more of prettier defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ruicsh committed Dec 15, 2023
1 parent 1fa385b commit a8ce1bc
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 31 deletions.
2 changes: 0 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"trailingComma": "es5",
"printWidth": 80,
"useTabs": true
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"scripts": {
"build": "tsx sh/build.ts",
"coverage": "tsx sh/coverage.ts",
"format": "prettier --write src sh",
"format": "prettier --write src sh ./*.json",
"lint:ts": "tsc --noEmit",
"lint": "eslint src --ext ts,tsx",
"run:examples:react": "tsx sh/run-examples-react.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/cardinal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export function getCardinal(
n: number,
options: Record<string, unknown>,
o: number,
locale: string
locale: string,
) {
const specificNumber = `=${n}`;
if (specificNumber in options) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/ordinal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function getOrdinal(
n: number,
options: Record<string, unknown>,
locale: string
locale: string,
) {
const pr = new Intl.PluralRules(locale, { type: "ordinal" });
const rule = pr.select(n);
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class I18n {

#resolve(
placeholder: Value | MessagePlaceholder,
values: Record<string, Value> = {}
values: Record<string, Value> = {},
): Value {
if (typeof placeholder !== "object") {
return placeholder;
Expand Down
14 changes: 7 additions & 7 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"outDir": "./dist",
},
"exclude": ["node_modules/**/*", "**/*.test.ts", "sh/*", "examples/**/*"]
}
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"outDir": "./dist"
},
"exclude": ["node_modules/**/*", "**/*.test.ts", "sh/*", "examples/**/*"]
}
36 changes: 18 additions & 18 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"compilerOptions": {
"baseUrl": "./",
"declaration": true,
"esModuleInterop": true,
"jsx": "preserve",
"lib": ["dom", "esnext"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./dist",
"removeComments": true,
"resolveJsonModule": true,
"strict": true,
"target": "es2019",
"types": ["vitest/globals"],
},
"include": ["src/**/*", "sh/**/*", "examples/**/*"],
"exclude": ["node_modules/**/*"]
}
"compilerOptions": {
"baseUrl": "./",
"declaration": true,
"esModuleInterop": true,
"jsx": "preserve",
"lib": ["dom", "esnext"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./dist",
"removeComments": true,
"resolveJsonModule": true,
"strict": true,
"target": "es2019",
"types": ["vitest/globals"]
},
"include": ["src/**/*", "sh/**/*", "examples/**/*"],
"exclude": ["node_modules/**/*"]
}

0 comments on commit a8ce1bc

Please sign in to comment.