prettier-standard
- Version 16.4.1
- Published
- 14 MB
- 12 dependencies
- MIT license
Install
npm i prettier-standard
yarn add prettier-standard
pnpm add prettier-standard
Overview
Prettier and standard brought together!
Index
Functions
Interfaces
Namespaces
regexpp.AST
- Alternative
- AnyCharacterSet
- Assertion
- Backreference
- BoundaryAssertion
- BranchNode
- CapturingGroup
- Character
- CharacterClass
- CharacterClassElement
- CharacterClassRange
- CharacterSet
- EdgeAssertion
- Element
- EscapeCharacterSet
- Flags
- Group
- LeafNode
- LookaheadAssertion
- LookaroundAssertion
- LookbehindAssertion
- Node
- NodeBase
- Pattern
- QuantifiableElement
- Quantifier
- RegExpLiteral
- UnicodePropertyCharacterSet
- WordBoundaryAssertion
regexpp/ast
- Alternative
- AnyCharacterSet
- Assertion
- Backreference
- BoundaryAssertion
- BranchNode
- CapturingGroup
- Character
- CharacterClass
- CharacterClassElement
- CharacterClassRange
- CharacterSet
- EdgeAssertion
- Element
- EscapeCharacterSet
- Flags
- Group
- LeafNode
- LookaheadAssertion
- LookaroundAssertion
- LookbehindAssertion
- Node
- NodeBase
- Pattern
- QuantifiableElement
- Quantifier
- RegExpLiteral
- UnicodePropertyCharacterSet
- WordBoundaryAssertion
Functions
function ignore
ignore: typeof ignore;
Creates new ignore manager.
Interfaces
interface Ignore
interface Ignore {}
method add
add: { (pattern: string | Ignore): this; (patterns: (string | Ignore)[]): this };
Adds a rule rules to the current manager.
Parameter pattern
Returns
IgnoreBase
Adds several rules to the current manager.
Parameter patterns
Returns
IgnoreBase
method createFilter
createFilter: () => (pathname: Pathname) => boolean;
Creates a filter function which could filter an array of paths with Array.prototype.filter.
method filter
filter: (pathnames: Pathname[]) => Pathname[];
Filters the given array of pathnames, and returns the filtered array. NOTICE that each path here should be a relative path to the root of your repository.
Parameter paths
the array of paths to be filtered.
Returns
The filtered array of paths
method ignores
ignores: (pathname: Pathname) => boolean;
Returns Boolean whether pathname should be ignored.
Parameter pathname
a path to check
Returns
boolean
method test
test: (pathname: Pathname) => TestResult;
Returns whether pathname should be ignored or unignored
Parameter pathname
a path to check
Returns
TestResult
Namespaces
namespace ignore
namespace ignore {}
function isPathValid
isPathValid: (pathname: string) => boolean;
namespace regexpp
module 'regexpp' {}
function parseRegExpLiteral
parseRegExpLiteral: ( source: string | RegExp, options?: RegExpParser.Options) => AST.RegExpLiteral;
function validateRegExpLiteral
validateRegExpLiteral: ( source: string, options?: RegExpValidator.Options) => void;
function visitRegExpAST
visitRegExpAST: (node: AST.Node, handlers: RegExpVisitor.Handlers) => void;
class RegExpParser
class RegExpParser {}
constructor
constructor(options?: RegExpParser.Options);
method parseFlags
parseFlags: (source: string, start?: number, end?: number) => Flags;
method parseLiteral
parseLiteral: (source: string, start?: number, end?: number) => RegExpLiteral;
method parsePattern
parsePattern: ( source: string, start?: number, end?: number, uFlag?: boolean) => Pattern;
class RegExpValidator
class RegExpValidator {}
constructor
constructor(options?: RegExpValidator.Options);
method validateFlags
validateFlags: (source: string, start?: number, end?: number) => void;
method validateLiteral
validateLiteral: (source: string, start?: number, end?: number) => void;
method validatePattern
validatePattern: ( source: string, start?: number, end?: number, uFlag?: boolean) => void;
namespace regexpp.AST
namespace regexpp.AST {}
interface Alternative
interface Alternative extends NodeBase {}
interface AnyCharacterSet
interface AnyCharacterSet extends NodeBase {}
interface Backreference
interface Backreference extends NodeBase {}
interface CapturingGroup
interface CapturingGroup extends NodeBase {}
property alternatives
alternatives: Alternative[];
property name
name: string | null;
property parent
parent: Alternative | Quantifier;
property references
references: Backreference[];
property type
type: 'CapturingGroup';
interface Character
interface Character extends NodeBase {}
interface CharacterClass
interface CharacterClass extends NodeBase {}
interface CharacterClassRange
interface CharacterClassRange extends NodeBase {}
interface EdgeAssertion
interface EdgeAssertion extends NodeBase {}
interface EscapeCharacterSet
interface EscapeCharacterSet extends NodeBase {}
interface Flags
interface Flags extends NodeBase {}
interface Group
interface Group extends NodeBase {}
property alternatives
alternatives: Alternative[];
property parent
parent: Alternative | Quantifier;
property type
type: 'Group';
interface LookaheadAssertion
interface LookaheadAssertion extends NodeBase {}
property alternatives
alternatives: Alternative[];
property kind
kind: 'lookahead';
property negate
negate: boolean;
property parent
parent: Alternative | Quantifier;
property type
type: 'Assertion';
interface LookbehindAssertion
interface LookbehindAssertion extends NodeBase {}
property alternatives
alternatives: Alternative[];
property kind
kind: 'lookbehind';
property negate
negate: boolean;
property parent
parent: Alternative;
property type
type: 'Assertion';
interface NodeBase
interface NodeBase {}
interface Pattern
interface Pattern extends NodeBase {}
property alternatives
alternatives: Alternative[];
property parent
parent: RegExpLiteral | null;
property type
type: 'Pattern';
interface Quantifier
interface Quantifier extends NodeBase {}
interface RegExpLiteral
interface RegExpLiteral extends NodeBase {}
interface UnicodePropertyCharacterSet
interface UnicodePropertyCharacterSet extends NodeBase {}
interface WordBoundaryAssertion
interface WordBoundaryAssertion extends NodeBase {}
type Assertion
type Assertion = BoundaryAssertion | LookaroundAssertion;
type BoundaryAssertion
type BoundaryAssertion = EdgeAssertion | WordBoundaryAssertion;
type BranchNode
type BranchNode = | RegExpLiteral | Pattern | Alternative | Group | CapturingGroup | Quantifier | CharacterClass | LookaroundAssertion | CharacterClassRange;
type CharacterClassElement
type CharacterClassElement = | EscapeCharacterSet | UnicodePropertyCharacterSet | Character | CharacterClassRange;
type CharacterSet
type CharacterSet = | AnyCharacterSet | EscapeCharacterSet | UnicodePropertyCharacterSet;
type Element
type Element = Assertion | Quantifier | QuantifiableElement;
type LeafNode
type LeafNode = BoundaryAssertion | CharacterSet | Character | Backreference | Flags;
type LookaroundAssertion
type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion;
type Node
type Node = BranchNode | LeafNode;
type QuantifiableElement
type QuantifiableElement = | Group | CapturingGroup | CharacterClass | CharacterSet | Character | Backreference | LookaheadAssertion;
namespace regexpp.RegExpParser
namespace regexpp.RegExpParser {}
interface Options
interface Options {}
property ecmaVersion
ecmaVersion?: EcmaVersion;
property strict
strict?: boolean;
namespace regexpp.RegExpValidator
namespace regexpp.RegExpValidator {}
interface Options
interface Options {}
property ecmaVersion
ecmaVersion?: EcmaVersion;
property strict
strict?: boolean;
method onAlternativeEnter
onAlternativeEnter: (start: number, index: number) => void;
method onAlternativeLeave
onAlternativeLeave: (start: number, end: number, index: number) => void;
method onAnyCharacterSet
onAnyCharacterSet: (start: number, end: number, kind: 'any') => void;
method onBackreference
onBackreference: (start: number, end: number, ref: number | string) => void;
method onCapturingGroupEnter
onCapturingGroupEnter: (start: number, name: string | null) => void;
method onCapturingGroupLeave
onCapturingGroupLeave: (start: number, end: number, name: string | null) => void;
method onCharacter
onCharacter: (start: number, end: number, value: number) => void;
method onCharacterClassEnter
onCharacterClassEnter: (start: number, negate: boolean) => void;
method onCharacterClassLeave
onCharacterClassLeave: (start: number, end: number, negate: boolean) => void;
method onCharacterClassRange
onCharacterClassRange: ( start: number, end: number, min: number, max: number) => void;
method onDisjunctionEnter
onDisjunctionEnter: (start: number) => void;
method onDisjunctionLeave
onDisjunctionLeave: (start: number, end: number) => void;
method onEdgeAssertion
onEdgeAssertion: (start: number, end: number, kind: 'start' | 'end') => void;
method onEscapeCharacterSet
onEscapeCharacterSet: ( start: number, end: number, kind: 'digit' | 'space' | 'word', negate: boolean) => void;
method onFlags
onFlags: ( start: number, end: number, global: boolean, ignoreCase: boolean, multiline: boolean, unicode: boolean, sticky: boolean, dotAll: boolean) => void;
method onGroupEnter
onGroupEnter: (start: number) => void;
method onGroupLeave
onGroupLeave: (start: number, end: number) => void;
method onLiteralEnter
onLiteralEnter: (start: number) => void;
method onLiteralLeave
onLiteralLeave: (start: number, end: number) => void;
method onLookaroundAssertionEnter
onLookaroundAssertionEnter: ( start: number, kind: 'lookahead' | 'lookbehind', negate: boolean) => void;
method onLookaroundAssertionLeave
onLookaroundAssertionLeave: ( start: number, end: number, kind: 'lookahead' | 'lookbehind', negate: boolean) => void;
method onPatternEnter
onPatternEnter: (start: number) => void;
method onPatternLeave
onPatternLeave: (start: number, end: number) => void;
method onQuantifier
onQuantifier: ( start: number, end: number, min: number, max: number, greedy: boolean) => void;
method onUnicodePropertyCharacterSet
onUnicodePropertyCharacterSet: ( start: number, end: number, kind: 'property', key: string, value: string | null, negate: boolean) => void;
method onWordBoundaryAssertion
onWordBoundaryAssertion: ( start: number, end: number, kind: 'word', negate: boolean) => void;
namespace regexpp/ast
module 'regexpp/ast' {}
interface Alternative
interface Alternative extends NodeBase {}
interface AnyCharacterSet
interface AnyCharacterSet extends NodeBase {}
interface Backreference
interface Backreference extends NodeBase {}
interface CapturingGroup
interface CapturingGroup extends NodeBase {}
property alternatives
alternatives: Alternative[];
property name
name: string | null;
property parent
parent: Alternative | Quantifier;
property references
references: Backreference[];
property type
type: 'CapturingGroup';
interface Character
interface Character extends NodeBase {}
interface CharacterClass
interface CharacterClass extends NodeBase {}
interface CharacterClassRange
interface CharacterClassRange extends NodeBase {}
interface EdgeAssertion
interface EdgeAssertion extends NodeBase {}
interface EscapeCharacterSet
interface EscapeCharacterSet extends NodeBase {}
interface Flags
interface Flags extends NodeBase {}
interface Group
interface Group extends NodeBase {}
property alternatives
alternatives: Alternative[];
property parent
parent: Alternative | Quantifier;
property type
type: 'Group';
interface LookaheadAssertion
interface LookaheadAssertion extends NodeBase {}
property alternatives
alternatives: Alternative[];
property kind
kind: 'lookahead';
property negate
negate: boolean;
property parent
parent: Alternative | Quantifier;
property type
type: 'Assertion';
interface LookbehindAssertion
interface LookbehindAssertion extends NodeBase {}
property alternatives
alternatives: Alternative[];
property kind
kind: 'lookbehind';
property negate
negate: boolean;
property parent
parent: Alternative;
property type
type: 'Assertion';
interface NodeBase
interface NodeBase {}
interface Pattern
interface Pattern extends NodeBase {}
property alternatives
alternatives: Alternative[];
property parent
parent: RegExpLiteral | null;
property type
type: 'Pattern';
interface Quantifier
interface Quantifier extends NodeBase {}
interface RegExpLiteral
interface RegExpLiteral extends NodeBase {}
interface UnicodePropertyCharacterSet
interface UnicodePropertyCharacterSet extends NodeBase {}
interface WordBoundaryAssertion
interface WordBoundaryAssertion extends NodeBase {}
type Assertion
type Assertion = BoundaryAssertion | LookaroundAssertion;
type BoundaryAssertion
type BoundaryAssertion = EdgeAssertion | WordBoundaryAssertion;
type BranchNode
type BranchNode = | RegExpLiteral | Pattern | Alternative | Group | CapturingGroup | Quantifier | CharacterClass | LookaroundAssertion | CharacterClassRange;
type CharacterClassElement
type CharacterClassElement = | EscapeCharacterSet | UnicodePropertyCharacterSet | Character | CharacterClassRange;
type CharacterSet
type CharacterSet = | AnyCharacterSet | EscapeCharacterSet | UnicodePropertyCharacterSet;
type Element
type Element = Assertion | Quantifier | QuantifiableElement;
type LeafNode
type LeafNode = BoundaryAssertion | CharacterSet | Character | Backreference | Flags;
type LookaroundAssertion
type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion;
type Node
type Node = BranchNode | LeafNode;
type QuantifiableElement
type QuantifiableElement = | Group | CapturingGroup | CharacterClass | CharacterSet | Character | Backreference | LookaheadAssertion;
namespace regexpp/ecma-versions
module 'regexpp/ecma-versions' {}
type EcmaVersion
type EcmaVersion = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020;
namespace regexpp/parser
module 'regexpp/parser' {}
class RegExpParser
class RegExpParser {}
constructor
constructor(options?: RegExpParser.Options);
method parseFlags
parseFlags: (source: string, start?: number, end?: number) => Flags;
method parseLiteral
parseLiteral: (source: string, start?: number, end?: number) => RegExpLiteral;
method parsePattern
parsePattern: ( source: string, start?: number, end?: number, uFlag?: boolean) => Pattern;
namespace regexpp/parser.RegExpParser
namespace regexpp/parser.RegExpParser {}
interface Options
interface Options {}
property ecmaVersion
ecmaVersion?: EcmaVersion;
property strict
strict?: boolean;
namespace regexpp/validator
module 'regexpp/validator' {}
class RegExpValidator
class RegExpValidator {}
constructor
constructor(options?: RegExpValidator.Options);
method validateFlags
validateFlags: (source: string, start?: number, end?: number) => void;
method validateLiteral
validateLiteral: (source: string, start?: number, end?: number) => void;
method validatePattern
validatePattern: ( source: string, start?: number, end?: number, uFlag?: boolean) => void;
namespace regexpp/validator.RegExpValidator
namespace regexpp/validator.RegExpValidator {}
interface Options
interface Options {}
property ecmaVersion
ecmaVersion?: EcmaVersion;
property strict
strict?: boolean;
method onAlternativeEnter
onAlternativeEnter: (start: number, index: number) => void;
method onAlternativeLeave
onAlternativeLeave: (start: number, end: number, index: number) => void;
method onAnyCharacterSet
onAnyCharacterSet: (start: number, end: number, kind: 'any') => void;
method onBackreference
onBackreference: (start: number, end: number, ref: number | string) => void;
method onCapturingGroupEnter
onCapturingGroupEnter: (start: number, name: string | null) => void;
method onCapturingGroupLeave
onCapturingGroupLeave: (start: number, end: number, name: string | null) => void;
method onCharacter
onCharacter: (start: number, end: number, value: number) => void;
method onCharacterClassEnter
onCharacterClassEnter: (start: number, negate: boolean) => void;
method onCharacterClassLeave
onCharacterClassLeave: (start: number, end: number, negate: boolean) => void;
method onCharacterClassRange
onCharacterClassRange: ( start: number, end: number, min: number, max: number) => void;
method onDisjunctionEnter
onDisjunctionEnter: (start: number) => void;
method onDisjunctionLeave
onDisjunctionLeave: (start: number, end: number) => void;
method onEdgeAssertion
onEdgeAssertion: (start: number, end: number, kind: 'start' | 'end') => void;
method onEscapeCharacterSet
onEscapeCharacterSet: ( start: number, end: number, kind: 'digit' | 'space' | 'word', negate: boolean) => void;
method onFlags
onFlags: ( start: number, end: number, global: boolean, ignoreCase: boolean, multiline: boolean, unicode: boolean, sticky: boolean, dotAll: boolean) => void;
method onGroupEnter
onGroupEnter: (start: number) => void;
method onGroupLeave
onGroupLeave: (start: number, end: number) => void;
method onLiteralEnter
onLiteralEnter: (start: number) => void;
method onLiteralLeave
onLiteralLeave: (start: number, end: number) => void;
method onLookaroundAssertionEnter
onLookaroundAssertionEnter: ( start: number, kind: 'lookahead' | 'lookbehind', negate: boolean) => void;
method onLookaroundAssertionLeave
onLookaroundAssertionLeave: ( start: number, end: number, kind: 'lookahead' | 'lookbehind', negate: boolean) => void;
method onPatternEnter
onPatternEnter: (start: number) => void;
method onPatternLeave
onPatternLeave: (start: number, end: number) => void;
method onQuantifier
onQuantifier: ( start: number, end: number, min: number, max: number, greedy: boolean) => void;
method onUnicodePropertyCharacterSet
onUnicodePropertyCharacterSet: ( start: number, end: number, kind: 'property', key: string, value: string | null, negate: boolean) => void;
method onWordBoundaryAssertion
onWordBoundaryAssertion: ( start: number, end: number, kind: 'word', negate: boolean) => void;
namespace regexpp/visitor
module 'regexpp/visitor' {}
class RegExpVisitor
class RegExpVisitor {}
constructor
constructor(handlers: RegExpVisitor.Handlers);
method visit
visit: (node: Node) => void;
namespace regexpp/visitor.RegExpVisitor
namespace regexpp/visitor.RegExpVisitor {}
interface Handlers
interface Handlers {}
method onAlternativeEnter
onAlternativeEnter: (node: Alternative) => void;
method onAlternativeLeave
onAlternativeLeave: (node: Alternative) => void;
method onAssertionEnter
onAssertionEnter: (node: Assertion) => void;
method onAssertionLeave
onAssertionLeave: (node: Assertion) => void;
method onBackreferenceEnter
onBackreferenceEnter: (node: Backreference) => void;
method onBackreferenceLeave
onBackreferenceLeave: (node: Backreference) => void;
method onCapturingGroupEnter
onCapturingGroupEnter: (node: CapturingGroup) => void;
method onCapturingGroupLeave
onCapturingGroupLeave: (node: CapturingGroup) => void;
method onCharacterClassEnter
onCharacterClassEnter: (node: CharacterClass) => void;
method onCharacterClassLeave
onCharacterClassLeave: (node: CharacterClass) => void;
method onCharacterClassRangeEnter
onCharacterClassRangeEnter: (node: CharacterClassRange) => void;
method onCharacterClassRangeLeave
onCharacterClassRangeLeave: (node: CharacterClassRange) => void;
method onCharacterEnter
onCharacterEnter: (node: Character) => void;
method onCharacterLeave
onCharacterLeave: (node: Character) => void;
method onCharacterSetEnter
onCharacterSetEnter: (node: CharacterSet) => void;
method onCharacterSetLeave
onCharacterSetLeave: (node: CharacterSet) => void;
method onFlagsEnter
onFlagsEnter: (node: Flags) => void;
method onFlagsLeave
onFlagsLeave: (node: Flags) => void;
method onGroupEnter
onGroupEnter: (node: Group) => void;
method onGroupLeave
onGroupLeave: (node: Group) => void;
method onPatternEnter
onPatternEnter: (node: Pattern) => void;
method onPatternLeave
onPatternLeave: (node: Pattern) => void;
method onQuantifierEnter
onQuantifierEnter: (node: Quantifier) => void;
method onQuantifierLeave
onQuantifierLeave: (node: Quantifier) => void;
method onRegExpLiteralEnter
onRegExpLiteralEnter: (node: RegExpLiteral) => void;
method onRegExpLiteralLeave
onRegExpLiteralLeave: (node: RegExpLiteral) => void;
Package Files (2)
Dependencies (12)
Dev Dependencies (3)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/prettier-standard
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/prettier-standard)
- HTML<a href="https://www.jsdocs.io/package/prettier-standard"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 7739 ms. - Missing or incorrect documentation? Open an issue for this package.