Skip to content

Commit 82e53e9

Browse files
committed
Linter: enforce quotes for JS object attributes
So far we have weird ESLint setup as it requires to not use quotes for plain attribute names, and enforce quotes for complex ones. Thus I've changed eslint rule to consistent value, so this always should be the same. Closes: #47
1 parent 22a2ce1 commit 82e53e9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"specialLink": ["to"]
1111
}],
1212
"react/prop-types": [0],
13-
"jsx-a11y/click-events-have-key-events": [0]
13+
"jsx-a11y/click-events-have-key-events": [0],
14+
"quote-props": ["error", "consistent"]
1415
},
1516
"plugins": ["jest"]
1617
}

src/actions/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const postSnippet = (snippet, onSuccess) => dispatch => (
5050
fetch('http://api.xsnippet.org/snippets', {
5151
method: 'POST',
5252
headers: {
53-
Accept: 'application/json',
53+
'Accept': 'application/json',
5454
'Content-Type': 'application/json',
5555
},
5656
body: JSON.stringify(snippet),

0 commit comments

Comments
 (0)