format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

View File

@ -1,8 +1,8 @@
import Settings from '../../settings';
import { EntryTransformerFunction } from '../../types';
export default class EntryTransformer {
private readonly _settings;
constructor(_settings: Settings);
getTransformer(): EntryTransformerFunction;
private _transform;
private readonly _settings;
constructor(_settings: Settings);
getTransformer(): EntryTransformerFunction;
private _transform;
}

View File

@ -1,26 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const utils = require('../../utils');
class EntryTransformer {
constructor(_settings) {
this._settings = _settings;
constructor(_settings) {
this._settings = _settings;
}
getTransformer() {
return (entry) => this._transform(entry);
}
_transform(entry) {
let filepath = entry.path;
if (this._settings.absolute) {
filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
filepath = utils.path.unixify(filepath);
}
getTransformer() {
return (entry) => this._transform(entry);
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
filepath += '/';
}
_transform(entry) {
let filepath = entry.path;
if (this._settings.absolute) {
filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
filepath = utils.path.unixify(filepath);
}
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
filepath += '/';
}
if (!this._settings.objectMode) {
return filepath;
}
return Object.assign(Object.assign({}, entry), { path: filepath });
if (!this._settings.objectMode) {
return filepath;
}
return Object.assign(Object.assign({}, entry), { path: filepath });
}
}
exports.default = EntryTransformer;