chore(build): enable CodeQL (#1026)

* Create codeql.yml

* setup pnpm

* sq.Eq{"ras.status": params.Filters.PushStatus}

* enable extended and quality

* fix: code scanning alert #58 #57

https://github.com/autobrr/autobrr/security/code-scanning/58
https://github.com/autobrr/autobrr/security/code-scanning/57

* fix: linting issues for code scanning 60, 59, 56

https://github.com/autobrr/autobrr/security/code-scanning/60
https://github.com/autobrr/autobrr/security/code-scanning/59
https://github.com/autobrr/autobrr/security/code-scanning/56

---------

Co-authored-by: Fabricio Silva <hi@fabricio.dev>
This commit is contained in:
Kyle Sanderson 2023-09-26 12:24:59 -07:00 committed by GitHub
parent a78a5d1bf8
commit 98df0c9040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 107 additions and 9 deletions

View file

@ -12,7 +12,7 @@ export function useToggle(initialValue = false): [boolean, () => void] {
return [value, toggle];
}
const isBrowser = typeof window !== "undefined";
const isBrowser = typeof(window) !== "undefined";
const getInitialState = (query: string, defaultState?: boolean) => {
// Prevent a React hydration mismatch when a default value is provided by not defaulting to window.matchMedia(query).matches.