UNPKG

@stylistic/eslint-plugin-js

Version:

JavaScript stylistic rules for ESLint, migrated from [eslint core](https://github.com/eslint/eslint).

2,087 lines (1,932 loc) 54.3 kB
type ArrayBracketNewlineSchema0 = | ('always' | 'never' | 'consistent') | { multiline?: boolean minItems?: number | null } type ArrayBracketNewlineRuleOptions = [ ArrayBracketNewlineSchema0?, ] type ArrayBracketSpacingSchema0 = 'always' | 'never' interface ArrayBracketSpacingSchema1 { singleValue?: boolean objectsInArrays?: boolean arraysInArrays?: boolean } type ArrayBracketSpacingRuleOptions = [ ArrayBracketSpacingSchema0?, ArrayBracketSpacingSchema1?, ] type ArrayElementNewlineSchema0 = | [] | [ | BasicConfig | { ArrayExpression?: BasicConfig ArrayPattern?: BasicConfig }, ] type BasicConfig = | ('always' | 'never' | 'consistent') | { consistent?: boolean multiline?: boolean minItems?: number | null } type ArrayElementNewlineRuleOptions = ArrayElementNewlineSchema0 type ArrowParensSchema0 = 'always' | 'as-needed' interface ArrowParensSchema1 { requireForBlockBody?: boolean } type ArrowParensRuleOptions = [ ArrowParensSchema0?, ArrowParensSchema1?, ] interface ArrowSpacingSchema0 { before?: boolean after?: boolean } type ArrowSpacingRuleOptions = [ArrowSpacingSchema0?] type BlockSpacingSchema0 = 'always' | 'never' type BlockSpacingRuleOptions = [BlockSpacingSchema0?] type BraceStyleSchema0 = | '1tbs' | 'stroustrup' | 'allman' interface BraceStyleSchema1 { allowSingleLine?: boolean } type BraceStyleRuleOptions = [ BraceStyleSchema0?, BraceStyleSchema1?, ] type CommaDangleSchema0 = | [] | [ | Value | { arrays?: ValueWithIgnore objects?: ValueWithIgnore imports?: ValueWithIgnore exports?: ValueWithIgnore functions?: ValueWithIgnore importAttributes?: ValueWithIgnore dynamicImports?: ValueWithIgnore }, ] type Value = | 'always-multiline' | 'always' | 'never' | 'only-multiline' type ValueWithIgnore = | 'always-multiline' | 'always' | 'ignore' | 'never' | 'only-multiline' type CommaDangleRuleOptions = CommaDangleSchema0 interface CommaSpacingSchema0 { before?: boolean after?: boolean } type CommaSpacingRuleOptions = [CommaSpacingSchema0?] type CommaStyleSchema0 = 'first' | 'last' interface CommaStyleSchema1 { exceptions?: { [k: string]: boolean } } type CommaStyleRuleOptions = [ CommaStyleSchema0?, CommaStyleSchema1?, ] type ComputedPropertySpacingSchema0 = | 'always' | 'never' interface ComputedPropertySpacingSchema1 { enforceForClassMembers?: boolean } type ComputedPropertySpacingRuleOptions = [ ComputedPropertySpacingSchema0?, ComputedPropertySpacingSchema1?, ] type DotLocationSchema0 = 'object' | 'property' type DotLocationRuleOptions = [DotLocationSchema0?] type EolLastSchema0 = | 'always' | 'never' | 'unix' | 'windows' type EolLastRuleOptions = [EolLastSchema0?] type FunctionCallArgumentNewlineSchema0 = | 'always' | 'never' | 'consistent' type FunctionCallArgumentNewlineRuleOptions = [ FunctionCallArgumentNewlineSchema0?, ] type FunctionCallSpacingSchema0 = | [] | ['never'] | [] | ['always'] | [ 'always', { allowNewlines?: boolean }, ] type FunctionCallSpacingRuleOptions = FunctionCallSpacingSchema0 type FunctionParenNewlineSchema0 = | ( | 'always' | 'never' | 'consistent' | 'multiline' | 'multiline-arguments' ) | { minItems?: number } type FunctionParenNewlineRuleOptions = [ FunctionParenNewlineSchema0?, ] type GeneratorStarSpacingSchema0 = | ('before' | 'after' | 'both' | 'neither') | { before?: boolean after?: boolean named?: | ('before' | 'after' | 'both' | 'neither') | { before?: boolean after?: boolean } anonymous?: | ('before' | 'after' | 'both' | 'neither') | { before?: boolean after?: boolean } method?: | ('before' | 'after' | 'both' | 'neither') | { before?: boolean after?: boolean } } type GeneratorStarSpacingRuleOptions = [ GeneratorStarSpacingSchema0?, ] type ImplicitArrowLinebreakSchema0 = | 'beside' | 'below' type ImplicitArrowLinebreakRuleOptions = [ ImplicitArrowLinebreakSchema0?, ] type IndentSchema0 = 'tab' | number interface IndentSchema1 { SwitchCase?: number VariableDeclarator?: | (number | ('first' | 'off')) | { var?: number | ('first' | 'off') let?: number | ('first' | 'off') const?: number | ('first' | 'off') } outerIIFEBody?: number | 'off' MemberExpression?: number | 'off' FunctionDeclaration?: { parameters?: number | ('first' | 'off') body?: number } FunctionExpression?: { parameters?: number | ('first' | 'off') body?: number } StaticBlock?: { body?: number } CallExpression?: { arguments?: number | ('first' | 'off') } ArrayExpression?: number | ('first' | 'off') ObjectExpression?: number | ('first' | 'off') ImportDeclaration?: number | ('first' | 'off') flatTernaryExpressions?: boolean offsetTernaryExpressions?: boolean offsetTernaryExpressionsOffsetCallExpressions?: boolean ignoredNodes?: string[] ignoreComments?: boolean tabLength?: number } type IndentRuleOptions = [ IndentSchema0?, IndentSchema1?, ] type JsxQuotesSchema0 = | 'prefer-single' | 'prefer-double' type JsxQuotesRuleOptions = [JsxQuotesSchema0?] type KeySpacingSchema0 = | { align?: | ('colon' | 'value') | { mode?: 'strict' | 'minimum' on?: 'colon' | 'value' beforeColon?: boolean afterColon?: boolean } mode?: 'strict' | 'minimum' beforeColon?: boolean afterColon?: boolean ignoredNodes?: ( | 'ObjectExpression' | 'ObjectPattern' | 'ImportDeclaration' | 'ExportNamedDeclaration' | 'ExportAllDeclaration' | 'TSTypeLiteral' | 'TSInterfaceBody' | 'ClassBody' )[] } | { singleLine?: { mode?: 'strict' | 'minimum' beforeColon?: boolean afterColon?: boolean } multiLine?: { align?: | ('colon' | 'value') | { mode?: 'strict' | 'minimum' on?: 'colon' | 'value' beforeColon?: boolean afterColon?: boolean } mode?: 'strict' | 'minimum' beforeColon?: boolean afterColon?: boolean } } | { singleLine?: { mode?: 'strict' | 'minimum' beforeColon?: boolean afterColon?: boolean } multiLine?: { mode?: 'strict' | 'minimum' beforeColon?: boolean afterColon?: boolean } align?: { mode?: 'strict' | 'minimum' on?: 'colon' | 'value' beforeColon?: boolean afterColon?: boolean } } type KeySpacingRuleOptions = [KeySpacingSchema0?] interface KeywordSpacingSchema0 { before?: boolean after?: boolean overrides?: { abstract?: { before?: boolean after?: boolean } as?: { before?: boolean after?: boolean } async?: { before?: boolean after?: boolean } await?: { before?: boolean after?: boolean } boolean?: { before?: boolean after?: boolean } break?: { before?: boolean after?: boolean } byte?: { before?: boolean after?: boolean } case?: { before?: boolean after?: boolean } catch?: { before?: boolean after?: boolean } char?: { before?: boolean after?: boolean } class?: { before?: boolean after?: boolean } const?: { before?: boolean after?: boolean } continue?: { before?: boolean after?: boolean } debugger?: { before?: boolean after?: boolean } default?: { before?: boolean after?: boolean } delete?: { before?: boolean after?: boolean } do?: { before?: boolean after?: boolean } double?: { before?: boolean after?: boolean } else?: { before?: boolean after?: boolean } enum?: { before?: boolean after?: boolean } export?: { before?: boolean after?: boolean } extends?: { before?: boolean after?: boolean } false?: { before?: boolean after?: boolean } final?: { before?: boolean after?: boolean } finally?: { before?: boolean after?: boolean } float?: { before?: boolean after?: boolean } for?: { before?: boolean after?: boolean } from?: { before?: boolean after?: boolean } function?: { before?: boolean after?: boolean } get?: { before?: boolean after?: boolean } goto?: { before?: boolean after?: boolean } if?: { before?: boolean after?: boolean } implements?: { before?: boolean after?: boolean } import?: { before?: boolean after?: boolean } in?: { before?: boolean after?: boolean } instanceof?: { before?: boolean after?: boolean } int?: { before?: boolean after?: boolean } interface?: { before?: boolean after?: boolean } let?: { before?: boolean after?: boolean } long?: { before?: boolean after?: boolean } native?: { before?: boolean after?: boolean } new?: { before?: boolean after?: boolean } null?: { before?: boolean after?: boolean } of?: { before?: boolean after?: boolean } package?: { before?: boolean after?: boolean } private?: { before?: boolean after?: boolean } protected?: { before?: boolean after?: boolean } public?: { before?: boolean after?: boolean } return?: { before?: boolean after?: boolean } satisfies?: { before?: boolean after?: boolean } set?: { before?: boolean after?: boolean } short?: { before?: boolean after?: boolean } static?: { before?: boolean after?: boolean } super?: { before?: boolean after?: boolean } switch?: { before?: boolean after?: boolean } synchronized?: { before?: boolean after?: boolean } this?: { before?: boolean after?: boolean } throw?: { before?: boolean after?: boolean } throws?: { before?: boolean after?: boolean } transient?: { before?: boolean after?: boolean } true?: { before?: boolean after?: boolean } try?: { before?: boolean after?: boolean } typeof?: { before?: boolean after?: boolean } var?: { before?: boolean after?: boolean } void?: { before?: boolean after?: boolean } volatile?: { before?: boolean after?: boolean } while?: { before?: boolean after?: boolean } with?: { before?: boolean after?: boolean } yield?: { before?: boolean after?: boolean } } } type KeywordSpacingRuleOptions = [ KeywordSpacingSchema0?, ] type LineCommentPositionSchema0 = | ('above' | 'beside') | { position?: 'above' | 'beside' ignorePattern?: string applyDefaultPatterns?: boolean applyDefaultIgnorePatterns?: boolean } type LineCommentPositionRuleOptions = [ LineCommentPositionSchema0?, ] type LinebreakStyleSchema0 = 'unix' | 'windows' type LinebreakStyleRuleOptions = [ LinebreakStyleSchema0?, ] interface LinesAroundCommentSchema0 { beforeBlockComment?: boolean afterBlockComment?: boolean beforeLineComment?: boolean afterLineComment?: boolean allowBlockStart?: boolean allowBlockEnd?: boolean allowClassStart?: boolean allowClassEnd?: boolean allowObjectStart?: boolean allowObjectEnd?: boolean allowArrayStart?: boolean allowArrayEnd?: boolean ignorePattern?: string applyDefaultIgnorePatterns?: boolean afterHashbangComment?: boolean } type LinesAroundCommentRuleOptions = [ LinesAroundCommentSchema0?, ] type LinesBetweenClassMembersSchema0 = | { /** * @minItems 1 */ enforce: [ { blankLine: 'always' | 'never' prev: 'method' | 'field' | '*' next: 'method' | 'field' | '*' }, ...{ blankLine: 'always' | 'never' prev: 'method' | 'field' | '*' next: 'method' | 'field' | '*' }[], ] } | ('always' | 'never') interface LinesBetweenClassMembersSchema1 { exceptAfterSingleLine?: boolean } type LinesBetweenClassMembersRuleOptions = [ LinesBetweenClassMembersSchema0?, LinesBetweenClassMembersSchema1?, ] type MaxLenSchema0 = | { code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number type MaxLenSchema1 = | { code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number interface MaxLenSchema2 { code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } type MaxLenRuleOptions = [ MaxLenSchema0?, MaxLenSchema1?, MaxLenSchema2?, ] interface MaxStatementsPerLineSchema0 { max?: number ignoredNodes?: ( | 'BreakStatement' | 'ClassDeclaration' | 'ContinueStatement' | 'DebuggerStatement' | 'DoWhileStatement' | 'ExpressionStatement' | 'ForInStatement' | 'ForOfStatement' | 'ForStatement' | 'FunctionDeclaration' | 'IfStatement' | 'ImportDeclaration' | 'LabeledStatement' | 'ReturnStatement' | 'SwitchStatement' | 'ThrowStatement' | 'TryStatement' | 'VariableDeclaration' | 'WhileStatement' | 'WithStatement' | 'ExportNamedDeclaration' | 'ExportDefaultDeclaration' | 'ExportAllDeclaration' )[] } type MaxStatementsPerLineRuleOptions = [ MaxStatementsPerLineSchema0?, ] type MultilineCommentStyleSchema0 = | [] | ['starred-block' | 'bare-block'] | [] | ['separate-lines'] | [ 'separate-lines', { checkJSDoc?: boolean }, ] type MultilineCommentStyleRuleOptions = MultilineCommentStyleSchema0 type MultilineTernarySchema0 = | 'always' | 'always-multiline' | 'never' interface MultilineTernarySchema1 { ignoreJSX?: boolean [k: string]: unknown } type MultilineTernaryRuleOptions = [ MultilineTernarySchema0?, MultilineTernarySchema1?, ] type NewParensSchema0 = 'always' | 'never' type NewParensRuleOptions = [NewParensSchema0?] interface NewlinePerChainedCallSchema0 { ignoreChainWithDepth?: number } type NewlinePerChainedCallRuleOptions = [ NewlinePerChainedCallSchema0?, ] interface NoConfusingArrowSchema0 { allowParens?: boolean onlyOneSimpleParam?: boolean } type NoConfusingArrowRuleOptions = [ NoConfusingArrowSchema0?, ] type NoExtraParensSchema0 = | [] | ['functions'] | [] | ['all'] | [ 'all', { conditionalAssign?: boolean ternaryOperandBinaryExpressions?: boolean nestedBinaryExpressions?: boolean returnAssign?: boolean ignoreJSX?: | 'none' | 'all' | 'single-line' | 'multi-line' enforceForArrowConditionals?: boolean enforceForSequenceExpressions?: boolean enforceForNewInMemberExpressions?: boolean enforceForFunctionPrototypeMethods?: boolean allowParensAfterCommentPattern?: string nestedConditionalExpressions?: boolean }, ] type NoExtraParensRuleOptions = NoExtraParensSchema0 type NoExtraSemiRuleOptions = [] type NoFloatingDecimalRuleOptions = [] interface NoMixedOperatorsSchema0 { groups?: [ ( | '+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??' ), ( | '+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??' ), ...( | '+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??' )[], ][] allowSamePrecedence?: boolean } type NoMixedOperatorsRuleOptions = [ NoMixedOperatorsSchema0?, ] type NoMixedSpacesAndTabsSchema0 = | 'smart-tabs' | boolean type NoMixedSpacesAndTabsRuleOptions = [ NoMixedSpacesAndTabsSchema0?, ] interface NoMultiSpacesSchema0 { exceptions?: { [k: string]: boolean } ignoreEOLComments?: boolean includeTabs?: boolean } type NoMultiSpacesRuleOptions = [ NoMultiSpacesSchema0?, ] interface NoMultipleEmptyLinesSchema0 { max: number maxEOF?: number maxBOF?: number } type NoMultipleEmptyLinesRuleOptions = [ NoMultipleEmptyLinesSchema0?, ] interface NoTabsSchema0 { allowIndentationTabs?: boolean } type NoTabsRuleOptions = [NoTabsSchema0?] interface NoTrailingSpacesSchema0 { skipBlankLines?: boolean ignoreComments?: boolean } type NoTrailingSpacesRuleOptions = [ NoTrailingSpacesSchema0?, ] type NoWhitespaceBeforePropertyRuleOptions = [] type NonblockStatementBodyPositionSchema0 = | 'beside' | 'below' | 'any' interface NonblockStatementBodyPositionSchema1 { overrides?: { if?: 'beside' | 'below' | 'any' else?: 'beside' | 'below' | 'any' while?: 'beside' | 'below' | 'any' do?: 'beside' | 'below' | 'any' for?: 'beside' | 'below' | 'any' } } type NonblockStatementBodyPositionRuleOptions = [ NonblockStatementBodyPositionSchema0?, NonblockStatementBodyPositionSchema1?, ] type ObjectCurlyNewlineSchema0 = | ( | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } ) | { ObjectExpression?: | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } ObjectPattern?: | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } ImportDeclaration?: | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } ExportDeclaration?: | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } TSTypeLiteral?: | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } TSInterfaceBody?: | ('always' | 'never') | { multiline?: boolean minProperties?: number consistent?: boolean } } type ObjectCurlyNewlineRuleOptions = [ ObjectCurlyNewlineSchema0?, ] type ObjectCurlySpacingSchema0 = 'always' | 'never' interface ObjectCurlySpacingSchema1 { arraysInObjects?: boolean objectsInObjects?: boolean } type ObjectCurlySpacingRuleOptions = [ ObjectCurlySpacingSchema0?, ObjectCurlySpacingSchema1?, ] interface ObjectPropertyNewlineSchema0 { allowAllPropertiesOnSameLine?: boolean allowMultiplePropertiesPerLine?: boolean } type ObjectPropertyNewlineRuleOptions = [ ObjectPropertyNewlineSchema0?, ] type OneVarDeclarationPerLineSchema0 = | 'always' | 'initializations' type OneVarDeclarationPerLineRuleOptions = [ OneVarDeclarationPerLineSchema0?, ] type OperatorLinebreakSchema0 = | ('after' | 'before' | 'none') | null interface OperatorLinebreakSchema1 { overrides?: { [k: string]: 'after' | 'before' | 'none' | 'ignore' } } type OperatorLinebreakRuleOptions = [ OperatorLinebreakSchema0?, OperatorLinebreakSchema1?, ] type PaddedBlocksSchema0 = | ('always' | 'never' | 'start' | 'end') | { blocks?: 'always' | 'never' | 'start' | 'end' switches?: 'always' | 'never' | 'start' | 'end' classes?: 'always' | 'never' | 'start' | 'end' } interface PaddedBlocksSchema1 { allowSingleLineBlocks?: boolean } type PaddedBlocksRuleOptions = [ PaddedBlocksSchema0?, PaddedBlocksSchema1?, ] type PaddingType = 'any' | 'never' | 'always' type StatementType = | ( | '*' | 'block-like' | 'cjs-export' | 'cjs-import' | 'directive' | 'expression' | 'iife' | 'multiline-block-like' | 'multiline-expression' | 'multiline-const' | 'multiline-export' | 'multiline-let' | 'multiline-var' | 'singleline-const' | 'singleline-export' | 'singleline-let' | 'singleline-var' | 'block' | 'empty' | 'function' | 'break' | 'case' | 'class' | 'const' | 'continue' | 'debugger' | 'default' | 'do' | 'export' | 'for' | 'if' | 'import' | 'let' | 'return' | 'switch' | 'throw' | 'try' | 'var' | 'while' | 'with' ) | [ ( | '*' | 'block-like' | 'cjs-export' | 'cjs-import' | 'directive' | 'expression' | 'iife' | 'multiline-block-like' | 'multiline-expression' | 'multiline-const' | 'multiline-export' | 'multiline-let' | 'multiline-var' | 'singleline-const' | 'singleline-export' | 'singleline-let' | 'singleline-var' | 'block' | 'empty' | 'function' | 'break' | 'case' | 'class' | 'const' | 'continue' | 'debugger' | 'default' | 'do' | 'export' | 'for' | 'if' | 'import' | 'let' | 'return' | 'switch' | 'throw' | 'try' | 'var' | 'while' | 'with' ), ...( | '*' | 'block-like' | 'cjs-export' | 'cjs-import' | 'directive' | 'expression' | 'iife' | 'multiline-block-like' | 'multiline-expression' | 'multiline-const' | 'multiline-export' | 'multiline-let' | 'multiline-var' | 'singleline-const' | 'singleline-export' | 'singleline-let' | 'singleline-var' | 'block' | 'empty' | 'function' | 'break' | 'case' | 'class' | 'const' | 'continue' | 'debugger' | 'default' | 'do' | 'export' | 'for' | 'if' | 'import' | 'let' | 'return' | 'switch' | 'throw' | 'try' | 'var' | 'while' | 'with' )[], ] type PaddingLineBetweenStatementsSchema0 = { blankLine: PaddingType prev: StatementType next: StatementType }[] type PaddingLineBetweenStatementsRuleOptions = PaddingLineBetweenStatementsSchema0 type QuotePropsSchema0 = | [] | [ | 'always' | 'as-needed' | 'consistent' | 'consistent-as-needed', ] | [] | [ | 'always' | 'as-needed' | 'consistent' | 'consistent-as-needed', ] | [ ( | 'always' | 'as-needed' | 'consistent' | 'consistent-as-needed' ), { keywords?: boolean unnecessary?: boolean numbers?: boolean }, ] type QuotePropsRuleOptions = QuotePropsSchema0 type QuotesSchema0 = 'single' | 'double' | 'backtick' type QuotesSchema1 = | 'avoid-escape' | { avoidEscape?: boolean allowTemplateLiterals?: | boolean | ('never' | 'avoidEscape' | 'always') ignoreStringLiterals?: boolean } type QuotesRuleOptions = [ QuotesSchema0?, QuotesSchema1?, ] type RestSpreadSpacingSchema0 = 'always' | 'never' type RestSpreadSpacingRuleOptions = [ RestSpreadSpacingSchema0?, ] interface SemiSpacingSchema0 { before?: boolean after?: boolean } type SemiSpacingRuleOptions = [SemiSpacingSchema0?] type SemiStyleSchema0 = 'last' | 'first' type SemiStyleRuleOptions = [SemiStyleSchema0?] type SemiSchema0 = | [] | ['never'] | [ 'never', { beforeStatementContinuationChars?: | 'always' | 'any' | 'never' }, ] | [] | ['always'] | [ 'always', { omitLastInOneLineBlock?: boolean omitLastInOneLineClassBody?: boolean }, ] type SemiRuleOptions = SemiSchema0 type SpaceBeforeBlocksSchema0 = | ('always' | 'never') | { keywords?: 'always' | 'never' | 'off' functions?: 'always' | 'never' | 'off' classes?: 'always' | 'never' | 'off' } type SpaceBeforeBlocksRuleOptions = [ SpaceBeforeBlocksSchema0?, ] type SpaceBeforeFunctionParenSchema0 = | ('always' | 'never') | { anonymous?: 'always' | 'never' | 'ignore' named?: 'always' | 'never' | 'ignore' asyncArrow?: 'always' | 'never' | 'ignore' } type SpaceBeforeFunctionParenRuleOptions = [ SpaceBeforeFunctionParenSchema0?, ] type SpaceInParensSchema0 = 'always' | 'never' interface SpaceInParensSchema1 { exceptions?: ('{}' | '[]' | '()' | 'empty')[] } type SpaceInParensRuleOptions = [ SpaceInParensSchema0?, SpaceInParensSchema1?, ] interface SpaceInfixOpsSchema0 { int32Hint?: boolean } type SpaceInfixOpsRuleOptions = [ SpaceInfixOpsSchema0?, ] interface SpaceUnaryOpsSchema0 { words?: boolean nonwords?: boolean overrides?: { [k: string]: boolean } } type SpaceUnaryOpsRuleOptions = [ SpaceUnaryOpsSchema0?, ] type SpacedCommentSchema0 = 'always' | 'never' interface SpacedCommentSchema1 { exceptions?: string[] markers?: string[] line?: { exceptions?: string[] markers?: string[] } block?: { exceptions?: string[] markers?: string[] balanced?: boolean } } type SpacedCommentRuleOptions = [ SpacedCommentSchema0?, SpacedCommentSchema1?, ] interface SwitchColonSpacingSchema0 { before?: boolean after?: boolean } type SwitchColonSpacingRuleOptions = [ SwitchColonSpacingSchema0?, ] type TemplateCurlySpacingSchema0 = 'always' | 'never' type TemplateCurlySpacingRuleOptions = [ TemplateCurlySpacingSchema0?, ] type TemplateTagSpacingSchema0 = 'always' | 'never' type TemplateTagSpacingRuleOptions = [ TemplateTagSpacingSchema0?, ] type WrapIifeSchema0 = 'outside' | 'inside' | 'any' interface WrapIifeSchema1 { functionPrototypeMethods?: boolean } type WrapIifeRuleOptions = [ WrapIifeSchema0?, WrapIifeSchema1?, ] type WrapRegexRuleOptions = [] type YieldStarSpacingSchema0 = | ('before' | 'after' | 'both' | 'neither') | { before?: boolean after?: boolean } type YieldStarSpacingRuleOptions = [ YieldStarSpacingSchema0?, ] interface RuleOptions { /** * Enforce linebreaks after opening and before closing array brackets * @see https://eslint.style/rules/js/array-bracket-newline */ '@stylistic/js/array-bracket-newline': ArrayBracketNewlineRuleOptions /** * Enforce consistent spacing inside array brackets * @see https://eslint.style/rules/js/array-bracket-spacing */ '@stylistic/js/array-bracket-spacing': ArrayBracketSpacingRuleOptions /** * Enforce line breaks after each array element * @see https://eslint.style/rules/js/array-element-newline */ '@stylistic/js/array-element-newline': ArrayElementNewlineRuleOptions /** * Require parentheses around arrow function arguments * @see https://eslint.style/rules/js/arrow-parens */ '@stylistic/js/arrow-parens': ArrowParensRuleOptions /** * Enforce consistent spacing before and after the arrow in arrow functions * @see https://eslint.style/rules/js/arrow-spacing */ '@stylistic/js/arrow-spacing': ArrowSpacingRuleOptions /** * Disallow or enforce spaces inside of blocks after opening block and before closing block * @see https://eslint.style/rules/js/block-spacing */ '@stylistic/js/block-spacing': BlockSpacingRuleOptions /** * Enforce consistent brace style for blocks * @see https://eslint.style/rules/js/brace-style */ '@stylistic/js/brace-style': BraceStyleRuleOptions /** * Require or disallow trailing commas * @see https://eslint.style/rules/js/comma-dangle */ '@stylistic/js/comma-dangle': CommaDangleRuleOptions /** * Enforce consistent spacing before and after commas * @see https://eslint.style/rules/js/comma-spacing */ '@stylistic/js/comma-spacing': CommaSpacingRuleOptions /** * Enforce consistent comma style * @see https://eslint.style/rules/js/comma-style */ '@stylistic/js/comma-style': CommaStyleRuleOptions /** * Enforce consistent spacing inside computed property brackets * @see https://eslint.style/rules/js/computed-property-spacing */ '@stylistic/js/computed-property-spacing': ComputedPropertySpacingRuleOptions /** * Enforce consistent newlines before and after dots * @see https://eslint.style/rules/js/dot-location */ '@stylistic/js/dot-location': DotLocationRuleOptions /** * Require or disallow newline at the end of files * @see https://eslint.style/rules/js/eol-last */ '@stylistic/js/eol-last': EolLastRuleOptions /** * Require or disallow spacing between function identifiers and their invocations * @see https://eslint.style/rules/js/function-call-spacing */ '@stylistic/js/func-call-spacing': FunctionCallSpacingRuleOptions /** * Enforce line breaks between arguments of a function call * @see https://eslint.style/rules/js/function-call-argument-newline */ '@stylistic/js/function-call-argument-newline': FunctionCallArgumentNewlineRuleOptions /** * Require or disallow spacing between function identifiers and their invocations * @see https://eslint.style/rules/js/function-call-spacing */ '@stylistic/js/function-call-spacing': FunctionCallSpacingRuleOptions /** * Enforce consistent line breaks inside function parentheses * @see https://eslint.style/rules/js/function-paren-newline */ '@stylistic/js/function-paren-newline': FunctionParenNewlineRuleOptions /** * Enforce consistent spacing around `*` operators in generator functions * @see https://eslint.style/rules/js/generator-star-spacing */ '@stylistic/js/generator-star-spacing': GeneratorStarSpacingRuleOptions /** * Enforce the location of arrow function bodies * @see https://eslint.style/rules/js/implicit-arrow-linebreak */ '@stylistic/js/implicit-arrow-linebreak': ImplicitArrowLinebreakRuleOptions /** * Enforce consistent indentation * @see https://eslint.style/rules/js/indent */ '@stylistic/js/indent': IndentRuleOptions /** * Enforce the consistent use of either double or single quotes in JSX attributes * @see https://eslint.style/rules/js/jsx-quotes */ '@stylistic/js/jsx-quotes': JsxQuotesRuleOptions /** * Enforce consistent spacing between keys and values in object literal properties * @see https://eslint.style/rules/js/key-spacing */ '@stylistic/js/key-spacing': KeySpacingRuleOptions /** * Enforce consistent spacing before and after keywords * @see https://eslint.style/rules/js/keyword-spacing */ '@stylistic/js/keyword-spacing': KeywordSpacingRuleOptions /** * Enforce position of line comments * @see https://eslint.style/rules/js/line-comment-position */ '@stylistic/js/line-comment-position': LineCommentPositionRuleOptions /** * Enforce consistent linebreak style * @see https://eslint.style/rules/js/linebreak-style */ '@stylistic/js/linebreak-style': LinebreakStyleRuleOptions /** * Require empty lines around comments * @see https://eslint.style/rules/js/lines-around-comment */ '@stylistic/js/lines-around-comment': LinesAroundCommentRuleOptions /** * Require or disallow an empty line between class members * @see https://eslint.style/rules/js/lines-between-class-members */ '@stylistic/js/lines-between-class-members': LinesBetweenClassMembersRuleOptions /** * Enforce a maximum line length * @see https://eslint.style/rules/js/max-len */ '@stylistic/js/max-len': MaxLenRuleOptions /** * Enforce a maximum number of statements allowed per line * @see https://eslint.style/rules/js/max-statements-per-line */ '@stylistic/js/max-statements-per-line': MaxStatementsPerLineRuleOptions /** * Enforce a particular style for multiline comments * @see https://eslint.style/rules/js/multiline-comment-style */ '@stylistic/js/multiline-comment-style': MultilineCommentStyleRuleOptions /** * Enforce newlines between operands of ternary expressions * @see https://eslint.style/rules/js/multiline-ternary */ '@stylistic/js/multiline-ternary': MultilineTernaryRuleOptions /** * Enforce or disallow parentheses when invoking a constructor with no arguments * @see https://eslint.style/rules/js/new-parens */ '@stylistic/js/new-parens': NewParensRuleOptions /** * Require a newline after each call in a method chain * @see https://eslint.style/rules/js/newline-per-chained-call */ '@stylistic/js/newline-per-chained-call': NewlinePerChainedCallRuleOptions /** * Disallow arrow functions where they could be confused with comparisons * @see https://eslint.style/rules/js/no-confusing-arrow */ '@stylistic/js/no-confusing-arrow': NoConfusingArrowRuleOptions /** * Disallow unnecessary parentheses * @see https://eslint.style/rules/js/no-extra-parens */ '@stylistic/js/no-extra-parens': NoExtraParensRuleOptions /** * Disallow unnecessary semicolons * @see https://eslint.style/rules/js/no-extra-semi */ '@stylistic/js/no-extra-semi': NoExtraSemiRuleOptions /** * Disallow leading or trailing decimal points in numeric literals * @see https://eslint.style/rules/js/no-floating-decimal */ '@stylistic/js/no-floating-decimal': NoFloatingDecimalRuleOptions /** * Disallow mixed binary operators * @see https://eslint.style/rules/js/no-mixed-operators */ '@stylistic/js/no-mixed-operators': NoMixedOperatorsRuleOptions /** * Disallow mixed spaces and tabs for indentation * @see https://eslint.style/rules/js/no-mixed-spaces-and-tabs */ '@stylistic/js/no-mixed-spaces-and-tabs': NoMixedSpacesAndTabsRuleOptions /** * Disallow multiple spaces * @see https://eslint.style/rules/js/no-multi-spaces */ '@stylistic/js/no-multi-spaces': NoMultiSpacesRuleOptions /** * Disallow multiple empty lines * @see https://eslint.style/rules/js/no-multiple-empty-lines */ '@stylistic/js/no-multiple-empty-lines': NoMultipleEmptyLinesRuleOptions /** * Disallow all tabs * @see https://eslint.style/rules/js/no-tabs */ '@stylistic/js/no-tabs': NoTabsRuleOptions /** * Disallow trailing whitespace at the end of lines * @see https://eslint.style/rules/js/no-trailing-spaces */ '@stylistic/js/no-trailing-spaces': NoTrailingSpacesRuleOptions /** * Disallow whitespace before properties * @see https://eslint.style/rules/js/no-whitespace-before-property */ '@stylistic/js/no-whitespace-before-property': NoWhitespaceBeforePropertyRuleOptions /** * Enforce the location of single-line statements * @see https://eslint.style/rules/js/nonblock-statement-body-position */ '@stylistic/js/nonblock-statement-body-position': NonblockStatementBodyPositionRuleOptions /** * Enforce consistent line breaks after opening and before closing braces * @see https://eslint.style/rules/js/object-curly-newline */ '@stylistic/js/object-curly-newline': ObjectCurlyNewlineRuleOptions /** * Enforce consistent spacing inside braces * @see https://eslint.style/rules/js/object-curly-spacing */ '@stylistic/js/object-curly-spacing': ObjectCurlySpacingRuleOptions /** * Enforce placing object properties on separate lines * @see https://eslint.style/rules/js/object-property-newline */ '@stylistic/js/object-property-newline': ObjectPropertyNewlineRuleOptions /** * Require or disallow newlines around variable declarations * @see https://eslint.style/rules/js/one-var-declaration-per-line */ '@stylistic/js/one-var-declaration-per-line': OneVarDeclarationPerLineRuleOptions /** * Enforce consistent linebreak style for operators * @see https://eslint.style/rules/js/operator-linebreak */ '@stylistic/js/operator-linebreak': OperatorLinebreakRuleOptions /** * Require or disallow padding within blocks * @see https://eslint.style/rules/js/padded-blocks */ '@stylistic/js/padded-blocks': PaddedBlocksRuleOptions /** * Require or disallow padding lines between statements * @see https://eslint.style/rules/js/padding-line-between-statements */ '@stylistic/js/padding-line-between-statements': PaddingLineBetweenStatementsRuleOptions /** * Require quotes around object literal property names * @see https://eslint.style/rules/js/quote-props */ '@stylistic/js/quote-props': QuotePropsRuleOptions /** * Enforce the consistent use of either backticks, double, or single quotes * @see https://eslint.style/rules/js/quotes */ '@stylistic/js/quotes': QuotesRuleOptions /** * Enforce spacing between rest and spread operators and their expressions * @see https://eslint.style/rules/js/rest-spread-spacing */ '@stylistic/js/rest-spread-spacing': RestSpreadSpacingRuleOptions /** * Require or disallow semicolons instead of ASI * @see https://eslint.style/rules/js/semi */ '@stylistic/js/semi': SemiRuleOptions /** * Enforce consistent spacing before and after semicolons * @see https://eslint.style/rules/js/semi-spacing */ '@stylistic/js/semi-spacing': SemiSpacingRuleOptions /** * Enforce location of semicolons * @see https://eslint.style/rules/js/semi-style */ '@stylistic/js/semi-style': SemiStyleRuleOptions /** * Enforce consistent spacing before blocks * @see https://eslint.style/rules/js/space-before-blocks */ '@stylistic/js/space-before-blocks': SpaceBeforeBlocksRuleOptions /** * Enforce consistent spacing before `function` definition opening parenthesis * @see https://eslint.style/rules/js/space-before-function-paren */ '@stylistic/js/space-before-function-paren': SpaceBeforeFunctionParenRuleOptions /** * Enforce consistent spacing inside parentheses * @see https://eslint.style/rules/js/space-in-parens */ '@stylistic/js/space-in-parens': SpaceInParensRuleOptions /** * Require spacing around infix operators * @see https://eslint.style/rules/js/space-infix-ops */ '@stylistic/js/space-infix-ops': SpaceInfixOpsRuleOptions /** * Enforce consistent spacing before or after unary operators * @see https://eslint.style/rules/js/space-unary-ops */ '@stylistic/js/space-unary-ops': SpaceUnaryOpsRuleOptions /** * Enforce consistent spacing after the `//` or `/*` in a comment * @see https://eslint.style/rules/js/spaced-comment */ '@stylistic/js/spaced-comment': SpacedCommentRuleOptions /** * Enforce spacing around colons of switch statements * @see https://eslint.style/rules/js/switch-colon-spacing */ '@stylistic/js/switch-colon-spacing': SwitchColonSpacingRuleOptions /** * Require or disallow spacing around embedded expressions of template strings * @see https://eslint.style/rules/js/template-curly-spacing */ '@stylistic/js/template-curly-spacing': TemplateCurlySpacingRuleOptions /** * Require or disallow spacing between template tags and their literals * @see https://eslint.style/rules/js/template-tag-spacing */ '@stylistic/js/template-tag-spacing': TemplateTagSpacingRuleOptions /** * Require parentheses around immediate `function` invocations * @see https://eslint.style/rules/js/wrap-iife */ '@stylistic/js/wrap-iife': WrapIifeRuleOptions /** * Require parenthesis around regex literals * @see https://eslint.style/rules/js/wrap-regex */ '@stylistic/js/wrap-regex': WrapRegexRuleOptions /** * Require or disallow spacing around the `*` in `yield*` expressions * @see https://eslint.style/rules/js/yield-star-spacing */ '@stylistic/js/yield-star-spacing': YieldStarSpacingRuleOptions } interface UnprefixedRuleOptions { /** * Enforce linebreaks after opening and before closing array brackets * @see https://eslint.style/rules/js/array-bracket-newline */ 'array-bracket-newline': ArrayBracketNewlineRuleOptions /** * Enforce consistent spacing inside array brackets * @see https://eslint.style/rules/js/array-bracket-spacing */ 'array-bracket-spacing': ArrayBracketSpacingRuleOptions /** * Enforce line breaks after each array element * @see https://eslint.style/rules/js/array-element-newline */ 'array-element-newline': ArrayElementNewlineRuleOptions /** * Require parentheses around arrow function arguments * @see https://eslint.style/rules/js/arrow-parens */ 'arrow-parens': ArrowParensRuleOptions /** * Enforce consistent spacing before and after the arrow in arrow functions * @see https://eslint.style/rules/js/arrow-spacing */ 'arrow-spacing': ArrowSpacingRuleOptions /** * Disallow or enforce spaces inside of blocks after opening block and before closing block * @see https://eslint.style/rules/js/block-spacing */ 'block-spacing': BlockSpacingRuleOptions /** * Enforce consistent brace style for blocks * @see https://eslint.style/rules/js/brace-style */ 'brace-style': BraceStyleRuleOptions /** * Require or disallow trailing commas * @see https://eslint.style/rules/js/comma-dangle */ 'comma-dangle': CommaDangleRuleOptions /** * Enforce consistent spacing before and after commas * @see https://eslint.style/rules/js/comma-spacing */ 'comma-spacing': CommaSpacingRuleOptions /** * Enforce consistent comma style * @see https://eslint.style/rules/js/comma-style */ 'comma-style': CommaStyleRuleOptions /** * Enforce consistent spacing inside computed property brackets * @see https://eslint.style/rules/js/computed-property-spacing */ 'computed-property-spacing': ComputedPropertySpacingRuleOptions /** * Enforce consistent newlines before and after dots * @see https://eslint.style/rules/js/dot-location */ 'dot-location': DotLocationRuleOptions /** * Require or disallow newline at the end of files * @see https://eslint.style/rules/js/eol-last */ 'eol-last': EolLastRuleOptions /** * Require or disallow spacing between function identifiers and their invocations * @see https://eslint.style/rules/js/function-call-spacing */ 'func-call-spacing': FunctionCallSpacingRuleOptions /** * Enforce line breaks between arguments of a function call * @see https://eslint.style/rules/js/function-call-argument-newline */ 'function-call-argument-newline': FunctionCallArgumentNewlineRuleOptions /** * Require or disallow spacing between function identifiers and their invocations * @see https://eslint.style/rules/js/function-call-spacing */ 'function-call-spacing': FunctionCallSpacingRuleOptions /** * Enforce consistent line breaks inside function parentheses * @see https://eslint.style/rules/js/function-paren-newline */ 'function-paren-newline': FunctionParenNewlineRuleOptions /** * Enforce consistent spacing around `*` operators in generator functions * @see https://eslint.style/rules/js/generator-star-spacing */ 'generator-star-spacing': GeneratorStarSpacingRuleOptions /** * Enforce the location of arrow function bodies * @see https://eslint.style/rules/js/implicit-arrow-linebreak */ 'implicit-arrow-linebreak': ImplicitArrowLinebreakRuleOptions /** * Enforce consistent indentation * @see https://eslint.style/rules/js/indent */ 'indent': IndentRuleOptions /** * Enforce the consistent use of either double or single quotes in JSX attributes * @see https://eslint.style/rules/js/jsx-quotes */ 'jsx-quotes': JsxQuotesRuleOptions /** * Enforce consistent spacing between keys and values in object literal properties * @see https://eslint.style/rules/js/key-spacing */ 'key-spacing': KeySpacingRuleOptions /** * Enforce consistent spacing before and after keywords * @see https://eslint.style/rules/js/keyword-spacing */ 'keyword-spacing': KeywordSpacingRuleOptions /** * Enforce position of line comments * @see https://eslint.style/rules/js/line-comment-position */ 'line-comment-position': LineCommentPositionRuleOptions /** * Enforce consistent linebreak style * @see https://eslint.style/rules/js/linebreak-style */ 'linebreak-style': LinebreakStyleRuleOptions /** * Require empty lines around comments * @see https://eslint.style/rules/js/lines-around-comment */ 'lines-around-comment': LinesAroundCommentRuleOptions /** * Require or disallow an empty line between class members * @see https://eslint.style/rules/js/lines-between-class-members */ 'lines-between-class-members': LinesBetweenClassMembersRuleOptions /** * Enforce a maximum line length * @see https://eslint.style/rules/js/max-len */ 'max-len': MaxLenRuleOptions /** * Enforce a maximum number of statements allowed per line * @see https://eslint.style/rules/js/max-statements-per-line */ 'max-statements-per-line': MaxStatementsPerLineRuleOptions /** * Enforce a particular style for multiline comments * @see https://eslint.style/rules/js/multiline-comment-style */ 'multiline-comment-style': MultilineCommentStyleRuleOptions /** * Enforce newlines between operands of ternary expressions * @see https://eslint.style/rules/js/multiline-ternary */ 'multiline-ternary': MultilineTernaryRuleOptions /** * Enforce or disallow parentheses when invoking a constructor with no arguments * @see https://eslint.style/rules/js/new-parens */ 'new-parens': NewParensRuleOptions /** * Require a newline after each call in a method chain * @see https://eslint.style/rules/js/newline-per-chained-call */ 'newline-per-chained-call': NewlinePerChainedCallRuleOptions /** * Disallow arrow functions where they could be confused with comparisons * @see https://eslint.style/rules/js/no-confusing-arrow */ 'no-confusing-arrow': NoConfusingArrowRuleOptions /** * Disallow unnecessary parentheses * @see https://eslint.style/rules/js/no-extra-parens */ 'no-extra-parens': NoExtraParensRuleOptions /** * Disallow unnecessary semicolons * @see https://eslint.style/rules/js/no-extra-semi */ 'no-extra-semi': NoExtraSemiRuleOptions /** * Disallow leading or trailing decimal points in numeric literals * @see https://eslint.style/rules/js/no-floating-decimal */ 'no-floating-decimal': NoFloatingDecimalRuleOptions /** * Disallow mixed binary operators * @see https://eslint.style/rules/js/no-mixed-operators */ 'no-mixed-operators': NoMixedOperatorsRuleOptions /** * Disallow mixed spaces and tabs for indentation * @see https://eslint.style/rules/js/no-mixed-spaces-and-tabs */ 'no-mixed-spaces-and-tabs': NoMixedSpacesAndTabsRuleOptions /** * Disallow multiple spaces * @see https://eslint.style/rules/js/no-multi-spaces */ 'no-multi-spaces': NoMultiSpacesRuleOptions /** * Disallow multiple empty lines * @see https://eslint.style/rules/js/no-multiple-empty-lines */ 'no-multiple-empty-lines': NoMultipleEmptyLinesRuleOptions /** * Disallow all tabs * @see https://eslint.style/rules/js/no-tabs */ 'no-tabs': NoTabsRuleOptions /** * Disallow trailing whitespace at the end of lines * @see https://eslint.style/rules/js/no-trailing-spaces */ 'no-trailing-spaces': NoTrailingSpacesRuleOptions /** * Disallow whitespace before properties * @see https://eslint.style/rules/js/no-whitespace-before-property */ 'no-whitespace-before-property': NoWhitespaceBeforePropertyRuleOptions /** * Enforce the location of single-line statements * @see https://eslint.style/rules/js/nonblock-statement-body-position */ 'nonblock-statement-body-position': NonblockStatementBodyPositionRuleOptions /** * Enforce consistent line breaks after opening and before closing braces * @see https://eslint.style/rules/js/object-curly-newline */ 'object-curly-newline': ObjectCurlyNewlineRuleOptions /** * Enforce consistent spacing inside braces * @see https://eslint.style/r