diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b44a53c..7b1b4fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,8 @@ on: branches: - main jobs: - lint: - name: Lint + verify_files: + name: Verify Files runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,10 +18,12 @@ jobs: node-version: "lts/*" - name: Install dependencies run: npm install - - name: Build commonjs + - name: Build run: npm run build - name: Lint files run: npm run lint + - name: Check Formatting + run: npm run fmt:check test: name: Test strategy: @@ -43,3 +45,17 @@ jobs: run: npm install - name: Run tests run: npm run test + jsr_test: + name: Verify JSR Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "lts/*" + - name: Install Packages + run: npm install + - name: Run --dry-run + run: | + npm run build + npm run test:jsr diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..10e4e6f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +dist +CHANGELOG.md +jsr.json diff --git a/README.md b/README.md index 27a8701..21f7837 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,6 @@ To use the recommended configuration for this plugin, specify your matching `fil import json from "@eslint/json"; export default [ - // lint JSON files { files: ["**/*.json"], diff --git a/package.json b/package.json index 4fb9a3c..0ed3ebe 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,8 @@ "test:jsr": "npx jsr@latest publish --dry-run", "pretest": "npm run build", "lint": "eslint", + "fmt": "prettier --write .", + "fmt:check": "prettier --check .", "test": "mocha tests/**/*.js", "test:coverage": "c8 npm test" },