hluisson / eslint-plugin-jsx-expressions

Rules for safe logical expressions in JSX
95 stars 12 forks source link

TypeScript required? #8

Closed frankcalise closed 2 years ago

frankcalise commented 2 years ago

Hello - I'm trying to use your plugin in my Expo project but am receiving the following error after setup:

Failed to load plugin 'jsx-expressions' declared in '.eslintrc.js': Cannot find module 'typescript' Require stack: -

I don't have typescript used at all in this project, is this necessary for me to use this plugin? Any suggestions?

branikclimbs commented 2 years ago

Hi, eslint-plugin-jsx-expressions package only works with @typescript-eslint/parser, and uses type information. So I don't think it will work without typescript.

hluisson commented 2 years ago

Yup, @branislaav is correct - TypeScript is required to use the plugin!