Skip to content

Commit

Permalink
Switch from clang/tslint to prettier/eslint (#219)
Browse files Browse the repository at this point in the history
* Replace clang-format with prettier
* Prettier-format everything
* Replace tslint with eslint
* Fix @typescript-eslint/ban-types errors
* Fix @typescript-eslint/no-explicit-any errors
* Fix no-async-promise-executor error
* Fix no-case-declarations errors
* Fix @typescript-eslint/no-var-requires errors
* Remove hack for tslint
* Add lint and check-format jobs to GitHub action
  • Loading branch information
aomarks authored Sep 20, 2021
1 parent 166bc39 commit 18711fa
Show file tree
Hide file tree
Showing 61 changed files with 4,151 additions and 2,049 deletions.
9 changes: 0 additions & 9 deletions .clang-format

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/lib/
/client/lib/
/src/test/data/
/config.schema.json
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "eslint-plugin-no-only-tests"],
"env": {
"node": true
},
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-constant-condition": "off",
"no-empty": "off"
}
}
22 changes: 22 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,25 @@ jobs:
env:
TACHOMETER_E2E_TEST_BROWSERS: ${{ matrix.browsers }}
TACHOMETER_E2E_TEST_SHOW_OUTPUT: true

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- run: npm ci
- run: npm run lint

check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- run: npm ci
- run: npm run format:check
6 changes: 4 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
test/
src/test/
lib/test/
.clang-format
.prettierignore
.prettierrc.json
tsconfig-base.json
tsconfig.json
tslint.json
.eslintignore
.eslintrc.json
*.tgz
*.code-workspace
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/lib/
/client/lib/
/src/test/data/logs/
/src/test/data/invalid-js.js
/config.schema.json
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"bracketSpacing": false
}
Loading

0 comments on commit 18711fa

Please sign in to comment.