Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

[indent] import require are not reported as error #577

Closed
ficristo opened this issue Dec 8, 2018 · 2 comments
Closed

[indent] import require are not reported as error #577

ficristo opened this issue Dec 8, 2018 · 2 comments
Labels

Comments

@ficristo
Copy link

ficristo commented Dec 8, 2018

What version of TypeScript are you using?
3.1.6

What version of typescript-eslint-parser are you using?
21.0.2

What code were you trying to parse?

// The code:
    import Dialogs              = require("widgets/Dialogs");

What did you expect to happen?
An error because the code is indented but shouldn't.

For now my rule indent is:

"indent": ["error", 4, {
    "SwitchCase": 1,
    "VariableDeclarator": 1,
    "FunctionDeclaration": { "parameters": "first", body: 1 },
    "FunctionExpression": { "parameters": "first", body: 1 },
    "CallExpression": { "arguments": 1 },
    "ArrayExpression": 1,
    "ObjectExpression": 1,
    "ImportDeclaration": 1,
    "flatTernaryExpressions": false
}],

What happened?
No error.

@armano2
Copy link
Contributor

armano2 commented Dec 8, 2018

TSImportEqualsDeclaration is not supported by eslint rule, this should be added in https://github.com/bradzacher/eslint-plugin-typescript

bradzacher added a commit to bradzacher/eslint-plugin-typescript that referenced this issue Dec 17, 2018
Fixes #201 
Fixes #96 
Fixes eslint/typescript-eslint-parser#577

The [base eslint implementation](https://github.com/eslint/eslint/blob/master/lib/rules/indent.js) purposely ignores nodes it doesn't know about (i.e. our TS nodes).

Because of how the base rule is written, we have to override the implementation entirely.
@ficristo
Copy link
Author

It should be fixed by bradzacher/eslint-plugin-typescript#219

JamesHenry pushed a commit to typescript-eslint/typescript-eslint that referenced this issue Jan 17, 2019
Fixes #201
Fixes #96
Fixes eslint/typescript-eslint-parser#577

The [base eslint implementation](https://github.com/eslint/eslint/blob/master/lib/rules/indent.js) purposely ignores nodes it doesn't know about (i.e. our TS nodes).

Because of how the base rule is written, we have to override the implementation entirely.
JamesHenry pushed a commit to typescript-eslint/typescript-eslint that referenced this issue Jan 17, 2019
Fixes #201
Fixes #96
Fixes eslint/typescript-eslint-parser#577

The [base eslint implementation](https://github.com/eslint/eslint/blob/master/lib/rules/indent.js) purposely ignores nodes it doesn't know about (i.e. our TS nodes).

Because of how the base rule is written, we have to override the implementation entirely.
JamesHenry pushed a commit to typescript-eslint/typescript-eslint that referenced this issue Jan 18, 2019
Fixes #201
Fixes #96
Fixes eslint/typescript-eslint-parser#577

The [base eslint implementation](https://github.com/eslint/eslint/blob/master/lib/rules/indent.js) purposely ignores nodes it doesn't know about (i.e. our TS nodes).

Because of how the base rule is written, we have to override the implementation entirely.
nightsky108 pushed a commit to nightsky108/typescript-eslint that referenced this issue Dec 21, 2021
Fixes #201
Fixes #96
Fixes eslint/typescript-eslint-parser#577

The [base eslint implementation](https://github.com/eslint/eslint/blob/master/lib/rules/indent.js) purposely ignores nodes it doesn't know about (i.e. our TS nodes).

Because of how the base rule is written, we have to override the implementation entirely.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants