Skip to content

Commit 082e5b3

Browse files
Radek Benkelbenmosher
authored andcommitted
Enable quotes rule for eslint
1 parent ea1b0e3 commit 082e5b3

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

.eslintrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ rules:
1313
comma-dangle: [2, always-multiline]
1414
eqeqeq: [2, "allow-null"]
1515
no-shadow: 1
16+
quotes:
17+
- 2
18+
- single
19+
- allowTemplateLiterals: true

src/core/getExports.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ function captureDoc(...nodes) {
352352
// capture XSDoc
353353
n.leadingComments.forEach(comment => {
354354
// skip non-block comments
355-
if (comment.value.slice(0, 4) !== "*\n *") return
355+
if (comment.value.slice(0, 4) !== '*\n *') return
356356
try {
357357
metadata.doc = doctrine.parse(comment.value, { unwrap: true })
358358
} catch (err) {

src/core/hash.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ export function hashArray(hash, array) {
2929
}
3030

3131
export function hashObject(hash, object) {
32-
hash.update("{")
32+
hash.update('{')
3333
Object.keys(object).sort().forEach(key => {
3434
hash.update(stringify(key))
3535
hash.update(':')
3636
hashify(hash, object[key])
37-
hash.update(",")
37+
hash.update(',')
3838
})
39-
hash.update("}")
39+
hash.update('}')
4040

4141
return hash
4242
}

src/core/parse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import assign from 'object-assign'
33

44
export default function (content, context) {
55

6-
if (context == null) throw new Error("need context to parse properly")
6+
if (context == null) throw new Error('need context to parse properly')
77

88
let { parserOptions, parserPath } = context
99

10-
if (!parserPath) throw new Error("parserPath is required!")
10+
if (!parserPath) throw new Error('parserPath is required!')
1111

1212
// hack: espree blows up with frozen options
1313
parserOptions = assign({}, parserOptions)

0 commit comments

Comments
 (0)