Skip to content

Commit

Permalink
test: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Jan 22, 2025
1 parent 819c7b2 commit e8d7ae0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { createConfig } from '@arianrhodsandlot/eslint-config'

export default createConfig({
n: false,
rules: {
'max-lines': 'off',
'sonarjs/no-empty-test-file': 'off',
},
})
4 changes: 1 addition & 3 deletions src/classes/emulator-file-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ export class EmulatorFileSystem {

const clonedConfig: typeof config = {}
for (const key in config) {
if (Object.hasOwn(config, key)) {
clonedConfig[key] = `__${config[key]}__`
}
clonedConfig[key] = `__${config[key]}__`
}
const fileContent = ini.stringify(clonedConfig, { platform: 'linux', whitespace: true }).replaceAll('__', '"')
await this.writeFile(path, fileContent)
Expand Down
12 changes: 4 additions & 8 deletions src/libs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ export function updateStyle(element: HTMLElement, style: Partial<CSSStyleDeclara
return
}
for (const rule in style) {
if (Object.hasOwn(style, rule)) {
const value = style[rule]
// @ts-expect-error null means to delete the rule
element.style[rule] = value || null
}
const value = style[rule]
// @ts-expect-error null means to delete the rule
element.style[rule] = value || null
}
}

Expand Down Expand Up @@ -144,9 +142,7 @@ export function merge(target: any, ...sources: any[]) {
if (sources.length === 1) {
const [source] = sources
for (const key in source) {
if (Object.hasOwn(source, key)) {
mergeProperty(target, source, key)
}
mergeProperty(target, source, key)
}
} else {
for (const source of sources) {
Expand Down

0 comments on commit e8d7ae0

Please sign in to comment.