mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
🆙 upgrade eslint-config-airbnb
This commit is contained in:
parent
090afe0402
commit
2bddeef1e5
@ -56,6 +56,8 @@ const eslintrc = {
|
||||
'jsx-a11y/anchor-is-valid': 0,
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'react/jsx-filename-extension': 0,
|
||||
'react/state-in-constructor': 0,
|
||||
'react/jsx-props-no-spreading': 0,
|
||||
'prefer-destructuring': 0, // TODO: remove later
|
||||
'consistent-return': 0, // TODO: remove later
|
||||
'no-return-assign': 0, // TODO: remove later
|
||||
@ -78,6 +80,8 @@ const eslintrc = {
|
||||
'react/display-name': 0,
|
||||
// ban this for Number.isNaN needs polyfill
|
||||
'no-restricted-globals': 0,
|
||||
'max-classes-per-file': 0,
|
||||
'react/static-property-placement': 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -143,7 +143,7 @@ describe('Test utils function', () => {
|
||||
it('bindAnimationEvent should return when node is null', () => {
|
||||
const wrapper = mount(
|
||||
<Wave>
|
||||
<button type="button" disabled />
|
||||
<button type="button" disabled>button</button>
|
||||
</Wave>,
|
||||
).instance();
|
||||
expect(wrapper.bindAnimationEvent()).toBe(undefined);
|
||||
@ -152,7 +152,7 @@ describe('Test utils function', () => {
|
||||
it('bindAnimationEvent.onClick should return when children is hidden', () => {
|
||||
const wrapper = mount(
|
||||
<Wave>
|
||||
<button type="button" style={{ display: 'none' }} />
|
||||
<button type="button" style={{ display: 'none' }}>button</button>
|
||||
</Wave>,
|
||||
).instance();
|
||||
expect(wrapper.bindAnimationEvent()).toBe(undefined);
|
||||
|
@ -2907,7 +2907,9 @@ exports[`Badge should support offset when count is a ReactNode 1`] = `
|
||||
<a
|
||||
class="head-example"
|
||||
href="#"
|
||||
/>
|
||||
>
|
||||
head
|
||||
</a>
|
||||
<span
|
||||
class="ant-scroll-number-custom-component custom"
|
||||
style="right:-10px;margin-top:20px;color:#f5222d"
|
||||
|
@ -84,7 +84,7 @@ describe('Badge', () => {
|
||||
it('should support offset when count is a ReactNode', () => {
|
||||
const wrapper = render(
|
||||
<Badge count={<span className="custom" style={{ color: '#f5222d' }} />} offset={[10, 20]}>
|
||||
<a href="#" className="head-example" />
|
||||
<a href="#" className="head-example">head</a>
|
||||
</Badge>,
|
||||
);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
|
@ -521,7 +521,7 @@ describe('Upload List', () => {
|
||||
|
||||
const wrapper = mount(
|
||||
<Upload listType="picture" defaultFileList={[file]} previewFile={previewFile}>
|
||||
<button type="button" />
|
||||
<button type="button">button</button>
|
||||
</Upload>,
|
||||
);
|
||||
wrapper.setState({});
|
||||
|
@ -126,7 +126,7 @@
|
||||
"enzyme-adapter-react-16": "^1.14.0",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
"eslint": "^6.1.0",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-config-airbnb": "^18.0.0",
|
||||
"eslint-config-prettier": "^6.0.0",
|
||||
"eslint-plugin-babel": "^5.3.0",
|
||||
"eslint-plugin-import": "^2.17.3",
|
||||
|
Loading…
Reference in New Issue
Block a user