mirror of
https://github.com/zhigang1992/styled-components.git
synced 2026-01-12 22:52:39 +08:00
remove annoying, unnecessary lint checks
This commit is contained in:
@@ -19,11 +19,13 @@
|
||||
"error",
|
||||
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "ignoreRestSiblings": true }
|
||||
],
|
||||
"react/button-has-type": 0,
|
||||
"react/destructuring-assignment": 0,
|
||||
"react/forbid-prop-types": 0,
|
||||
"react/jsx-filename-extension": 0,
|
||||
"react/no-multi-comp": 0,
|
||||
"react/prefer-stateless-function": 0,
|
||||
"react/prop-types": 0,
|
||||
"react/require-default-props": 0,
|
||||
"react/sort-comp": 0,
|
||||
"symbol-description": 0,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
/* eslint-disable react/prop-types */
|
||||
import validAttr from '@emotion/is-prop-valid';
|
||||
import merge from 'merge-anything';
|
||||
import React, {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
/* eslint-disable react/prop-types */
|
||||
import React from 'react';
|
||||
import { renderToString } from 'react-dom/server';
|
||||
import { render } from 'react-dom';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
/* eslint-disable react/prop-types, no-console */
|
||||
/* eslint-disable no-console */
|
||||
import { Text, View } from 'react-native';
|
||||
import React from 'react';
|
||||
import TestRenderer from 'react-test-renderer';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
/* eslint-disable react/prop-types, no-console */
|
||||
/* eslint-disable no-console */
|
||||
import React, { Component, StrictMode } from 'react';
|
||||
import { findDOMNode } from 'react-dom';
|
||||
import { findRenderedComponentWithType, renderIntoDocument } from 'react-dom/test-utils';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
/* eslint-disable react/prop-types */
|
||||
import React from 'react';
|
||||
import TestRenderer from 'react-test-renderer';
|
||||
|
||||
|
||||
@@ -8,11 +8,8 @@ type Props = {
|
||||
export default (props: Props, fallbackTheme: any, defaultProps: any = EMPTY_OBJECT) => {
|
||||
// Props should take precedence over ThemeProvider, which should take precedence over
|
||||
// defaultProps, but React automatically puts defaultProps on props.
|
||||
|
||||
/* eslint-disable react/prop-types, flowtype-errors/show-errors */
|
||||
const isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
|
||||
const theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
|
||||
/* eslint-enable */
|
||||
|
||||
return theme;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user