Skip to content
Merged
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
delete (rc.config as HtmlnanoOptionsConfigFile).preset;
}

if (!options) {
restConfig = rc.config as Partial<HtmlnanoOptions>;
}
restConfig = { ...(rc.config as Partial<HtmlnanoOptions>), ...restConfig };
}
}

Expand Down Expand Up @@ -136,7 +134,7 @@
removeUnusedCss: () => interop(import('./_modules/removeUnusedCss')),
sortAttributes: () => interop(import('./_modules/sortAttributes')),
sortAttributesWithLists: () => interop(import('./_modules/sortAttributesWithLists'))
} satisfies Record<string, () => Promise<HtmlnanoModule<any>>>;

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 137 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type

const htmlnano = Object.assign(function htmlnano(optionsRun: HtmlnanoOptions = {}, presetRun?: HtmlnanoPreset) {
// eslint-disable-next-line prefer-const -- re-assign options
Expand Down Expand Up @@ -187,16 +185,16 @@
: (await import(`./_modules/${moduleName}.mjs`)) as HtmlnanoModule;

if (typeof mod.onAttrs === 'function') {
attrsHandlers.push(mod.onAttrs(options, moduleOptions as Partial<any>));

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 188 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type
}
if (typeof mod.onContent === 'function') {
contentsHandlers.push(mod.onContent(options, moduleOptions as Partial<any>));

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 191 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type
}
if (typeof mod.onNode === 'function') {
nodeHandlers.push(mod.onNode(options, moduleOptions as Partial<any>));

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 194 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type
}
if (typeof mod.default === 'function') {
promise = promise.then(async tree => await mod.default!(tree, options, moduleOptions as Partial<any>));

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (current)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (22)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (20)

Unexpected any. Specify a different type

Check warning on line 197 in src/index.ts

View workflow job for this annotation

GitHub Actions / Run tests (23)

Unexpected any. Specify a different type
}
}

Expand Down
Loading