mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[eslint config] [patch] extend no-underscore-dangle to allow for redux dev tools in the main config instead
This commit is contained in:
@@ -369,7 +369,7 @@ module.exports = {
|
||||
// disallow dangling underscores in identifiers
|
||||
// https://eslint.org/docs/rules/no-underscore-dangle
|
||||
'no-underscore-dangle': ['error', {
|
||||
allow: ['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'],
|
||||
allow: [],
|
||||
allowAfterThis: false,
|
||||
allowAfterSuper: false,
|
||||
enforceInMethodNames: true,
|
||||
|
||||
9
packages/eslint-config-airbnb/rules/react.js
vendored
9
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -1,3 +1,8 @@
|
||||
const assign = require('object.assign');
|
||||
const baseStyleRules = require('eslint-config-airbnb-base/rules/style').rules;
|
||||
|
||||
const dangleRules = baseStyleRules['no-underscore-dangle'];
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
'react',
|
||||
@@ -12,6 +17,10 @@ module.exports = {
|
||||
// View link below for react rules documentation
|
||||
// https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules
|
||||
rules: {
|
||||
'no-underscore-dangle': [dangleRules[0], assign({}, dangleRules[1], {
|
||||
allow: dangleRules[1].allow.concat(['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__']),
|
||||
})],
|
||||
|
||||
// Specify whether double or single quotes should be used in JSX attributes
|
||||
// https://eslint.org/docs/rules/jsx-quotes
|
||||
'jsx-quotes': ['error', 'prefer-double'],
|
||||
|
||||
Reference in New Issue
Block a user