Comments (10)
Yup, also verified. Thanks!
from eslint-plugin-mocha.
- It's good that you spotted this issue and reported it! I've submitted it as a new open issue #354.
from eslint-plugin-mocha.
I’ve cherry-picked the changes from #347 and made a patch release v10.4.2. Unfortunately I forgot to make a release after merging #347 to main
and now main
contains a few breaking changes which are planned for v11.
Please let me know if v10.4.2 fixes the issues with ESLint v9.
from eslint-plugin-mocha.
Please let me know if v10.4.2 fixes the issues with ESLint v9.
I tested with [email protected]
and my errors were gone. I also checked for backwards compatibility with [email protected]
and I saw no issue.
Many thanks!
from eslint-plugin-mocha.
@MikeMcC399 thanks for confirming... in this case I will close this issue.
from eslint-plugin-mocha.
This issue relates to the blog Preparing your custom rules for ESLint v9.0.0 published on Sep 26, 2023
Good to see that there is already a merged PR for this as Eslint v9 was announced released on Apr 5, 2024.
from eslint-plugin-mocha.
Thanks for reporting. I will take a look into it and try to make a patch release ASAP.
from eslint-plugin-mocha.
Hello,
I believe the 10.4.2 patch broke compatibility with eslint versions prior to 8 (We get the error on 7.32.0):
TypeError: Cannot read properties of undefined (reading 'getScope')
from eslint-plugin-mocha.
I believe the 10.4.2 patch broke compatibility with eslint versions prior to 8 (We get the error on 7.32.0):
TypeError: Cannot read properties of undefined (reading 'getScope')
Ouch!
It sounds like this needs to be a new issue leading to a new fix release.
The example in https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getscope() shows supporting both the deprecated API and the new API. If only the new API has been implemented, then it would break compatibility with anything below ESLint v8.37.0
🤭
module.exports = {
create(context) {
const { sourceCode } = context;
return {
Program(node) {
const scope = sourceCode.getScope
? sourceCode.getScope(node)
: context.getScope();
// do something with scope
}
}
}
};
from eslint-plugin-mocha.
This was fixed in 10.4.3.
from eslint-plugin-mocha.
Related Issues (20)
- Consitent rule naming
- node 12 should still be supported HOT 1
- Upgrade to ramda 0.28.0 HOT 1
- ESLint peer dependency causing issues HOT 2
- ramda 0.28.0 regression in 10.0.4 (node 17) HOT 7
- 10.0.4 caused "[DEP0148] DeprecationWarning: Use of deprecated folder mapping..." warning HOT 1
- v10.0.4 crashes on node 17 HOT 2
- False positive when test is not a mocha global HOT 1
- mocha/no-top-level-hooks with test generator function HOT 2
- Issue within ESM module HOT 1
- The `mocha/prefer-arrow-callback` rule does not work as documented
- Support function calls as custom names (to stop false warnings) HOT 2
- ESLint 9 / Flat config
- `no-setup-in-describe` triggers on both `describe.each()` and `it.each()` HOT 1
- `mocha/no-mocha-arrows` with explicitly imported APIs HOT 1
- Breaking change accidentally release in 10.4.0 HOT 4
- Latest Version 10.4.2. is throwing TypeError: Cannot read properties of undefined (reading 'getScope') HOT 2
- Regression: [email protected] fails with [email protected] and lower HOT 5
- Cannot install with ESLint 4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-mocha.