75 строки
2.5 KiB
JSON
75 строки
2.5 KiB
JSON
{
|
|
"extends": ["tslint-microsoft-contrib"],
|
|
"rules": {
|
|
// coding style
|
|
"align": [true, "elements", "members", "statements"],
|
|
"ban-types": [true, ["Object", "Strong typing preferred"], ["AnyAction"]],
|
|
"function-name": [true, {
|
|
"static-method-regex": "^[a-z][\\w\\d]+$"
|
|
}],
|
|
"quotemark": [true, "double"],
|
|
"linebreak-style": false,
|
|
"max-func-body-length": false,
|
|
"max-line-length": false,
|
|
"member-ordering": [true, {"order": [
|
|
"public-static-field",
|
|
"public-instance-field",
|
|
"protected-static-field",
|
|
"protected-instance-field",
|
|
"private-static-field",
|
|
"private-instance-field",
|
|
"public-constructor",
|
|
"protected-constructor",
|
|
"private-constructor",
|
|
"public-static-method",
|
|
"public-instance-method",
|
|
"protected-static-method",
|
|
"private-static-method",
|
|
"protected-instance-method",
|
|
"private-instance-method"
|
|
] }],
|
|
"newline-before-return": false,
|
|
"newline-per-chained-call": false,
|
|
"no-consecutive-blank-lines": [true, 2],
|
|
"typedef": [true, "parameter", "property-declaration", "member-variable-declaration", "array-destructuring"],
|
|
"variable-name": [true, "allow-pascal-case", "ban-keywords"],
|
|
|
|
// modules
|
|
"export-name": false,
|
|
"import-name": false,
|
|
"no-submodule-imports": false,
|
|
"no-relative-imports": false,
|
|
"no-default-export": false,
|
|
"no-import-side-effect": [true, {"ignore-module": "(\\.png|\\.jpg|\\.svg|\\.css|\\.scss)$"}],
|
|
"no-implicit-dependencies": [true, "dev"],
|
|
"ordered-imports": false,
|
|
|
|
// documentation
|
|
"completed-docs": false,
|
|
"missing-jsdoc": false,
|
|
|
|
// best practices
|
|
"no-floating-promises": true,
|
|
"no-increment-decrement": false,
|
|
"no-null-keyword": false,
|
|
"no-parameter-reassignment": false,
|
|
"no-unsafe-any": false,
|
|
"no-unused-expression": [true, "allow-fast-null-checks", "allow-new"],
|
|
"no-void-expression": [true, "ignore-arrow-function-shorthand"],
|
|
"jsx-no-lambda": false,
|
|
"jsx-no-multiline-js": false,
|
|
"strict-boolean-expressions": false,
|
|
"underscore-consistent-invocation": false,
|
|
"use-simple-attributes": false,
|
|
"no-console": false,
|
|
|
|
// tests
|
|
"mocha-no-side-effect-code": false
|
|
},
|
|
"linterOptions": {
|
|
"exclude": [
|
|
"*.js",
|
|
"node_modules/**/*.ts"
|
|
]
|
|
}
|
|
} |