Skip to content

Commit 54258f4

Browse files
committed
chore(lint): add report-unused-disable-directives
1 parent e72f967 commit 54258f4

File tree

6 files changed

+3
-10
lines changed

6 files changed

+3
-10
lines changed

__tests__/api/htmlAttributes.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Helmet } from '../../src';
33
import { HELMET_ATTRIBUTE } from '../../src/constants';
44
import { render } from './utils';
55

6-
/* eslint-disable max-nested-callbacks, jsx-a11y/html-has-lang */
6+
/* eslint-disable jsx-a11y/html-has-lang */
77

88
Helmet.defaultProps.defer = false;
99

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"scripts": {
6262
"clean": "rimraf lib",
63-
"lint": "eslint .",
63+
"lint": "eslint . --report-unused-disable-directives",
6464
"lint-fix": "eslint . --fix",
6565
"test": "NODE_ENV=test BABEL_ENV=test jest",
6666
"test-watch": "yarn test --watch",

src/Provider.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export default class Provider extends Component {
3737

3838
value = {
3939
setHelmet: serverState => {
40-
// eslint-disable-next-line react/prop-types
4140
this.props.context.helmet = serverState;
4241
},
4342
helmetInstances: {
@@ -56,7 +55,6 @@ export default class Provider extends Component {
5655
super(props);
5756

5857
if (!Provider.canUseDOM) {
59-
// eslint-disable-next-line no-param-reassign
6058
props.context.helmet = mapStateOnServer({
6159
baseTag: [],
6260
bodyAttributes: {},

src/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const REACT_TAG_MAP = {
4545
};
4646

4747
export const HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce((obj, key) => {
48-
// eslint-disable-next-line no-param-reassign
4948
obj[REACT_TAG_MAP[key]] = key;
5049
return obj;
5150
}, {});

src/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class Helmet extends Component {
2828
* @param {Object} titleAttributes: {"itemprop": "name"}
2929
* @param {String} titleTemplate: "MySite.com - %s"
3030
*/
31-
/* eslint-disable react/prop-types, react/forbid-prop-types, react/require-default-props */
31+
/* eslint-disable react/forbid-prop-types, react/require-default-props */
3232
static propTypes = {
3333
base: PropTypes.object,
3434
bodyAttributes: PropTypes.object,
@@ -171,7 +171,6 @@ export class Helmet extends Component {
171171
const { children: nestedChildren, ...childProps } = child.props;
172172
// convert React props to HTML attributes
173173
const newChildProps = Object.keys(childProps).reduce((obj, key) => {
174-
// eslint-disable-next-line no-param-reassign
175174
obj[HTML_TAG_MAP[key] || key] = childProps[key];
176175
return obj;
177176
}, {});
@@ -185,7 +184,6 @@ export class Helmet extends Component {
185184

186185
switch (type) {
187186
case TAG_NAMES.FRAGMENT:
188-
// eslint-disable-next-line no-param-reassign
189187
newProps = this.mapChildrenToProps(nestedChildren, newProps);
190188
break;
191189

@@ -203,7 +201,6 @@ export class Helmet extends Component {
203201
break;
204202

205203
default:
206-
// eslint-disable-next-line no-param-reassign
207204
newProps = this.mapObjectTypeChildren({
208205
child,
209206
newProps,

src/server.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ const generateTagsAsString = (type, tags, encode) =>
6969

7070
const convertElementAttributesToReactProps = (attributes, initProps = {}) =>
7171
Object.keys(attributes).reduce((obj, key) => {
72-
// eslint-disable-next-line no-param-reassign
7372
obj[REACT_TAG_MAP[key] || key] = attributes[key];
7473
return obj;
7574
}, initProps);

0 commit comments

Comments
 (0)