Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 0f67d2e

Browse files
committed
feat: Add Yarn configuration files and update dependencies #minor
1 parent 1797316 commit 0f67d2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+7716
-8358
lines changed

.eslintrc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"plugin:react/jsx-runtime",
1515
"plugin:import/recommended",
1616
"plugin:import/typescript",
17-
"plugin:@typescript-eslint/recommended-type-checked",
17+
"plugin:@typescript-eslint/strict-type-checked",
1818
"plugin:@typescript-eslint/stylistic-type-checked",
1919
"plugin:prettier/recommended"
2020
],
@@ -26,7 +26,12 @@
2626
}
2727
},
2828
"rules": {
29-
"@typescript-eslint/consistent-type-imports": "warn",
29+
"@typescript-eslint/consistent-generic-constructors": "error",
30+
"@typescript-eslint/consistent-indexed-object-style": "error",
31+
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "never" }],
32+
"@typescript-eslint/consistent-type-definitions": "error",
33+
"@typescript-eslint/consistent-type-exports": ["error", { "fixMixedExportsWithInlineTypeSpecifier": true }],
34+
"@typescript-eslint/consistent-type-imports": ["error", { "fixStyle": "inline-type-imports" }],
3035
"import/order": [
3136
"warn",
3237
{
@@ -50,6 +55,6 @@
5055
"postcss.config.js",
5156
"tailwind.config.js",
5257
"tests/",
53-
"webpack/"
58+
"webpack.config.js"
5459
]
5560
}

.gitattributes

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
## GITATTRIBUTES FOR WEB PROJECTS
2+
#
3+
# These settings are for any web project.
4+
#
5+
# Details per file setting:
6+
# text These files should be normalized (i.e. convert CRLF to LF).
7+
# binary These files are binary and should be left untouched.
8+
#
9+
# Note that binary is a macro for -text -diff.
10+
######################################################################
11+
12+
# Auto detect
13+
## Handle line endings automatically for files detected as
14+
## text and leave all files detected as binary untouched.
15+
## This will handle all files NOT defined below.
16+
* text=auto
17+
18+
# Source code
19+
*.bash text eol=lf
20+
*.bat text eol=crlf
21+
*.cmd text eol=crlf
22+
*.coffee text
23+
*.css text diff=css
24+
*.htm text diff=html
25+
*.html text diff=html
26+
*.inc text
27+
*.ini text
28+
*.js text
29+
*.mjs text
30+
*.cjs text
31+
*.json text
32+
*.jsx text
33+
*.less text
34+
*.ls text
35+
*.map text -diff
36+
*.od text
37+
*.onlydata text
38+
*.php text diff=php
39+
*.pl text
40+
*.ps1 text eol=crlf
41+
*.py text diff=python
42+
*.rb text diff=ruby
43+
*.sass text
44+
*.scm text
45+
*.scss text diff=css
46+
*.sh text eol=lf
47+
.husky/* text eol=lf
48+
*.sql text
49+
*.styl text
50+
*.tag text
51+
*.ts text
52+
*.tsx text
53+
*.xml text
54+
*.xhtml text diff=html
55+
56+
# Docker
57+
Dockerfile text
58+
59+
# Documentation
60+
*.ipynb text eol=lf
61+
*.markdown text diff=markdown
62+
*.md text diff=markdown
63+
*.mdwn text diff=markdown
64+
*.mdown text diff=markdown
65+
*.mkd text diff=markdown
66+
*.mkdn text diff=markdown
67+
*.mdtxt text
68+
*.mdtext text
69+
*.txt text
70+
AUTHORS text
71+
CHANGELOG text
72+
CHANGES text
73+
CONTRIBUTING text
74+
COPYING text
75+
copyright text
76+
*COPYRIGHT* text
77+
INSTALL text
78+
license text
79+
LICENSE text
80+
NEWS text
81+
readme text
82+
*README* text
83+
TODO text
84+
85+
# Templates
86+
*.dot text
87+
*.ejs text
88+
*.erb text
89+
*.haml text
90+
*.handlebars text
91+
*.hbs text
92+
*.hbt text
93+
*.jade text
94+
*.latte text
95+
*.mustache text
96+
*.njk text
97+
*.phtml text
98+
*.svelte text
99+
*.tmpl text
100+
*.tpl text
101+
*.twig text
102+
*.vue text
103+
104+
# Configs
105+
*.cnf text
106+
*.conf text
107+
*.config text
108+
.editorconfig text
109+
.env text
110+
.gitattributes text
111+
.gitconfig text
112+
.htaccess text
113+
*.lock text -diff
114+
package.json text eol=lf
115+
package-lock.json text eol=lf -diff
116+
pnpm-lock.yaml text eol=lf -diff
117+
.prettierrc text
118+
yarn.lock text -diff
119+
*.toml text
120+
*.yaml text
121+
*.yml text
122+
browserslist text
123+
Makefile text
124+
makefile text
125+
# Fixes syntax highlighting on GitHub to allow comments
126+
tsconfig.json linguist-language=JSON-with-Comments
127+
128+
# Heroku
129+
Procfile text
130+
131+
# Graphics
132+
*.ai binary
133+
*.bmp binary
134+
*.eps binary
135+
*.gif binary
136+
*.gifv binary
137+
*.ico binary
138+
*.jng binary
139+
*.jp2 binary
140+
*.jpg binary
141+
*.jpeg binary
142+
*.jpx binary
143+
*.jxr binary
144+
*.pdf binary
145+
*.png binary
146+
*.psb binary
147+
*.psd binary
148+
# SVG treated as an asset (binary) by default.
149+
*.svg text
150+
# If you want to treat it as binary,
151+
# use the following line instead.
152+
# *.svg binary
153+
*.svgz binary
154+
*.tif binary
155+
*.tiff binary
156+
*.wbmp binary
157+
*.webp binary
158+
159+
# Audio
160+
*.kar binary
161+
*.m4a binary
162+
*.mid binary
163+
*.midi binary
164+
*.mp3 binary
165+
*.ogg binary
166+
*.ra binary
167+
168+
# Video
169+
*.3gpp binary
170+
*.3gp binary
171+
*.as binary
172+
*.asf binary
173+
*.asx binary
174+
*.avi binary
175+
*.fla binary
176+
*.flv binary
177+
*.m4v binary
178+
*.mng binary
179+
*.mov binary
180+
*.mp4 binary
181+
*.mpeg binary
182+
*.mpg binary
183+
*.ogv binary
184+
*.swc binary
185+
*.swf binary
186+
*.webm binary
187+
188+
# Archives
189+
*.7z binary
190+
*.gz binary
191+
*.jar binary
192+
*.rar binary
193+
*.tar binary
194+
*.zip binary
195+
196+
# Fonts
197+
*.ttf binary
198+
*.eot binary
199+
*.otf binary
200+
*.woff binary
201+
*.woff2 binary
202+
203+
# Executables
204+
*.exe binary
205+
*.pyc binary
206+
# Prevents massive diffs caused by vendored, minified files
207+
**/.yarn/releases/** binary
208+
**/.yarn/plugins/** binary
209+
210+
# RC files (like .babelrc or .eslintrc)
211+
*.*rc text
212+
213+
# Ignore files (like .npmignore or .gitignore)
214+
*.*ignore text
215+
216+
# Prevents massive diffs from built files
217+
dist/* binary

.github/workflows/automerge.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ on:
55
types:
66
- opened
77

8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
128
jobs:
139
automerge:
1410
runs-on: ubuntu-latest
1511
steps:
1612
- id: automerge
1713
name: automerge
1814
uses: "pascalgn/automerge-action@v0.16.3"
15+
permissions:
16+
contents: write
1917
env:
2018
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2119
MERGE_FILTER_AUTHOR: dependabot[bot]

.github/workflows/publish.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: Publish to Chrome Web Store
22

33
on:
44
push:
5-
branches:
6-
- master
5+
workflow_run:
6+
workflows: [Automatically merge dependabot pull requests]
7+
types: [completed]
8+
branches: [master]
79

810
permissions:
911
contents: write
@@ -15,6 +17,23 @@ jobs:
1517
- name: Checkout code
1618
uses: actions/checkout@v4
1719

20+
- name: Use Node.js
21+
uses: actions/setup-node@v4
22+
23+
- name: Run with Node.js + yarn pnp
24+
run: |
25+
corepack enable
26+
yarn set version stable
27+
yarn config set enableImmutableInstalls false
28+
yarn config set enableScripts false
29+
yarn config set nodeLinker pnp
30+
31+
- name: Install dependencies
32+
run: yarn --immutable
33+
34+
- name: Build
35+
run: yarn build
36+
1837
- name: Update major version number
1938
if: contains(github.event.head_commit.message, '#major')
2039
run: npm version major --no-git-tag-version
@@ -26,48 +45,28 @@ jobs:
2645
- name: Update patch version number
2746
if: "!contains(github.event.head_commit.message, '#major') && !contains(github.event.head_commit.message, '#minor')"
2847
run: npm version patch --no-git-tag-version
29-
48+
3049
- name: Update manifest.json version
50+
if: github.ref == 'refs/heads/master'
3151
run: |
3252
# Update manifest.json version
3353
echo "VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV
3454
sed -i "s/\"version\": \".*\"/\"version\": \"$(npm pkg get version | tr -d '"')\"/g" public/manifest.json
3555
3656
- name: Commit changes
57+
if: github.ref == 'refs/heads/master'
3758
run: |
3859
git config --global user.name "github-actions[bot]"
3960
git config --global user.email "github-actions[bot]@users.noreply.github.com"
4061
git commit -m "Bump version to ${{ env.VERSION }} [skip ci]" -a
4162
git push
4263
43-
- name: Get npm cache directory
44-
id: npm-cache-dir
45-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
46-
47-
- name: Cache node modules
48-
uses: actions/cache@v4
49-
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
50-
with:
51-
path: ${{ steps.npm-cache-dir.outputs.dir }}
52-
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
53-
restore-keys: |
54-
${{ runner.os }}-build-
55-
56-
- name: List the state of node modules
57-
if: steps.npm-cache.outputs.cache-hit != 'true'
58-
continue-on-error: true
59-
run: npm list
60-
61-
- name: Install dependencies
62-
run: npm ci
63-
64-
- name: Build
65-
run: npm run build
66-
6764
- name: Zip files
65+
if: github.ref == 'refs/heads/master'
6866
run: zip -r extension.zip dist/
6967

7068
- name: Create Release
69+
if: github.ref == 'refs/heads/master'
7170
uses: softprops/action-gh-release@v2
7271
env:
7372
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -78,10 +77,11 @@ jobs:
7877
tag_name: ${{ env.VERSION }}
7978

8079
- name: Publish to Chrome Web Store
80+
if: github.ref == 'refs/heads/master'
8181
uses: mnao305/chrome-extension-upload@v5.0.0
8282
with:
8383
client-id: ${{ secrets.CHROME_CLIENT_ID }}
8484
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
8585
extension-id: "kcdlihaidnmkenhlnofkjfoachidbnif"
8686
file-path: extension.zip
87-
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
87+
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"arcanis.vscode-zipfs",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

0 commit comments

Comments
 (0)