mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Due to the specific way we implement everything, none of these files are actually modules. But thanks to `babel-plugin-remove-import-export`, there's no reason why the code can't be written as modules. I wouldn't say I like modules, but it's what's popular and it's what people are used to and it's what tooling is built around.
59 lines
2.1 KiB
JSON
59 lines
2.1 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,
|
|
"max-line-length": {
|
|
"options": {
|
|
"limit": 120,
|
|
"ignore-pattern": "template\\.replace\\(('\\[|/)|[a-z0-9]=|^\\s*(// \\s*)?((let |const )?[a-zA-Z0-9$.]+ \\+?= (\\$\\()?|(return |throw )?(new )?([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,
|
|
"no-console": false,
|
|
"no-namespace": [true, "allow-declarations"],
|
|
"only-arrow-functions": false,
|
|
"prefer-conditional-expression": false,
|
|
"no-shadowed-variable": [true, {"temporalDeadZone": false}],
|
|
"no-switch-case-fall-through": true,
|
|
"no-unnecessary-initializer": false,
|
|
"object-literal-sort-keys": false,
|
|
"object-literal-key-quotes": false,
|
|
"ordered-imports": false,
|
|
"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": []
|
|
}
|