Sync GJS eslint
This commit is contained in:
+18
-1
@@ -1,7 +1,9 @@
|
|||||||
---
|
---
|
||||||
# From https://gitlab.gnome.org/GNOME/gjs/
|
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
|
||||||
|
# SPDX-FileCopyrightText: 2018 Claudio André <claudioandre.br@gmail.com>
|
||||||
env:
|
env:
|
||||||
es6: true
|
es6: true
|
||||||
|
es2020: true
|
||||||
extends: 'eslint:recommended'
|
extends: 'eslint:recommended'
|
||||||
plugins:
|
plugins:
|
||||||
- jsdoc
|
- jsdoc
|
||||||
@@ -120,8 +122,15 @@ rules:
|
|||||||
no-octal-escape: error
|
no-octal-escape: error
|
||||||
no-proto: error
|
no-proto: error
|
||||||
no-prototype-builtins: 'off'
|
no-prototype-builtins: 'off'
|
||||||
|
no-restricted-globals: [error, window]
|
||||||
no-restricted-properties:
|
no-restricted-properties:
|
||||||
- error
|
- error
|
||||||
|
- object: imports
|
||||||
|
property: format
|
||||||
|
message: Use template strings
|
||||||
|
- object: pkg
|
||||||
|
property: initFormat
|
||||||
|
message: Use template strings
|
||||||
- object: Lang
|
- object: Lang
|
||||||
property: copyProperties
|
property: copyProperties
|
||||||
message: Use Object.assign()
|
message: Use Object.assign()
|
||||||
@@ -180,6 +189,7 @@ rules:
|
|||||||
object-curly-newline:
|
object-curly-newline:
|
||||||
- error
|
- error
|
||||||
- consistent: true
|
- consistent: true
|
||||||
|
multiline: true
|
||||||
object-curly-spacing: error
|
object-curly-spacing: error
|
||||||
object-shorthand: error
|
object-shorthand: error
|
||||||
operator-assignment: error
|
operator-assignment: error
|
||||||
@@ -232,6 +242,9 @@ rules:
|
|||||||
- inside
|
- inside
|
||||||
yield-star-spacing: error
|
yield-star-spacing: error
|
||||||
yoda: error
|
yoda: error
|
||||||
|
settings:
|
||||||
|
jsdoc:
|
||||||
|
mode: typescript
|
||||||
globals:
|
globals:
|
||||||
ARGV: readonly
|
ARGV: readonly
|
||||||
Debugger: readonly
|
Debugger: readonly
|
||||||
@@ -243,5 +256,9 @@ globals:
|
|||||||
logError: readonly
|
logError: readonly
|
||||||
print: readonly
|
print: readonly
|
||||||
printerr: readonly
|
printerr: readonly
|
||||||
|
window: readonly
|
||||||
|
TextEncoder: readonly
|
||||||
|
TextDecoder: readonly
|
||||||
|
console: readonly
|
||||||
parserOptions:
|
parserOptions:
|
||||||
ecmaVersion: 2020
|
ecmaVersion: 2020
|
||||||
|
|||||||
Reference in New Issue
Block a user