| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- {
- "env": {
- "browser": true,
- "es6": true,
- "node": true
- },
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "project": [
- "src/browser/tsconfig.json",
- "src/common/tsconfig.json",
- "test/api/tsconfig.json",
- "test/benchmark/tsconfig.json",
- "addons/xterm-addon-attach/src/tsconfig.json",
- "addons/xterm-addon-attach/test/tsconfig.json",
- "addons/xterm-addon-fit/src/tsconfig.json",
- "addons/xterm-addon-fit/test/tsconfig.json",
- "addons/xterm-addon-ligatures/src/tsconfig.json",
- "addons/xterm-addon-search/src/tsconfig.json",
- "addons/xterm-addon-search/test/tsconfig.json",
- "addons/xterm-addon-serialize/src/tsconfig.json",
- "addons/xterm-addon-serialize/test/tsconfig.json",
- "addons/xterm-addon-serialize/benchmark/tsconfig.json",
- "addons/xterm-addon-unicode11/src/tsconfig.json",
- "addons/xterm-addon-unicode11/test/tsconfig.json",
- "addons/xterm-addon-web-links/src/tsconfig.json",
- "addons/xterm-addon-web-links/test/tsconfig.json",
- "addons/xterm-addon-webgl/src/tsconfig.json",
- "addons/xterm-addon-webgl/test/tsconfig.json"
- ],
- "sourceType": "module"
- },
- "ignorePatterns": [
- "**/typings/*.d.ts",
- "**/node_modules",
- "**/*.js"
- ],
- "plugins": [
- "@typescript-eslint"
- ],
- "rules": {
- "no-extra-semi": "error",
- "@typescript-eslint/array-type": [
- "warn",
- {
- "default": "array-simple",
- "readonly": "generic"
- }
- ],
- "@typescript-eslint/consistent-type-definitions": "warn",
- "@typescript-eslint/explicit-function-return-type": [
- "warn",
- {
- "allowExpressions": true
- }
- ],
- "@typescript-eslint/explicit-member-accessibility": [
- "warn",
- {
- "accessibility": "explicit",
- "overrides": {
- "constructors": "off"
- }
- }
- ],
- "@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": "default", "format": ["camelCase"] },
- // variableLike
- { "selector": "variable", "format": ["camelCase", "UPPER_CASE"] },
- { "selector": "variable", "filter": "^I.+Service$", "format": ["PascalCase"], "prefix": ["I"] },
- // memberLike
- { "selector": "memberLike", "modifiers": ["private"], "format": ["camelCase"], "leadingUnderscore": "require" },
- { "selector": "memberLike", "modifiers": ["protected"], "format": ["camelCase"], "leadingUnderscore": "require" },
- { "selector": "enumMember", "format": ["UPPER_CASE"] },
- // memberLike - Allow enum-like objects to use UPPER_CASE
- { "selector": "property", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"] },
- { "selector": "method", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"] },
- // typeLike
- { "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"
- ],
- "keyword-spacing": "warn",
- "new-parens": "warn",
- "no-duplicate-imports": "warn",
- "no-else-return": [
- "warn",
- {
- "allowElseIf": false
- }
- ],
- "no-eval": "warn",
- "no-irregular-whitespace": "warn",
- "no-restricted-imports": [
- "warn",
- {
- "patterns": [
- ".*\\/out\\/.*"
- ]
- }
- ],
- "no-trailing-spaces": "warn",
- "no-unsafe-finally": "warn",
- "no-var": "warn",
- "one-var": [
- "warn",
- "never"
- ],
- "object-curly-spacing": [
- "warn",
- "always"
- ],
- "prefer-const": "warn",
- "spaced-comment": [
- "warn",
- "always",
- {
- "markers": ["/"],
- "exceptions": ["-"]
- }
- ]
- },
- "overrides": [
- {
- "files": ["**/*.test.ts"],
- "rules": {
- "object-curly-spacing": "off"
- }
- }
- ]
- }
|