Skip to content

Commit

Permalink
Merge branch 'main' into light-prop-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Jan 18, 2023
2 parents c64d09d + eb1e4e8 commit a65d02e
Show file tree
Hide file tree
Showing 32 changed files with 127 additions and 45 deletions.
Binary file not shown.
18 changes: 18 additions & 0 deletions config/eslint-config-carbon/plugins/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ module.exports = {
'react/jsx-no-useless-fragment': 2,
'react/no-typos': 2,
'react/sort-prop-types': 2,
'react/forbid-component-props': [
2,
{ forbid: [{ propName: 'style', message: 'Avoid using style prop' }] },
],
'react/forbid-dom-props': [
2,
{ forbid: [{ propName: 'style', message: 'Avoid using style prop' }] },
],

// react-hooks
'react-hooks/rules-of-hooks': 2,
Expand Down Expand Up @@ -77,6 +85,16 @@ module.exports = {
rules: {
'react/display-name': 0,
'react/prop-types': 0,
'react/forbid-component-props': 0,
'react/forbid-dom-props': 0,
},
},
// style prop is fine to be used in internal unit testing
{
files: ['*.e2e.js'],
rules: {
'react/forbid-component-props': 0,
'react/forbid-dom-props': 0,
},
},

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"prettier": "^2.7.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.0",
"rimraf": "^4.0.0",
"stylelint": "^14.3.0"
},
"commitlint": {
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"fs-extra": "^10.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"@carbon/test-utils": "^10.26.0",
"fs-extra": "^10.0.0",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"sass": "^1.51.0"
},
"sideEffects": [
Expand Down
2 changes: 1 addition & 1 deletion packages/colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@carbon/test-utils": "^10.26.0",
"change-case": "^4.1.1",
"fs-extra": "^10.0.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"sideEffects": false,
"eyeglass": {
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"fs-extra": "^10.0.0",
"klaw-sync": "^6.0.0",
"replace-in-file": "^3.4.2",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/feature-flags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"change-case": "^4.1.2",
"fs-extra": "^10.0.0",
"js-yaml": "^3.14.0",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@carbon/cli": "^11.8.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"eyeglass": {
"exports": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/icon-build-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"prop-types": "^15.6.2",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"rimraf": "^3.0.0",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0",
"svg-parser": "^2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/icon-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"@carbon/cli": "^11.8.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/icons-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"@carbon/icon-build-helpers": "^1.9.0",
"@carbon/icons": "^11.15.0-rc.0",
"rimraf": "^3.0.2"
"rimraf": "^4.0.0"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/icons-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@carbon/icons": "^11.15.0-rc.0",
"fs-extra": "^10.0.0",
"prettier": "^2.7.1",
"rimraf": "^3.0.0",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"vue": "^2.6.8"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"devDependencies": {
"@carbon/cli": "^11.8.0",
"@carbon/icon-build-helpers": "^1.9.0",
"rimraf": "^3.0.2"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"@carbon/scss-generator": "^10.15.0",
"@carbon/test-utils": "^10.26.0",
"core-js": "^3.16.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/motion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
},
"devDependencies": {
"@carbon/cli": "^11.8.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/pictograms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
},
"devDependencies": {
"@carbon/icon-build-helpers": "^1.9.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"requestanimationframe": "^0.0.23",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0",
"rtlcss": "^4.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/FocusScope/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function FocusScopeBumper(props) {
return (
<span
data-carbon-focus-scope=""
// eslint-disable-next-line react/forbid-dom-props
style={bumperStyle}
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
tabIndex="0"
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Menu/_storybook-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const InfoBanner = () => (

// eslint-disable-next-line react/prop-types
export const StoryFrame = ({ children }) => (
// eslint-disable-next-line react/forbid-dom-props
<div style={{ height: 'calc(100vh - 6.25rem)' }}>
<InfoBanner />
{children}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Stack/Stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const Stack = React.forwardRef(function Stack(props, ref) {
}

return (
// eslint-disable-next-line react/forbid-component-props
<BaseComponent {...rest} ref={ref} className={className} style={style}>
{children}
</BaseComponent>
Expand Down
2 changes: 1 addition & 1 deletion packages/sketch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"cross-env": "^7.0.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"skpm": {
"name": "Carbon Elements",
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"lodash.isequal": "^4.5.0",
"postcss": "^8.4.14",
"postcss-flexbugs-fixes": "^5.0.2",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"sass": "^1.51.0"
},
"sideEffects": [
Expand Down
24 changes: 24 additions & 0 deletions packages/styles/scss/__tests__/type-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,30 @@ describe('@carbon/styles/scss/type', () => {
"display-02",
"display-03",
"display-04",
"legal-01",
"legal-02",
"body-compact-01",
"body-compact-02",
"heading-compact-01",
"heading-compact-02",
"body-01",
"body-02",
"heading-03",
"heading-04",
"heading-05",
"heading-06",
"heading-07",
"fluid-heading-03",
"fluid-heading-04",
"fluid-heading-05",
"fluid-heading-06",
"fluid-paragraph-01",
"fluid-quotation-01",
"fluid-quotation-02",
"fluid-display-01",
"fluid-display-02",
"fluid-display-03",
"fluid-display-04",
"font-families",
"font-weights",
"tokens",
Expand Down
26 changes: 26 additions & 0 deletions packages/styles/scss/type/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@
$display-02,
$display-03,
$display-04,
// V11 Tokens
$legal-01,
$legal-02,
$body-compact-01,
$body-compact-02,
$heading-compact-01,
$heading-compact-02,
$body-01,
$body-02,
$heading-03,
$heading-04,
$heading-05,
$heading-06,
$heading-07,
$fluid-heading-03,
$fluid-heading-04,
$fluid-heading-05,
$fluid-heading-06,
$fluid-paragraph-01,
$fluid-quotation-01,
$fluid-quotation-02,
$fluid-display-01,
$fluid-display-02,
$fluid-display-03,
$fluid-display-04,
// others
$font-families,
$font-weights,
$tokens;
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"core-js": "^3.16.0",
"fs-extra": "^10.0.0",
"js-yaml": "^3.13.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@carbon/test-utils": "^10.26.0",
"change-case": "^4.1.1",
"css": "^3.0.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"eyeglass": {
"exports": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/type/scss/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ $tokens: (
fluid-display-02: $fluid-display-02,
fluid-display-03: $fluid-display-03,
fluid-display-04: $fluid-display-04,
);
) !default;

/// @param {Map} $map
/// @access public
Expand Down
2 changes: 1 addition & 1 deletion packages/upgrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"memfs": "^3.4.0",
"nanoid": "^3.1.30",
"npm-which": "^3.0.1",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"semver": "^7.3.5",
"yargs": "^17.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"devDependencies": {
"fast-glob": "^3.2.7",
"lodash.merge": "^4.6.2",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"semver": "^7.3.5"
}
}
2 changes: 2 additions & 0 deletions www/src/pages/insights/[owner]/[repo].js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default function InsightPage(props) {
{formatChange(sprint.issues.states.open.change)}
</span>
</TableCell>
{/* eslint-disable-next-line react/forbid-component-props */}
<TableCell style={closedStyle}>
<Flex align-center justify-between gap-x-5>
<span>
Expand All @@ -165,6 +166,7 @@ export default function InsightPage(props) {
{closedLabel}
</Flex>
</TableCell>
{/* eslint-disable-next-line react/forbid-component-props */}
<TableCell style={createdStyle}>
<Flex align-center justify-between gap-x-5>
<span>
Expand Down

0 comments on commit a65d02e

Please sign in to comment.