[eslint config] fix tests

This commit is contained in:
Jordan Harband
2018-06-21 14:46:24 -07:00
parent fdb998b38a
commit 8be089eb11
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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 });