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
Oops! Something went wrong! :(
ESLint: 7.1.0
Error: Unexpected null when attempting to fix /Users/sshivananda/git/ts-sqs-consumer/integration-test/step-definitions/processes_all_messages_if_there_is_no_error.steps.ts - please file a github issue at https://github.com/jest-community/eslint-plugin-jest
Occurred while linting /Users/sshivananda/git/ts-sqs-consumer/integration-test/step-definitions/processes_all_messages_if_there_is_no_error.steps.ts:10
at Object.fix (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint-plugin-jest/lib/rules/no-test-callback.js:75:21)
at normalizeFixes (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/report-translator.js:178:28)
at /Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/report-translator.js:343:49
at Object.report (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/linter.js:917:41)
at CallExpression (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint-plugin-jest/lib/rules/no-test-callback.js:53:17)
at /Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
at NodeEventGenerator.applySelectors (/Users/sshivananda/git/ts-sqs-consumer/node_modules/eslint/lib/linter/node-event-generator.js:283:22)
Here's my eslintrc
module.exports={extends: ['airbnb-typescript/base','plugin:jest/recommended','plugin:security/recommended',],plugins: ['@typescript-eslint','jest','security',],parserOptions: {project: './tsconfig.json',},rules: {'object-shorthand' : 0,'no-await-in-loop': 0,// Overriding restricted syntax rule to remove for of from the blacklist'no-restricted-syntax': ['error',{selector: 'ForInStatement',message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',},{selector: 'LabeledStatement',message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',},{selector: 'WithStatement',message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',},],}};
Cheers for this, it's caused by destructuring - ironically I've already fixed this in #586, but our CI is currently having issues so I've not been able to release anything.
However, no-test-callback actually shouldn't be checking that call since it's not the Jest test variable, which is tracked by #556.
For now I'd recommend disabling the rule for at least that line, or renaming the variable :)
Seeing the following error while runnint eslint
Here's my eslintrc
And the eslint command is run as
eslint -c .eslintrc.js --ext .ts .
This error can be replicated by the repo at https://github.com/sshivananda/ts-sqs-consumer
The text was updated successfully, but these errors were encountered: