Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

Commit c88403b

Browse files
including docs folder back in linting
1 parent 2583a76 commit c88403b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ module.exports = {
3030
'dist/',
3131
'.yarn/',
3232
'storybook-static',
33-
'docs/', // TODO: Remove this line once node version upgrade PR is merged https://github.com/MetaMask/design-tokens/pull/600
33+
'docs/utils/getCSSVariablesFromStylesheet.ts', // TODO: Fix the types in this file
3434
],
3535
};

docs/utils/getCSSVariablesFromStylesheet.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
// Define a type for the color object
2-
export interface Color {
1+
/* global document, CSSRule, CSSStyleRule, getComputedStyle */
2+
3+
export type Color = {
34
[key: string]: {
45
color: string;
56
name: string;
67
};
7-
}
8+
};
89

910
/**
1011
* Retrieves CSS variables from the stylesheet.
@@ -19,7 +20,7 @@ function getCSSVariablesFromStylesheet(varPrefix: string): Color {
1920
.flatMap((styleSheet) => {
2021
try {
2122
return Array.from(styleSheet.cssRules);
22-
} catch (err) {
23+
} catch (error) {
2324
return [];
2425
}
2526
})

0 commit comments

Comments
 (0)