2018-03-26 18:44:45 +00:00
|
|
|
{
|
2018-04-05 19:21:22 +00:00
|
|
|
"defaultSeverity": "error",
|
2018-05-04 20:08:26 +00:00
|
|
|
"extends": ["tslint:recommended", "tslint-react"],
|
2018-04-05 19:21:22 +00:00
|
|
|
"jsRules": {},
|
|
|
|
"rules": {
|
2018-05-04 20:08:26 +00:00
|
|
|
"align": [
|
|
|
|
true,
|
|
|
|
"arguments",
|
|
|
|
"elements",
|
|
|
|
"members",
|
|
|
|
"parameters",
|
|
|
|
"statements"
|
|
|
|
],
|
2018-04-09 23:13:39 +00:00
|
|
|
"array-type": [true, "generic"],
|
2018-04-14 02:06:55 +00:00
|
|
|
|
|
|
|
// Preferred by Prettier:
|
|
|
|
"arrow-parens": [true, "ban-single-arg-parens"],
|
|
|
|
|
2018-04-13 14:55:08 +00:00
|
|
|
"import-spacing": false,
|
2018-04-13 19:50:55 +00:00
|
|
|
"indent": [true, "spaces", 2],
|
2018-04-11 15:02:42 +00:00
|
|
|
"interface-name": [true, "never-prefix"],
|
2018-04-14 02:07:20 +00:00
|
|
|
|
|
|
|
// Allows us to write inline `style`s. Revisit when we have a more sophisticated
|
|
|
|
// CSS-in-JS solution:
|
|
|
|
"jsx-no-multiline-js": false,
|
|
|
|
|
2018-04-13 19:51:09 +00:00
|
|
|
"linebreak-style": [true, "LF"],
|
2018-04-14 02:06:55 +00:00
|
|
|
|
|
|
|
// Ignore `import`s to allow Prettier formatting:
|
2018-05-04 20:08:26 +00:00
|
|
|
"max-line-length": [true, { "limit": 90, "ignore-pattern": "^import" }],
|
2018-04-11 23:45:48 +00:00
|
|
|
|
|
|
|
"mocha-avoid-only": true,
|
|
|
|
// Disabled until we can allow dynamically generated tests:
|
|
|
|
// https://github.com/Microsoft/tslint-microsoft-contrib/issues/85#issuecomment-371749352
|
|
|
|
"mocha-no-side-effect-code": false,
|
|
|
|
"mocha-unneeded-done": true,
|
|
|
|
|
2018-04-05 19:21:22 +00:00
|
|
|
"no-consecutive-blank-lines": [true, 2],
|
2018-04-11 15:02:42 +00:00
|
|
|
"object-literal-key-quotes": [true, "as-needed"],
|
|
|
|
"object-literal-sort-keys": false,
|
|
|
|
|
|
|
|
// Ignore import sources order until we can specify that we want ordering
|
|
|
|
// based on import name vs module name:
|
2018-05-04 20:08:26 +00:00
|
|
|
"ordered-imports": [
|
|
|
|
true,
|
|
|
|
{
|
|
|
|
"import-sources-order": "any",
|
|
|
|
"named-imports-order": "case-insensitive"
|
|
|
|
}
|
|
|
|
],
|
2018-04-11 15:02:42 +00:00
|
|
|
|
2018-05-04 20:08:26 +00:00
|
|
|
"quotemark": [
|
|
|
|
true,
|
|
|
|
"single",
|
|
|
|
"jsx-double",
|
|
|
|
"avoid-template",
|
|
|
|
"avoid-escape"
|
|
|
|
],
|
2018-04-14 02:06:55 +00:00
|
|
|
|
|
|
|
// Preferred by Prettier:
|
|
|
|
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
2018-04-11 15:02:42 +00:00
|
|
|
|
2018-04-14 02:06:55 +00:00
|
|
|
// Preferred by Prettier:
|
|
|
|
"trailing-comma": [
|
|
|
|
true,
|
|
|
|
{
|
|
|
|
"singleline": "never",
|
|
|
|
"multiline": {
|
|
|
|
"objects": "always",
|
|
|
|
"arrays": "always",
|
|
|
|
"functions": "never",
|
|
|
|
"typeLiterals": "always"
|
|
|
|
},
|
|
|
|
"esSpecCompliant": true
|
|
|
|
}
|
|
|
|
]
|
2018-04-05 19:21:22 +00:00
|
|
|
},
|
2018-05-04 20:08:26 +00:00
|
|
|
"rulesDirectory": ["node_modules/tslint-microsoft-contrib"]
|
2018-03-26 18:44:45 +00:00
|
|
|
}
|