forked from xtermjs/xterm.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Similar to xtermjs#4668, this brings linting to the API files with a cut down set of rules. One of the bigger ones is comment length is restricted to 80, this was done as opposed to 100 for regular code to reduce the chance of wrapping or API going off screen regardless of resolution or window/browser size
- Loading branch information
Showing
5 changed files
with
292 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"jsdoc" | ||
], | ||
"rules": { | ||
"no-extra-semi": "error", | ||
"@typescript-eslint/array-type": [ | ||
"warn", | ||
{ | ||
"default": "array", | ||
"readonly": "generic" | ||
} | ||
], | ||
"@typescript-eslint/explicit-function-return-type": [ | ||
"warn", | ||
{ | ||
"allowExpressions": true | ||
} | ||
], | ||
"@typescript-eslint/indent": [ | ||
"warn", | ||
2 | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"warn", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "comma", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ "selector": "typeLike", "format": ["PascalCase"] }, | ||
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] } | ||
], | ||
"@typescript-eslint/prefer-namespace-keyword": "warn", | ||
"@typescript-eslint/type-annotation-spacing": "warn", | ||
"@typescript-eslint/quotes": [ | ||
"warn", | ||
"single", | ||
{ "allowTemplateLiterals": true } | ||
], | ||
"@typescript-eslint/semi": [ | ||
"warn", | ||
"always" | ||
], | ||
"comma-dangle": [ | ||
"warn", | ||
{ | ||
"objects": "never", | ||
"arrays": "never", | ||
"functions": "never" | ||
} | ||
], | ||
"curly": [ | ||
"warn", | ||
"multi-line" | ||
], | ||
"eol-last": "warn", | ||
"eqeqeq": [ | ||
"warn", | ||
"always" | ||
], | ||
"jsdoc/check-alignment": 1, | ||
"jsdoc/check-param-names": 1, | ||
"keyword-spacing": "warn", | ||
"max-len": [ | ||
"warn", | ||
{ | ||
"code": 1000, // Don't enforce for code | ||
"comments": 80, | ||
"ignoreUrls": true, | ||
"ignorePattern": "^ *(?<ps_description>\\* Ps=)" | ||
} | ||
], | ||
"no-irregular-whitespace": "warn", | ||
"no-trailing-spaces": "warn", | ||
"object-curly-spacing": [ | ||
"warn", | ||
"always" | ||
], | ||
"spaced-comment": [ | ||
"warn", | ||
"always", | ||
{ | ||
"markers": ["/"], | ||
"exceptions": ["-"] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.