mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-04 03:42:34 +02:00
chore(v2): fix several lint warnings, add missing types, cleanup (#3844)
* fix several lint warnings, add missing types, cleanup * fix EnumChangefreq issue * better utilization of EnumChangefreq type * update test snapshot
This commit is contained in:
parent
139b668737
commit
ad31facb32
49 changed files with 228 additions and 171 deletions
|
@ -28,11 +28,13 @@ module.exports = postcss.plugin(
|
|||
const sameProperties =
|
||||
decl.parent.nodes.filter((n) => n.prop === decl.prop) || [];
|
||||
const hasImportantProperties = sameProperties.some((p) =>
|
||||
p.hasOwnProperty('important'),
|
||||
Object.prototype.hasOwnProperty.call(p, 'important'),
|
||||
);
|
||||
|
||||
const overriddenProperties = hasImportantProperties
|
||||
? sameProperties.filter((p) => !p.hasOwnProperty('important'))
|
||||
? sameProperties.filter(
|
||||
(p) => !Object.prototype.hasOwnProperty.call(p, 'important'),
|
||||
)
|
||||
: sameProperties.slice(0, -1);
|
||||
|
||||
overriddenProperties.map((p) => p.remove());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue