Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TypeScript (Requires #153) #154

Merged
merged 87 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
4f55f91
Prepare for generated files
Lucki Dec 8, 2022
476aeff
Use TypeScript for better tooling
Lucki Dec 8, 2022
c0cf5c6
Alot of stuff
Lucki Dec 10, 2022
ff39a29
Allow requesting multiple images from different adapter
Lucki Dec 11, 2022
a8a8d3d
Fix timer
Lucki Dec 11, 2022
661d089
Selectable log level
Lucki Dec 13, 2022
995d3ac
Expect `historyEntry.adapter` as null
Lucki Dec 14, 2022
1e25530
Return the full JsonPath if the object was found
Lucki Dec 14, 2022
e04af31
Install script fixes:
Lucki Dec 14, 2022
33ebaa4
Support independent background and lock screen
Lucki Dec 15, 2022
d1d1325
Fix hover preview for independent usage
Lucki Dec 16, 2022
cc5fd8d
timer fix
Lucki Dec 15, 2022
10cf353
Reuse soup session
Lucki Dec 16, 2022
0f23d97
Properly type UI settingsGroups
Lucki Dec 16, 2022
edf6ca1
Properly type `HistoryElement`
Lucki Dec 16, 2022
3c91fc9
Fix false eslint rule matches
Lucki Dec 25, 2022
de318fa
[Wallhaven] Find more possible wallpaper by…
Lucki Dec 25, 2022
f80018e
Overall more logging
Lucki Dec 14, 2022
fcc7e2f
More efficient history insert
Lucki Dec 26, 2022
7cf9832
Correct stopLoadingHooks description
Lucki Dec 27, 2022
a90da5e
Move HydraPaper to subfolder
Lucki Dec 27, 2022
1d38ce7
Preparation for more manager
Lucki Dec 27, 2022
c51c2fc
let to const
Lucki Dec 27, 2022
26101ff
Possibility to use Superpaper instead HydraPaper
Lucki Dec 28, 2022
098de76
Trim file:// from wallpaper path for post commands
Lucki Feb 10, 2023
43ff6c1
[Local folder] Allow all image types
Lucki Feb 21, 2023
1771209
Throw error if folder creation fails
Lucki Feb 26, 2023
46343cd
Remove unnecessary file moving
Lucki Feb 26, 2023
ac5d72b
Add note for Gnome 44+
Lucki Feb 26, 2023
5d64420
Tighten required typing
Lucki Feb 25, 2023
02de305
Allow reverting whole schema at once
Lucki Mar 2, 2023
5c7a337
Move enum into code
Lucki Mar 3, 2023
1496a5a
Remove obsolete comment
Lucki Mar 3, 2023
e0d8b8c
Change max retry handling
Lucki Mar 3, 2023
5fca479
Refactor image dimensions descriptions.
Lucki Mar 31, 2023
9e1cd78
Always try at least for number of displays
Lucki May 9, 2023
81ef355
Use regex for file path manipulation
Lucki May 9, 2023
604899d
Add link to source and describe additional changes
Lucki May 9, 2023
efabd11
Warning if less than requested images are found
Lucki May 9, 2023
44a6a76
Throw if not all requested images can be resolved.
Lucki May 10, 2023
5718f98
Force return types
Lucki May 10, 2023
aa7c1fb
Use upstream Adw and extend the EntryRow
Lucki May 26, 2023
6b6c342
Update blueprint-compiler syntax to 0.8.0
Lucki May 26, 2023
5af6174
Workaround crash on shell loading
Lucki May 29, 2023
ddc216c
Catch and log network and parsing errors
Lucki May 29, 2023
6686745
Refactor URL source adapter and settings
Lucki May 29, 2023
56888b3
Add Gnome44 to metadata
Lucki May 29, 2023
ab8da23
Reduce import rewrites
Lucki May 31, 2023
db84933
Rename adwEntryRow.d.ts
Lucki Jun 1, 2023
f387bc2
Further improve Adw importing and extending
Lucki Jun 1, 2023
0d76314
Further reduce import rewrites by mapping
Lucki Jun 1, 2023
6a09e6b
Replace legacy ByteArray with TextDecoder
Lucki Jun 1, 2023
726c176
Rename extensionUtils.d.ts
Lucki Jun 1, 2023
0875d33
Remove all import rewrites
Lucki Jun 1, 2023
f1cbfce
Fix blueprint-compiler for github workflow on ubuntu
Lucki Jun 2, 2023
cd1e195
Manually backport libadwaita in github workflow
Lucki Jun 2, 2023
9abbed1
Update deps and replace deprecated lint rule
Lucki Jun 2, 2023
b3a55d5
Add missing extension meta object
Lucki Jun 4, 2023
db7c010
Require documentation
Lucki Jun 4, 2023
6c3b289
Remove unnecessary HistoryEntry parameter
Lucki Jun 4, 2023
cae71cc
Move identical statements to finally block
Lucki Jun 4, 2023
a05bf60
Clean up unused remnants
Lucki Jun 4, 2023
b174bb5
Improve local folder logic
Lucki Jun 9, 2023
5260787
More line padding for generated files
Lucki Jun 12, 2023
ae166e3
Try workaround manually deleting files
Lucki Jun 25, 2023
4b8807d
More specific function description
Lucki Jun 25, 2023
1361bb8
Simplify calling timeoutEndCallback
Lucki Jun 25, 2023
eda9f8f
Try unblocking the UI on startup
Lucki Jun 25, 2023
fcab543
Clarify enabled timer
Lucki Jun 25, 2023
e402329
Prevent double fetching on startup
Lucki Jun 28, 2023
6105539
Move hardcoded strings to wallpaper manager
Lucki Jul 1, 2023
8f64775
Remove UI todos - it may need an complete overhaul
Lucki Jul 1, 2023
a71fd5f
Deduplicate manager code
Lucki Jul 1, 2023
7bd7f12
Ignore prefer rule for generated code
Lucki Jul 1, 2023
f0173dc
Introduce a default manager
Lucki Jul 1, 2023
68ad2b0
Request monitor count from Mutter instead of Gdk
Lucki Jul 2, 2023
39a66e2
Use API key header instead of parameter
Lucki Jul 5, 2023
ea75f9e
Correct spelling error throughout the project.
Lucki Jul 5, 2023
f3399b4
[Wallhaven] Add undocumented `ai_art_filter`
Lucki Jul 5, 2023
ddfedcb
Move mode enum to code
Lucki Jul 8, 2023
2202b36
Remove obsolete function
Lucki Jul 8, 2023
238c87f
Remove log level enum from gsettings
Lucki Jul 8, 2023
0b0a69e
Remove constraint-type enum from gsettings
Lucki Jul 8, 2023
50f65d8
Let the manager handle all states
Lucki Jul 8, 2023
c90d859
Stop observing when disabling the extension
Lucki Jul 12, 2023
23ffa7c
Also "unobserve" in the menu
Lucki Jul 14, 2023
b4c31d7
Pin dependencies to current latest version
Lucki Aug 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
321 changes: 321 additions & 0 deletions .eslintrc-gjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
---
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
# SPDX-FileCopyrightText: 2018 Claudio André <[email protected]>

# Contains some additional styling rules to autofix generated javascript
# https://eslint.org/docs/latest/rules/padding-line-between-statements
env:
es2021: true
extends: 'eslint:recommended'
plugins:
- jsdoc
rules:
array-bracket-newline:
- error
- consistent
array-bracket-spacing:
- error
- never
array-callback-return: error
arrow-parens:
- error
- as-needed
arrow-spacing: error
block-scoped-var: error
block-spacing: error
brace-style: error
# Waiting for this to have matured a bit in eslint
# camelcase:
# - error
# - properties: never
# allow: [^vfunc_, ^on_, _instance_init]
comma-dangle:
- error
- arrays: always-multiline
objects: always-multiline
functions: never
comma-spacing:
- error
- before: false
after: true
comma-style:
- error
- last
computed-property-spacing: error
curly:
- error
- multi-or-nest
- consistent
dot-location:
- error
- property
eol-last: error
eqeqeq: error
func-call-spacing: error
func-name-matching: error
func-style:
- error
- declaration
- allowArrowFunctions: 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'
jsdoc/check-alignment: error
jsdoc/check-param-names: error
jsdoc/check-tag-names: error
jsdoc/check-types: error
jsdoc/implements-on-classes: error
jsdoc/newline-after-description: error
jsdoc/require-jsdoc: error
jsdoc/require-param: error
jsdoc/require-param-description: error
jsdoc/require-param-name: error
jsdoc/require-param-type: error
key-spacing:
- error
- beforeColon: false
afterColon: true
keyword-spacing:
- error
- before: true
after: true
linebreak-style:
- error
- unix
lines-between-class-members:
- error
- always
- exceptAfterSingleLine: true
max-nested-callbacks: error
max-statements-per-line: error
new-parens: error
no-array-constructor: error
no-await-in-loop: error
no-caller: error
no-constant-condition:
- error
- checkLoops: false
no-div-regex: error
no-empty:
- error
- allowEmptyCatch: true
no-extra-bind: error
no-extra-parens:
- error
- all
- conditionalAssign: false
nestedBinaryExpressions: false
returnAssign: false
no-implicit-coercion:
- error
- allow:
- '!!'
no-invalid-this: error
no-iterator: error
no-label-var: error
no-lonely-if: error
no-loop-func: error
no-nested-ternary: error
no-new-object: error
no-new-wrappers: error
no-octal-escape: error
no-proto: error
no-prototype-builtins: 'off'
no-restricted-globals: [error, window]
no-restricted-properties:
- error
- object: imports
property: format
message: Use template strings
- object: pkg
property: initFormat
message: Use template strings
- object: Lang
property: copyProperties
message: Use Object.assign()
- object: Lang
property: bind
message: Use arrow notation or Function.prototype.bind()
- object: Lang
property: Class
message: Use ES6 classes
no-restricted-syntax:
- error
- selector: >-
MethodDefinition[key.name="_init"] >
FunctionExpression[params.length=1] >
BlockStatement[body.length=1]
CallExpression[arguments.length=1][callee.object.type="Super"][callee.property.name="_init"] >
Identifier:first-child
message: _init() that only calls super._init() is unnecessary
- selector: >-
MethodDefinition[key.name="_init"] >
FunctionExpression[params.length=0] >
BlockStatement[body.length=1]
CallExpression[arguments.length=0][callee.object.type="Super"][callee.property.name="_init"]
message: _init() that only calls super._init() is unnecessary
- selector: BinaryExpression[operator="instanceof"][right.name="Array"]
message: Use Array.isArray()
no-return-assign: error
no-return-await: error
no-self-compare: error
no-shadow: error
no-shadow-restricted-names: error
no-spaced-func: error
no-tabs: error
no-template-curly-in-string: error
no-throw-literal: error
no-trailing-spaces: error
no-undef-init: error
no-unneeded-ternary: error
no-unused-expressions: error
no-unused-vars:
- error
# Vars use a suffix _ instead of a prefix because of file-scope private vars
- varsIgnorePattern: (^unused|_$)
argsIgnorePattern: ^(unused|_)
no-useless-call: error
no-useless-computed-key: error
no-useless-concat: error
no-useless-constructor: error
no-useless-rename: error
no-useless-return: error
no-whitespace-before-property: error
no-with: error
nonblock-statement-body-position:
- error
- below
object-curly-newline:
- error
- consistent: true
multiline: true
object-curly-spacing: error
object-shorthand: error
operator-assignment: error
operator-linebreak: error
padded-blocks:
- error
- never
# These may be a bit controversial, we can try them out and enable them later
# prefer-const: error
# prefer-destructuring: error
prefer-numeric-literals: error
prefer-promise-reject-errors: error
prefer-rest-params: error
prefer-spread: error
prefer-template: error
quotes:
- error
- single
- avoidEscape: true
require-await: error
rest-spread-spacing: error
semi:
- error
- always
semi-spacing:
- error
- before: false
after: true
semi-style: error
space-before-blocks: error
space-before-function-paren:
- error
- named: never
# for `function ()` and `async () =>`, preserve space around keywords
anonymous: always
asyncArrow: always
space-in-parens: error
space-infix-ops:
- error
- int32Hint: false
space-unary-ops: error
spaced-comment: error
switch-colon-spacing: error
symbol-description: error
template-curly-spacing: error
template-tag-spacing: error
unicode-bom: error
wrap-iife:
- error
- inside
yield-star-spacing: error
yoda: error
padding-line-between-statements:
- error
- blankLine: always
prev: function
next: function
- blankLine: always
prev: class
next: function
- blankLine: always
prev: function
next: class
- blankLine: always
prev: class
next: class
- blankLine: always
prev: import
next: function
- blankLine: always
prev: const
next: function
- blankLine: always
prev: let
next: function
- blankLine: always
prev: import
next: class
- blankLine: always
prev: class
next: export
- blankLine: always
prev: function
next: export
- blankLine: always
prev: '*'
next: return
- blankLine: always
prev: '*'
next: block-like
- blankLine: always
prev: block-like
next: '*'
- blankLine: always
prev: '*'
next: if
- blankLine: always
prev: if
next: '*'
settings:
jsdoc:
mode: typescript
globals:
ARGV: readonly
Debugger: readonly
GIRepositoryGType: readonly
globalThis: readonly
imports: readonly
Intl: readonly
log: readonly
logError: readonly
print: readonly
printerr: readonly
window: readonly
TextEncoder: readonly
TextDecoder: readonly
console: readonly
setTimeout: readonly
setInterval: readonly
clearTimeout: readonly
clearInterval: readonly
parserOptions:
ecmaVersion: 2022
sourceType: "module"
Loading