mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 07:09:07 +00:00
Require trailing commas for multiline for arrays, objects, imports and exports and disallow trailing commas for functions. Do this by updating the ESLint config and fixing new complaints. The reason for this change are the resulting future cleaner version diffs. Also see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas https://eslint.org/docs/latest/rules/comma-dangle
61 lines
1.0 KiB
YAML
61 lines
1.0 KiB
YAML
env:
|
|
es2021: true
|
|
extends: 'eslint:recommended'
|
|
parserOptions:
|
|
ecmaVersion: 2022
|
|
sourceType: module
|
|
rules:
|
|
indent:
|
|
- error
|
|
- 4
|
|
- SwitchCase: 1
|
|
linebreak-style:
|
|
- error
|
|
- unix
|
|
quotes:
|
|
- error
|
|
- double
|
|
semi:
|
|
- error
|
|
- always
|
|
no-unused-vars:
|
|
- error
|
|
- argsIgnorePattern: "^_"
|
|
curly:
|
|
- error
|
|
- all
|
|
brace-style:
|
|
- error
|
|
- 1tbs
|
|
# Rules from GJS Style Guide regarding whitespace.
|
|
# See here: https://gjs.guide/guides/gjs/style-guide.html#whitespace
|
|
func-call-spacing:
|
|
- error
|
|
- never
|
|
array-bracket-spacing:
|
|
- error
|
|
- never
|
|
space-before-function-paren:
|
|
- error
|
|
- never
|
|
space-before-blocks:
|
|
- error
|
|
- always
|
|
key-spacing:
|
|
- error
|
|
- beforeColon: false
|
|
afterColon: true
|
|
mode: strict
|
|
object-curly-spacing:
|
|
- error
|
|
- always
|
|
comma-dangle:
|
|
- error
|
|
- arrays: always-multiline
|
|
objects: always-multiline
|
|
imports: always-multiline
|
|
exports: always-multiline
|
|
functions: never
|
|
globals:
|
|
log: readonly
|