Skip to content

Commit

Permalink
Merge 61b695e into c150da3
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh committed Sep 17, 2020
2 parents c150da3 + 61b695e commit 6ae84f2
Show file tree
Hide file tree
Showing 120 changed files with 917 additions and 580 deletions.
37 changes: 35 additions & 2 deletions .eslintrc.js
Expand Up @@ -24,9 +24,12 @@ module.exports = {
}
},
rules: {
'@typescript-eslint/lines-between-class-members': [ 'error', { exceptAfterSingleLine: true }],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-invalid-void-type': 'off', // breaks with default void in Asynchandler 2nd generic
'@typescript-eslint/no-unnecessary-condition': 'off', // problems with optional parameters
'@typescript-eslint/space-before-function-paren': [ 'error', 'never' ],
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/unified-signatures': 'off',
'class-methods-use-this': 'off', // conflicts with functions from interfaces that sometimes don't require `this`
'comma-dangle': ['error', 'always-multiline'],
Expand All @@ -39,7 +42,36 @@ module.exports = {
'padding-line-between-statements': 'off',
'prefer-named-capture-group': 'off',
'tsdoc/syntax': 'error',
'unicorn/catch-error-name': 'off',
'unicorn/import-index': 'off',
'unicorn/no-fn-reference-in-iterator': 'off', // this prevents some functional programming paradigms
'unicorn/no-object-as-default-parameter': 'off',

// Naming conventions
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: [ 'typeParameter' ],
format: [ 'PascalCase' ],
prefix: [ 'T' ]
}
],

// Import
'sort-imports': 'off', // Disabled in favor of eslint-plugin-import
Expand All @@ -49,8 +81,9 @@ module.exports = {
caseInsensitive: true
}
}],
'unused-imports/no-unused-imports-ts': 'error',
'import/no-duplicates': 'error',
'import/no-extraneous-dependencies': 'error',
'unicorn/import-index': 'off'
'no-duplicate-imports': 'off', // doesn't work with type imports
'unused-imports/no-unused-imports-ts': 'error'
},
};

0 comments on commit 6ae84f2

Please sign in to comment.