Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Add ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed Jun 24, 2021
1 parent 7099226 commit 5fc85d4
Show file tree
Hide file tree
Showing 5 changed files with 1,854 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ jobs:

steps:
- name: Install dependencies
run: yarn global add prettier
run: npm install --prefix "$scripts"
- name: Checkout
uses: actions/checkout@v2
- name: Lint JavaScript
run: yarn --cwd "$scripts" run lint
- name: Check JavaScript formatting
run: yarn --cwd "$scripts" run checkformat
14 changes: 14 additions & 0 deletions r2-navigator-swift/EPUB/Scripts/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"ignorePatterns": ["src/vendor"],
"rules": {
}
}
3 changes: 3 additions & 0 deletions r2-navigator-swift/EPUB/Scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ A set of JavaScript files used by the Swift EPUB navigator.

## Scripts

Run `npm install`, then use one of the following:

* `npx webpack` Rebuild the assets after any changes in the `src/` folder.
* `yarn run lint` Check code quality.
* `yarn run checkformat` Check if there's any formatting issues.
* `yarn run format` Automatically format JavaScript sources.
Loading

0 comments on commit 5fc85d4

Please sign in to comment.