Skip to content

Commit 79c88c4

Browse files
authored
Many spec conformance and code quality updates
Update the `CSSStyleDeclaration` class for better spec conformance: * The `cssText` getter now returns the empty string if the computed flag is set. * The `cssText` setter, and the `removeProperty()` and `setProperty()` methods, now throw if the readonly flag is set. * The `parentRule` getter now returns the parent `CSSRule` instead of always returning `null`. * The `item()` method now throws if no argument is given. * Added camel-cased and Pascal-cased versions of WebKit properties, and fixed the raw properties to have a leading hyphen. Fixes #70. * Closes #120 by superseding it. (Some of these still need additional fixes on the jsdom side.) Rewrite the `properties/*.js` files, unifying each file to export three functions: `parse`, `isValid`, and `definition`. Closes #202. Fixes #124. Update the property list to be based on the latest specs, in particular removing the deprecated `azumith` property and some deprecated WebKit properties. Code organization and style updates: * Update style to mostly match the `@domenic/eslint-config` rules. Closes #204. * Put generated files under `generated/`. * Create `utils/camelize.js` to centralize camelization logic. Closes #207. * Rename test files to `*.test.js`, and add many more tests. Additionally closes #200, closes #201, closes #203, closes #205, closes #206, fixes #129. Fixes jsdom/jsdom#3878. Fixes jsdom/jsdom#3833.
1 parent 231845d commit 79c88c4

File tree

105 files changed

+7999
-5109
lines changed

Some content is hidden

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

105 files changed

+7999
-5109
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
node_modules
22
npm-debug.log
3-
lib/implementedProperties.js
4-
lib/properties.js
3+
lib/generated/implementedProperties.js
4+
lib/generated/properties.js

eslint.config.mjs

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1-
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
2-
import globals from 'globals';
1+
import domenicConfig from "@domenic/eslint-config";
2+
import prettierRecommended from "eslint-plugin-prettier/recommended";
3+
import globals from "globals";
34

45
export default [
56
{
6-
ignores: ['lib/implementedProperties.js', 'lib/properties.js'],
7+
ignores: ["lib/generated/*"]
78
},
89
{
9-
files: ['**/*.js'],
10+
files: ["**/*.js"],
1011
languageOptions: {
11-
sourceType: 'commonjs',
12-
},
12+
sourceType: "commonjs"
13+
}
1314
},
14-
eslintPluginPrettierRecommended,
15+
...domenicConfig,
16+
prettierRecommended,
1517
{
16-
files: ['scripts/**/*'],
1718
rules: {
18-
'no-console': 'off',
19-
},
19+
"consistent-return": "off",
20+
"func-style": "off",
21+
"prefer-destructuring": "off",
22+
"require-unicode-regexp": "off"
23+
}
2024
},
2125
{
22-
files: ['scripts/**/*', 'tests/**/*'],
26+
files: ["scripts/**/*"],
2327
languageOptions: {
24-
globals: globals.node,
28+
globals: globals.node
2529
},
30+
rules: {
31+
"no-console": "off"
32+
}
2633
},
34+
{
35+
files: ["test/**/*"],
36+
languageOptions: {
37+
globals: globals.node
38+
}
39+
}
2740
];

0 commit comments

Comments
 (0)