Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Adding a typescript & typescript-react config #54

Merged
merged 25 commits into from
Dec 1, 2017
Merged

Conversation

ismail-syed
Copy link
Contributor

@ismail-syed ismail-syed commented Dec 1, 2017

This PR adds a consumable typescript & typescriptReact config for projects with .ts and .tsx files.
The application of the typescript config is demonstrated in sewing-kit in here

This is a revive of #42

@ismail-syed ismail-syed changed the title Typescript config Adding a typescript & typescript-react config Dec 1, 2017
strict: 'off',
'shopify/prefer-early-return': 'off',
'array-callback-return': 'off',
'getter-return': 'off',
Copy link
Contributor Author

@ismail-syed ismail-syed Dec 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config still uses the stock typescript-eslint-parser. The workaround attempts to address these 4 rules revealed more concerns with the parser.

The performance improvements of using eslint vs tslint easily outweigh loosing these 4 rules.

'react/default-props-match-prop-types': 'off',

// Breaks typescript-eslint-parser
'react/jsx-indent': 'off',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sucks that the fixers for these rules break the parser, but using the prettier config with the parser option set to typescript gives us the features back.

@ismail-syed ismail-syed merged commit 616ffcc into master Dec 1, 2017
@ismail-syed ismail-syed deleted the typescript-config branch December 1, 2017 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants