Skip to content

Commit bc31a6f

Browse files
committed
chore: disable ESLint rule for function names (#4241)
1 parent 5b95896 commit bc31a6f

26 files changed

+30
-24
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"consistent-return": "off",
1212
"complexity": ["warn", 10],
1313
"global-require": "off",
14+
"func-names": "off",
1415
"lines-between-class-members": "off",
1516
"no-console": "error",
1617
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],

src/collections/Table/Table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import TableRow from './TableRow'
2525
/**
2626
* A table displays a collections of data grouped into rows.
2727
*/
28-
const Table = React.forwardRef(function TableInner(props, ref) {
28+
const Table = React.forwardRef(function (props, ref) {
2929
const {
3030
attached,
3131
basic,

src/collections/Table/TableBody.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react'
44

55
import { getElementType, getUnhandledProps } from '../../lib'
66

7-
const TableBody = React.forwardRef(function TableBodyInner(props, ref) {
7+
const TableBody = React.forwardRef(function (props, ref) {
88
const { children, className } = props
99
const classes = cx(className)
1010
const rest = getUnhandledProps(TableBody, props)

src/collections/Table/TableCell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Icon from '../../elements/Icon'
2020
/**
2121
* A table row can have cells.
2222
*/
23-
const TableCell = React.forwardRef(function TableCellInner(props, ref) {
23+
const TableCell = React.forwardRef(function (props, ref) {
2424
const {
2525
active,
2626
children,

src/collections/Table/TableFooter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import TableHeader from './TableHeader'
77
/**
88
* A table can have a footer.
99
*/
10-
const TableFooter = React.forwardRef(function TableFooterInner(props, ref) {
10+
const TableFooter = React.forwardRef(function (props, ref) {
1111
const { as } = props
1212
const rest = getUnhandledProps(TableFooter, props)
1313

src/collections/Table/TableHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
/**
1414
* A table can have a header.
1515
*/
16-
const TableHeader = React.forwardRef(function TableHeaderInner(props, ref) {
16+
const TableHeader = React.forwardRef(function (props, ref) {
1717
const { children, className, content, fullWidth } = props
1818
const classes = cx(useKeyOnly(fullWidth, 'full-width'), className)
1919
const rest = getUnhandledProps(TableHeader, props)

src/collections/Table/TableHeaderCell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TableCell from './TableCell'
88
/**
99
* A table can have a header cell.
1010
*/
11-
const TableHeaderCell = React.forwardRef(function TableHeaderCellInner(props, ref) {
11+
const TableHeaderCell = React.forwardRef(function (props, ref) {
1212
const { as, className, sorted } = props
1313
const classes = cx(useValueAndKey(sorted, 'sorted'), className)
1414
const rest = getUnhandledProps(TableHeaderCell, props)

src/collections/Table/TableRow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import TableCell from './TableCell'
1919
/**
2020
* A table can have rows.
2121
*/
22-
const TableRow = React.forwardRef(function TableRowInner(props, ref) {
22+
const TableRow = React.forwardRef(function (props, ref) {
2323
const {
2424
active,
2525
cellAs,

src/elements/Header/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import HeaderContent from './HeaderContent'
2323
/**
2424
* A header provides a short summary of content
2525
*/
26-
const Header = React.forwardRef(function HeaderInner(props, ref) {
26+
const Header = React.forwardRef(function (props, ref) {
2727
const {
2828
attached,
2929
block,

src/elements/Header/HeaderContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { childrenUtils, customPropTypes, getElementType, getUnhandledProps } fro
77
/**
88
* Header content wraps the main content when there is an adjacent Icon or Image.
99
*/
10-
const HeaderContent = React.forwardRef(function HeaderContentInner(props, ref) {
10+
const HeaderContent = React.forwardRef(function (props, ref) {
1111
const { children, className, content } = props
1212
const classes = cx('content', className)
1313
const rest = getUnhandledProps(HeaderContent, props)

src/elements/Header/HeaderSubheader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
/**
1414
* Headers may contain subheaders.
1515
*/
16-
const HeaderSubheader = React.forwardRef(function HeaderSubheaderInner(props, ref) {
16+
const HeaderSubheader = React.forwardRef(function (props, ref) {
1717
const { children, className, content } = props
1818
const classes = cx('sub header', className)
1919
const rest = getUnhandledProps(HeaderSubheader, props)

src/elements/Image/Image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import ImageGroup from './ImageGroup'
2525
* An image is a graphic representation of something.
2626
* @see Icon
2727
*/
28-
const Image = React.forwardRef(function ImageInner(props, ref) {
28+
const Image = React.forwardRef(function (props, ref) {
2929
const {
3030
avatar,
3131
bordered,

src/elements/Placeholder/Placeholder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import PlaceholderParagraph from './PlaceholderParagraph'
1717
/**
1818
* A placeholder is used to reserve space for content that soon will appear in a layout.
1919
*/
20-
const Placeholder = React.forwardRef(function PlaceholderInner(props, ref) {
20+
const Placeholder = React.forwardRef(function (props, ref) {
2121
const { children, className, content, fluid, inverted } = props
2222
const classes = cx(
2323
'ui',

src/elements/Placeholder/PlaceholderHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
/**
1414
* A placeholder can contain a header.
1515
*/
16-
const PlaceholderHeader = React.forwardRef(function PlaceholderHeaderInner(props, ref) {
16+
const PlaceholderHeader = React.forwardRef(function (props, ref) {
1717
const { children, className, content, image } = props
1818
const classes = cx(useKeyOnly(image, 'image'), 'header', className)
1919
const rest = getUnhandledProps(PlaceholderHeader, props)

src/elements/Placeholder/PlaceholderImage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { customPropTypes, getElementType, getUnhandledProps, useKeyOnly } from '
77
/**
88
* A placeholder can contain an image.
99
*/
10-
const PlaceholderImage = React.forwardRef(function PlaceholderImageInner(props, ref) {
10+
const PlaceholderImage = React.forwardRef(function (props, ref) {
1111
const { className, square, rectangular } = props
1212
const classes = cx(
1313
useKeyOnly(square, 'square'),

src/elements/Placeholder/PlaceholderLine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getElementType, getUnhandledProps } from '../../lib'
77
/**
88
* A placeholder can contain have lines of text.
99
*/
10-
const PlaceholderLine = React.forwardRef(function PlaceholderLineInner(props, ref) {
10+
const PlaceholderLine = React.forwardRef(function (props, ref) {
1111
const { className, length } = props
1212
const classes = cx('line', length, className)
1313
const rest = getUnhandledProps(PlaceholderLine, props)

src/elements/Placeholder/PlaceholderParagraph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { childrenUtils, customPropTypes, getElementType, getUnhandledProps } fro
77
/**
88
* A placeholder can contain a paragraph.
99
*/
10-
const PlaceholderParagraph = React.forwardRef(function PlaceholderParagraphInner(props, ref) {
10+
const PlaceholderParagraph = React.forwardRef(function (props, ref) {
1111
const { children, className, content } = props
1212
const classes = cx('paragraph', className)
1313
const rest = getUnhandledProps(PlaceholderParagraph, props)

src/elements/Segment/Segment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import SegmentInline from './SegmentInline'
2020
/**
2121
* A segment is used to create a grouping of related content.
2222
*/
23-
const Segment = React.forwardRef(function SegmentInner(props, ref) {
23+
const Segment = React.forwardRef(function (props, ref) {
2424
const {
2525
attached,
2626
basic,

src/elements/Segment/SegmentGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
/**
1616
* A group of segments can be formatted to appear together.
1717
*/
18-
const SegmentGroup = React.forwardRef(function SegmentGroupInner(props, ref) {
18+
const SegmentGroup = React.forwardRef(function (props, ref) {
1919
const { children, className, compact, content, horizontal, piled, raised, size, stacked } = props
2020

2121
const classes = cx(

src/elements/Segment/SegmentInline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { childrenUtils, customPropTypes, getElementType, getUnhandledProps } fro
77
/**
88
* A placeholder segment can be inline.
99
*/
10-
const SegmentInline = React.forwardRef(function SegmentInlineInner(props, ref) {
10+
const SegmentInline = React.forwardRef(function (props, ref) {
1111
const { children, className, content } = props
1212
const classes = cx('inline', className)
1313
const rest = getUnhandledProps(SegmentInline, props)

src/elements/Step/Step.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import StepTitle from './StepTitle'
2121
/**
2222
* A step shows the completion status of an activity in a series of activities.
2323
*/
24-
const Step = React.forwardRef(function StepInner(props, ref) {
24+
const Step = React.forwardRef(function (props, ref) {
2525
const {
2626
active,
2727
children,

src/elements/Step/StepContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import StepTitle from './StepTitle'
1515
/**
1616
* A step can contain a content.
1717
*/
18-
const StepContent = React.forwardRef(function StepContentInner(props, ref) {
18+
const StepContent = React.forwardRef(function (props, ref) {
1919
const { children, className, content, description, title } = props
2020
const classes = cx('content', className)
2121
const rest = getUnhandledProps(StepContent, props)

src/elements/Step/StepDescription.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
getUnhandledProps,
1111
} from '../../lib'
1212

13-
const StepDescription = React.forwardRef(function StepDescriptionInner(props, ref) {
13+
const StepDescription = React.forwardRef(function (props, ref) {
1414
const { children, className, content } = props
1515
const classes = cx('description', className)
1616
const rest = getUnhandledProps(StepDescription, props)

src/elements/Step/StepGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const numberMap = _.pickBy(numberToWordMap, (val, key) => key <= 8)
2222
/**
2323
* A set of steps.
2424
*/
25-
const StepGroup = React.forwardRef(function StepGroupInner(props, ref) {
25+
const StepGroup = React.forwardRef(function (props, ref) {
2626
const {
2727
attached,
2828
children,

src/elements/Step/StepTitle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
/**
1414
* A step can contain a title.
1515
*/
16-
const StepTitle = React.forwardRef(function StepTitleInner(props, ref) {
16+
const StepTitle = React.forwardRef(function (props, ref) {
1717
const { children, className, content } = props
1818
const classes = cx('title', className)
1919
const rest = getUnhandledProps(StepTitle, props)

test/specs/commonTests/forwardsRef.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export default function forwardsRef(Component, options = {}) {
1616
expect(ReactIs.isForwardRef(<Component {...requiredProps} />)).to.equal(true)
1717
})
1818

19+
it('a render function is anonymous', () => {
20+
const innerFunctionName = Component.render.name
21+
expect(innerFunctionName).to.equal('')
22+
})
23+
1924
it(`forwards ref to "${tagName}"`, () => {
2025
const ref = sandbox.spy()
2126

0 commit comments

Comments
 (0)