mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
40 lines
685 B
JavaScript
40 lines
685 B
JavaScript
import { InputFile } from "./build-plugin.js";
|
|
|
|
export class LinterPlugin {
|
|
constructor(pluginDefinition, userPlugin) {
|
|
this.pluginDefinition = pluginDefinition;
|
|
this.userPlugin = userPlugin;
|
|
}
|
|
}
|
|
|
|
export class LintingFile extends InputFile {
|
|
constructor(source) {
|
|
super();
|
|
this._source = source;
|
|
}
|
|
|
|
getContentsAsBuffer() {
|
|
return this._source.contents;
|
|
}
|
|
|
|
getPathInPackage() {
|
|
return this._source.relPath;
|
|
}
|
|
|
|
getPackageName() {
|
|
return this._source["package"];
|
|
}
|
|
|
|
getSourceHash() {
|
|
return this._source.hash;
|
|
}
|
|
|
|
getArch() {
|
|
return this._source.arch;
|
|
}
|
|
|
|
getFileOptions() {
|
|
return this._source.fileOptions || {};
|
|
}
|
|
}
|