Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xo --space doesn't work with eslint-config-xo-typescript #410

Closed
haotangio opened this issue Dec 5, 2019 · 3 comments
Closed

xo --space doesn't work with eslint-config-xo-typescript #410

haotangio opened this issue Dec 5, 2019 · 3 comments

Comments

@haotangio
Copy link

I tried to use xo --space together with eslint-config-xo-typescript but it doesn't work.
Seems like we need to change the currently hardcoded tab-indent usage of eslint-config-xo-typescript

@sindresorhus
Copy link
Member

This actually needs to be fixed in XO. XO needs to check if eslint-config-xo-typescript is used and override the @typescript-eslint/indent rule if so.

@sindresorhus sindresorhus changed the title xo --space doesn't work xo --space doesn't work with eslint-config-xo-typescript Dec 5, 2019
@sindresorhus sindresorhus transferred this issue from xojs/eslint-config-xo-typescript Dec 5, 2019
@dobromyslov
Copy link

Workaround:

Add to package.json:
"xo": { "space": 2, "rules": { "@typescript-eslint/indent": "off" }}

@pvdlg
Copy link
Contributor

pvdlg commented Feb 25, 2020

That should have been fixed wit the recent changes to support TypeScript out of the box:

config.rules['@typescript-eslint/indent'] = ['error', spaces, {SwitchCase: 1}];

@haotangio @dobromyslov can you try again with the latest XO version?
Note that you shouldn't configure eslint-config-xo-typescript anymore as it will now be used automatically for .ts/.tsx files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants