Skip to content

Commit e693901

Browse files
remove eslint errors
1 parent 1e3606a commit e693901

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

src/hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useContext} from 'react';
1+
import {useContext} from 'react';
22
import {ApiContext, StateContext, ForceUpdateContext} from './context.js';
33
export const useApi = function useApi() {
44
return useContext(ApiContext);

src/plugins/moreButtonPlugin/button/api.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ export default function Api(components, setOpen) {
7474
this._components.TabFactory.bind(undefined, (ins) => ({
7575
tabPropsManager: (props) => {
7676
const originalProps = this._components.tabPropsManager(ins, props);
77+
7778
const {
78-
'aria-controls': ariaControls,
79-
'aria-expanded': ariaExpanded,
80-
'aria-selected': ariaSelected,
81-
id,
79+
'aria-controls': ariaControls, // eslint-disable-line no-unused-vars
80+
'aria-expanded': ariaExpanded, // eslint-disable-line no-unused-vars
81+
'aria-selected': ariaSelected, // eslint-disable-line no-unused-vars
82+
id, // eslint-disable-line no-unused-vars
8283
...rest
8384
} = originalProps;
8485
if (rest.role) {

src/plugins/moreButtonPlugin/setComponents.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function setComponents(deps, ctx, components) {
88
setComponents.setMoreButtonPlugin(ctx, components, ShowMoreTabs, setComponents.ShowMoreButton, memo);
99
setComponents.setTablistOverflow(components);
1010
}
11-
export const ShowMoreButton = (setComponents.ShowMoreButton = function (deps, props) {
11+
export const ShowMoreButton = (setComponents.ShowMoreButton = function ShowMoreButton(deps, props) {
1212
const {
1313
ShowMoreTabs,
1414
components: {useForceUpdate, useRootState},
@@ -17,7 +17,7 @@ export const ShowMoreButton = (setComponents.ShowMoreButton = function (deps, pr
1717
const {openTabIDs, selectedTabID} = useRootState();
1818
return (
1919
<ShowMoreTabs {...props} ctx={deps.ctx} openTabIDs={openTabIDs} selectedTabID={selectedTabID}>
20-
{props.children}
20+
{props.children /* eslint-disable-line react/prop-types */}
2121
</ShowMoreTabs>
2222
);
2323
});
@@ -38,10 +38,10 @@ export const setMoreButtonPlugin = (setComponents.setMoreButtonPlugin = function
3838
export const setTablistOverflow = (setComponents.setTablistOverflow = function (components) {
3939
if (!components.OriginalTablistOverflow) {
4040
components.OriginalTablistOverflow = components.TablistOverflow;
41-
components.TablistOverflow = function (props) {
41+
components.TablistOverflow = function TablistOverflow(props) {
4242
return (
4343
<components.OriginalTablistOverflow {...props}>
44-
{props.children}
44+
{props.children /* eslint-disable-line react/prop-types */}
4545
<components.MoreButtonPlugin />
4646
</components.OriginalTablistOverflow>
4747
);

src/tab/memomizeTab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {memo} from 'react';
1+
import {memo} from 'react';
22
export default (TabComponent) =>
33
memo(TabComponent, (oldProps, newProps) => {
44
const {id, selectedTabID: oldActiveId} = oldProps,

src/tab/tab.factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const TabComponent = function TabComponent(deps, props) {
55
React.useContext(ForceUpdateContext);
66
const api = React.useContext(ApiContext);
77
const {tabPropsManager, tabInnerPropsManager, closeIconPropsManager} = deps(api);
8-
const {id, selectedTabID} = props,
8+
const {id, selectedTabID} = props, // eslint-disable-line no-unused-vars
99
TabInnerComponent = api.getOption('tabComponent'),
1010
tabObj = api.getTab(id),
1111
clkHandler = function (e) {

src/utils/api/api.factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Helper.setNoneEnumProps(_apiProps, {
244244
},
245245
getSetting: function (settingName) {
246246
const st = this.optionsManager.setting;
247-
if (st.hasOwnProperty(settingName)) {
247+
if (Object.prototype.hasOwnProperty.call(st, settingName)) {
248248
if (typeof st[settingName] === 'function') {
249249
return st[settingName].apply(st, Array.prototype.slice.call(arguments, 1));
250250
}

0 commit comments

Comments
 (0)