diff --git a/.husky/pre-commit b/. husky/pre-commit similarity index 100% rename from .husky/pre-commit rename to . husky/pre-commit diff --git a/.github/workflows/sanity.check.yml b/.github/workflows/sanity.check.yml new file mode 100644 index 0000000..92fe8ea --- /dev/null +++ b/.github/workflows/sanity.check.yml @@ -0,0 +1,22 @@ + name: PR Sanity Check + +on: pull_request + +jobs: + lint: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Packages + run: | + npm install + + - name: Lint check + run: | + npm run lint + + - name: Lint check + run: | + npm run test \ No newline at end of file diff --git a/package.json b/package.json index 05087c2..0d9c5c8 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,15 @@ "license": "ISC", "description": "", "lint-staged": { - "src/**/*.js": "eslint" + "*.html": "prettier --write", + "*.css": [ + "stylelint --fix", + "prettier --write" + ], + "*.js": [ + "eslint --fix", + "prettier --write" + ] }, "devDependencies": { "@babel/cli": "^7.25.9",