Skip to content

Commit

Permalink
chore: refactor mime
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Dec 16, 2024
1 parent afe26e4 commit 359afcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lint/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ export class LintFile {
if ( this.#type ) {
const extnames = mime.get( this.#type.type )?.extnames;

if ( extnames?.length && !extnames.includes( path.extname( this.path ) ) ) {
this.#fullPath += extnames[ 0 ];
if ( extnames?.default && !extnames.has( path.extname( this.path ) ) ) {
this.#fullPath += extnames.default;
}
}

Expand Down

0 comments on commit 359afcf

Please sign in to comment.