You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests are written in a way that eslint is really mad (and sometimes it's necessary). Fixing them simply require too many effort which I believe is not worth it currently, as long as the tests have good coverage.
Also, I am using tsconfig.json as eslint's parserOptions, and tests are not included in the config (which is valid). Nevertheless this will cause some config issue and the best way to fix it is by ignoring the test folder.
Nevertheless that might be an issue in the future and we might want to lint tests. Therefore I am creating this issue for reference and to document how to make eslint lint tests:
Create a file tsconfig.remaining.json that contains the following code:
/** * This json is included solely for eslint, as it does not lint files not included in tsconfig.json. * This file includes all remaining ts files not included in tsconfig, such as those in __tests__. */{"include": ["./**/*.ts"],"exclude": ["src/**/*",],"extends": "./tsconfig.json",}
Tests are written in a way that eslint is really mad (and sometimes it's necessary). Fixing them simply require too many effort which I believe is not worth it currently, as long as the tests have good coverage.
Also, I am using
tsconfig.json
aseslint
'sparserOptions
, and tests are not included in the config (which is valid). Nevertheless this will cause some config issue and the best way to fix it is by ignoring the test folder.Nevertheless that might be an issue in the future and we might want to lint tests. Therefore I am creating this issue for reference and to document how to make
eslint
lint tests:tsconfig.remaining.json
that contains the following code:.eslintrc.js
to contain such:npx eslint './__tests__/**/*'
The text was updated successfully, but these errors were encountered: