Skip to content

Commit 08a9133

Browse files
aghh1504sapegin
authored andcommitted
Chore: Add eslint-plugin-jsx-a11y (styleguidist#1138)
Part of styleguidist#879
1 parent 4f932ac commit 08a9133

File tree

8 files changed

+3199
-3128
lines changed

8 files changed

+3199
-3128
lines changed

.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"parser": "babel-eslint",
3-
"extends": "tamia/react",
3+
"extends": ["tamia/react", "plugin:jsx-a11y/recommended"],
44
"env": {
55
"browser": true,
66
"node": true
77
},
88
"plugins": [
99
"compat",
10-
"import"
10+
"import",
11+
"jsx-a11y"
1112
],
1213
"settings": {
1314
"import/resolver": {

examples/basic/src/components/Placeholder/Placeholder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export default class Placeholder extends Component {
4747

4848
render() {
4949
const { width, height } = this.props;
50-
return <img className="placeholder" src={this.getImageUrl()} width={width} height={height} />;
50+
return (
51+
<img className="placeholder" src={this.getImageUrl()} width={width} height={height} alt="" />
52+
);
5153
}
5254
}

examples/customised/src/components/Placeholder/Placeholder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ export default class Placeholder extends Component {
4747

4848
render() {
4949
const { width, height } = this.props;
50-
return <img className={s.root} src={this.getImageUrl()} width={width} height={height} />;
50+
return <img className={s.root} src={this.getImageUrl()} width={width} height={height} alt="" />;
5151
}
5252
}

examples/preact/src/components/Placeholder/Placeholder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export default class Placeholder extends Component {
4747

4848
render() {
4949
const { width, height } = this.props;
50-
return <img className="placeholder" src={this.getImageUrl()} width={width} height={height} />;
50+
return (
51+
<img className="placeholder" src={this.getImageUrl()} width={width} height={height} alt="" />
52+
);
5153
}
5254
}

examples/sections/src/components/Placeholder/Placeholder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ export default class Placeholder extends Component {
4949

5050
render() {
5151
const { width, height } = this.props;
52-
return <img className="placeholder" src={this.getImageUrl()} width={width} height={height} />;
52+
return (
53+
<img className="placeholder" src={this.getImageUrl()} width={width} height={height} alt="" />
54+
);
5355
}
5456
}

0 commit comments

Comments
 (0)