Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

No object literal type assertion #34

Merged
3 commits merged into from
May 6, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions dt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"extends": "./dtslint.json",
"rules": {
"dt-header": true,
"no-bad-reference": true
}
"extends": "./dtslint.json",
"rules": {
// TODO: enable and fix these
"prefer-const": false,
"no-object-literal-type-assertion": false,

"dt-header": true,
"no-bad-reference": true
}
}
133 changes: 65 additions & 68 deletions dtslint.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,72 @@
{
"extends": "tslint:latest",
"rulesDirectory": "./bin/rules",
"rules": {
// Wait on 5.2 release (https://github.com/palantir/tslint/pull/2391)
"prefer-const": false,

// Custom rules
"expect": true,
"export-just-namespace": true,
"no-bad-reference": true,
"no-dead-reference": true,
"no-padding": true,
"no-relative-import-in-test": true,
"strict-export-declare-modifiers": true,
"no-single-declare-module": true,
"extends": "tslint:latest",
"rulesDirectory": "./bin/rules",
"rules": {
// Custom rules
"expect": true,
"export-just-namespace": true,
"no-bad-reference": true,
"no-dead-reference": true,
"no-padding": true,
"no-relative-import-in-test": true,
"strict-export-declare-modifiers": true,
"no-single-declare-module": true,
"no-useless-files": true,
"prefer-declare-function": true,
"trim-file": true,
"unified-signatures": true,
"void-return": true,
"prefer-declare-function": true,
"trim-file": true,
"unified-signatures": true,
"void-return": true,

"no-var-keyword": false,
"no-var": true,
"no-var-keyword": false,
"no-var": true,

"interface-name": [true, "never-prefix"],
"max-line-length": [true, 200],
"member-access": [true, "no-public"],
"no-consecutive-blank-lines": true,
"no-unnecessary-callback-wrapper": true,
"no-namespace": [true, "allow-declarations"],
"object-literal-key-quotes": [true, "as-needed"],
"one-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace",
"check-whitespace"
],
"prefer-method-signature": true,
"whitespace": [
"interface-name": [true, "never-prefix"],
"max-line-length": [true, 200],
"member-access": [true, "no-public"],
"no-consecutive-blank-lines": true,
"no-unnecessary-callback-wrapper": true,
"no-namespace": [true, "allow-declarations"],
"object-literal-key-quotes": [true, "as-needed"],
"one-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace",
"check-whitespace"
],
"prefer-method-signature": true,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-type",
"check-typecast"
],
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-type",
"check-typecast"
],

"arrow-parens": false,
"class-name": false,
"curly": false,
"forin": false,
"indent": false,
"max-classes-per-file": false,
"member-ordering": false,
"no-angle-bracket-type-assertion": false,
"no-bitwise": false,
"no-console": false,
"no-empty": false,
"no-reference": false, // But see no-bad-reference
"no-shadowed-variable": false,
"no-string-literal": false,
"no-unused-expression": false,
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": false,
"switch-default": false,
"trailing-comma": false,
"variable-name": false
}
"arrow-parens": false,
"class-name": false,
"curly": false,
"forin": false,
"indent": false,
"max-classes-per-file": false,
"member-ordering": false,
"no-angle-bracket-type-assertion": false,
"no-bitwise": false,
"no-console": false,
"no-empty": false,
"no-reference": false, // But see no-bad-reference
"no-shadowed-variable": false,
"no-string-literal": false,
"no-unused-expression": false,
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": false,
"switch-default": false,
"trailing-comma": false,
"variable-name": false
}
}
30 changes: 15 additions & 15 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es2017"],
"outDir": "bin",
"sourceMap": true,
"newLine": "LF",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es2017"],
"outDir": "bin",
"sourceMap": true,
"newLine": "LF",

"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true
},
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true
},
"include": ["src"]
}
1 change: 0 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

"no-console": false,
"no-namespace": false,
"no-object-literal-type-assertion": false,
"object-literal-sort-keys": false,
"switch-default": false
}
Expand Down