Skip to content

Commit

Permalink
Add eslint (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
keybraker authored Nov 25, 2023
1 parent 530ba91 commit 7fc476c
Show file tree
Hide file tree
Showing 20 changed files with 1,582 additions and 614 deletions.
39 changes: 39 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
},
"globals": {
"chrome": "readonly"
}
}
21 changes: 21 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ESLint Check

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install Dependencies
run: npm install

- name: Run ESLint
# run: npx eslint .
run: npx eslint "src/**/*.{js,ts}"
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"git-blame.gitWebUrl": ""
}
"git-blame.gitWebUrl": "",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"]
}
Loading

0 comments on commit 7fc476c

Please sign in to comment.