Skip to content

Commit

Permalink
Prettier 3
Browse files Browse the repository at this point in the history
  • Loading branch information
wtetsu committed Aug 22, 2023
1 parent eb6f3d1 commit 2ca272e
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"printWidth": 125,
"tabWidth": 2,
"overrides": [
{
"files": ["*.json", "*.json5"],
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"milligram": "^1.4.1",
"prettier": "2.8.8",
"prettier": "^3.0.2",
"typescript": "^5.1.6"
}
}
4 changes: 2 additions & 2 deletions src/main/core/launch.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ const setEvents = async (area, userSettings) => {
// Notice for the very first launch.
const notice = dom.create(
`<span style="font-size: 1.3rem; font-family: 'hiragino kaku gothic pro', meiryo, sans-serif;">${res(
"needToPrepareDict"
)}</span>`
"needToPrepareDict",
)}</span>`,
);

dom.replace(area.content, notice);
Expand Down
2 changes: 1 addition & 1 deletion src/main/core/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const registerPhrase = (data) => Object.assign(phraseRule, data);
const registerPronoun = (data) =>
Object.assign(
pronounRule,
data.map((datum) => new Map(datum))
data.map((datum) => new Map(datum)),
);
const registerSpelling = (data) => utils.updateMap(spellingRule, data);
const registerTrailing = (data) => Object.assign(trailingRule, data);
Expand Down
4 changes: 2 additions & 2 deletions src/options/component/organism/WholeSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const WholeSettings: React.FC<Props> = (props) => {

useEffect(() => {
const copyButton = createProcessButton("COPY", COPY_BUTTON_STYLES1, "COPIED!", COPY_BUTTON_STYLES2, () =>
navigator.clipboard.writeText(json)
navigator.clipboard.writeText(json),
);
dom.applyStyles(copyButton, COPY_BUTTON_STYLES);
editor?.current?.refEditor?.appendChild(copyButton);
Expand Down Expand Up @@ -143,7 +143,7 @@ const createProcessButton = (
style1: React.CSSProperties,
text2: string,
style2: React.CSSProperties,
doSomething: () => void
doSomething: () => void,
): HTMLElement => {
let canProcess = true;
const element = document.createElement("span");
Expand Down
2 changes: 1 addition & 1 deletion src/options/page/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const Main: React.FC = () => {

const updateState = (
statePatch: Record<string, any> | undefined,
settingsPatch: Partial<MouseDictionarySettings> | undefined = undefined
settingsPatch: Partial<MouseDictionarySettings> | undefined = undefined,
): void => {
dispatch({ type: "patch", statePatch, settingsPatch });
};
Expand Down
2 changes: 1 addition & 1 deletion src/options/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export type Replace = {

export type UpdateEventHandler = (
statePatch: Record<string, any> | undefined,
settingsPatch: Partial<MouseDictionarySettings> | undefined
settingsPatch: Partial<MouseDictionarySettings> | undefined,
) => void;

type EnvForMain = {
Expand Down

0 comments on commit 2ca272e

Please sign in to comment.