Socket
Socket
Sign inDemoInstall

@typescript-eslint/eslint-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3773
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/eslint-plugin - npm Package Compare versions

Comparing version 1.4.1-alpha.6 to 1.4.1

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # Change Log

## [1.4.1](https://github.com/typescript-eslint/typescript-eslint/compare/v1.4.0...v1.4.1) (2019-02-23)
### Bug Fixes
- **eslint-plugin:** out-of-bounds access in member-ordering rule ([#304](https://github.com/typescript-eslint/typescript-eslint/issues/304)) ([4526f27](https://github.com/typescript-eslint/typescript-eslint/commit/4526f27))
- **eslint-plugin:** support BigInt in restrict-plus-operands rule ([#309](https://github.com/typescript-eslint/typescript-eslint/issues/309)) ([#310](https://github.com/typescript-eslint/typescript-eslint/issues/310)) ([9a88363](https://github.com/typescript-eslint/typescript-eslint/commit/9a88363))
# [1.4.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.3.0...v1.4.0) (2019-02-19)

@@ -8,0 +15,0 @@

8

dist/index.js
"use strict";
/**
* @fileoverview TypeScript plugin for ESLint
* @author Nicholas C. Zakas
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -17,5 +21,5 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

configs: {
recommended: recommended_json_1.default,
},
recommended: recommended_json_1.default
}
};
//# sourceMappingURL=index.js.map
"use strict";
/**
* @fileoverview Enforces member overloads to be consecutive.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,8 +24,8 @@ if (mod && mod.__esModule) return mod;

tslintName: 'adjacent-overload-signatures',
recommended: 'error',
recommended: 'error'
},
schema: [],
messages: {
adjacentSignature: "All '{{name}}' signatures should be adjacent.",
},
adjacentSignature: "All '{{name}}' signatures should be adjacent."
}
},

@@ -97,3 +101,3 @@ defaultOptions: [],

name,
static: 'static' in member && !!member.static,
static: 'static' in member && !!member.static
};

@@ -106,4 +110,4 @@ const index = seenMethods.findIndex(seenMethod => isSameMethod(method, seenMethod));

data: {
name: (method.static ? 'static ' : '') + method.name,
},
name: (method.static ? 'static ' : '') + method.name
}
});

@@ -123,6 +127,6 @@ }

TSTypeLiteral: checkBodyForOverloadMethods,
TSInterfaceBody: checkBodyForOverloadMethods,
TSInterfaceBody: checkBodyForOverloadMethods
};
},
}
});
//# sourceMappingURL=adjacent-overload-signatures.js.map
"use strict";
/**
* @fileoverview Requires using either `T[]` or `Array<T>` for arrays.
* @author Mackie Underdown
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -82,3 +87,3 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},

@@ -90,9 +95,9 @@ fixable: 'code',

errorStringArray: "Array type using 'Array<{{type}}>' is forbidden. Use '{{type}}[]' instead.",
errorStringArraySimple: "Array type using 'Array<{{type}}>' is forbidden for simple types. Use '{{type}}[]' instead.",
errorStringArraySimple: "Array type using 'Array<{{type}}>' is forbidden for simple types. Use '{{type}}[]' instead."
},
schema: [
{
enum: ['array', 'generic', 'array-simple'],
},
],
enum: ['array', 'generic', 'array-simple']
}
]
},

@@ -143,3 +148,3 @@ defaultOptions: ['array'],

data: {
type: getMessageType(node.elementType),
type: getMessageType(node.elementType)
},

@@ -150,3 +155,3 @@ fix(fixer) {

fixer.replaceTextRange([node.range[1] - 2, node.range[1]], '>'),
fixer.insertTextBefore(node, `${startText ? ' ' : ''}Array<`),
fixer.insertTextBefore(node, `${startText ? ' ' : ''}Array<`)
];

@@ -163,3 +168,3 @@ if (node.elementType.type === typescript_estree_1.AST_NODE_TYPES.TSParenthesizedType) {

return toFix;
},
}
});

@@ -181,7 +186,7 @@ },

data: {
type: 'any',
type: 'any'
},
fix(fixer) {
return fixer.replaceText(node, 'any[]');
},
}
});

@@ -200,3 +205,3 @@ return;

data: {
type: getMessageType(type),
type: getMessageType(type)
},

@@ -206,10 +211,10 @@ fix(fixer) {

fixer.replaceTextRange([node.range[0], type.range[0]], parens ? '(' : ''),
fixer.replaceTextRange([type.range[1], node.range[1]], parens ? ')[]' : '[]'),
fixer.replaceTextRange([type.range[1], node.range[1]], parens ? ')[]' : '[]')
];
},
}
});
},
}
};
},
}
});
//# sourceMappingURL=array-type.js.map
"use strict";
/**
* @fileoverview Bans “// @ts-ignore” comments from being used.
* @author Ricky Lippmann <https://github.com/ldrick>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +23,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
schema: [],
messages: {
tsIgnoreComment: 'Do not use "// @ts-ignore" comments because they suppress compilation errors.',
},
tsIgnoreComment: 'Do not use "// @ts-ignore" comments because they suppress compilation errors.'
}
},

@@ -41,10 +45,10 @@ defaultOptions: [],

node: comment,
messageId: 'tsIgnoreComment',
messageId: 'tsIgnoreComment'
});
}
});
},
}
};
},
}
});
//# sourceMappingURL=ban-ts-ignore.js.map
"use strict";
/**
* @fileoverview Enforces that types will not to be used
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,7 +24,7 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
fixable: 'code',
messages: {
bannedTypeMessage: "Don't use '{{name}}' as a type.{{customMessage}}",
bannedTypeMessage: "Don't use '{{name}}' as a type.{{customMessage}}"
},

@@ -41,13 +45,13 @@ schema: [

message: { type: 'string' },
fixWith: { type: 'string' },
fixWith: { type: 'string' }
},
additionalProperties: false,
},
],
},
},
additionalProperties: false
}
]
}
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -59,22 +63,22 @@ defaultOptions: [

message: 'Use string instead',
fixWith: 'string',
fixWith: 'string'
},
Boolean: {
message: 'Use boolean instead',
fixWith: 'boolean',
fixWith: 'boolean'
},
Number: {
message: 'Use number instead',
fixWith: 'number',
fixWith: 'number'
},
Object: {
message: 'Use Record<string, any> instead',
fixWith: 'Record<string, any>',
fixWith: 'Record<string, any>'
},
Symbol: {
message: 'Use symbol instead',
fixWith: 'symbol',
},
},
},
fixWith: 'symbol'
}
}
}
],

@@ -107,12 +111,12 @@ create(context, [{ types: bannedTypes }]) {

name: node.name,
customMessage,
customMessage
},
fix,
fix
});
}
}
},
}
};
},
}
});
//# sourceMappingURL=ban-types.js.map
"use strict";
/**
* @fileoverview Rule to flag non-camelcased identifiers
* @author Patricio Trevino
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -23,6 +27,6 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
schema: camelcase_1.default.meta.schema,
messages: camelcase_1.default.meta.messages,
messages: camelcase_1.default.meta.messages
},

@@ -33,4 +37,4 @@ defaultOptions: [

ignoreDestructuring: false,
properties: 'never',
},
properties: 'never'
}
],

@@ -43,3 +47,3 @@ create(context, [options]) {

typescript_estree_1.AST_NODE_TYPES.TSParameterProperty,
typescript_estree_1.AST_NODE_TYPES.TSAbstractClassProperty,
typescript_estree_1.AST_NODE_TYPES.TSAbstractClassProperty
];

@@ -101,3 +105,3 @@ const properties = options.properties;

messageId: 'notCamelCase',
data: { name: node.name },
data: { name: node.name }
});

@@ -109,6 +113,6 @@ }

rules.Identifier(node);
},
}
};
},
}
});
//# sourceMappingURL=camelcase.js.map
"use strict";
/**
* @fileoverview Enforces PascalCased class and interface names.
* @author Jed Fox
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,8 +25,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
messages: {
notPascalCased: "{{friendlyName}} '{{name}}' must be PascalCased.",
notPascalCased: "{{friendlyName}} '{{name}}' must be PascalCased."
},
schema: [],
schema: []
},

@@ -60,4 +65,4 @@ defaultOptions: [],

friendlyName,
name: id.name,
},
name: id.name
}
});

@@ -90,6 +95,6 @@ }

}
},
}
};
},
}
});
//# sourceMappingURL=class-name-casing.js.map
"use strict";
/**
* @fileoverview Enforces explicit return type for functions
* @author Scott O'Hara
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,6 +23,6 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'warn',
recommended: 'warn'
},
messages: {
missingReturnType: 'Missing return type on function.',
missingReturnType: 'Missing return type on function.'
},

@@ -30,13 +34,13 @@ schema: [

allowExpressions: {
type: 'boolean',
},
type: 'boolean'
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},
defaultOptions: [
{
allowExpressions: true,
},
allowExpressions: true
}
],

@@ -71,3 +75,3 @@ create(context, [options]) {

node,
messageId: 'missingReturnType',
messageId: 'missingReturnType'
});

@@ -92,6 +96,6 @@ }

FunctionDeclaration: checkFunctionReturnType,
FunctionExpression: checkFunctionExpressionReturnType,
FunctionExpression: checkFunctionExpressionReturnType
};
},
}
});
//# sourceMappingURL=explicit-function-return-type.js.map
"use strict";
/**
* @fileoverview Enforces explicit accessibility modifier for class members
* @author Danny Fritz
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +23,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
messages: {
missingAccessibility: 'Missing accessibility modifier on {{type}} {{name}}.',
missingAccessibility: 'Missing accessibility modifier on {{type}} {{name}}.'
},
schema: [],
schema: []
},

@@ -41,4 +45,4 @@ defaultOptions: [],

type: 'method definition',
name: util.getNameFromPropertyName(methodDefinition.key),
},
name: util.getNameFromPropertyName(methodDefinition.key)
}
});

@@ -59,4 +63,4 @@ }

type: 'class property',
name: util.getNameFromPropertyName(classProperty.key),
},
name: util.getNameFromPropertyName(classProperty.key)
}
});

@@ -67,6 +71,6 @@ }

ClassProperty: checkPropertyAccessibilityModifier,
MethodDefinition: checkMethodAccessibilityModifier,
MethodDefinition: checkMethodAccessibilityModifier
};
},
}
});
//# sourceMappingURL=explicit-member-accessibility.js.map
"use strict";
/**
* @fileoverview Enforces naming of generic type variables.
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -18,16 +21,16 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: false,
recommended: false
},
messages: {
paramNotMatchRule: 'Type parameter {{name}} does not match rule {{rule}}.',
paramNotMatchRule: 'Type parameter {{name}} does not match rule {{rule}}.'
},
schema: [
{
type: 'string',
},
],
type: 'string'
}
]
},
defaultOptions: [
// Matches: T , TA , TAbc , TA1Bca , T1 , T2
'^T([A-Z0-9][a-zA-Z0-9]*){0,1}$',
'^T([A-Z0-9][a-zA-Z0-9]*){0,1}$'
],

@@ -45,10 +48,10 @@ create(context, [rule]) {

name,
rule,
},
rule
}
});
}
},
}
};
},
}
});
//# sourceMappingURL=generic-type-naming.js.map
"use strict";
/**
* @fileoverview Rule to flag non-camelcased identifiers
*
* Note this file is rather type-unsafe in its current state.

@@ -83,3 +85,3 @@ * This is due to some really funky type conversions between different node types.

typescript_estree_1.AST_NODE_TYPES.TSTypeReference,
typescript_estree_1.AST_NODE_TYPES.TSUnionType,
typescript_estree_1.AST_NODE_TYPES.TSUnionType
]);

@@ -94,7 +96,7 @@ exports.default = util.createRule({

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
fixable: 'whitespace',
schema: indent_1.default.meta.schema,
messages: indent_1.default.meta.messages,
messages: indent_1.default.meta.messages
},

@@ -109,4 +111,4 @@ defaultOptions: [

flatTernaryExpressions: false,
ignoredNodes: [],
},
ignoredNodes: []
}
],

@@ -120,4 +122,4 @@ create(context, optionsWithDefaults) {

configurable: false,
value: optionsWithDefaults,
},
value: optionsWithDefaults
}
});

@@ -145,3 +147,3 @@ const rules = indent_1.default.create(contextWithDefaults);

range: node.range,
loc: node.loc,
loc: node.loc
};

@@ -174,3 +176,3 @@ if (type === typescript_estree_1.AST_NODE_TYPES.Property) {

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -191,4 +193,4 @@ },

start: node.checkType.loc.start,
end: node.extendsType.loc.end,
},
end: node.extendsType.loc.end
}
},

@@ -200,3 +202,3 @@ consequent: node.trueType,

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -212,3 +214,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -229,3 +231,3 @@ },

start: id.loc.start,
end: moduleReference.loc.end,
end: moduleReference.loc.end
},

@@ -240,3 +242,3 @@ id: id,

moduleReference.range[0],
moduleReference.range[0] + 'require'.length,
moduleReference.range[0] + 'require'.length
],

@@ -247,5 +249,5 @@ loc: {

line: moduleReference.loc.end.line,
column: moduleReference.loc.start.line + 'require'.length,
},
},
column: moduleReference.loc.start.line + 'require'.length
}
}
},

@@ -257,5 +259,5 @@ arguments: 'expression' in moduleReference

range: moduleReference.range,
loc: moduleReference.loc,
},
},
loc: moduleReference.loc
}
}
],

@@ -265,3 +267,3 @@ // location data

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -278,3 +280,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -290,3 +292,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -305,3 +307,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -325,3 +327,3 @@ },

? node.typeAnnotation.range[1]
: squareBracketStart.range[0],
: squareBracketStart.range[0]
],

@@ -332,3 +334,3 @@ loc: {

? node.typeAnnotation.loc.end
: squareBracketStart.loc.end,
: squareBracketStart.loc.end
},

@@ -338,4 +340,4 @@ kind: 'init',

method: false,
shorthand: false,
},
shorthand: false
}
],

@@ -345,3 +347,3 @@ // location data

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -357,3 +359,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -369,3 +371,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -381,3 +383,3 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});

@@ -397,8 +399,8 @@ },

range: node.range,
loc: node.loc,
loc: node.loc
});
},
}
});
},
}
});
//# sourceMappingURL=indent.js.map
"use strict";
/**
* @fileoverview Enforces interface names are prefixed with "I".
* @author Danny Fritz
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,12 +23,12 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
messages: {
noPrefix: 'Interface name must not be prefixed with "I".',
noPrefix: 'Interface name must not be prefixed with "I".'
},
schema: [
{
enum: ['never', 'always'],
},
],
enum: ['never', 'always']
}
]
},

@@ -50,3 +54,3 @@ defaultOptions: ['never'],

node: node.id,
messageId: 'noPrefix',
messageId: 'noPrefix'
});

@@ -59,10 +63,10 @@ }

node: node.id,
messageId: 'noPrefix',
messageId: 'noPrefix'
});
}
}
},
}
};
},
}
});
//# sourceMappingURL=interface-name-prefix.js.map
"use strict";
/**
* @fileoverview Enforces a member delimiter style in interfaces and type literals.
* @author Patricio Trevino
* @author Brad Zacher
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,5 +24,5 @@ if (mod && mod.__esModule) return mod;

delimiter: { enum: ['none', 'semi', 'comma'] },
requireLast: { type: 'boolean' },
requireLast: { type: 'boolean' }
},
additionalProperties: false,
additionalProperties: false
},

@@ -29,8 +34,8 @@ singleline: {

delimiter: { enum: ['semi', 'comma'] },
requireLast: { type: 'boolean' },
requireLast: { type: 'boolean' }
},
additionalProperties: false,
},
additionalProperties: false
}
},
additionalProperties: false,
additionalProperties: false
};

@@ -44,3 +49,3 @@ exports.default = util.createRule({

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},

@@ -52,3 +57,3 @@ fixable: 'code',

expectedComma: 'Expected a comma.',
expectedSemi: 'Expected a semicolon.',
expectedSemi: 'Expected a semicolon.'
},

@@ -63,10 +68,10 @@ schema: [

interface: definition,
typeLiteral: definition,
typeLiteral: definition
},
additionalProperties: false,
},
additionalProperties: false
}
}),
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -77,9 +82,9 @@ defaultOptions: [

delimiter: 'semi',
requireLast: true,
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
requireLast: false
}
}
],

@@ -114,3 +119,3 @@ create(context, [options]) {

const lastToken = sourceCode.getLastToken(member, {
includeComments: false,
includeComments: false
});

@@ -157,8 +162,8 @@ if (!lastToken) {

line: lastToken.loc.end.line,
column: lastToken.loc.end.column,
column: lastToken.loc.end.column
},
end: {
line: lastToken.loc.end.line,
column: lastToken.loc.end.column,
},
column: lastToken.loc.end.column
}
},

@@ -178,3 +183,3 @@ messageId,

return fixer.replaceText(lastToken, token);
},
}
});

@@ -200,6 +205,6 @@ }

TSInterfaceBody: checkMemberSeparatorStyle,
TSTypeLiteral: checkMemberSeparatorStyle,
TSTypeLiteral: checkMemberSeparatorStyle
};
},
}
});
//# sourceMappingURL=member-delimiter-style.js.map
"use strict";
/**
* @fileoverview Enforces naming conventions for class members by visibility.
* @author Ian MacLeod
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -18,6 +22,6 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: false,
recommended: false
},
messages: {
incorrectName: '{{accessibility}} property {{name}} should match {{convention}}.',
incorrectName: '{{accessibility}} property {{name}} should match {{convention}}.'
},

@@ -31,3 +35,3 @@ schema: [

minLength: 1,
format: 'regex',
format: 'regex'
},

@@ -37,3 +41,3 @@ protected: {

minLength: 1,
format: 'regex',
format: 'regex'
},

@@ -43,9 +47,9 @@ private: {

minLength: 1,
format: 'regex',
},
format: 'regex'
}
},
additionalProperties: false,
minProperties: 1,
},
],
minProperties: 1
}
]
},

@@ -74,3 +78,3 @@ defaultOptions: [{}],

messageId: 'incorrectName',
data: { accessibility, name, convention },
data: { accessibility, name, convention }
});

@@ -80,6 +84,6 @@ }

MethodDefinition: validateName,
ClassProperty: validateName,
ClassProperty: validateName
};
},
}
});
//# sourceMappingURL=member-naming.js.map
"use strict";
/**
* @fileoverview Enforces a standard member declaration order.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -35,6 +39,6 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: false,
recommended: false
},
messages: {
incorrectOrder: 'Member {{name}} should be declared before all {{rank}} definitions.',
incorrectOrder: 'Member {{name}} should be declared before all {{rank}} definitions.'
},

@@ -48,3 +52,3 @@ schema: [

{
enum: ['never'],
enum: ['never']
},

@@ -54,6 +58,6 @@ {

items: {
enum: schemaOptions,
},
},
],
enum: schemaOptions
}
}
]
},

@@ -63,3 +67,3 @@ classes: {

{
enum: ['never'],
enum: ['never']
},

@@ -69,6 +73,6 @@ {

items: {
enum: schemaOptions,
},
},
],
enum: schemaOptions
}
}
]
},

@@ -78,3 +82,3 @@ classExpressions: {

{
enum: ['never'],
enum: ['never']
},

@@ -84,6 +88,6 @@ {

items: {
enum: schemaOptions,
},
},
],
enum: schemaOptions
}
}
]
},

@@ -93,3 +97,3 @@ interfaces: {

{
enum: ['never'],
enum: ['never']
},

@@ -99,6 +103,6 @@ {

items: {
enum: ['field', 'method', 'constructor'],
},
},
],
enum: ['field', 'method', 'constructor']
}
}
]
},

@@ -108,3 +112,3 @@ typeLiterals: {

{
enum: ['never'],
enum: ['never']
},

@@ -114,11 +118,11 @@ {

items: {
enum: ['field', 'method', 'constructor'],
},
},
],
},
enum: ['field', 'method', 'constructor']
}
}
]
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -152,5 +156,5 @@ defaultOptions: [

'instance-method',
'method',
],
},
'method'
]
}
],

@@ -160,3 +164,3 @@ create(context, [options]) {

typescript_estree_1.AST_NODE_TYPES.FunctionExpression,
typescript_estree_1.AST_NODE_TYPES.ArrowFunctionExpression,
typescript_estree_1.AST_NODE_TYPES.ArrowFunctionExpression
];

@@ -169,5 +173,2 @@ /**

// TODO: add missing TSCallSignatureDeclaration
// TODO: add missing TSIndexSignature
// TODO: add missing TSAbstractClassProperty
// TODO: add missing TSAbstractMethodDefinition
switch (node.type) {

@@ -238,3 +239,3 @@ case typescript_estree_1.AST_NODE_TYPES.MethodDefinition:

// shouldn't happen but just in case, put it on the end
return order.length - 1;
return Number.MAX_SAFE_INTEGER;
}

@@ -302,4 +303,4 @@ const scope = 'static' in node && node.static ? 'static' : 'instance';

name: getMemberName(member),
rank: getLowestRank(previousRanks, rank, order),
},
rank: getLowestRank(previousRanks, rank, order)
}
});

@@ -326,6 +327,6 @@ }

validateMembers(node.members, options.typeLiterals || options.default, false);
},
}
};
},
}
});
//# sourceMappingURL=member-ordering.js.map
"use strict";
/**
* @fileoverview Enforces the use of `as Type` assertions instead of `<Type>` assertions.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +23,8 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
messages: {
preferAs: "Prefer 'as {{cast}}' instead of '<{{cast}}>' when doing type assertions.",
preferAs: "Prefer 'as {{cast}}' instead of '<{{cast}}>' when doing type assertions."
},
schema: [],
schema: []
},

@@ -36,9 +40,9 @@ defaultOptions: [],

data: {
cast: sourceCode.getText(node.typeAnnotation),
},
cast: sourceCode.getText(node.typeAnnotation)
}
});
},
}
};
},
}
});
//# sourceMappingURL=no-angle-bracket-type-assertion.js.map
"use strict";
/**
* @fileoverview Disallow generic `Array` constructors
* @author Jed Fox
* @author Matt DuVall <http://www.mattduvall.com/>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,9 +24,9 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
fixable: 'code',
messages: {
useLiteral: 'The array literal notation [] is preferrable.',
useLiteral: 'The array literal notation [] is preferrable.'
},
schema: [],
schema: []
},

@@ -49,3 +54,3 @@ defaultOptions: [],

return fixer.replaceText(node, `[${fullText.slice(preambleLength + 1, -1)}]`);
},
}
});

@@ -56,6 +61,6 @@ }

CallExpression: check,
NewExpression: check,
NewExpression: check
};
},
}
});
//# sourceMappingURL=no-array-constructor.js.map
"use strict";
/**
* @fileoverview Disallows the declaration of empty interfaces.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,7 +23,7 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
messages: {
noEmpty: 'An empty interface is equivalent to `{}`.',
noEmptyWithSuper: 'An interface declaring no members is equivalent to its supertype.',
noEmptyWithSuper: 'An interface declaring no members is equivalent to its supertype.'
},

@@ -32,12 +36,12 @@ schema: [

allowSingleExtends: {
type: 'boolean',
},
},
},
],
type: 'boolean'
}
}
}
]
},
defaultOptions: [
{
allowSingleExtends: false,
},
allowSingleExtends: false
}
],

@@ -54,3 +58,3 @@ create(context, [{ allowSingleExtends }]) {

node: node.id,
messageId: 'noEmpty',
messageId: 'noEmpty'
});

@@ -66,10 +70,10 @@ }

node: node.id,
messageId: 'noEmptyWithSuper',
messageId: 'noEmptyWithSuper'
});
}
}
},
}
};
},
}
});
//# sourceMappingURL=no-empty-interface.js.map
"use strict";
/**
* @fileoverview Enforces the any type is not used.
* @author Danny Fritz
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +24,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'warn',
recommended: 'warn'
},
messages: {
unexpectedAny: 'Unexpected any. Specify a different type.',
unexpectedAny: 'Unexpected any. Specify a different type.'
},
schema: [],
schema: []
},

@@ -33,8 +38,8 @@ defaultOptions: [],

node,
messageId: 'unexpectedAny',
messageId: 'unexpectedAny'
});
},
}
};
},
}
});
//# sourceMappingURL=no-explicit-any.js.map
"use strict";
/**
* @fileoverview Forbids the use of classes as namespaces
* @author Jed Fox
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,3 +24,3 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: false,
recommended: false
},

@@ -29,12 +33,12 @@ schema: [

allowConstructorOnly: {
type: 'boolean',
type: 'boolean'
},
allowEmpty: {
type: 'boolean',
type: 'boolean'
},
allowStaticOnly: {
type: 'boolean',
},
},
},
type: 'boolean'
}
}
}
],

@@ -44,4 +48,4 @@ messages: {

onlyStatic: 'Unexpected class with only static properties.',
onlyConstructor: 'Unexpected class with only a constructor.',
},
onlyConstructor: 'Unexpected class with only a constructor.'
}
},

@@ -52,4 +56,4 @@ defaultOptions: [

allowEmpty: false,
allowStaticOnly: false,
},
allowStaticOnly: false
}
],

@@ -70,3 +74,3 @@ create(context, [{ allowConstructorOnly, allowEmpty, allowStaticOnly }]) {

node: reportNode,
messageId: 'empty',
messageId: 'empty'
});

@@ -97,3 +101,3 @@ return;

node: reportNode,
messageId: 'onlyConstructor',
messageId: 'onlyConstructor'
});

@@ -106,9 +110,9 @@ }

node: reportNode,
messageId: 'onlyStatic',
messageId: 'onlyStatic'
});
}
},
}
};
},
}
});
//# sourceMappingURL=no-extraneous-class.js.map
"use strict";
/**
* @fileoverview Disallow iterating over an array with a for-in loop
* @author Benjamin Lichtman
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -22,9 +26,9 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

recommended: false,
tslintName: 'no-for-in-array',
tslintName: 'no-for-in-array'
},
messages: {
forInViolation: 'For-in loops over arrays are forbidden. Use for-of or array.forEach instead.',
forInViolation: 'For-in loops over arrays are forbidden. Use for-of or array.forEach instead.'
},
schema: [],
type: 'problem',
type: 'problem'
},

@@ -44,9 +48,9 @@ defaultOptions: [],

node,
messageId: 'forInViolation',
messageId: 'forInViolation'
});
}
},
}
};
},
}
});
//# sourceMappingURL=no-for-in-array.js.map
"use strict";
/**
* @fileoverview Disallows explicit type declarations for inferrable types
* @author James Garbutt <https://github.com/43081j>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,7 +24,7 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
fixable: 'code',
messages: {
noInferrableType: 'Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.',
noInferrableType: 'Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.'
},

@@ -32,11 +36,11 @@ schema: [

ignoreParameters: {
type: 'boolean',
type: 'boolean'
},
ignoreProperties: {
type: 'boolean',
},
type: 'boolean'
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -46,4 +50,4 @@ defaultOptions: [

ignoreParameters: true,
ignoreProperties: true,
},
ignoreProperties: true
}
],

@@ -115,5 +119,5 @@ create(context, [{ ignoreParameters, ignoreProperties }]) {

data: {
type,
type
},
fix: fixer => fixer.remove(typeNode),
fix: fixer => fixer.remove(typeNode)
});

@@ -152,6 +156,6 @@ }

ArrowFunctionExpression: inferrableParameterVisitor,
ClassProperty: inferrablePropertyVisitor,
ClassProperty: inferrablePropertyVisitor
};
},
}
});
//# sourceMappingURL=no-inferrable-types.js.map
"use strict";
/**
* @fileoverview Enforce valid definition of `new` and `constructor`.
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,3 +24,3 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},

@@ -26,4 +30,4 @@ schema: [],

errorMessageInterface: 'Interfaces cannot be constructed, only classes.',
errorMessageClass: 'Class cannon have method named `new`.',
},
errorMessageClass: 'Class cannon have method named `new`.'
}
},

@@ -70,3 +74,3 @@ defaultOptions: [],

node,
messageId: 'errorMessageInterface',
messageId: 'errorMessageInterface'
});

@@ -78,3 +82,3 @@ }

node,
messageId: 'errorMessageInterface',
messageId: 'errorMessageInterface'
});

@@ -88,10 +92,10 @@ },

node,
messageId: 'errorMessageClass',
messageId: 'errorMessageClass'
});
}
}
},
}
};
},
}
});
//# sourceMappingURL=no-misused-new.js.map
"use strict";
/**
* @fileoverview Disallows the use of custom TypeScript modules and namespaces.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,6 +24,6 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
messages: {
moduleSyntaxIsPreferred: 'ES2015 module syntax is preferred over custom TypeScript modules and namespaces.',
moduleSyntaxIsPreferred: 'ES2015 module syntax is preferred over custom TypeScript modules and namespaces.'
},

@@ -31,11 +35,11 @@ schema: [

allowDeclarations: {
type: 'boolean',
type: 'boolean'
},
allowDefinitionFiles: {
type: 'boolean',
},
type: 'boolean'
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -45,4 +49,4 @@ defaultOptions: [

allowDeclarations: false,
allowDefinitionFiles: true,
},
allowDefinitionFiles: true
}
],

@@ -61,8 +65,8 @@ create(context, [{ allowDeclarations, allowDefinitionFiles }]) {

node,
messageId: 'moduleSyntaxIsPreferred',
messageId: 'moduleSyntaxIsPreferred'
});
},
}
};
},
}
});
//# sourceMappingURL=no-namespace.js.map
"use strict";
/**
* @fileoverview Disallows non-null assertions using the `!` postfix operator.
* @author Macklin Underdown
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +23,8 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
messages: {
noNonNull: 'Forbidden non-null assertion.',
noNonNull: 'Forbidden non-null assertion.'
},
schema: [],
schema: []
},

@@ -33,8 +37,8 @@ defaultOptions: [],

node,
messageId: 'noNonNull',
messageId: 'noNonNull'
});
},
}
};
},
}
});
//# sourceMappingURL=no-non-null-assertion.js.map
"use strict";
/**
* @fileoverview Forbids an object literal to appear in a type assertion expression
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,6 +24,6 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
messages: {
unexpectedTypeAssertion: 'Type assertion on object literals is forbidden, use a type annotation instead.',
unexpectedTypeAssertion: 'Type assertion on object literals is forbidden, use a type annotation instead.'
},

@@ -32,12 +36,12 @@ schema: [

allowAsParameter: {
type: 'boolean',
},
},
},
],
type: 'boolean'
}
}
}
]
},
defaultOptions: [
{
allowAsParameter: false,
},
allowAsParameter: false
}
],

@@ -70,9 +74,9 @@ create(context, [{ allowAsParameter }]) {

node,
messageId: 'unexpectedTypeAssertion',
messageId: 'unexpectedTypeAssertion'
});
}
},
}
};
},
}
});
//# sourceMappingURL=no-object-literal-type-assertion.js.map
"use strict";
/**
* @fileoverview Disallows parameter properties in class constructors.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,6 +24,6 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
messages: {
noParamProp: 'Property {{parameter}} cannot be declared in the constructor.',
noParamProp: 'Property {{parameter}} cannot be declared in the constructor.'
},

@@ -40,16 +44,16 @@ schema: [

'protected readonly',
'public readonly',
],
'public readonly'
]
},
minItems: 1,
},
minItems: 1
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},
defaultOptions: [
{
allows: [],
},
allows: []
}
],

@@ -88,10 +92,10 @@ create(context, [{ allows }]) {

data: {
parameter: name,
},
parameter: name
}
});
}
},
}
};
},
}
});
//# sourceMappingURL=no-parameter-properties.js.map
"use strict";
/**
* @fileoverview Disallows invocation of `require()`.
* @author Kanitkorn Sujautra
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +23,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
schema: [],
messages: {
noRequireImports: 'A `require()` style import is forbidden.',
},
noRequireImports: 'A `require()` style import is forbidden.'
}
},

@@ -33,3 +37,3 @@ defaultOptions: [],

node: node.parent,
messageId: 'noRequireImports',
messageId: 'noRequireImports'
});

@@ -40,8 +44,8 @@ },

node,
messageId: 'noRequireImports',
messageId: 'noRequireImports'
});
},
}
};
},
}
});
//# sourceMappingURL=no-require-imports.js.map
"use strict";
/**
* @fileoverview Disallow aliasing `this`
* @author Jed Fox
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,3 +24,3 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: false,
recommended: false
},

@@ -29,3 +33,3 @@ schema: [

allowDestructuring: {
type: 'boolean',
type: 'boolean'
},

@@ -35,12 +39,12 @@ allowedNames: {

items: {
type: 'string',
},
},
},
},
type: 'string'
}
}
}
}
],
messages: {
thisAssignment: "Unexpected aliasing of 'this' to local variable.",
thisDestructure: "Unexpected aliasing of members of 'this' to local variables.",
},
thisDestructure: "Unexpected aliasing of members of 'this' to local variables."
}
},

@@ -50,4 +54,4 @@ defaultOptions: [

allowDestructuring: false,
allowedNames: [],
},
allowedNames: []
}
],

@@ -69,9 +73,9 @@ create(context, [{ allowDestructuring, allowedNames }]) {

? 'thisAssignment'
: 'thisDestructure',
: 'thisDestructure'
});
}
},
}
};
},
}
});
//# sourceMappingURL=no-this-alias.js.map
"use strict";
/**
* @fileoverview Enforces triple slash references are not used.
* @author Danny Fritz
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,8 +23,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
schema: [],
messages: {
tripleSlashReference: 'Do not use a triple slash reference.',
},
tripleSlashReference: 'Do not use a triple slash reference.'
}
},

@@ -41,10 +45,10 @@ defaultOptions: [],

node: comment,
messageId: 'tripleSlashReference',
messageId: 'tripleSlashReference'
});
}
});
},
}
};
},
}
});
//# sourceMappingURL=no-triple-slash-reference.js.map
"use strict";
/**
* @fileoverview Disallows the use of type aliases.
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,7 +24,7 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: false,
recommended: false
},
messages: {
noTypeAlias: 'Type {{alias}} are not allowed.',
noCompositionAlias: '{{typeName}} in {{compositionType}} types are not allowed.',
noCompositionAlias: '{{typeName}} in {{compositionType}} types are not allowed.'
},

@@ -37,7 +41,7 @@ schema: [

'in-intersections',
'in-unions-and-intersections',
],
'in-unions-and-intersections'
]
},
allowCallbacks: {
enum: ['always', 'never'],
enum: ['always', 'never']
},

@@ -50,4 +54,4 @@ allowLiterals: {

'in-intersections',
'in-unions-and-intersections',
],
'in-unions-and-intersections'
]
},

@@ -60,9 +64,9 @@ allowMappedTypes: {

'in-intersections',
'in-unions-and-intersections',
],
},
'in-unions-and-intersections'
]
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -74,4 +78,4 @@ defaultOptions: [

allowLiterals: 'never',
allowMappedTypes: 'never',
},
allowMappedTypes: 'never'
}
],

@@ -83,3 +87,3 @@ create(context, [{ allowAliases, allowCallbacks, allowLiterals, allowMappedTypes }]) {

'in-intersections',
'in-unions-and-intersections',
'in-unions-and-intersections'
];

@@ -89,3 +93,3 @@ const compositions = [

'in-intersections',
'in-unions-and-intersections',
'in-unions-and-intersections'
];

@@ -95,3 +99,3 @@ const aliasTypes = [

typescript_estree_1.AST_NODE_TYPES.TSTypeReference,
typescript_estree_1.AST_NODE_TYPES.TSLiteralType,
typescript_estree_1.AST_NODE_TYPES.TSLiteralType
];

@@ -163,4 +167,4 @@ /**

data: {
alias: type || 'aliases',
},
alias: type || 'aliases'
}
};

@@ -175,4 +179,4 @@ }

: 'intersection',
typeName: util.upperCaseFirst(type),
},
typeName: util.upperCaseFirst(type)
}
};

@@ -236,6 +240,6 @@ }

}
},
}
};
},
}
});
//# sourceMappingURL=no-type-alias.js.map
"use strict";
/**
* @fileoverview Warns when a namespace qualifier is unnecessary.
* @author Benjamin Lichtman
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -16,2 +20,5 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const util = __importStar(require("../util"));
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
exports.default = util.createRule({

@@ -24,10 +31,10 @@ name: 'no-unnecessary-qualifier',

recommended: false,
tslintName: 'no-unnecessary-qualifier',
tslintName: 'no-unnecessary-qualifier'
},
fixable: 'code',
messages: {
unnecessaryQualifier: "Qualifier is unnecessary since '{{ name }}' is in scope.",
unnecessaryQualifier: "Qualifier is unnecessary since '{{ name }}' is in scope."
},
schema: [],
type: 'suggestion',
type: 'suggestion'
},

@@ -43,2 +50,5 @@ defaultOptions: [],

const sourceCode = context.getSourceCode();
//----------------------------------------------------------------------
// Helpers
//----------------------------------------------------------------------
function tryGetAliasedSymbol(symbol, checker) {

@@ -91,7 +101,7 @@ return tsutils.isSymbolFlagSet(symbol, typescript_1.default.SymbolFlags.Alias)

data: {
name: sourceCode.getText(name),
name: sourceCode.getText(name)
},
fix(fixer) {
return fixer.removeRange([qualifier.range[0], name.range[0]]);
},
}
});

@@ -119,2 +129,5 @@ }

}
//----------------------------------------------------------------------
// Public
//----------------------------------------------------------------------
return {

@@ -139,6 +152,6 @@ TSModuleDeclaration: enterDeclaration,

'TSQualifiedName:exit': resetCurrentNamespaceExpression,
'MemberExpression:exit': resetCurrentNamespaceExpression,
'MemberExpression:exit': resetCurrentNamespaceExpression
};
},
}
});
//# sourceMappingURL=no-unnecessary-qualifier.js.map
"use strict";
/**
* @fileoverview Rule to warn if a type assertion does not change the type of an expression
* @author Benjamin Lichtman
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -23,7 +27,7 @@ if (mod && mod.__esModule) return mod;

recommended: false,
tslintRuleName: 'no-unnecessary-type-assertion',
tslintRuleName: 'no-unnecessary-type-assertion'
},
fixable: 'code',
messages: {
unnecessaryAssertion: 'This assertion is unnecessary since it does not change the type of the expression.',
unnecessaryAssertion: 'This assertion is unnecessary since it does not change the type of the expression.'
},

@@ -37,9 +41,9 @@ schema: [

items: {
type: 'string',
},
},
},
},
type: 'string'
}
}
}
}
],
type: 'suggestion',
type: 'suggestion'
},

@@ -87,5 +91,5 @@ defaultOptions: [{}],

originalNode.expression.end,
originalNode.end,
originalNode.end
]);
},
}
});

@@ -119,9 +123,9 @@ }

originalNode.getStart(),
originalNode.expression.getStart(),
originalNode.expression.getStart()
])
: fixer.removeRange([
originalNode.expression.end,
originalNode.end,
originalNode.end
]);
},
}
});

@@ -140,6 +144,6 @@ }

verifyCast(node, checker);
},
}
};
},
}
});
//# sourceMappingURL=no-unnecessary-type-assertion.js.map
"use strict";
/**
* @fileoverview Prevent TypeScript-specific variables being falsely marked as unused
* @author James Henry
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -24,6 +28,6 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

category: 'Variables',
recommended: 'warn',
recommended: 'warn'
},
schema: no_unused_vars_1.default.meta.schema,
messages: no_unused_vars_1.default.meta.messages,
messages: no_unused_vars_1.default.meta.messages
},

@@ -81,6 +85,6 @@ defaultOptions: [],

}
},
}
});
},
}
});
//# sourceMappingURL=no-unused-vars.js.map
"use strict";
/**
* @fileoverview Rule to flag use of variables before they are defined
* @author Ilya Volodin
* @author Jed Fox
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -129,6 +134,6 @@ if (mod && mod.__esModule) return mod;

category: 'Variables',
recommended: 'error',
recommended: 'error'
},
messages: {
noUseBeforeDefine: "'{{name}}' was used before it was defined.",
noUseBeforeDefine: "'{{name}}' was used before it was defined."
},

@@ -139,3 +144,3 @@ schema: [

{
enum: ['nofunc'],
enum: ['nofunc']
},

@@ -148,9 +153,9 @@ {

variables: { type: 'boolean' },
typedefs: { type: 'boolean' },
typedefs: { type: 'boolean' }
},
additionalProperties: false,
},
],
},
],
additionalProperties: false
}
]
}
]
},

@@ -162,4 +167,4 @@ defaultOptions: [

variables: true,
typedefs: true,
},
typedefs: true
}
],

@@ -209,3 +214,3 @@ create(context, optionsWithDefault) {

messageId: 'noUseBeforeDefine',
data: reference.identifier,
data: reference.identifier
});

@@ -218,6 +223,6 @@ });

findVariablesInScope(context.getScope());
},
}
};
},
}
});
//# sourceMappingURL=no-use-before-define.js.map
"use strict";
/**
* @fileoverview Disallow unnecessary constructors
* @author Armano <https://github.com/armano2>
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -50,6 +54,6 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

category: 'Best Practices',
recommended: false,
recommended: false
},
schema: no_useless_constructor_1.default.meta.schema,
messages: no_useless_constructor_1.default.meta.messages,
messages: no_useless_constructor_1.default.meta.messages
},

@@ -67,6 +71,6 @@ defaultOptions: [],

}
},
}
};
},
}
});
//# sourceMappingURL=no-useless-constructor.js.map
"use strict";
/**
* @fileoverview Disallows the use of require statements except in import statements.
* @author Macklin Underdown
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,8 +24,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
messages: {
noVarReqs: 'Require statement not part of import statement.',
noVarReqs: 'Require statement not part of import statement.'
},
schema: [],
schema: []
},

@@ -38,9 +42,9 @@ defaultOptions: [],

node,
messageId: 'noVarReqs',
messageId: 'noVarReqs'
});
}
},
}
};
},
}
});
//# sourceMappingURL=no-var-requires.js.map
"use strict";
/**
* @fileoverview Use function types instead of interfaces with call signatures
* @author Benjamin Lichtman
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,10 +23,10 @@ if (mod && mod.__esModule) return mod;

recommended: false,
tslintName: 'callable-types',
tslintName: 'callable-types'
},
fixable: 'code',
messages: {
functionTypeOverCallableType: "{{ type }} has only a call signature - use '{{ sigSuggestion }}' instead.",
functionTypeOverCallableType: "{{ type }} has only a call signature - use '{{ sigSuggestion }}' instead."
},
schema: [],
type: 'suggestion',
type: 'suggestion'
},

@@ -107,7 +111,7 @@ defaultOptions: [],

: 'Interface',
sigSuggestion: suggestion,
sigSuggestion: suggestion
},
fix(fixer) {
return fixer.replaceTextRange([fixStart, node.range[1]], suggestion);
},
}
});

@@ -124,6 +128,6 @@ }

checkMember(node.members[0], node);
},
}
};
},
}
});
//# sourceMappingURL=prefer-function-type.js.map
"use strict";
/**
* @fileoverview Prefer an interface declaration over a type literal (type T = { ... })
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,9 +23,9 @@ if (mod && mod.__esModule) return mod;

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},
fixable: 'code',
messages: {
interfaceOverType: 'Use an interface instead of a type literal.',
interfaceOverType: 'Use an interface instead of a type literal.'
},
schema: [],
schema: []
},

@@ -52,8 +56,8 @@ defaultOptions: [],

return fixes;
},
}
});
},
}
};
},
}
});
//# sourceMappingURL=prefer-interface.js.map
"use strict";
/**
* @fileoverview Enforces the use of the keyword `namespace` over `module` to declare custom TypeScript modules.
* @author Patricio Trevino
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,9 +25,9 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
fixable: 'code',
messages: {
useNamespace: "Use 'namespace' instead of 'module' to declare custom TypeScript modules.",
useNamespace: "Use 'namespace' instead of 'module' to declare custom TypeScript modules."
},
schema: [],
schema: []
},

@@ -48,9 +53,9 @@ defaultOptions: [],

return fixer.replaceText(moduleType, 'namespace');
},
}
});
}
},
}
};
},
}
});
//# sourceMappingURL=prefer-namespace-keyword.js.map
"use strict";
/**
* @fileoverview Requires any function or method that returns a Promise to be marked async
* @author Josh Goldberg <https://github.com/joshuakgoldberg>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,6 +23,6 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: 'error',
recommended: 'error'
},
messages: {
missingAsync: 'Functions that return promises must be async.',
missingAsync: 'Functions that return promises must be async.'
},

@@ -32,21 +36,21 @@ schema: [

items: {
type: 'string',
},
type: 'string'
}
},
checkArrowFunctions: {
type: 'boolean',
type: 'boolean'
},
checkFunctionDeclarations: {
type: 'boolean',
type: 'boolean'
},
checkFunctionExpressions: {
type: 'boolean',
type: 'boolean'
},
checkMethodDeclarations: {
type: 'boolean',
},
type: 'boolean'
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -59,9 +63,9 @@ defaultOptions: [

checkFunctionExpressions: true,
checkMethodDeclarations: true,
},
checkMethodDeclarations: true
}
],
create(context, [{ allowedPromiseNames, checkArrowFunctions, checkFunctionDeclarations, checkFunctionExpressions, checkMethodDeclarations, },]) {
create(context, [{ allowedPromiseNames, checkArrowFunctions, checkFunctionDeclarations, checkFunctionExpressions, checkMethodDeclarations }]) {
const allAllowedPromiseNames = new Set([
'Promise',
...allowedPromiseNames,
...allowedPromiseNames
]);

@@ -84,3 +88,3 @@ const parserServices = util.getParserServices(context);

messageId: 'missingAsync',
node,
node
});

@@ -110,6 +114,6 @@ }

}
},
}
};
},
}
});
//# sourceMappingURL=promise-function-async.js.map
"use strict";
/**
* @fileoverview Enforce giving `compare` argument to `Array#sort`
* @author Toru Nagashima <https://github.com/mysticatea>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -20,8 +24,8 @@ if (mod && mod.__esModule) return mod;

category: 'Best Practices',
recommended: false,
recommended: false
},
messages: {
requireCompare: "Require 'compare' argument.",
requireCompare: "Require 'compare' argument."
},
schema: [],
schema: []
},

@@ -49,6 +53,6 @@ create(context) {

}
},
}
};
},
}
});
//# sourceMappingURL=require-array-sort-compare.js.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
/**
* @fileoverview When adding two variables, operands must both be of type number or of type string.
* @author James Henry
* @author Armano <https://github.com/armano2>
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -13,3 +15,2 @@ if (mod && mod.__esModule) return mod;

Object.defineProperty(exports, "__esModule", { value: true });
const typescript_1 = __importDefault(require("typescript"));
const util = __importStar(require("../util"));

@@ -24,10 +25,9 @@ exports.default = util.createRule({

category: 'Best Practices',
recommended: false,
recommended: false
},
messages: {
notNumbers: "Operands of '+' operation must either be both strings or both numbers.",
notStrings: "Operands of '+' operation must either be both strings or both numbers. Consider using a template literal.",
notBigInts: "Operands of '+' operation must be both bigints.",
notStrings: "Operands of '+' operation must either be both strings or both numbers. Consider using a template literal."
},
schema: [],
schema: []
},

@@ -50,6 +50,2 @@ defaultOptions: [],

}
// is BigIntLiteral
if (type.flags & typescript_1.default.TypeFlags.BigIntLiteral) {
return 'bigint';
}
if (type.isUnion()) {

@@ -84,22 +80,16 @@ const types = type.types.map(getBaseTypeOfLiteralType);

node,
messageId: 'notStrings',
messageId: 'notStrings'
});
}
else if (leftType === 'bigint' || rightType === 'bigint') {
context.report({
node,
messageId: 'notBigInts',
});
}
else {
context.report({
node,
messageId: 'notNumbers',
messageId: 'notNumbers'
});
}
}
},
}
};
},
}
});
//# sourceMappingURL=restrict-plus-operands.js.map
"use strict";
/**
* @fileoverview Enforces spacing around type annotations.
* @author Nicholas C. Zakas
* @author Patricio Trevino
*/
var __importStar = (this && this.__importStar) || function (mod) {

@@ -15,5 +20,5 @@ if (mod && mod.__esModule) return mod;

before: { type: 'boolean' },
after: { type: 'boolean' },
after: { type: 'boolean' }
},
additionalProperties: false,
additionalProperties: false
};

@@ -28,3 +33,3 @@ exports.default = util.createRule({

category: 'Stylistic Issues',
recommended: 'error',
recommended: 'error'
},

@@ -36,3 +41,3 @@ fixable: 'whitespace',

unexpectedSpaceAfter: "Unexpected a space after the '{{type}}'.",
unexpectedSpaceBefore: "Unexpected a space before the '{{type}}'.",
unexpectedSpaceBefore: "Unexpected a space before the '{{type}}'."
},

@@ -49,10 +54,10 @@ schema: [

colon: definition,
arrow: definition,
arrow: definition
},
additionalProperties: false,
},
additionalProperties: false
}
},
additionalProperties: false,
},
],
additionalProperties: false
}
]
},

@@ -62,3 +67,3 @@ defaultOptions: [

// that if we apply them here, it will break the no override case.
{},
{}
],

@@ -105,7 +110,7 @@ create(context, [options]) {

data: {
type,
type
},
fix(fixer) {
return fixer.insertTextAfter(punctuatorTokenEnd, ' ');
},
}
});

@@ -118,3 +123,3 @@ }

data: {
type,
type
},

@@ -124,5 +129,5 @@ fix(fixer) {

punctuatorTokenEnd.range[1],
nextToken.range[0],
nextToken.range[0]
]);
},
}
});

@@ -135,7 +140,7 @@ }

data: {
type,
type
},
fix(fixer) {
return fixer.insertTextAfter(previousToken, ' ');
},
}
});

@@ -148,3 +153,3 @@ }

data: {
type,
type
},

@@ -154,5 +159,5 @@ fix(fixer) {

previousToken.range[1],
punctuatorTokenStart.range[0],
punctuatorTokenStart.range[0]
]);
},
}
});

@@ -169,6 +174,6 @@ }

checkTypeAnnotationSpacing(node.typeAnnotation);
},
}
};
},
}
});
//# sourceMappingURL=type-annotation-spacing.js.map

@@ -8,5 +8,5 @@ "use strict";

// TODO - when the above rule lands; add type checking for the context.report `data` property
function createRule({ name, meta, defaultOptions, create, }) {
function createRule({ name, meta, defaultOptions, create }) {
return {
meta: Object.assign({}, meta, { docs: Object.assign({}, meta.docs, { url: `https://github.com/typescript-eslint/typescript-eslint/blob/v${version}/packages/eslint-plugin/docs/rules/${name}.md`, extraDescription: meta.docs.tslintName
meta: Object.assign({}, meta, { docs: Object.assign({}, meta.docs, { url: `https://github.com/typescript-eslint/typescript-eslint/blob/${version}/packages/eslint-plugin/docs/rules/${name}.md`, extraDescription: meta.docs.tslintName
? [`\`${meta.docs.tslintName}\` from TSLint`]

@@ -17,3 +17,3 @@ : undefined }) }),

return create(context, optionsWithDefault);
},
}
};

@@ -20,0 +20,0 @@ }

{
"name": "@typescript-eslint/eslint-plugin",
"version": "1.4.1-alpha.6+9a88363",
"version": "1.4.1",
"description": "TypeScript plugin for ESLint",

@@ -38,4 +38,4 @@ "keywords": [

"dependencies": {
"@typescript-eslint/parser": "1.4.1-alpha.6+9a88363",
"@typescript-eslint/typescript-estree": "1.4.1-alpha.6+9a88363",
"@typescript-eslint/parser": "1.4.1",
"@typescript-eslint/typescript-estree": "1.4.1",
"requireindex": "^1.2.0",

@@ -51,3 +51,3 @@ "tsutils": "^3.7.0"

},
"gitHead": "9a883635a4b0cbf759d1ae791398933d6fb0d614"
"gitHead": "d362c4a2051ff4128388fc515ba2f07f0ca1a3aa"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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