Skip to content

Commit

Permalink
feat: add eslint formatting & ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jul 26, 2023
1 parent 10466ba commit 2e2dd6b
Show file tree
Hide file tree
Showing 4 changed files with 225 additions and 152 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
'env': {
'commonjs': true,
'es2021': true,
},
'extends': 'google',
'overrides': [
],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module',
},
'rules': {
'indent': ['error', 2, {'SwitchCase': 1}],
'max-len': [
'error',
{'code': 160, 'ignoreComments': true, 'ignoreUrls': true, 'ignoreStrings': true},
],
'one-var': ['error', 'consecutive'],
},
};
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint

on:
push:
branches:
- master
pull_request:
branches:
- "**"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install modules
run: npm install
- name: Run ESLint
run: npm run lint
Loading

0 comments on commit 2e2dd6b

Please sign in to comment.