Commit 64a88b75 authored by Philip Chimento's avatar Philip Chimento

Merge branch 'more-lint' into 'master'

Add some more eslint rules

See merge request GNOME/gjs!272
parents 553341b6 d0bc28cd
......@@ -12,6 +12,7 @@
"error",
"never"
],
"arrow-spacing": "error",
"brace-style": "error",
"comma-spacing": [
"error",
......@@ -24,6 +25,9 @@
"error",
4,
{
"ignoredNodes": [
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
],
"MemberExpression": "off"
}
],
......@@ -57,6 +61,19 @@
"allow": ["!!"]
}
],
"no-restricted-properties": [
"error",
{
"object": "Lang",
"property": "bind",
"message": "Use arrow notation or Function.prototype.bind()"
},
{
"object": "Lang",
"property": "Class",
"message": "Use ES6 classes"
}
],
"nonblock-statement-body-position": [
"error",
"below"
......
......@@ -70,8 +70,6 @@ A more realistic example would be connecting to a signal on a
method of a prototype:
```js
const Lang = imports.lang;
MyPrototype = {
_init : function() {
fnorb.connect('frobate', this._onFnorbFrobate.bind(this));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment