-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add eslint-plugin-json and lint workflow (#5101)
Co-authored-by: turbocrime <[email protected]>
- Loading branch information
1 parent
40b643b
commit 9da4e8f
Showing
4 changed files
with
2,022 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
- name: Lint JSON files | ||
run: npx eslint ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"], | ||
}, | ||
]; |
Oops, something went wrong.