JSLint Happy
Config Key: jslint_happy
Description: Enable jslint-stricter mode
Available since version: 0.7.0 (Current: )
Type: boolean
Default: false
Support
Languages: EJS, JSX, JavaScript
Beautifiers: JS-Beautify
Comparison Table
Language | JS-Beautify |
---|---|
EJS | ✅ |
JSX | ✅ |
JavaScript | ✅ |
Examples
Carriage Return = ␍; Line Feed = ␊; Tab = ⇥; Whitespace = ·.
🚧 Original Code
const·fun1·=·function·(arg1)·{␊
}␊
const·fun2·=·function(arg1)·{␊
}␊
🔧 true
Using JS-Beautify beautifier:
const·fun1·=·function·(arg1)·{}␊
const·fun2·=·function·(arg1)·{}
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"jslint_happy": true,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: true
===================================================================
--- true Original
+++ true Beautified
@@ -1,4 +1,2 @@
-const·fun1·=·function·(arg1)·{␊
-}␊
-const·fun2·=·function(arg1)·{␊
-}␊
+const·fun1·=·function·(arg1)·{}␊
+const·fun2·=·function·(arg1)·{}
\ No newline at end of file
🔧 false
Using JS-Beautify beautifier:
const·fun1·=·function(arg1)·{}␊
const·fun2·=·function(arg1)·{}
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"jslint_happy": false,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: false
===================================================================
--- false Original
+++ false Beautified
@@ -1,4 +1,2 @@
-const·fun1·=·function·(arg1)·{␊
-}␊
-const·fun2·=·function(arg1)·{␊
-}␊
+const·fun1·=·function(arg1)·{}␊
+const·fun2·=·function(arg1)·{}
\ No newline at end of file