Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add-eslint #485

Merged
merged 31 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1ec9c1c
add missing @types/create-hash devDep
mrnerdhair Mar 22, 2022
b5d6bc3
remove unused trezor transport parameter
mrnerdhair Mar 21, 2022
a5d6afa
remove unused console.assert()
mrnerdhair Mar 22, 2022
a045b32
remove obsolete eslint override
mrnerdhair Mar 22, 2022
2092b17
feat: add eslint
mrnerdhair Mar 22, 2022
788f35b
eslint: autofix
mrnerdhair Apr 6, 2022
457e635
remove `debug` package
mrnerdhair Mar 21, 2022
5f37046
remove reordered import comments
mrnerdhair Mar 21, 2022
24db69c
remove unused code & variables
mrnerdhair Mar 22, 2022
11da7f9
comment out unused fio test imports
mrnerdhair Mar 21, 2022
5a7573d
normalize integration selfTest beforeAll
mrnerdhair Mar 21, 2022
22c1e0c
prefer const over let despite destructuring
mrnerdhair Mar 22, 2022
0685ed8
eslint: override jest/no-conditional-expect
mrnerdhair Mar 21, 2022
6c0086d
eslint: fix no-console
mrnerdhair Mar 21, 2022
2941aec
eslint: fix no-use-before-define
mrnerdhair Mar 21, 2022
7822cf2
eslint: override jest/no-disabled-tests
mrnerdhair Mar 21, 2022
da042b5
eslint: override @typescript-eslint/no-namespace
mrnerdhair Mar 21, 2022
36e473c
eslint: fix @typescript-eslint/ban-ts-ignore
mrnerdhair Mar 21, 2022
7641d34
eslint: override @typescript-eslint/no-unused-vars
mrnerdhair Mar 21, 2022
b23517b
eslint: fix/override @typescript-eslint/no-shadow
mrnerdhair Mar 22, 2022
6cf40b0
eslint: fix no-case-declarations
mrnerdhair Mar 22, 2022
3eeaab5
eslint: fix/override no-var-requires
mrnerdhair Mar 22, 2022
45ef301
eslint: fix @typescript-eslint/ban-types
mrnerdhair Mar 22, 2022
7a97ece
eslint: fix no-async-promise-executor
mrnerdhair Mar 22, 2022
31e1c2e
eslint: fix jest/no-commented-out-tests
mrnerdhair Mar 22, 2022
deade90
eslint: fix no-identical-title
mrnerdhair Mar 22, 2022
9e65d68
eslint: fix jest/expect-expect
mrnerdhair Apr 7, 2022
5d6e751
eslint: override @typescript-eslint/no-empty-function
mrnerdhair Mar 22, 2022
6ce42b4
eslint: override @typescript-eslint/no-non-null-assertion
mrnerdhair Mar 22, 2022
aec74ed
eslint: fix badly-defined tests
mrnerdhair Mar 22, 2022
2ee303b
eslint: fix misc errors
mrnerdhair Mar 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ orbs:
no_output_timeout: 30m
name: Build packages
command: yarn build
- run:
name: Lint
command: yarn lint
- run:
name: Run unit tests
command: yarn test --runInBand --coverage=false
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
82 changes: 82 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:jest/recommended"
],
"plugins": [
"@typescript-eslint",
"prettier",
"jest",
"simple-import-sort"
],
"env": {
"node": true,
"browser": true,
"jest/globals": true
},
"globals": {
"process": "readonly"
},
"rules": {
"prettier/prettier": "error",
"no-console": [
"error",
{
"allow": [
"warn",
"error",
"info",
"debug",
"group",
"groupEnd",
"time",
"timeEnd"
]
}
],
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-shadow": [
"error"
],
"jest/no-standalone-expect": [
"error",
{
"additionalTestBlockFunctions": [
"beforeAll",
"beforeEach",
"afterEach",
"afterAll"
]
}
],
// TODO: We need to fix these rules later
"@typescript-eslint/no-explicit-any": "off",
"simple-import-sort/imports": [
"error"
]
},
"overrides": [
{
"files": [
"**/*.test.{j,t}s"
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": [
"integration/**"
],
"rules": {
"jest/no-export": "off"
}
}
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
!/.circleci
!/.circleci/**
!/.codeclimate.yml
!/.eslintignore
!/.eslintrc
!/.gitbook.yaml
!/.github/
!/.github/**
Expand Down
Loading