-
-
Notifications
You must be signed in to change notification settings - Fork 920
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
chore(linting): disable unbound-method
warnings
#1128
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1128 +/- ##
=======================================
Coverage 99.64% 99.65%
=======================================
Files 2146 2146
Lines 230401 230401
Branches 979 982 +3
=======================================
+ Hits 229591 229603 +12
+ Misses 789 777 -12
Partials 21 21
|
There would still be this: Lines 79 to 80 in b70d63d
I could call them in an anonym function as well but that would instantiate a new |
I currently see two ways for this:
|
What is the general problem with how it currently works in main branch? // Bind `this` so namespaced is working correctly
for (const name of Object.getOwnPropertyNames(<Module>.prototype)) {
if (name === 'constructor' || typeof this[name] !== 'function') {
continue;
}
this[name] = this[name].bind(this);
} So if this PR just aims to get rid of the warning, we might just want to turn the warning off and don't care import { faker } from '@faker-js/faker'
const uuid = faker.datatype.uuid
const id = uuid() and until now, we support this function datatype(faker = faker() /* or = new Faker() ?! */ ) {
uuid() {
return ... using something with faker. ....
}
} This would be a complete breaking change and currently I don't see that (at least not before we tackled more important parts like outsource locales / maybe using a monorepo) |
So I'm reverting all changes and changing the linter config instead? Just give me a thumbs up or down and I will act accordingly. My only plan was to get rid of the warnings since they are triggering my OCD during development. |
I'm fine either way, but the warnings bother me as well. Maybe put this on our agenda for tomorrow. |
Decision from todays meeting: |
a4b78f2
to
b70d63d
Compare
I didn't close this PR :/ if you drop all changes you made, does it auto-close? |
Never heard of this behavior, in the log history of GitHub it says you closed it. |
I know, but I promise I didn't click the close button. Since we decided to not "fix" these warnings I first wanted to revert all commits I did and then just thought. Fk it, I'll rebase and drop all commits (basically resetting). After force pushing "the changes" I received a notification that I closed the PR ¯\(ツ)/¯ |
8641856
RIP |
unbound-method
warningsunbound-method
warnings
This PR fixes nearly all linter warnings for the
unbound-method
rule.