-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for linting .ts and .tsx files
Connects to #3 change-type: minor
- Loading branch information
1 parent
d006858
commit 960e2fe
Showing
6 changed files
with
136 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[package.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[.babelrc] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"extends": "tslint:recommended", | ||
"rules": { | ||
"indent": [ true, "tabs" ], | ||
"jsdoc-format": true, | ||
"whitespace": [ | ||
false, | ||
"check-type" | ||
], | ||
"object-literal-sort-keys": false, | ||
"only-arrow-functions": [false], | ||
"quotemark": [true, "single", "avoid-escape", "jsx-double"], | ||
"max-classes-per-file": [false], | ||
"max-line-length": [180], | ||
"member-access": false, | ||
"member-ordering": [false], | ||
"no-consecutive-blank-lines": false, | ||
"no-shadowed-variable": false, | ||
"no-var-requires": true, | ||
"arrow-parens": false, | ||
"no-angle-bracket-type-assertion": false, | ||
"no-console": [false], | ||
"no-empty-interface": false, | ||
"no-string-literal": false, | ||
"object-literal-key-quotes": [true, "as-needed"], | ||
"interface-name": [false], | ||
"interface-over-type-literal": false, | ||
"variable-name": [ | ||
true, | ||
"ban-keywords", | ||
"check-format", | ||
"allow-leading-underscore", | ||
"allow-pascal-case" | ||
], | ||
"semicolon": [true, "always", "ignore-bound-class-methods"], | ||
"trailing-comma": [ | ||
true, | ||
{ | ||
"multiline": { | ||
"objects": "always", | ||
"arrays": "always", | ||
"functions": "always", | ||
"typeLiterals": "ignore" | ||
}, | ||
"esSpecCompliant": true | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
"url": "[email protected]:resin-io/node-resin-lint" | ||
}, | ||
"scripts": { | ||
"test": "./bin/resin-lint test/", | ||
"test": "./bin/resin-lint test/ && ./bin/resin-lint test/ --typescript", | ||
"prepublish": "npm run lint lib/", | ||
"lint": "./bin/resin-lint" | ||
}, | ||
|
@@ -29,7 +29,9 @@ | |
"depcheck": "^0.6.7", | ||
"glob": "^7.0.3", | ||
"merge": "^1.2.0", | ||
"optimist": "^0.6.1" | ||
"optimist": "^0.6.1", | ||
"tslint": "^5.8.0", | ||
"typescript": "^2.6.2" | ||
}, | ||
"devDependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const fn = () => ({ | ||
a: 1, | ||
b: 2, | ||
}); | ||
|
||
const { a, b } = fn(); | ||
|
||
console.log(a, b); |