Skip to content

Commit

Permalink
feat: install prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Robot-Inventor committed Apr 11, 2024
1 parent 3107377 commit 4b82232
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 21 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Node.js CI (format)

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
format:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run format:check
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"tabWidth": 4,
"trailingComma": "none"
}
20 changes: 20 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"scripts": {
"build": "webpack",
"watch": "webpack --watch",
"format": "npx prettier --write ./src/**/*",
"format:check": "npx prettier --check ./src/**/*",
"package": "ts-node ./script/package.ts",
"version": "npm run build && git add ."
},
Expand All @@ -27,6 +29,7 @@
"dependencies": {
"chokidar": "^3.6.0",
"copy-webpack-plugin": "^12.0.2",
"prettier": "^3.2.5",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"twi-ext": "^0.4.1",
Expand All @@ -35,4 +38,4 @@
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4"
}
}
}
2 changes: 1 addition & 1 deletion src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"manifest_description": {
"message": "This extension hides the number of impressions on Twitter and prevents the creation of an approval desire monster."
}
}
}
2 changes: 1 addition & 1 deletion src/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"manifest_description": {
"message": "Twitterのインプレッション数を非表示にして、承認欲求モンスターが生まれてしまうのを防ぐ拡張機能です。"
}
}
}
12 changes: 3 additions & 9 deletions src/manifest/v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
},
"content_scripts": [
{
"matches": [
"https://twitter.com/*",
"https://mobile.twitter.com/*",
"https://pro.twitter.com/*"
],
"js": [
"js/index.js"
]
"matches": ["https://twitter.com/*", "https://mobile.twitter.com/*", "https://pro.twitter.com/*"],
"js": ["js/index.js"]
}
],
"default_locale": "en",
"browser_specific_settings": {
"gecko_android": {}
}
}
}
12 changes: 3 additions & 9 deletions src/manifest/v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
},
"content_scripts": [
{
"matches": [
"https://twitter.com/*",
"https://mobile.twitter.com/*",
"https://pro.twitter.com/*"
],
"js": [
"js/index.js"
]
"matches": ["https://twitter.com/*", "https://mobile.twitter.com/*", "https://pro.twitter.com/*"],
"js": ["js/index.js"]
}
],
"default_locale": "en",
"browser_specific_settings": {
"gecko_android": {}
}
}
}

0 comments on commit 4b82232

Please sign in to comment.