[gnome-builder] snippet: Use single quotes in JS



commit 88ac78106d4dd0806c1898f0d2b581b2bd814417
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Apr 3 00:55:46 2022 +0200

    snippet: Use single quotes in JS
    
    gjs mandates single quotes for strings, which is the closest we get
    to a canonical "GNOME JS" style, in particular as it is the base for
    the style guidelines of gnome-shell and friends. As good as it would
    be to have an option for the quoting style of string literals, it
    makes more sense to follow the gjs style for now than using double
    quotes, so adjust the snippets accordingly.
    
    https://gitlab.gnome.org/GNOME/gnome-builder/-/issues/738

 src/plugins/snippets/snippets/js.snippets | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/snippets/snippets/js.snippets b/src/plugins/snippets/snippets/js.snippets
index f9a0885fe..110489730 100644
--- a/src/plugins/snippets/snippets/js.snippets
+++ b/src/plugins/snippets/snippets/js.snippets
@@ -1,9 +1,9 @@
 snippet import
-       import "${1:./module.js}";
+       import '${1:./module.js}';
        $0
 snippet from
 - desc import … from
-       import ${1:{ Module }} from "${2:./module.js}";
+       import ${1:{ Module }} from '${2:./module.js}';
        $0
 snippet imports
        const ${1:Module} = imports.${2:path}.${$1|decapitalize};
@@ -17,7 +17,7 @@ snippet lang
        const ${1:Lang} = imports.${$1|decapitalize};
        $0
 snippet require
-       const ${1:Module} = require("${2:./}${3:$1|lower}");
+       const ${1:Module} = require('${2:./}${3:$1|lower}');
        $0
 snippet class
        class ${1:ClassName} {
@@ -104,10 +104,10 @@ snippet let
 snippet var
        var ${1:variable} = ${2:expression};$0
 snippet log
-       console.log("${1:message}");$0
+       console.log('${1:message}');$0
 snippet error
-       console.error("${1:message}");$0
+       console.error('${1:message}');$0
 snippet info
-       console.info("${1:message}");$0
+       console.info('${1:message}');$0
 snippet warn
-       console.warn("${1:message}");$0
\ No newline at end of file
+       console.warn('${1:message}');$0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]