mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-24 15:19:17 -05:00
Probably the most controversial change here is that I have a max line length limit, currently set to 140 columns. Lines that set up a string buffer, lines involving regexes, and the text parser's replace chains are excluded from the limit. PS has otherwise been moving towards a line length limit, it just hasn't been linter-enforced yet. I worry about contributors being annoyed by it, especially since it's not like it's handled automatically by Prettier or something. Oh well, it's set to "warning" so Travis won't yell about it.
54 lines
2.0 KiB
JSON
54 lines
2.0 KiB
JSON
{
|
|
"extends": "tslint:latest",
|
|
"defaultSeverity": "error",
|
|
"jsRules": {},
|
|
"rules": {
|
|
"array-type": [true, "array"],
|
|
"arrow-parens": [true, "ban-single-arg-parens"],
|
|
"curly": [true, "ignore-same-line"],
|
|
"indent": [true, "tabs", 2],
|
|
"quotemark": false,
|
|
"member-access": [true, "no-public"],
|
|
"no-empty": [true, "allow-empty-catch", "allow-empty-functions"],
|
|
"no-string-literal": false,
|
|
"interface-over-type-literal": false,
|
|
// TODO: turn on
|
|
"prefer-const": false,
|
|
// I do want to bring this down to 120 at some point but maybe later
|
|
"max-line-length": {
|
|
"severity": "warning",
|
|
"options": {
|
|
"limit": 140,
|
|
"ignore-pattern": "\\.replace\\(('\\[|/)|^\\s*(// \\s*)?(return |(let |const )?[a-zA-Z0-9$.]+ \\+?= (\\$\\()?|[a-zA-Z0-9$.]+\\()?['\"`]"
|
|
}
|
|
},
|
|
"interface-name": false,
|
|
"forin": false,
|
|
// maybe one day
|
|
"member-ordering": false,
|
|
"max-classes-per-file": false,
|
|
// they look weird in `new class {...}`
|
|
"new-parens": false,
|
|
"no-bitwise": false,
|
|
"prefer-conditional-expression": false,
|
|
"no-shadowed-variable": [true, {"temporalDeadZone": false}],
|
|
"object-literal-sort-keys": false,
|
|
"object-literal-key-quotes": [true, "as-needed"],
|
|
"trailing-comma": [
|
|
true,
|
|
{
|
|
"multiline": {
|
|
"objects": "always",
|
|
"arrays": "always",
|
|
"functions": "never",
|
|
"typeLiterals": "always"
|
|
},
|
|
"singleline": "never",
|
|
"esSpecCompliant": true
|
|
}
|
|
],
|
|
"semicolon": [true, "always", "strict-bound-class-methods"],
|
|
"space-before-function-paren": [true, {"anonymous": "always", "named": "never", "asyncArrow": "always"}]
|
|
},
|
|
"rulesDirectory": []
|
|
} |