Skip to content

Commit

Permalink
Merge pull request #213 from QuLogic/format
Browse files Browse the repository at this point in the history
Add eslint, prettier, and re-format JS
  • Loading branch information
martinRenou authored May 25, 2020
2 parents b05afff + 096d65e commit 8257581
Show file tree
Hide file tree
Showing 12 changed files with 1,052 additions and 158 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Linting
on: [pull_request]

jobs:
eslint:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: eslint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
workdir: 'js'
21 changes: 21 additions & 0 deletions js/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es2017: true,
},
extends: ["eslint:recommended", "prettier"],
parserOptions: {
ecmaVersion: 9,
sourceType: "module",
},
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
},
],
},
};
11 changes: 11 additions & 0 deletions js/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"overrides": [
{
"files": ["webpack.config.js", "src/**/*.js"],
"options": {
"singleQuote": true,
"tabWidth": 4,
}
}
]
}
Loading

0 comments on commit 8257581

Please sign in to comment.