add lint to build

This commit is contained in:
Boris Cherny
2018-06-21 13:26:06 +03:00
parent 4447c1967a
commit aa05594395
3 changed files with 65 additions and 18 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export function react2angular<Props>(
bindings: fromPairs(names.map(_ => [_, '<'])),
controller: ['$element', ...injectNames, class extends NgComponent<Props> {
static get $$ngIsClass() {
return true;
return true
}
injectedProps: { [name: string]: any }
constructor(private $element: IAugmentedJQuery, ...injectedProps: any[]) {
+2 -1
View File
@@ -6,8 +6,9 @@
"main:esnext": "index.es2015.js",
"typings": "index.d.ts",
"scripts": {
"build": "npm run clean; tsc -d -t es2015 && mv ./index.js ./index.es2015.js && tsc -t es5",
"build": "npm run clean && npm run lint && tsc -d -t es2015 && mv ./index.js ./index.es2015.js && tsc -t es5",
"clean": "rm ./*.d.ts; rm ./*.map; exit 0",
"lint": "tslint -p ./tsconfig.json index.tsx test.tsx",
"pretest": "npm run build",
"prepublishOnly": "npm test",
"test": "karma start --single-run",
+62 -16
View File
@@ -1,17 +1,27 @@
{
"rules": {
"class-name": true,
"comment-format": [true, "check-space"],
"comment-format": [
true,
"check-space"
],
"eofline": true,
"indent": [true, "spaces"],
"linebreak-style": [true, "LF"],
"indent": [
true,
"spaces"
],
"linebreak-style": [
true,
"LF"
],
"member-access": false,
"no-angle-bracket-type-assertion": true,
"no-bitwise": true,
"no-consecutive-blank-lines": [true],
"no-consecutive-blank-lines": [
true
],
"no-debugger": true,
"no-default-export": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-eval": true,
"no-internal-module": true,
@@ -19,20 +29,56 @@
"no-reference": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-unused-new": true,
"no-unused-variable": true,
"no-var-keyword": true,
"object-literal-key-quotes": [true, "as-needed"],
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-shorthand": true,
"object-literal-sort-keys": true,
"one-line": [true, "check-catch", "check-finally", "check-else", "check-open-brace"],
"one-variable-per-declaration": [true, "ignore-for-loop"],
"ordered-imports": [true],
"quotemark": [true, "single"],
"semicolon": [true, "never"],
"trailing-comma": [true, {"multiline": "never", "singleline": "never"}],
"triple-equals": [true, "allow-null-check"],
"one-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace"
],
"one-variable-per-declaration": [
true,
"ignore-for-loop"
],
"ordered-imports": [
true
],
"quotemark": [
true,
"single"
],
"semicolon": [
true,
"never"
],
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never"
}
],
"triple-equals": [
true,
"allow-null-check"
],
"use-isnan": true,
"whitespace": [true, "check-branch", "check-decl", "check-module", "check-operator", "check-separator", "check-type"]
"whitespace": [
true,
"check-branch",
"check-decl",
"check-module",
"check-operator",
"check-separator",
"check-type"
]
}
}
}