mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 23:46:28 +08:00
feat: add extend from prettier/react
This commit is contained in:
parent
91146e5e91
commit
44d110c0db
@ -5,6 +5,7 @@ const eslintrc = {
|
||||
'plugin:jest/recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:import/typescript',
|
||||
'prettier/react',
|
||||
],
|
||||
env: {
|
||||
browser: true,
|
||||
|
@ -170,7 +170,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
||||
if (loading && typeof loading !== 'boolean' && loading.delay) {
|
||||
this.delayTimeout = window.setTimeout(() => this.setState({ loading }), loading.delay);
|
||||
} else if (prevProps.loading !== this.props.loading) {
|
||||
// eslint-disable-next-line react/no-did-update-set-state */
|
||||
// eslint-disable-next-line react/no-did-update-set-state
|
||||
this.setState({ loading });
|
||||
}
|
||||
}
|
||||
|
@ -137,6 +137,7 @@ export default function confirm(config: ModalFuncProps) {
|
||||
}
|
||||
for (let i = 0; i < destroyFns.length; i++) {
|
||||
const fn = destroyFns[i];
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
if (fn === close) {
|
||||
destroyFns.splice(i, 1);
|
||||
break;
|
||||
|
@ -58,7 +58,7 @@ function getStyle() {
|
||||
`;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react/prefer-stateless-function */
|
||||
// eslint-disable-next-line react/prefer-stateless-function
|
||||
class Home extends React.Component {
|
||||
static contextTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
|
@ -27,8 +27,8 @@ if (typeof window !== 'undefined') {
|
||||
// Expose to iframe
|
||||
window.react = React;
|
||||
window['react-dom'] = ReactDOM;
|
||||
// eslint-disable-next-line global-require
|
||||
window.antd = require('antd');
|
||||
/* eslint-enable global-require */
|
||||
|
||||
// Error log statistic
|
||||
window.addEventListener('error', function onError(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user