/*
๐ Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config
It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! ๐
*/
module.exports = {
env: {
browser: true,
node: true,
},
extends: ['plugin:@typescript-eslint/all', 'prettier', 'prettier/@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint', '@typescript-eslint/tslint'],
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': [
'error',
{
default: 'array-simple',
},
],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-types': [
'error',
{
types: {
async: {
message: 'Use Promises instead, it add a lot to bundle size.',
},
},
},
],
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'explicit',
overrides: {
accessors: 'explicit',
constructors: 'explicit',
parameterProperties: 'explicit',
},
},
],
'@typescript-eslint/indent': 'off',
'@typescript-eslint/interface-name-prefix': 'error',
'@typescript-eslint/member-delimiter-style': [
'off',
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-param-reassign': 'error',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/semi': ['off', null],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/triple-slash-reference': [
'error',
{
path: 'always',
types: 'prefer-import',
lib: 'always',
},
],
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/unified-signatures': 'error',
'arrow-body-style': ['error', 'always'],
'arrow-parens': ['off', 'always'],
'brace-style': ['off', 'off'],
camelcase: 'error',
'class-methods-use-this': 'off',
'comma-dangle': 'off',
complexity: 'error',
'constructor-super': 'error',
curly: 'error',
'default-case': 'error',
'eol-last': 'off',
eqeqeq: ['error', 'always'],
'guard-for-in': 'error',
'id-blacklist': [
'error',
'any',
'Number',
'number',
'String',
'string',
'Boolean',
'boolean',
'Undefined',
'undefined',
],
'id-match': 'error',
'import/no-default-export': 'error',
'import/no-deprecated': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-internal-modules': 'off',
'import/no-unassigned-import': 'error',
'import/order': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/newline-after-description': 'error',
'jsdoc/no-types': 'error',
'linebreak-style': 'off',
'max-classes-per-file': ['error', 1],
'max-len': 'off',
'max-lines': ['error', 1000],
'new-parens': 'off',
'newline-per-chained-call': 'off',
'no-bitwise': 'error',
'no-caller': 'error',
'no-cond-assign': 'error',
'no-console': [
'error',
{
allow: [
'debug',
'info',
'dirxml',
'warn',
'error',
'dir',
'time',
'timeEnd',
'timeLog',
'trace',
'assert',
'clear',
'count',
'countReset',
'group',
'groupCollapsed',
'groupEnd',
'table',
'Console',
'markTimeline',
'profile',
'profileEnd',
'timeline',
'timelineEnd',
'timeStamp',
'context',
],
},
],
'no-debugger': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-empty': 'error',
'no-eval': 'error',
'no-extra-bind': 'error',
'no-extra-semi': 'off',
'no-irregular-whitespace': 'off',
'no-magic-numbers': 'off',
'no-multiple-empty-lines': 'off',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-null/no-null': 'off',
'no-plusplus': [
'off',
{
allowForLoopAfterthoughts: true,
},
],
'no-redeclare': 'error',
'no-restricted-syntax': ['error', 'ForInStatement'],
'no-return-await': 'error',
'no-sequences': 'error',
'no-shadow': [
'error',
{
hoist: 'all',
},
],
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'off',
'no-undef-init': 'error',
'no-underscore-dangle': 'error',
'no-unsafe-finally': 'error',
'no-unused-labels': 'error',
'no-useless-constructor': 'error',
'no-var': 'error',
'no-void': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'padding-line-between-statements': [
'off',
{
blankLine: 'always',
prev: '*',
next: 'return',
},
],
'prefer-arrow/prefer-arrow-functions': 'error',
'prefer-const': 'error',
'prefer-object-spread': 'error',
'prefer-template': 'error',
'quote-props': 'off',
radix: 'error',
'space-before-function-paren': 'off',
'space-in-parens': ['off', 'never'],
'spaced-comment': [
'error',
'always',
{
markers: ['/'],
},
],
'unicorn/filename-case': 'error',
'use-isnan': 'error',
yoda: 'error',
'@typescript-eslint/tslint/config': [
'error',
{
rules: {
'comment-type': [true, 'singleline', 'multiline', 'doc', 'directive'],
'completed-docs': [
true,
{
classes: {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
},
enums: {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
},
'enum-members': {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
},
functions: {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
},
interfaces: {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
},
methods: {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
},
properties: {
tags: {
content: {},
existence: ['inheritDoc', 'hidden'],
},
locations: 'instance',
},
},
],
encoding: true,
'invalid-void': true,
'match-default-export-name': true,
'naming-convention': [
true,
{
type: 'member',
modifiers: 'protected',
leadingUnderscore: 'require',
},
{
type: 'member',
modifiers: 'private',
leadingUnderscore: 'require',
},
],
'no-default-import': true,
'no-dynamic-delete': true,
'no-inferred-empty-object-type': true,
'no-mergeable-namespace': true,
'no-null-undefined-union': true,
'no-promise-as-boolean': true,
'no-restricted-globals': true,
'no-tautology-expression': true,
'no-unnecessary-callback-wrapper': true,
'no-unsafe-any': true,
'object-literal-sort-keys': true,
'prefer-conditional-expression': true,
'prefer-method-signature': true,
'prefer-switch': true,
'prefer-while': true,
'return-undefined': true,
'static-this': true,
'strict-comparisons': true,
'strict-string-expressions': true,
'strict-type-predicates': true,
'switch-final-break': true,
typedef: [true, 'call-signature', 'parameter', 'property-declaration', 'member-variable-declaration'],
'unnecessary-else': true,
},
},
],
},
};