Skip to content

Commit

Permalink
fix(eslint): add more eslint ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Jan 5, 2023
1 parent 1017b7c commit f7fcc80
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/eslint-config-carbon/plugins/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ module.exports = {
'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,
},
},

// When writing fixtures, we tend to focus on the specific component and
// don't require React in scope as we never end up executing the code. The
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: 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 f7fcc80

Please sign in to comment.