Conflict between tslint:align and @typescript-eslint/indent
See original GitHub issueI’m running into a conflict between @typescript-eslint/indent and the align rule in @typescript-eslint/tslint/config, specifically with regard to the alignment of parameters on my class constructors.
🐛 Bug Report
tslint-to-eslint-config
version: 0.2.5- ESLint version: 6.3.0
- Node version: 10.15.3
Actual Behavior
Expected indentation of x spaces but found x @typescript-eslint/indent or parameters are not aligned (tslint:align) @typescript-eslint/tslint/config
Expected Behavior
I don’t really mind which convention is accepted as long as its consistent.
Reproduction
constructor(private router: Router,
private authenticationService: AuthenticationService,
private tokenService: TokenService) {}
constructor(private router: Router,
private authenticationService: AuthenticationService,
private tokenService: TokenService) { }
{
"rules": {
"@typescript-eslint/indent": [
"error",
2
],
"@typescript-eslint/tslint/config": [
"error",
{
"rulesDirectory": [
"**MyPath**"
],
"rules": {
"align": [
true,
"parameters",
"statements"
]
}
}
]
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Prettier and eslint indents not working together - Stack Overflow
ESLint's indent rule and Prettier's indentation styles do not match - they're completely separate implementations and are two different ...
Read more >Indentation rule conflict with prettier · Issue #372 - GitHub
I'm not sure you understand why this was closed. This is 100% intentional. The two should conflict because prettier does its own indentation...
Read more >indent - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Importing 'indent' rule from ESLint configuration should ...
The first example (Align when Multiline On) conflicts with ESLint's 'indent' rule, so when importing code style settings from a config that contains...
Read more >Using Prettier and ESLint to automate formatting and fixing ...
Managing ESLint's rules to avoid conflict with Prettier. There are two broad categories of linting rules: formatting rules and code-quality ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
May I work on this?
typescript-eslint
’sindent
rule supports an indentation level of"first"
which should be similar to what TSLint’salign
rule enforces:@KingDarBoja the issue here is that TSLint’s
align
rule isn’t yet converted - not theindent
one, sadly.