eslint: disallow importing react-inlinesvg directly
This commit is contained in:
parent
b391f65e3c
commit
734750a46a
|
@ -94,6 +94,12 @@ module.exports = {
|
|||
'no-loop-func': 'error',
|
||||
'no-mixed-spaces-and-tabs': 'error',
|
||||
'no-nested-ternary': 'warn',
|
||||
'no-restricted-imports': ['error', {
|
||||
patterns: [{
|
||||
group: ['react-inlinesvg'],
|
||||
message: 'Use the SvgIcon component instead.',
|
||||
}],
|
||||
}],
|
||||
'no-trailing-spaces': 'warn',
|
||||
'no-undef': 'error',
|
||||
'no-unreachable': 'error',
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import classNames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import InlineSVG from 'react-inlinesvg';
|
||||
import InlineSVG from 'react-inlinesvg'; // eslint-disable-line no-restricted-imports
|
||||
|
||||
export default class SvgIcon extends React.PureComponent {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import InlineSVG from 'react-inlinesvg';
|
||||
import InlineSVG from 'react-inlinesvg'; // eslint-disable-line no-restricted-imports
|
||||
|
||||
interface ISvgIcon {
|
||||
className?: string,
|
||||
|
|
Loading…
Reference in New Issue