Skip to content

Commit 5d9302b

Browse files
authored
Use const for EOL variable (#129)
The variable is never re-assigned, and using let triggers the following linting error: ``` standard: Use JavaScript Standard Style (https://standardjs.com) standard: Run `standard --fix` to automatically fix some problems. /Users/linus/coding/standard/tmp/jsonfile/utils.js:2:7: 'EOL' is never reassigned. Use 'const' instead. (prefer-const) ```
1 parent 1639f64 commit 5d9302b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function stringify (obj, options = {}) {
2-
let EOL = options.EOL || '\n'
2+
const EOL = options.EOL || '\n'
33

44
const str = JSON.stringify(obj, options ? options.replacer : null, options.spaces)
55

0 commit comments

Comments
 (0)