mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 21:48:05 -05:00
[Tests] fix linting error caused by updated base config
This commit is contained in:
@@ -113,7 +113,7 @@ module.exports = {
|
||||
body: 1
|
||||
},
|
||||
CallExpression: {
|
||||
'arguments': 1
|
||||
arguments: 1
|
||||
},
|
||||
ArrayExpression: 1,
|
||||
ObjectExpression: 1,
|
||||
@@ -344,8 +344,8 @@ module.exports = {
|
||||
// enforce line breaks between braces
|
||||
// http://eslint.org/docs/rules/object-curly-newline
|
||||
'object-curly-newline': ['error', {
|
||||
ObjectExpression: { minProperties: 3, multiline: true, consistent: true },
|
||||
ObjectPattern: { minProperties: 3, multiline: true, consistent: true }
|
||||
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
|
||||
ObjectPattern: { minProperties: 4, multiline: true, consistent: true }
|
||||
}],
|
||||
|
||||
// enforce "same line" or "multiple line" on object properties.
|
||||
|
||||
@@ -11,9 +11,9 @@ fs.readdirSync(path.join(__dirname, '../rules')).forEach((name) => {
|
||||
files[name] = require(`../rules/${name}`); // eslint-disable-line global-require
|
||||
});
|
||||
|
||||
Object.keys(files).forEach((
|
||||
Object.keys(files).forEach(( // eslint-disable-line function-paren-newline
|
||||
name, // trailing function comma is to test parsing
|
||||
) => {
|
||||
) => { // eslint-disable-line function-paren-newline
|
||||
const config = files[name];
|
||||
|
||||
test(`${name}: does not reference react`, (t) => {
|
||||
|
||||
6
packages/eslint-config-airbnb/rules/react.js
vendored
6
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -186,7 +186,11 @@ module.exports = {
|
||||
|
||||
// Prevent missing props validation in a React component definition
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
|
||||
'react/prop-types': ['error', { ignore: [], customValidators: [], skipUndeclared: false }],
|
||||
'react/prop-types': ['error', {
|
||||
ignore: [],
|
||||
customValidators: [],
|
||||
skipUndeclared: false
|
||||
}],
|
||||
|
||||
// Prevent missing React when using JSX
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md
|
||||
|
||||
Reference in New Issue
Block a user