storj/web/satellite/tslint.json
2018-12-06 14:12:09 +02:00

81 lines
3.2 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"defaultSeverity": "warning",
"extends": [
"tslint:recommended"
],
"rulesDirectory": [
"tslint-consistent-codestyle"
],
"linterOptions": {
"exclude": [
"node_modules/**"
]
},
"rules": {
// Enforces function overloads to be consecutive.
"adjacent-overload-signatures": true,
// Enforces vertical alignment.
"align": [true, "parameters", "statements"],
// Enforces use of T[] if T is a simple type.
"array-type": [true, "array-simple"],
// Enforces PascalCased class and interface names.
"class-name": true,
// Enforces formatting rules for single-line comments.
"comment-format": [true, "check-space"],
"quotemark": [true, "single"],
"indent": [true, "tabs", 4],
// Ensures the file ends with a newline.
"eofline": true,
// Ensures proper spacing between import statement keywords.
"import-spacing": true,
"interface-name": false,
"ordered-imports": false,
// Enforces consistent semicolon usage at the end of every statement.
"semicolon": [true, "always"],
// Enforces braces for if/for/do/while statements.
"curly": [true, "ignore-same-line"],
// Enforces blank line before return when not the only line in the block.
"newline-before-return": true,
// Disallows multiple variable definitions in the same declaration statement.(Exception for loops)
"one-variable-per-declaration": [true, "ignore-for-loop"],
"object-literal-sort-keys": false,
// Enforces whitespace style conventions.
"file-header": [true,
"// Copyright (C) 2018 Storj Labs, Inc.\n// See LICENSE for copying information.\n"
],
"whitespace": [
true,
"check-branch", // checks branching statements (if/else/for/while) are followed by whitespace.
"check-decl", // checks that variable declarations have whitespace around the equals token.
"check-operator", // checks for whitespace around operator tokens.
"check-module", // checks for whitespace in import & export statements.
"check-separator", // checks for whitespace after separator tokens (,/;).
"check-type-operator", // checks for whitespace between type operators | and &.
"check-preblock" // checks for whitespace before the opening brace of a block.
],
// Recommends to use an early exit instead of a long if block.
"early-exit": true,
// Bans the use of specified console methods.
"no-console": [true, "log"],
"no-default-export": true,
// Ban the use of this in static methods.
"no-static-this": true,
// Warns if super() appears twice in a constructor.
"no-duplicate-super": true,
// Disallows any type of assignment in conditionals.
"no-conditional-assignment": true,
// Disallows the use constant number values outside of variable assignments.
"no-magic-numbers": true,
// Prevents duplicate cases in switch statements.
"no-duplicate-switch-case": true,
// Disallows empty blocks.
"no-empty": true,
// Disallows two or more blank lines in a row.
"no-consecutive-blank-lines": [true, 2],
// Warns on use of ${ in non-template strings.
"no-invalid-template-strings": true,
// Disallows using the this keyword outside of classes.
"no-invalid-this": true
}
}