Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint and format #58

Merged
merged 11 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.cache
.husky
.plasmo
.vscode
package-lock.json
pnpm-lock.yaml
build
assets
26 changes: 26 additions & 0 deletions .github/workflows/lint-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint and Formatting Check

on: push

jobs:
main:
name: Run ESLint + Prettier
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install Next for ESLint and Prettier
run: npm install next prettier

- name: Run ESLint
run: npm run lint:check

- name: Run Prettier
run: npm run format:check
4 changes: 2 additions & 2 deletions .github/workflows/submit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Submit to Web Store"
name: 'Submit to Web Store'
on:
workflow_dispatch:

Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/[email protected]
with:
node-version: 16.x
cache: "pnpm"
cache: 'pnpm'
- name: Build and zip extension artifact
run: pnpm package
- name: Browser Platform Publish
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ keys.json

# typescript
.tsbuildinfo

# lint cache
.eslintcache
*.cache
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.cache
.husky
.next
.plasmo
.vscode
package.json
package-lock.json
pnpm-lock.yaml
build
assets
17 changes: 0 additions & 17 deletions .prettierrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
printWidth: 80,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
};
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading
Loading