mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[eslint config] fix tests
This commit is contained in:
4
packages/eslint-config-airbnb/rules/react.js
vendored
4
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -375,8 +375,8 @@ module.exports = {
|
||||
|
||||
// Forbids using non-exported propTypes
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
|
||||
// this is intentionally set to "warn". it would be "error", but it's only critical if you're using
|
||||
// a babel transform to strip propTypes in production.
|
||||
// this is intentionally set to "warn". it would be "error",
|
||||
// but it's only critical if you're stripping propTypes in production.
|
||||
'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }],
|
||||
|
||||
// Prevent void DOM elements from receiving children
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
const baseConfig = require('.');
|
||||
const assign = require('object.assign');
|
||||
const entries = require('object.entries');
|
||||
const CLIEngine = require('eslint').CLIEngine;
|
||||
|
||||
const baseConfig = require('.');
|
||||
|
||||
function onlyErrorOnRules(rulesToError, config) {
|
||||
const errorsOnly = assign({}, config);
|
||||
const cli = new CLIEngine({ baseConfig: config, useEslintrc: false });
|
||||
|
||||
Reference in New Issue
Block a user