[polari] lint: Convert eslint JSON to YAML
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] lint: Convert eslint JSON to YAML
- Date: Wed, 14 Aug 2019 18:20:46 +0000 (UTC)
commit 725073ee79715720a6df570c33280f616e588a31
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Aug 7 01:35:35 2019 +0200
lint: Convert eslint JSON to YAML
gjs will change its configuration to YAML, so switch to that format
to keep syncing possible.
https://gitlab.gnome.org/GNOME/polari/merge_requests/130
.eslintrc.json | 6 ---
.eslintrc.yml | 3 ++
lint/eslintrc-gjs.json | 130 ----------------------------------------------
lint/eslintrc-gjs.yml | 88 +++++++++++++++++++++++++++++++
lint/eslintrc-polari.json | 40 --------------
lint/eslintrc-polari.yml | 28 ++++++++++
6 files changed, 119 insertions(+), 176 deletions(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
new file mode 100644
index 0000000..2319963
--- /dev/null
+++ b/.eslintrc.yml
@@ -0,0 +1,3 @@
+extends:
+ - ./lint/eslintrc-gjs.yml
+ - ./lint/eslintrc-polari.yml
diff --git a/lint/eslintrc-gjs.yml b/lint/eslintrc-gjs.yml
new file mode 100644
index 0000000..50da632
--- /dev/null
+++ b/lint/eslintrc-gjs.yml
@@ -0,0 +1,88 @@
+---
+env:
+ es6: true
+extends: 'eslint:recommended'
+rules:
+ array-bracket-newline:
+ - error
+ - consistent
+ array-bracket-spacing:
+ - error
+ - never
+ arrow-spacing: error
+ brace-style: error
+ comma-spacing:
+ - error
+ - before: false
+ after: true
+ indent:
+ - error
+ - 4
+ - ignoredNodes:
+ # Allow not indenting the body of GObject.registerClass, since in the
+ # future it's intended to be a decorator
+ - 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] >
ClassExpression:first-child'
+ # Allow dedenting chained member expressions
+ MemberExpression: 'off'
+ key-spacing:
+ - error
+ - beforeColon: false
+ afterColon: true
+ keyword-spacing:
+ - error
+ - before: true
+ after: true
+ linebreak-style:
+ - error
+ - unix
+ no-empty:
+ - error
+ - allowEmptyCatch: true
+ no-implicit-coercion:
+ - error
+ - 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
+ object-curly-newline:
+ - error
+ - consistent: true
+ object-curly-spacing: error
+ prefer-template: error
+ quotes:
+ - error
+ - single
+ - avoidEscape: true
+ semi:
+ - error
+ - always
+ semi-spacing:
+ - error
+ - before: false
+ after: true
+ space-before-blocks: error
+ space-infix-ops:
+ - error
+ - int32Hint: false
+globals:
+ ARGV: readonly
+ Debugger: readonly
+ GIRepositoryGType: readonly
+ imports: readonly
+ Intl: readonly
+ log: readonly
+ logError: readonly
+ print: readonly
+ printerr: readonly
+ window: readonly
+parserOptions:
+ ecmaVersion: 2017
diff --git a/lint/eslintrc-polari.yml b/lint/eslintrc-polari.yml
new file mode 100644
index 0000000..d8478b0
--- /dev/null
+++ b/lint/eslintrc-polari.yml
@@ -0,0 +1,28 @@
+rules:
+ camelcase:
+ - error
+ - properties: never
+ allow: [^vfunc_, ^on_]
+ curly:
+ - error
+ - multi-or-nest
+ - consistent
+ no-unused-vars:
+ - error
+ - argsIgnorePattern: ^_
+ varsIgnorePattern: _$
+ object-curly-spacing:
+ - error
+ - always
+ prefer-arrow-callback: error
+globals:
+ debug: readonly
+ info: readonly
+ warning: readonly
+ critical: readonly
+ error: readonly
+ pkg: readonly
+ _: readonly
+ C_: readonly
+ N_: readonly
+ ngettext: readonly
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]