Skip to content

Commit b7cb58d

Browse files
authored
Align code style with jsdom
There are some small departures as we use Prettier in this project.
1 parent 38ab569 commit b7cb58d

85 files changed

Lines changed: 2199 additions & 2081 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 2

eslint.config.mjs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,16 @@ export default [
99
{
1010
files: ["**/*.js"],
1111
languageOptions: {
12-
sourceType: "commonjs"
12+
sourceType: "commonjs",
13+
globals: globals.node
1314
}
1415
},
1516
...domenicConfig,
1617
prettierRecommended,
1718
{
1819
rules: {
1920
"consistent-return": "off",
20-
"func-style": "off",
21-
"prefer-destructuring": "off",
2221
"require-unicode-regexp": "off"
2322
}
24-
},
25-
{
26-
files: ["scripts/**/*"],
27-
languageOptions: {
28-
globals: globals.node
29-
},
30-
rules: {
31-
"no-console": "off"
32-
}
33-
},
34-
{
35-
files: ["test/**/*"],
36-
languageOptions: {
37-
globals: globals.node
38-
}
3923
}
4024
];

lib/CSSStyleDeclaration.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ const {
1313
prepareProperties,
1414
shorthandProperties
1515
} = require("./normalize");
16-
const {
17-
hasVarFunc,
18-
isGlobalKeyword,
19-
parseCSS,
20-
parsePropertyValue,
21-
prepareValue
22-
} = require("./parsers");
16+
const { hasVarFunc, isGlobalKeyword, parseCSS, parsePropertyValue, prepareValue } = require("./parsers");
2317
const { asciiLowercase } = require("./utils/strings");
2418

2519
/**
@@ -591,8 +585,7 @@ class CSSStyleDeclaration {
591585
}
592586
if (value && !hasVarFunc(value)) {
593587
const longhandValues = [];
594-
const { shorthandFor, position: shorthandPosition } =
595-
shorthandProperties.get(shorthandProperty);
588+
const { shorthandFor, position: shorthandPosition } = shorthandProperties.get(shorthandProperty);
596589
for (const [longhandProperty] of shorthandFor) {
597590
const longhandValue = this.getPropertyValue(longhandProperty);
598591
const longhandPriority = this._priorities.get(longhandProperty) ?? "";

0 commit comments

Comments
 (0)