Linting throws false positives for no-unused-vars rule
Vamate opened this issue · 0 comments
Vamate commented
If you fresh clone the project and follow the setup instructions and after that run yarn lint
you get the following 24 errors:
$ yarn tsc && eslint . --ext .js,.ts,.tsx --cache
$ ./node_modules/typescript/bin/tsc
/jest.setup.js
9:1 error 'jest' is not defined no-undef
11:1 error 'jest' is not defined no-undef
13:11 error 'jest' is not defined no-undef
14:11 error 'jest' is not defined no-undef
20:1 error 'jest' is not defined no-undef
21:31 warning '@typescript-eslint/no-var-requires' rule is disabled but never reported eslint-comments/no-unused-disable
26:31 warning '@typescript-eslint/no-empty-function' rule is disabled but never reported eslint-comments/no-unused-disable
33:1 error 'jest' is not defined no-undef
/src/__tests__/sagas/usersSaga.test.ts
9:10 error 'User' is defined but never used @typescript-eslint/no-unused-vars
/src/actions/actionTypes.d.ts
1:10 error 'ActionType' is defined but never used @typescript-eslint/no-unused-vars
/src/actions/appActions.ts
2:10 error 'AppReducerState' is defined but never used @typescript-eslint/no-unused-vars
/src/actions/usersActions.ts
2:10 error 'User' is defined but never used @typescript-eslint/no-unused-vars
/src/lib/NavigationService.ts
1:10 error 'NavigationAction' is defined but never used @typescript-eslint/no-unused-vars
1:28 error 'NavigationContainerRef' is defined but never used @typescript-eslint/no-unused-vars
19:5 warning Expected { after 'if' condition curly
/src/lib/jsonPlaceholderAPI.ts
1:10 error 'User' is defined but never used @typescript-eslint/no-unused-vars
/src/reducers/appReducer.ts
4:10 error 'AppAction' is defined but never used @typescript-eslint/no-unused-vars
/src/reducers/usersReducer.ts
3:10 error 'User' is defined but never used @typescript-eslint/no-unused-vars
5:10 error 'UsersAction' is defined but never used @typescript-eslint/no-unused-vars
/src/store.ts
2:22 error 'AppReducerState' is defined but never used @typescript-eslint/no-unused-vars
3:24 error 'UsersState' is defined but never used @typescript-eslint/no-unused-vars
5:66 error 'Dispatch' is defined but never used @typescript-eslint/no-unused-vars
5:76 error 'MiddlewareAPI' is defined but never used @typescript-eslint/no-unused-vars
6:10 error 'PersistConfig' is defined but never used @typescript-eslint/no-unused-vars
8:10 error 'RootAction' is defined but never used @typescript-eslint/no-unused-vars
/src/utils/useSelector.ts
2:15 error 'RootAction' is defined but never used @typescript-eslint/no-unused-vars
3:15 error 'RootState' is defined but never used @typescript-eslint/no-unused-vars
✖ 27 problems (24 errors, 3 warnings)
0 errors and 1 warning potentially fixable with the `--fix` option.```