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 42a72c1 commit def6534
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/lint/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,7 @@ export class LintFile {
let type = this.#file.type;

// get by shebang
if ( !type ) {
const mimeType = mime.getByShebang( this.#data );

if ( mimeType ) type = mimeType.type;
}
type ||= mime.getByShebang( this.#data )?.type;

if ( type ) this.#type = TYPES[ type ];
}
Expand Down

0 comments on commit def6534

Please sign in to comment.