Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[no-extraneous-class] Rule always throws an AssertionError #170

Closed
Assignees
armano2
Labels
bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@sebald

Description

@sebald

Repro

{"parser":"@typescript-eslint/parser","plugins": ["@typescript-eslint"],"extends": ["plugin:@typescript-eslint/recommended"],"rules": {"@typescript-eslint/no-extraneous-class":"error"  }}

Note: the error occurs by just turning the rule on. So the below is not necessary

exportdefaultclassFoo{hello(){return'I am foo!';}waitFor(it:string){returnPromise.resolve(it);}}

Expected Result
No exception.

Actual Result

Stack trace:

AssertionError [ERR_ASSERTION]: Node must be provided when reporting error if location is not provided    at assertValidNodeInfo (<path>/node_modules/eslint/lib/util/report-translator.js:96:9)    at args (<path>/node_modules/eslint/lib/util/report-translator.js:246:9)    at Object.report (<path>/node_modules/eslint/lib/linter.js:720:41)    at ClassBody (<path>/node_modules/@typescript-eslint/eslint-plugin/lib/rules/no-extraneous-class.js:71:19)    at listeners.(anonymous function).forEach.listener (<path>/node_modules/eslint/lib/util/safe-emitter.js:45:58)    at Array.forEach (<anonymous>)    at Object.emit (<path>/node_modules/eslint/lib/util/safe-emitter.js:45:38)    at NodeEventGenerator.applySelector (<path>/node_modules/eslint/lib/util/node-event-generator.js:251:26)    at NodeEventGenerator.applySelectors (<path>/node_modules/eslint/lib/util/node-event-generator.js:280:22)    at NodeEventGenerator.enterNode (<path>/node_modules/eslint/lib/util/node-event-generator.js:294:14)

Additional Info

If I turn the rule everything works fine.

Versions

packageversion
@typescript-eslint/eslint-plugin1.1.1
@typescript-eslint/parser1.1.1
TypeScript3.2.4
ESLint5.12.1
node10.15.1
npm6.5.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp