chore: add tslint
This commit is contained in:
Родитель
a50cd9cbdd
Коммит
c471896881
|
@ -14,12 +14,12 @@
|
|||
"start": "webpack --mode production",
|
||||
"dev": "webpack --watch --mode development --config webpack.config.js",
|
||||
"jsxc": "cd node_modules/jsxc/ && webpack --watch --mode development",
|
||||
"fix-typescript-format": "node_modules/.bin/tsfmt -r",
|
||||
"checking-typescript-format": "node_modules/.bin/tsfmt --verify"
|
||||
"fix-typescript-format": "tslint -c tslint.json \"ts/**/*.ts\" --fix",
|
||||
"checking-typescript-format": "tslint -c tslint.json \"ts/**/*.ts\""
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "vendor/bin/php-cs-fixer fix --dry-run && vendor/bin/phpunit -c phpunit.xml",
|
||||
"pre-commit": "yarn checking-typescript-format && vendor/bin/php-cs-fixer fix --dry-run && vendor/bin/phpunit -c phpunit.xml",
|
||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS "
|
||||
}
|
||||
},
|
||||
|
@ -48,6 +48,7 @@
|
|||
"dependencies": {
|
||||
"@jsxc/jsxc": "^4.0.0-beta.4",
|
||||
"libsignal-protocol": "https://github.com/signalapp/libsignal-protocol-javascript",
|
||||
"tslint": "^5.19.0",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"quotemark": [true, "single"],
|
||||
"prefer-const": false,
|
||||
"trailing-comma": false,
|
||||
"semicolon": [true, "always"],
|
||||
"ordered-imports": false,
|
||||
"member-ordering": false,
|
||||
"arrow-parens": false,
|
||||
"no-angle-bracket-type-assertion": false,
|
||||
"comment-format": false,
|
||||
"max-line-length": false,
|
||||
"only-arrow-functions": false,
|
||||
"unified-signatures": false,
|
||||
"interface-name": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"max-classes-per-file": false,
|
||||
"no-console": false,
|
||||
"no-bitwise": false,
|
||||
"no-shadowed-variable": false,
|
||||
"no-var-requires": false,
|
||||
"no-unused-expression": [true, "allow-new"],
|
||||
"forin": false,
|
||||
"no-empty": false,
|
||||
"ban-types": false
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
19
yarn.lock
19
yarn.lock
|
@ -5563,6 +5563,25 @@ tslint@^5.18.0:
|
|||
tslib "^1.8.0"
|
||||
tsutils "^2.29.0"
|
||||
|
||||
tslint@^5.19.0:
|
||||
version "5.19.0"
|
||||
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.19.0.tgz#a2cbd4a7699386da823f6b499b8394d6c47bb968"
|
||||
integrity sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.0.0"
|
||||
builtin-modules "^1.1.1"
|
||||
chalk "^2.3.0"
|
||||
commander "^2.12.1"
|
||||
diff "^3.2.0"
|
||||
glob "^7.1.1"
|
||||
js-yaml "^3.13.1"
|
||||
minimatch "^3.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
resolve "^1.3.2"
|
||||
semver "^5.3.0"
|
||||
tslib "^1.8.0"
|
||||
tsutils "^2.29.0"
|
||||
|
||||
tsutils@^2.29.0:
|
||||
version "2.29.0"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
|
||||
|
|
Загрузка…
Ссылка в новой задаче