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

Gnome 45 port #137

Merged
merged 11 commits into from
Nov 12, 2023
Prev Previous commit
Next Next commit
Clear unused imports & styles
yilozt committed Nov 12, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit c514c33fa9d9bb81bc18524ddfc678fcabe256fc
2 changes: 1 addition & 1 deletion src/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@
"func-call-spacing": ["error", "always"],
"no-var": ["error"],
"max-len": ["warn", {
"code": 80,
"code": 120,
"ignorePattern": "^import"
}]
},
5 changes: 4 additions & 1 deletion src/prefs.ts
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import { pages } from './preferences/index.js'
import * as Utils from './utils/io.js'
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'

declare const imports: any
export default class RoundedWindowCornresPrefs extends ExtensionPreferences {
constructor (metadata: object) {
super (metadata)
@@ -44,3 +43,7 @@ export default class RoundedWindowCornresPrefs extends ExtensionPreferences {
this._load_css ()
}
}

declare const imports: {
gettext: { textdomain: (uuid: string) => void }
}
4 changes: 1 addition & 3 deletions src/utils/io.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import * as Gio from 'gi://Gio'

import { _log, _logError } from './log.js'

// --------------------------------------------------------------- [end imports]

export const load = (path: string): string => {
const file = Gio.File.new_for_path (path)

const [, contents, ] = file.load_contents (null)
const [, contents] = file.load_contents (null)

const decoder = new TextDecoder ('utf-8')
return decoder.decode (contents)