Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
285 changes: 263 additions & 22 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,265 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
"env": {
"browser": false,
"es2021": true
},
"extends": [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-typescript/base",
"airbnb-base",
"plugin:sonarjs/recommended",
"plugin:jsdoc/recommended-typescript"
],
"overrides": [
{
"files": [
"**/*.spec.ts",
"**/*.mock.ts"
],
"env": {
"jest": true
},
"rules": {
"import/first": "off",
"max-lines-per-function": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/dot-notation": "off",
"sonarjs/no-duplicate-string": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": [
"./tsconfig.json"
]
}
},
"plugins": [
"@typescript-eslint",
"sonarjs",
"prettier",
"jsdoc"
],
"rules": {
"quotes": [
"error",
"double"
],
"semi": [
"warn",
"always"
],
"import/extensions": [
"error",
"never"
],
"no-await-in-loop": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "warn",
"no-unreachable-loop": "warn",
"no-unused-private-class-members": "warn",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off",
"camelcase": "off",
"dot-notation": "off",
"func-style": [
"error",
"declaration"
],
"max-depth": [
"warn",
4
],
"max-lines": [
"warn",
{
"max": 500,
"skipBlankLines": true,
"skipComments": true
}
],
"max-lines-per-function": [
"warn",
{
"max": 40,
"skipBlankLines": true,
"skipComments": true
}
],
"no-confusing-arrow": "warn",
"no-console": "off",
"no-else-return": [
"error",
{
"allowElseIf": true
}
],
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-magic-numbers": [
"warn",
{
"ignore": [
0,
1
]
}
],
"no-new": "warn",
"no-return-await": "error",
"no-sequences": "error",
"no-unused-expressions": "error",
"no-useless-computed-key": "warn",
"no-useless-concat": "error",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",
"no-useless-escape": "error",
"no-useless-call": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"no-with": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "warn",
"prefer-template": "error",
"require-await": "error",
"spaced-comment": "error",
"yoda": "error",
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"no-extra-parens": "off",
"no-whitespace-before-property": "error",
"no-trailing-spaces": "error",
"object-curly-spacing": [
"error",
"always"
],
"object-curly-newline": "off",
"padded-blocks": [
"error",
"never"
],
"space-before-blocks": [
"error",
"always"
],
"space-before-function-paren": "off",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"camelCase"
]
},
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
]
},
{
"selector": "parameter",
"format": [
"camelCase"
],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"modifiers": [
"private"
],
"format": [
"camelCase"
],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"format": [
"camelCase",
"snake_case"
],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": [
"PascalCase"
]
},
{
"selector": "variable",
"modifiers": [
"destructured"
],
"format": null
},
{
"selector": "interface",
"format": [
"PascalCase"
],
"custom": {
"regex": "^I[A-Z]",
"match": false
}
}
],
"@typescript-eslint/quotes": [
"error",
"double"
],
"no-underscore-dangle": "off",
"max-len": [
"error",
{
"code": 80,
"ignorePattern": "(^import .*$|^export .*$)",
"ignoreStrings": true,
"ignoreComments": true,
"ignoreTemplateLiterals": true
}
],
"operator-linebreak": "off",
"indent": "off",
"@typescript-eslint/indent": "off",
"no-empty-function": "off",
"implicit-arrow-linebreak": "off",
"function-paren-newline": "off",
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"import/no-unresolved": "off",
"import/order": "off",
"class-methods-use-this": "off",
"brace-style": "off",
"@typescript-eslint/brace-style": "off",
"jsdoc/require-jsdoc": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn"
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
package-lock.json
dist
dist
out
coverage
*.vsix
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"endOfLine": "lf",
"printWidth": 80,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"parser": "typescript"
}
Loading