-
-
Notifications
You must be signed in to change notification settings - Fork 79
Align code style with jsdom #300
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
Conversation
lib/CSSStyleDeclaration.js
Outdated
| this._readonly = true; | ||
| // FIXME: The `_readonly` flag should initially be `false` to be editable, | ||
| // but should eventually be set to `true`. | ||
| this._readonly = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a non-style change. Are there others like it I should keep an eye on?
Perhaps it would be better to separate the non-style changes into a different PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
eslint.config.mjs
Outdated
| globals: globals.node | ||
| }, | ||
| rules: { | ||
| "func-style": "off" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not also update test files? What is the benefit of the inconsistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added just in case. Removed.
Fix #286
Motivation
We will apply a code style that largely matches jsdom's.
The objective is to unify code styling across the jsdom project to improve readability and maintainability, as well as to facilitate debugging.
Changes from the existing code style
.editorconfigfrom jsdom.eslint.config.mjsto nearly match jsdom's.function foo() {}) instead of arrow function expressions (const foo = () => {}).require())Differences from jsdom
"consistent-return": "off"to therulesto accommodate Prettier usage."func-style": "off"for test files.