Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/stylelint

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/stylelint - npm Package Compare versions

Comparing version 9.4.2 to 9.10.0

125

stylelint/index.d.ts

@@ -1,29 +0,49 @@

// Type definitions for stylelint 9.4
// Type definitions for stylelint 9.10
// Project: https://github.com/stylelint/stylelint, https://stylelint.io
// Definitions by: Alan Agius <https://github.com/alan-agius4>
// Filips Alpe <https://github.com/filipsalpe>
// James Garbutt <https://github.com/43081j>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export type FormatterType = "json" | "string" | "verbose" | "compact";
import * as postcss from 'postcss';
export type SyntaxType = "scss" | "sass" | "less" | "sugarss";
export type FormatterType = "json" | "string" | "verbose" | "compact" | "unix";
export type SyntaxType = "css-in-js"
| "html"
| "less"
| "markdown"
| "sass"
| "scss"
| "sugarss";
export interface Configuration {
rules: Record<string, any>;
extends: string | string[];
plugins: string[];
processors: string[];
ignoreFiles: string|string[];
defaultSeverity: "warning"|"error";
}
export interface LinterOptions {
code?: string;
codeFilename?: string;
config?: JSON;
configBasedir?: string;
configFile?: string;
configOverrides?: JSON;
cache?: boolean;
cacheLocation?: string;
files?: string | string[];
fix?: boolean;
formatter?: FormatterType;
ignoreDisables?: boolean;
reportNeedlessDisables?: boolean;
ignorePath?: boolean;
syntax?: SyntaxType;
customSyntax?: string;
cache: boolean;
cacheLocation: string;
code: string;
codeFilename: string;
config: Partial<Configuration>;
configBasedir: string;
configFile: string;
configOverrides: Partial<Configuration>;
customSyntax: string;
disableDefaultIgnores: boolean;
files: string | string[];
fix: boolean;
formatter: FormatterType;
ignoreDisables: boolean;
ignorePath: string;
maxWarnings: number;
reportNeedlessDisables: boolean;
syntax: SyntaxType;
}

@@ -34,3 +54,2 @@

output: string;
postcssResults: any[];
results: LintResult[];

@@ -53,7 +72,8 @@ }

function verbose(results: LintResult[]): string;
function unix(results: LintResult[]): string;
}
export function lint(options?: LinterOptions): Promise<LinterResult>;
export function lint(options?: Partial<LinterOptions>): Promise<LinterResult>;
export type RuleOption = {
export type ValidateOptionsAssertion = {
actual: any;

@@ -68,8 +88,10 @@ possible?: any;

export type RuleMessageValue = string | ((...args: any[]) => string);
export namespace utils {
function report(violation: {
ruleName: string;
result: LintResult;
result: postcss.Result;
message: string;
node: any;
node: postcss.Node;
index?: number;

@@ -80,12 +102,59 @@ word?: string;

function ruleMessages(ruleName: string, messages: { [key: string]: any; }): typeof messages;
function ruleMessages<T extends {[key: string]: RuleMessageValue}>(
ruleName: string,
messages: T): T;
function validateOptions(result: LintResult, ruleName: string, ...options: RuleOption[]): boolean;
function validateOptions(result: postcss.Result, ruleName: string,
...options: ValidateOptionsAssertion[]): boolean;
function checkAgainstRule(options: { ruleName: string; ruleSettings: any; root: any; }, callback: (warning: string) => void): void;
function checkAgainstRule(options: {
ruleName: string;
ruleSettings: any;
root: any;
}, callback: (warning: string) => void): void;
}
export type Plugin = (primaryOption: any, secondaryOptions?: object) =>
(root: postcss.Root, result: postcss.Result) => void|PromiseLike<void>;
export function createPlugin(
ruleName: string,
plugin: (options: RuleOption[]) => (root: any, result: LintResult) => void,
plugin: Plugin
): any;
export interface RuleTesterResult {
expected: number;
actual: number;
description: string;
}
export interface RuleTesterTest {
code: string;
description?: string;
}
export interface RuleTesterTestRejected extends RuleTesterTest {
line?: number;
column?: number;
only?: boolean;
message?: string;
}
export interface RuleTesterSchema {
ruleName: string;
syntax?: SyntaxType;
config?: any;
accept?: RuleTesterTest[];
reject?: RuleTesterTestRejected[];
}
export interface RuleTesterContext {
comparisonCount: number;
completeAssertionDescription: string;
caseDescription: string;
only?: boolean;
}
export function createRuleTester(
fn: (result: Promise<RuleTesterResult[]>, context: RuleTesterContext) => void
): (rule: Plugin, schema: RuleTesterSchema) => void;
{
"name": "@types/stylelint",
"version": "9.4.2",
"version": "9.10.0",
"description": "TypeScript definitions for stylelint",

@@ -16,2 +16,7 @@ "license": "MIT",

"githubUsername": "filipsalpe"
},
{
"name": "James Garbutt",
"url": "https://github.com/43081j",
"githubUsername": "43081j"
}

@@ -23,8 +28,11 @@ ],

"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/stylelint"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "f3f9bda1ddc60dd2f26c252bd1b4bc23b336979887b741ded84f4e9d198c4172",
"dependencies": {
"postcss": "7.x.x"
},
"typesPublisherContentHash": "dd6e8f2e5fb0778d54a23d3c69b8acf590d81be09cd6234f60347f7419bbab8d",
"typeScriptVersion": "2.2"
}

@@ -11,7 +11,7 @@ # Installation

Additional Details
* Last updated: Wed, 13 Feb 2019 23:15:44 GMT
* Dependencies: none
* Last updated: Wed, 20 Mar 2019 22:47:14 GMT
* Dependencies: @types/postcss
* Global values: none
# Credits
These definitions were written by Alan Agius <https://github.com/alan-agius4>, Filips Alpe <https://github.com/filipsalpe>.
These definitions were written by Alan Agius <https://github.com/alan-agius4>, Filips Alpe <https://github.com/filipsalpe>, James Garbutt <https://github.com/43081j>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc