Skip to content

Commit

Permalink
add eslint-plugin-json and lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime committed Jul 31, 2024
1 parent 69dff68 commit 1f9df10
Show file tree
Hide file tree
Showing 4 changed files with 2,022 additions and 20 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

name: Lint PR ✅

jobs:
lint-json:
name: Lint JSON files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install ESLint
run: npm install -g eslint

- name: Lint JSON files
run: npx eslint ./
8 changes: 8 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import json from "eslint-plugin-json";

export default [
{
files: ["./**/*.json"],
...json.configs["recommended"],
},
];
Loading

0 comments on commit 1f9df10

Please sign in to comment.