-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
Here's a gist/repo:
https://gist.github.com/ixth/4b7c26e8c28a0a0647545199120046a2
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/lines-between-class-members": "error",
"lines-between-class-members": "off"
}
}
abstract class foo {
abstract bar(a: string): void;
abstract bar(a: string, b: string): void;
}
Expected Result
No errors at all.
Actual Result
eslint gives me these lines:
yarn run v1.22.11
$ /Users/ixth/Projects/ts-eslint-repro/node_modules/.bin/eslint index.ts
/Users/ixth/Projects/ts-eslint-repro/index.ts
3:3 error Expected blank line between class members @typescript-eslint/lines-between-class-members
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Additional Info
yarn run v1.22.11
$ /Users/ixth/Projects/ts-eslint-repro/node_modules/.bin/eslint index.ts --debug
2021-10-01T19:40:33.566Z eslint:cli CLI args: [ 'index.ts', '--debug' ]
2021-10-01T19:40:33.568Z eslint:cli Running on files
2021-10-01T19:40:33.581Z eslintrc:config-array-factory Loading JSON config file: /Users/ixth/Projects/ts-eslint-repro/package.json
2021-10-01T19:40:33.582Z eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/Users/ixth/Projects/ts-eslint-repro', loose: false } ]
2021-10-01T19:40:33.584Z eslintrc:ignore-pattern processed: { basePath: '/Users/ixth/Projects/ts-eslint-repro', patterns: [ '/**/node_modules/*' ] }
2021-10-01T19:40:33.584Z eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/Users/ixth/Projects/ts-eslint-repro', loose: false } ]
2021-10-01T19:40:33.584Z eslintrc:ignore-pattern processed: { basePath: '/Users/ixth/Projects/ts-eslint-repro', patterns: [ '/**/node_modules/*' ] }
2021-10-01T19:40:33.585Z eslint:file-enumerator Start to iterate files: [ 'index.ts' ]
2021-10-01T19:40:33.585Z eslint:file-enumerator File: /Users/ixth/Projects/ts-eslint-repro/index.ts
2021-10-01T19:40:33.586Z eslintrc:cascading-config-array-factory Load config files for /Users/ixth/Projects/ts-eslint-repro.
2021-10-01T19:40:33.586Z eslintrc:cascading-config-array-factory No cache found: /Users/ixth/Projects/ts-eslint-repro.
2021-10-01T19:40:33.586Z eslintrc:config-array-factory Loading legacy config file: /Users/ixth/Projects/ts-eslint-repro/.eslintrc
2021-10-01T19:40:33.628Z eslintrc:config-array-factory Config file found: /Users/ixth/Projects/ts-eslint-repro/.eslintrc
2021-10-01T19:40:33.629Z eslintrc:config-array-factory Loading parser "@typescript-eslint/parser" from /Users/ixth/Projects/ts-eslint-repro/.eslintrc
2021-10-01T19:40:33.630Z eslintrc:config-array-factory Loaded: @typescript-eslint/parser@4.32.0 (/Users/ixth/Projects/ts-eslint-repro/node_modules/@typescript-eslint/parser/dist/index.js)
2021-10-01T19:40:34.765Z eslintrc:config-array-factory Loading plugin "@typescript-eslint" from /Users/ixth/Projects/ts-eslint-repro/.eslintrc
2021-10-01T19:40:34.767Z eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@4.32.0 (/Users/ixth/Projects/ts-eslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/index.js)
2021-10-01T19:40:35.218Z eslintrc:config-array-factory Plugin /Users/ixth/Projects/ts-eslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/index.js loaded in: 451ms
2021-10-01T19:40:35.218Z eslintrc:cascading-config-array-factory Stop traversing because of 'root:true'.
2021-10-01T19:40:35.220Z eslint:rules Loading rule 'lines-between-class-members' (remaining=283)
2021-10-01T19:40:35.220Z eslintrc:cascading-config-array-factory Configuration was determined: ConfigArray(2) [ { type: 'config', name: 'DefaultIgnorePattern', filePath: '', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: '/Users/ixth/Projects/ts-eslint-repro', loose: false }, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined }, { type: 'config', name: '.eslintrc', filePath: '/Users/ixth/Projects/ts-eslint-repro/.eslintrc', criteria: null, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: { error: null, filePath: '/Users/ixth/Projects/ts-eslint-repro/node_modules/@typescript-eslint/parser/dist/index.js', id: '@typescript-eslint/parser', importerName: '.eslintrc', importerPath: '/Users/ixth/Projects/ts-eslint-repro/.eslintrc' }, parserOptions: undefined, plugins: { '@typescript-eslint': [Object] }, processor: undefined, reportUnusedDisableDirectives: undefined, root: true, rules: { '@typescript-eslint/lines-between-class-members': 'error', 'lines-between-class-members': 'off' }, settings: undefined } ] on /Users/ixth/Projects/ts-eslint-repro
2021-10-01T19:40:35.221Z eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/Users/ixth/Projects/ts-eslint-repro', loose: false } ]
2021-10-01T19:40:35.221Z eslintrc:ignore-pattern processed: { basePath: '/Users/ixth/Projects/ts-eslint-repro', patterns: [ '/**/node_modules/*' ] }
2021-10-01T19:40:35.222Z eslintrc:ignore-pattern Check {
filePath: '/Users/ixth/Projects/ts-eslint-repro/index.ts',
dot: false,
relativePath: 'index.ts',
result: false
}
2021-10-01T19:40:35.222Z eslint:cli-engine Lint /Users/ixth/Projects/ts-eslint-repro/index.ts
2021-10-01T19:40:35.222Z eslint:linter Linting code for /Users/ixth/Projects/ts-eslint-repro/index.ts (pass 1)
2021-10-01T19:40:35.223Z eslint:linter Verify
2021-10-01T19:40:35.223Z eslint:linter With ConfigArray: /Users/ixth/Projects/ts-eslint-repro/index.ts
2021-10-01T19:40:35.253Z eslint:linter Generating fixed text for /Users/ixth/Projects/ts-eslint-repro/index.ts (pass 1)
2021-10-01T19:40:35.254Z eslint:source-code-fixer Applying fixes
2021-10-01T19:40:35.254Z eslint:source-code-fixer shouldFix parameter was false, not attempting fixes
2021-10-01T19:40:35.254Z eslint:file-enumerator Complete iterating files: ["index.ts"]
2021-10-01T19:40:35.254Z eslint:cli-engine Linting complete in: 1669ms
/Users/ixth/Projects/ts-eslint-repro/index.ts
3:3 error Expected blank line between class members @typescript-eslint/lines-between-class-members
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.32.0 |
@typescript-eslint/parser |
4.32.0 |
TypeScript |
4.4.3 |
ESLint |
7.32.0 |
node |
16.10.0 |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin