mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
lint: Convert eslint JSON to YAML
gjs has changed its configuration to YAML, so switch to that format to keep syncing possible. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818
This commit is contained in:
parent
913990b9ea
commit
abc7cc9a26
9 changed files with 136 additions and 202 deletions
88
lint/eslintrc-gjs.yml
Normal file
88
lint/eslintrc-gjs.yml
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue