@adguard/aglint
Version:
Universal adblock filter list linter.
58 lines (56 loc) • 1.97 kB
JavaScript
/*
* AGLint v3.0.0 (build date: Wed, 21 May 2025 13:24:14 GMT)
* (c) 2025 AdGuard Software Ltd.
* Released under the MIT license
* https://github.com/AdguardTeam/AGLint#readme
*/
/**
* Represents currently supported inline config comments by AGLint.
*/
var ConfigCommentType;
(function (ConfigCommentType) {
/**
* Main config comment with configuration object.
*/
ConfigCommentType["Main"] = "aglint";
/**
* Disables AGLint. It will be enabled again if there is an `aglint-enable` comment.
*/
ConfigCommentType["Disable"] = "aglint-disable";
/**
* Enables AGLint. It will be disabled again if there is an `aglint-disable` comment.
* If AGLint is already enabled, this comment will be ignored.
*/
ConfigCommentType["Enable"] = "aglint-enable";
/**
* Disables AGLint for next line. If you specify rule names as params, then only these rules will be disabled.
*
* @example
* The following comment will disable `some-rule` and `another-rule` for the next line:
* ```adblock
* ! aglint-disable-next-line some-rule another-rule
* ```
*
* The following comment will disable all rules for the next line:
* ```adblock
* ! aglint-disable-next-line
* ```
*/
ConfigCommentType["DisableNextLine"] = "aglint-disable-next-line";
/**
* Enables AGLint for next line. If you specify rule names as params, then only these rules will be enabled.
*
* @example
* The following comment will enable `some-rule` and `another-rule` for the next line:
* ```adblock
* ! aglint-enable-next-line some-rule another-rule
* ```
*
* The following comment will enable all rules for the next line:
* ```adblock
* ! aglint-enable-next-line
* ```
*/
ConfigCommentType["EnableNextLine"] = "aglint-enable-next-line";
})(ConfigCommentType || (ConfigCommentType = {}));
export { ConfigCommentType };