Skip to content

Commit 7c0bda2

Browse files
authored
Fix lint usage w/ prettier. (FormidableLabs#322)
We were missing the `"prettier/prettier": "error"` rule which means that we disabled all style rules and _didn't_ have anything re-added for prettier to fix specifically. :P This corrects the config and when run we get this (expected) error: ``` $ eslint . /Users/rye/scm/fmd/nuka-carousel/src/index.js 1028:46 error Insert `;` prettier/prettier 1029:46 error Insert `;` prettier/prettier 1030:46 error Insert `;` prettier/prettier ``` And `eslint . --fix` or `yarn lint --fix` now automagically fixes prettier-based errors!
1 parent f510b15 commit 7c0bda2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"plugins": ["prettier"],
1919
"rules": {
20+
"prettier/prettier": "error",
2021
"react/no-multi-comp": 0,
2122
"max-params": 0,
2223
"no-magic-numbers": 0,

src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1025,9 +1025,9 @@ export default class Carousel extends React.Component {
10251025
? 0
10261026
: this.props.speed;
10271027

1028-
const frameStyles = this.getFrameStyles()
1029-
const touchEvents = this.getTouchEvents()
1030-
const mouseEvents = this.getMouseEvents()
1028+
const frameStyles = this.getFrameStyles();
1029+
const touchEvents = this.getTouchEvents();
1030+
const mouseEvents = this.getMouseEvents();
10311031

10321032
return (
10331033
<div

0 commit comments

Comments
 (0)