-
Notifications
You must be signed in to change notification settings - Fork 62
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
no-setup-in-describe function expression false positives #274
Comments
rhansen
added a commit
to ether/ep_comments_page
that referenced
this issue
Nov 17, 2020
This is a workaround for lo1tuma/eslint-plugin-mocha#274
rhansen
added a commit
to ether/ep_comments_page
that referenced
this issue
Nov 17, 2020
This is a workaround for lo1tuma/eslint-plugin-mocha#274
rhansen
added a commit
to ether/ep_comments_page
that referenced
this issue
Nov 19, 2020
This is a workaround for lo1tuma/eslint-plugin-mocha#274
JohnMcLear
pushed a commit
to ether/ep_comments_page
that referenced
this issue
Nov 19, 2020
* Configure ESLint * Run `eslint --fix .` * Fix comments `eslint --fix .` added a space after the second asterisk because it interprets `/***/` as a JSDoc comment. * Combine two string literals into one For some reason `eslint --fix .` didn't do this. I don't know why. * Delete unnecessary `else` * Fix comment indentation * Switch single and double quotes in HTML string * Use `this` instead of `self` where possible * Enable strict mode everywhere * Delete unused imports * Delete most unused variables There are still some variables that can't be removed without technically changing behavior. Those will be fixed in a future commit. * Delete redundant variable redeclarations * Delete commented-out code * Delete dead code Regarding the conditions: One of them is always false and the other is always true. * Use `const` and `let` instead of `var` * Rename `ep_comments` class to `EpComments` * Simplify handling of "Show Comments" toggle This also eliminates a bunch of ESLint errors. * Use camel case for variable names * Remove redundant ESLint global declarations * Reduce global namespace pollution This silences some ESLint errors. * Use jQuery to build HTML This also silences an ESLint error. * Fix various minor ESLint errors: * Convert to arrow functions. * Use strict equality except for null checks. * Irregular whitespace fix. * Keep lines under 100 columns long. * Use camel case for variable names. * Put `else if` on same line as preceding `}`. * Don't iterate over inherited properties This fixes ESLint errors. * Simplify comment counting This also eliminates ESLint unused variable errors (the loop variables). * Rewrite `getSelectedText` for readability, robustness * Delete redundant jQuery imports jQuery is already available as a global var. * Avoid mutating passed-in list This also fixes an ESLint error. * Capitalize PreCommentMarker class name * Add missing variable declaration * tests: Fix exception error message (copy+paste bug) This also fixes an ESLint error. * tests: Delete unnecessary wrapper objects * tests: Switch some function expressions to arrow functions This is a workaround for lo1tuma/eslint-plugin-mocha#274
We've been seeing this on some of our projects as well. Any updates on a potential fix at all? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no-setup-in-describe thinks that the bodies of function expressions are executed as part of the describe block:
Versions:
The text was updated successfully, but these errors were encountered: