eslint-plugin-gjs
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -23,3 +23,3 @@ /** | ||
const GJS_RULES = { | ||
'comma': 'error', | ||
'comma-style': 'error', | ||
'no-unreachable': 'error', | ||
@@ -56,2 +56,8 @@ 'no-undef': 'error', | ||
const GJS_GLOBALS_BASE = { | ||
'ARGV': false, | ||
'Debugger': false, | ||
'GjsFileImporter': false, | ||
'imports': false, | ||
'InternalError': false, | ||
'Iterator': false, | ||
'log': false, | ||
@@ -61,5 +67,5 @@ 'logError': false, | ||
'printerr': false, | ||
'imports': false, | ||
'ARGV': false, | ||
'global': false | ||
'StopIteration': false, | ||
'uneval': false, | ||
'window': false | ||
}; | ||
@@ -76,4 +82,6 @@ | ||
return Object.assign({ | ||
window: false, | ||
pkg: false | ||
'pkg': false, | ||
'C_': false, | ||
'N_': false, | ||
'_': false | ||
}, GJS_GLOBALS_BASE); | ||
@@ -83,3 +91,35 @@ } () | ||
'shell-extension': { | ||
globals: GJS_GLOBALS_BASE | ||
globals: function () { | ||
return Object.assign({ | ||
'global': false, | ||
'C_': false, | ||
'N_': false, | ||
'_': false, | ||
'ngettext': false | ||
}, GJS_GLOBALS_BASE); | ||
} () | ||
}, | ||
'cairo': { | ||
globals: { | ||
'CairoLinearGradient': false, | ||
'CairoRadialGradient': false, | ||
'CairoPDFSurface': false, | ||
'CairoPSSurface': false, | ||
'CairoSVGSurface': false, | ||
'CairoImageSurface': false, | ||
'CairoSurfacePattern': false, | ||
'CairoContext': false, | ||
'CairoRegion': false, | ||
'CairoGradient': false, | ||
// TODO: Is this a global? 'CairoPath': false, | ||
'CairoSolidPattern': false, | ||
'CairoPattern': false, | ||
'CairoSurface': false | ||
} | ||
}, | ||
'girepository': { | ||
'GIRepository': false, | ||
'GIRepositoryGType': false, | ||
'GIRepositoryFunction': false, | ||
'GIRepositoryNamespace': false | ||
} | ||
@@ -86,0 +126,0 @@ }, |
{ | ||
"name": "eslint-plugin-gjs", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Adds compatibility for the GJS (Gnome JavaScript) environment.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -49,2 +49,4 @@ # eslint-plugin-gjs | ||
You can also add `gjs/cairo` or `gjs/girepository` to your env to enable the relevant globals. | ||
## Supported Rules | ||
@@ -62,3 +64,2 @@ | ||
* gjs/translation-strings | ||
* DEPRECATED: gjs/no-unsupported-syntax | ||
@@ -70,2 +71,3 @@ | ||
* Lang.bind enforcement for closures | ||
* Prohibit Promise, Symbol, and WeakSet globals. | ||
@@ -72,0 +74,0 @@ |
44401
1104
75