Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
chore: update lint script to exclude emitting files during type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Aug 19, 2024
1 parent 28fd92b commit def277f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bundle:iosblocker": "esbuild sources/src/index-ios-blocker.ts --bundle --minify-whitespace --minify-syntax --define:global=window --inject:./sources/esbuild.inject.ts --banner:js=\"$(cat ./sources/banner-ios-blocker.txt)\" --target=es2022,chrome109,safari16,firefox115 --outfile=./microShield-ios-blocker.user.js",
"bundle:iosrecovery": "esbuild sources/src/index-ios-recovery.ts --bundle --minify-whitespace --minify-syntax --define:global=window --inject:./sources/esbuild.inject.ts --banner:js=\"$(cat ./sources/banner-ios-recovery.txt)\" --target=es2022,chrome109,safari16,firefox115 --outfile=./microShield-ios-recovery.user.js",
"debug": "esbuild sources/src/index.ts --bundle --define:global=window --inject:./sources/esbuild.inject.ts --banner:js=\"$(cat ./sources/banner.txt)\" --target=es2022,chrome109,safari16,firefox115 --outfile=./microShield-debug.user.js",
"lint": "tsc && eslint sources --ext .ts"
"lint": "tsc --noEmit && eslint sources"
},
"keywords": [],
"author": {
Expand Down
3 changes: 1 addition & 2 deletions sources/src/adshield/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ export const ResolveResourceUrls = async (Html: string, Token: string) => {
const Host = GetRandomAdShieldHost()

let NewHtml = ''
// eslint-disable-next-line @typescript-eslint/ban-types
let Matches: RegExpExecArray | null = null

while ((Matches = Pattern.exec(Html)) !== null) {
const Url = 'https://' + Host + '/resources/' + Matches[1].slice(12 /* 'resources://'.length */) + '?token=' + Token

// eslint-disable-next-line no-await-in-loop
NewHtml += await GetCachableHtml(Url)
.catch(Errors => {
console.error(Errors)
Expand Down
2 changes: 1 addition & 1 deletion sources/src/adshield/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const AdshieldKeywords = [

const AdshieldDomainsize = AdshieldHostableDomains.length

// eslint-disable-next-line no-bitwise
export const GetRandomAdShieldHost = () => AdshieldHostableDomains[(Number(cryptoRandomString({length: 16, type: 'numeric'})) * 0.0000000000000001 * AdshieldDomainsize) >>> 0]

export const IsAdShieldCall = (Trace = JustifyCallStack()) => {
Expand Down
2 changes: 1 addition & 1 deletion sources/src/index-ios-blocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type unsafeWindow = typeof window
declare const unsafeWindow: unsafeWindow

const Hook = () => {
// eslint-disable-next-line no-negated-condition
const Win = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window

// Pollusions
Expand Down
2 changes: 1 addition & 1 deletion sources/src/index-ios-recovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type unsafeWindow = typeof window
declare const unsafeWindow: unsafeWindow

const Hook = () => {

Check warning on line 15 in sources/src/index-ios-recovery.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

'Hook' is assigned a value but never used

Check warning on line 15 in sources/src/index-ios-recovery.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

'Hook' is assigned a value but never used
// eslint-disable-next-line no-negated-condition
const Win = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window

// Pollusions
Expand Down
2 changes: 1 addition & 1 deletion sources/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type unsafeWindow = typeof window
declare const unsafeWindow: unsafeWindow

const Hook = () => {
// eslint-disable-next-line no-negated-condition
const Win = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window

// Pollusions
Expand Down
2 changes: 1 addition & 1 deletion sources/src/loaders/ztinywave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const Tinywave = async () => {
const Token = await GetResourceToken(Source.Script)
for (const Entity of PrivateEntities) {
if (Entity.Type === EntityTypes.Head) {
// eslint-disable-next-line no-await-in-loop
Entity.Html = await ResolveResourceUrls(Entity.Html, Token as string)
}
}
Expand Down
3 changes: 1 addition & 2 deletions sources/src/utils/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ declare const unsafeWindow: unsafeWindow

const Win = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window

// eslint-disable-next-line @typescript-eslint/ban-types
type ArbitaryObject = object

// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-function-type
type Fomulate = ((...args: any[]) => any) & Function

const Debug = CreateDebug('secret')
Expand Down

0 comments on commit def277f

Please sign in to comment.