Skip to content

Commit

Permalink
Enforce code style via linter (part of #446) (#448)
Browse files Browse the repository at this point in the history
* Add ESLint autofixed files
* Convert tabs to 2 spaces
* Solve the easy linting issues
* Add a few more, ignore linting on folders with 'test'
* Fix typos, more linter happiness, add rule to disallow semicolons
* Quote eslint properly, solve some more issues
* And some more linting goodness
* Update package-lock.json
* Some more linting happiness
* Replace Thenable by Promise
* Run CI on pull requests
* Fix null/undefined check conditions for PDF export

Co-authored-by: Guillaume Grossetie <ggrossetie@gmail.com>
  • Loading branch information
danyill and ggrossetie authored Sep 26, 2021
1 parent 74bce1d commit cd477c7
Show file tree
Hide file tree
Showing 72 changed files with 4,660 additions and 4,650 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*/test/*
/test/*
.eslintrc.js
/dist/*
12 changes: 8 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module.exports = {
"tsconfigRootDir": __dirname,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"extends": [
// "eslint:recommended",
// "plugin:@typescript-eslint/recommended",
"standard"
],
"rules": {
"arrow-parens": ["error", "always"],
Expand All @@ -25,6 +25,10 @@ module.exports = {
"ignoreTemplateLiterals": true
}],
//"indent": ["error", 4],
"spaced-comment": "off"
"semi": ["error", "never"],
"spaced-comment": "off",
// https://github.com/typescript-eslint/typescript-eslint/issues/2621
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
}
};
};
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Lint and Compile

on: [push]
on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
build:
Expand All @@ -10,9 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '12.x'
node-version: '14'
- run: npm ci
- run: npm run lint
- run: npm run compile
Expand Down
Loading

0 comments on commit cd477c7

Please sign in to comment.