Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Sep 18, 2023
1 parent 3824087 commit fba5611
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 25 deletions.
4 changes: 1 addition & 3 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"@types/react-is": "^16.7.2",
"browser-sync": "^2.29.3",
"browser-sync-webpack-plugin": "^2.3.0",
"color-contrast-checker": "^2.1.0",
"concurrently": "^7.6.0",
"core-js": "^3.32.2",
"cypress": "^12.17.4",
Expand All @@ -86,8 +85,7 @@
"react-is": "^16.13.1",
"react-router-dom": "~6.3.0",
"storybook-addon-mdx-embed": "^1.1.1",
"storybook-docs-toc": "^1.7.0",
"use-overflow": "^1.2.0"
"storybook-docs-toc": "^1.7.0"
},
"peerDependencies": {
"@talend/icons": "^6.52.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/storybook/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
declare module 'color-contrast-checker';
declare module '*.png';
declare module '*.svg' {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}

declare module '*.scss' {
const contents: Record<string, string>;
export default contents;
}
7 changes: 5 additions & 2 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build-storybook": "echo on hold",
"start-storybook": "echo on hold",
"lint": "talend-scripts lint ./src ./storybook/docs ./storybook/blocks",
"lint": "talend-scripts lint",
"start": "cross-env BROWSER=none talend-scripts start-storybook -p 6006 --docs"
},
"repository": {
Expand All @@ -24,12 +24,15 @@
"@storybook/react": "^7.4.1",
"@talend/design-system": "^7.15.0",
"@talend/design-tokens": "^2.9.0",
"@talend/icons": "^6.59.0",
"algoliasearch": "^4.17.2",
"classnames": "^2.3.1",
"color-contrast-checker": "^2.1.0",
"figma-js": "^1.16.0",
"react-hook-form": "^6.15.8",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"use-overflow": "^1.2.0"
},
"devDependencies": {
"@storybook/addon-a11y": "^7.4.1",
Expand Down
16 changes: 8 additions & 8 deletions packages/storybook/src/Welcome.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}

.cls-4 {
fill: #FB5460;
fill: #fb5460;
}

.cls-45,
Expand All @@ -89,7 +89,7 @@

.cls-31,
.cls-6 {
fill: #FF6D70;
fill: #ff6d70;
}

.cls-7 {
Expand Down Expand Up @@ -142,7 +142,7 @@
}

.cls-19 {
fill: #E1E5F0;
fill: #e1e5f0;
}

.cls-20 {
Expand Down Expand Up @@ -178,7 +178,7 @@
}

.cls-28 {
fill: #0075C7;
fill: #0075c7;
}

.cls-29 {
Expand All @@ -202,7 +202,7 @@
}

.cls-34 {
fill: #FDD3B5;
fill: #fdd3b5;
}

.cls-35 {
Expand All @@ -214,7 +214,7 @@
}

.cls-37 {
fill: #1A2E35;
fill: #1a2e35;
}

.cls-38 {
Expand All @@ -226,7 +226,7 @@
}

.cls-40 {
fill: #2B454E;
fill: #2b454e;
}

.cls-41 {
Expand Down Expand Up @@ -293,7 +293,7 @@
}

.cls-56 {
fill: #E96065;
fill: #e96065;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
position: relative;
color: tokens.$coral-color-accent-text;

&:after {
&::after {
content: 'hover me';
position: absolute;
bottom: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,5 @@ const CompositionListItem = forwardRef(
},
);

CompositionListItem.displayName = 'CompositionListItem';
export default CompositionListItem;
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable declaration-property-value-disallowed-list */
@use '@talend/design-tokens/lib/tokens';

.breakpointScale {
Expand Down Expand Up @@ -36,8 +37,8 @@
color: tokens.$coral-color-accent-text-strong;
scrollbar-width: thin;

&:before,
&:after {
&::before,
&::after {
content: '';
display: block;
width: calc(#{tokens.$coral-sizing-l} * 2);
Expand All @@ -49,21 +50,21 @@
transition: opacity tokens.$coral-transition-fast;
}

&:before {
&::before {
left: 0;
background: linear-gradient(to right, #{tokens.$coral-color-neutral-background}, transparent);
}

&:after {
&::after {
right: 0;
background: linear-gradient(to left, #{tokens.$coral-color-neutral-background}, transparent);
}

&__overflowRight:after {
&__overflowRight::after {
opacity: 1;
}

&__overflowLeft:before {
&__overflowLeft::before {
opacity: 1;
}

Expand Down Expand Up @@ -124,6 +125,7 @@
border-top: tokens.$coral-border-m-solid tokens.$coral-color-accent-border-hover;
}
}

&:active {
.icons {
color: tokens.$coral-color-accent-text-strong-active;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable declaration-property-value-disallowed-list */
@use '@talend/design-tokens/lib/tokens';

.colorScale {
Expand Down Expand Up @@ -76,6 +77,7 @@
background: tokens.$coral-color-accent-background-weak-hover;
}
}

&:active {
.icons {
color: tokens.$coral-color-accent-text-strong-active;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const TokensDefinitionList = ({ tokens }: TokensProps) => {
{Object.values(filteredTokens).map((entries: Token[], index) => (
<Tabs.TabPanel key={index}>
<StackVertical gap="S">
{entries.map((token, index) => (
<DefinitionListItemColor key={`${token.name}-${index}`} token={token} />
{entries.map((token, jindex) => (
<DefinitionListItemColor key={`${token.name}-${jindex}`} token={token} />
))}
</StackVertical>
</Tabs.TabPanel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable declaration-property-value-disallowed-list */
@use '@talend/design-tokens/lib/tokens';

.copyButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
background: transparent;
word-break: break-word;
hyphens: auto;
display: -webkit-box;
display: box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const DefinitionListTypography = ({ tokens }: TokensProps) => {
<StackVertical gap="M" key={index}>
<h2 className={styles.title}>{Object.keys(filteredTokens)[index]}</h2>
<StackVertical gap="S">
{entries.map((token, index) => (
<DefinitionListItemTypography key={`${token.name}-${index}`} token={token} />
{entries.map((token, jindex) => (
<DefinitionListItemTypography key={`${token.name}-${jindex}`} token={token} />
))}
</StackVertical>
</StackVertical>
Expand Down

0 comments on commit fba5611

Please sign in to comment.