eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

Support '.tsx' filename extension by default

Open kripod opened this issue 6 years ago • 3 comments

As TypeScript is spreading and official ESLint support is given through the typescript-eslint project, I thought it would be convenient if the .tsx file extension was supported out of the box.

kripod avatar Apr 17 '19 21:04 kripod

Hmm. I can see how this would help a TS user, but I'm not sure it's a sensible default - a non-TS user would actively want tsx files to be prohibited.

ljharb avatar Apr 17 '19 22:04 ljharb

@ljharb I don't think that a non-TS user is willing to create or transpile tsx files at all. We cannot prevent them from creating a file of a given kind anyway.

kripod avatar Apr 17 '19 22:04 kripod

I agree with you - that's why i'm saying that the linter rule should error on a tsx file for a non-TSX user.

ljharb avatar Apr 17 '19 22:04 ljharb