Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@sherifforg/types

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sherifforg/types - npm Package Compare versions

Comparing version
4.0.3
to
4.1.0
+109
dist/index.d.ts
interface NoRestrictedSyntaxSlice {
selector: string;
message: string;
}
interface Entry {
ruleName: string;
parentPluginName: string;
severity: NumericSeverity;
ruleOptions: RuleOptionsConfig;
affectedFiles: string;
docs: {
description: string;
url: string;
};
}
type NumericSeverity = 0 | 1 | 2;
type StringSeverity = 'error' | 'warn' | 'off';
type Severity = NumericSeverity | StringSeverity;
type RuleOptions = [Severity, ...(Record<string, unknown> | string)[]] | Severity | undefined;
type Plugins = {
[key: string]: {
files?: string[];
rules?: any;
configs?: any;
} | undefined;
} | null | undefined;
interface BarebonesConfigAtom {
rules?: Record<string, RuleOptions> | undefined;
plugins?: Plugins;
files?: string[] | undefined;
}
interface ExportableConfigAtom {
rules?: Record<string, any>;
plugins?: Plugins;
files?: string[];
languageOptions?: Record<string, unknown>;
settings?: Record<string, unknown>;
ignores?: string[];
}
type RuleOptionsConfig = (Record<string, any> | string)[];
interface SheriffConfigurablePlugins {
/**
* React support.
*/
react: boolean;
/**
* Lodash support.
*/
lodash: boolean;
/**
* Nextjs support.
*/
next: boolean;
/**
* Astro support.
*/
astro: boolean;
/**
* Playwright support.
*/
playwright: boolean;
/**
* Jest support. Select this or vitest, not both.
*/
jest: boolean;
/**
* Vitest support. Select this or jest, not both.
*/
vitest: boolean;
}
interface SheriffSettings extends Partial<SheriffConfigurablePlugins> {
/**
* This parameter allows you to override the paths for some Sheriff settings.
*/
pathsOverrides?: {
/**
* With this setting, if you have multiple tsconfig.json files in your project (like tsconfig.json, tsconfig.eslint.json, tsconfig.node.json, etc...) you can specify which config Sheriff will pickup. You can also specify a list of paths, see: https://typescript-eslint.io/linting/typed-linting/monorepos/#one-tsconfigjson-per-package-and-an-optional-one-in-the-root.
*/
tsconfigLocation?: string | string[];
/**
* This setting overrides the default Sheriff filepaths for test files. It accepts an array of filepaths, dictaced by minimatch syntax. Sheriff will apply Jest or Vitest rules only on these files.
*/
tests?: string[];
};
/**
* This setting apply some ignore patterns to the whole config.
*/
ignores?: {
/**
* Some commonly ignored folders.
*/
recommended?: boolean;
/**
* With this setting, Sheriff will ignore all the files that are currently ignored by git. Chances are that if you are ignoring a file in git, you don't want to lint it, which usually is the case with temporary and autogenerated files.
*/
inheritedFromGitignore?: boolean;
};
/**
* This setting accepts an array of filepaths, dictaced by minimatch syntax. Only the matching files found in this array will be linted. All other files will be ignored. This is useful if you want to lint only a subset of your project.
*/
files?: string[];
}
interface ServerResponse {
compiledConfig: Entry[];
pluginsNames: string[];
totalAvailableRulesAmount?: number;
}
export type { BarebonesConfigAtom, Entry, ExportableConfigAtom, NoRestrictedSyntaxSlice, NumericSeverity, Plugins, RuleOptions, RuleOptionsConfig, ServerResponse, Severity, SheriffConfigurablePlugins, SheriffSettings, StringSeverity };
+7
-12
{
"name": "@sherifforg/types",
"description": "Sheriff types.",
"version": "4.0.3",
"version": "4.1.0",
"license": "MIT",
"type": "module",
"files": [
"src"
"dist"
],
"main": "./src/index.ts",
"types": "./src/index.ts",
"module": "./src/index.ts",
"exports": {
".": {
"types": "./src/index.ts",
"import": "./src/index.ts",
"require": "./src/index.ts"
"import": "./dist/index.js"
}
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.4",
"@types/node": "^20.14.10",
"publint": "^0.2.10",
"tsup": "^8.2.4",
"typescript": "^5.5.3",
"tsconfig": "0.0.2"
"tsconfig": "0.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/AndreaPontrandolfo/sheriff.git",
"url": "git+https://github.com/AndreaPontrandolfo/sheriff.git",
"directory": "packages/sheriff-types"

@@ -54,4 +49,4 @@ },

"publint": "publint",
"are-the-types-wrong": "attw --pack ."
"build": "tsup"
}
}
export interface NoRestrictedSyntaxSlice {
selector: string;
message: string;
}
export interface Entry {
ruleName: string;
parentPluginName: string;
severity: NumericSeverity;
ruleOptions: RuleOptionsConfig;
affectedFiles: string;
docs: {
description: string;
url: string;
};
}
export type NumericSeverity = 0 | 1 | 2;
export type Severity = NumericSeverity | 'error' | 'warn' | 'off';
export type RuleOptions =
| [Severity, ...(Record<string, unknown> | string)[]]
| Severity;
export type Plugins =
| {
[key: string]:
| {
files?: string[];
rules: any;
configs?: any;
}
| undefined;
}
| null
| undefined;
export interface BarebonesConfigAtom {
rules?: Record<string, RuleOptions> | undefined;
plugins?: Plugins;
files?: string[] | undefined;
}
export interface ExportableConfigAtom {
rules?: Record<string, any>;
plugins?: Plugins;
files?: string[];
languageOptions?: Record<string, unknown>;
settings?: Record<string, unknown>;
ignores?: string[];
}
export type RuleOptionsConfig = (Record<string, any> | string)[];
export interface SheriffConfigurablePlugins {
/**
* React support.
*/
react: boolean;
/**
* Lodash support.
*/
lodash: boolean;
/**
* Nextjs support.
*/
next: boolean;
/**
* Astro support.
*/
astro: boolean;
/**
* Playwright support.
*/
playwright: boolean;
/**
* Jest support. Select this or vitest, not both.
*/
jest: boolean;
/**
* Vitest support. Select this or jest, not both.
*/
vitest: boolean;
}
export interface SheriffSettings extends Partial<SheriffConfigurablePlugins> {
/**
* This parameter allows you to override the paths for some Sheriff settings.
*/
pathsOverrides?: {
/**
* With this setting, if you have multiple tsconfig.json files in your project (like tsconfig.json, tsconfig.eslint.json, tsconfig.node.json, etc...) you can specify which config Sheriff will pickup. You can also specify a list of paths, see: https://typescript-eslint.io/linting/typed-linting/monorepos/#one-tsconfigjson-per-package-and-an-optional-one-in-the-root.
*/
tsconfigLocation?: string | string[];
/**
* This setting overrides the default Sheriff filepaths for test files. It accepts an array of filepaths, dictaced by minimatch syntax. Sheriff will apply Jest or Vitest rules only on these files.
*/
tests?: string[];
};
/**
* This setting apply some ignore patterns to the whole config.
*/
ignores?: {
/**
* Some commonly ignored folders.
*/
recommended?: boolean;
/**
* With this setting, Sheriff will ignore all the files that are currently ignored by git. Chances are that if you are ignoring a file in git, you don't want to lint it, which usually is the case with temporary and autogenerated files.
*/
inheritedFromGitignore?: boolean;
};
/**
* This setting accepts an array of filepaths, dictaced by minimatch syntax. Only the matching files found in this array will be linted. All other files will be ignored. This is useful if you want to lint only a subset of your project.
*/
files?: string[];
}
export interface ServerResponse {
compiledConfig: Entry[];
pluginsNames: string[];
totalAvailableRulesAmount?: number;
}