Skip to content

Commit 36de99d

Browse files
feat: install prettier (#42)
1 parent 3107377 commit 36de99d

File tree

8 files changed

+61
-21
lines changed

8 files changed

+61
-21
lines changed

.github/workflows/format.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Node.js CI (format)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
format:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [21.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- run: npm ci
24+
- run: npm run format:check

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"trailingComma": "none"
5+
}

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"scripts": {
77
"build": "webpack",
88
"watch": "webpack --watch",
9+
"format": "npx prettier --write ./src/**/*",
10+
"format:check": "npx prettier --check ./src/**/*",
911
"package": "ts-node ./script/package.ts",
1012
"version": "npm run build && git add ."
1113
},
@@ -27,6 +29,7 @@
2729
"dependencies": {
2830
"chokidar": "^3.6.0",
2931
"copy-webpack-plugin": "^12.0.2",
32+
"prettier": "^3.2.5",
3033
"ts-loader": "^9.5.1",
3134
"ts-node": "^10.9.2",
3235
"twi-ext": "^0.4.1",
@@ -35,4 +38,4 @@
3538
"webpack": "^5.91.0",
3639
"webpack-cli": "^5.1.4"
3740
}
38-
}
41+
}

src/_locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"manifest_description": {
33
"message": "This extension hides the number of impressions on Twitter and prevents the creation of an approval desire monster."
44
}
5-
}
5+
}

src/_locales/ja/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"manifest_description": {
33
"message": "Twitterのインプレッション数を非表示にして、承認欲求モンスターが生まれてしまうのを防ぐ拡張機能です。"
44
}
5-
}
5+
}

src/manifest/v2.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@
1111
},
1212
"content_scripts": [
1313
{
14-
"matches": [
15-
"https://twitter.com/*",
16-
"https://mobile.twitter.com/*",
17-
"https://pro.twitter.com/*"
18-
],
19-
"js": [
20-
"js/index.js"
21-
]
14+
"matches": ["https://twitter.com/*", "https://mobile.twitter.com/*", "https://pro.twitter.com/*"],
15+
"js": ["js/index.js"]
2216
}
2317
],
2418
"default_locale": "en",
2519
"browser_specific_settings": {
2620
"gecko_android": {}
2721
}
28-
}
22+
}

src/manifest/v3.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@
1111
},
1212
"content_scripts": [
1313
{
14-
"matches": [
15-
"https://twitter.com/*",
16-
"https://mobile.twitter.com/*",
17-
"https://pro.twitter.com/*"
18-
],
19-
"js": [
20-
"js/index.js"
21-
]
14+
"matches": ["https://twitter.com/*", "https://mobile.twitter.com/*", "https://pro.twitter.com/*"],
15+
"js": ["js/index.js"]
2216
}
2317
],
2418
"default_locale": "en",
2519
"browser_specific_settings": {
2620
"gecko_android": {}
2721
}
28-
}
22+
}

0 commit comments

Comments
 (0)