Skip to content

Commit d78af39

Browse files
authored
Merge pull request #1996 from remcohaszing/redux-devtools-extension-compose
[eslint config] [base] [patch] Allow use of `__REDUX_DEVTOOLS_EXTENSION_COMPOSE__`
2 parents d8256fc + 25f11fb commit d78af39

File tree

1 file changed

+9
-0
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+9
-0
lines changed

packages/eslint-config-airbnb/rules/react.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
const assign = require('object.assign');
2+
const baseStyleRules = require('eslint-config-airbnb-base/rules/style').rules;
3+
4+
const dangleRules = baseStyleRules['no-underscore-dangle'];
5+
16
module.exports = {
27
plugins: [
38
'react',
@@ -12,6 +17,10 @@ module.exports = {
1217
// View link below for react rules documentation
1318
// https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules
1419
rules: {
20+
'no-underscore-dangle': [dangleRules[0], assign({}, dangleRules[1], {
21+
allow: dangleRules[1].allow.concat(['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__']),
22+
})],
23+
1524
// Specify whether double or single quotes should be used in JSX attributes
1625
// https://eslint.org/docs/rules/jsx-quotes
1726
'jsx-quotes': ['error', 'prefer-double'],

0 commit comments

Comments
 (0)