Closed
Description
Repro
After upgrading to version 3.6.0 abstracts function report an error in the rule @typescript-eslint/space-before-function-paren
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
'@typescript-eslint/array-type': ['error', {default: 'generic'}],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': ['error',
{
'ts-expect-error': true,
'ts-ignore': true,
'ts-nocheck': true,
'ts-check': true
}
],
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/ban-types': 'off', // should probably be on
'brace-style': 'off',
'@typescript-eslint/brace-style': ['error', '1tbs'],
'camelcase': 'off',
'comma-spacing': 'off',
'@typescript-eslint/comma-spacing': ['error', {'before': false, 'after': true}],
'dot-notation': 'off',
'@typescript-eslint/dot-notation': ['error', {'allowPattern': '^[a-zA-Z]+(_[a-zA-Z]+)+$'}],
'@typescript-eslint/explicit-function-return-type': 'off', // should probably be on
'@typescript-eslint/explicit-module-boundary-types': 'warn',
'indent': 'off',
'@typescript-eslint/indent': ['error', 'tab', {'SwitchCase': 1}],
'keyword-spacing': 'off',
'@typescript-eslint/keyword-spacing': ['error', {'before': true, 'after': true, 'overrides': {}}],
'lines-between-class-members': 'off',
'@typescript-eslint/lines-between-class-members': ['error', 'always', {'exceptAfterSingleLine': true}],
'@typescript-eslint/member-delimiter-style': ['error',
{
singleline: {
delimiter: 'comma',
requireLast: false
},
multiline: {
delimiter: 'comma',
requireLast: true
}
}
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'], // only camelCase would be more appropriate
leadingUnderscore: 'allow'
},
{
selector: 'function',
format: ['camelCase', 'PascalCase'], // only camelCase would be more appropriate
leadingUnderscore: 'allow'
},
{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow'
},
/*
{
selector: 'property',
format: ['camelCase']
},
{
selector: 'parameterProperty',
format: ['camelCase']
},
*/
{
selector: 'method',
format: ['camelCase'],
leadingUnderscore: 'allow'
},
/*
{
selector: 'accessor',
format: ['camelCase']
},
{
selector: 'enumMember',
format: ['camelCase']
},
*/
{
selector: 'class',
format: ['PascalCase']
},
/*
{
selector: 'interface',
format: ['camelCase']
},
{
selector: 'typeAlias',
format: ['camelCase']
},
{
selector: 'enum',
format: ['camelCase']
},
{
selector: 'typeParameter',
format: ['camelCase']
},
*/
],
'no-dupe-class-members': 'off',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'@typescript-eslint/no-dupe-class-members': ['error'],
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-extra-parens': 'off',
'@typescript-eslint/no-extra-parens': 'error',
'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': ['error'],
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': ['error', {'ignoreParameters': true}],
'no-invalid-this': 'off',
'@typescript-eslint/no-invalid-this': 'off', // should but cannot be used because jquery uses this in callbacks
'@typescript-eslint/no-invalid-void-type': 'error',
'no-loss-of-precision': 'off',
'@typescript-eslint/no-loss-of-precision': ['error'],
'@typescript-eslint/no-misused-promises': 'off', // should probably be on
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': ['off', {ignoreRhs: true}], // should probably be on
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unsafe-assignment': 'off', // should be on!
'@typescript-eslint/no-unsafe-call': 'off', // should be on!
'@typescript-eslint/no-unsafe-member-access': 'off', // should be on!
'@typescript-eslint/no-unsafe-return': 'off', // should be on!
'@typescript-eslint/no-untyped-public-signature': 'off', // should probably be on
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': [
'error',
{
allowDestructuring: true,
allowedNames: ['that']
}
],
'@typescript-eslint/no-throw-literal': ['error'],
'@typescript-eslint/prefer-as-const': ['error'],
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/prefer-literal-enum-member': 'warn',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/prefer-ts-expect-error': ['error'],
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/prefer-readonly-parameter-types': 'off', // should probably be on
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/require-array-sort-compare': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off', // should probably be on
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': ['error', {'anonymous': 'always', 'named': 'never'}],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/unbound-method': 'error',
}
};
error: Missing space before function parentheses (@typescript-eslint/space-before-function-paren) at src/framework/SplitViewModule/index.ts:261:36:
> 261 | protected abstract doGetFormConfig(action: ActionType): UiForm$ConfigType;
Expected Result
Actual Result
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
3.6.0 |
@typescript-eslint/parser |
3.6.0 |
TypeScript |
3.9.6 |
ESLint |
7.4.0 |
node |
14.5.0 |
npm |
6.14.5 |