Skip to content

Commit

Permalink
Merge pull request #3 from skedwards88/linter
Browse files Browse the repository at this point in the history
Add linting workflow
  • Loading branch information
skedwards88 authored Feb 8, 2024
2 parents 678135d + 7a96c1c commit 4392e1c
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 458 deletions.
12 changes: 11 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"shared-node-browser": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
Expand All @@ -17,5 +21,11 @@
"plugins": ["react"],
"rules": {
"react/prop-types": "off"
},
"ignorePatterns": ["dist/*"],
"settings": {
"react": {
"version": "detect"
}
}
}
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on:
pull_request:

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install requirements
run: npm ci

- name: Prettier
run: npx prettier -c src/ README.md .github/workflows

- name: ES lint
run: npx eslint --ignore-path .gitignore .

- name: Stylelint
run: npx stylelint '**/*.css'
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
TODO.md
src/privacy.html
src/App.css
Loading

0 comments on commit 4392e1c

Please sign in to comment.