keithamus / eslint-plugin-escompat

Report errors for code which wont work in browsers without transpiling
MIT License
30 stars 6 forks source link

Plugin stopped working? #18

Closed gkiely closed 1 year ago

gkiely commented 1 year ago

I'm probably doing something dumb, but I can't seem to get it working.

Steps:

git clone git@github.com:gkiely/vite-react-ts.git
# Uncomment line 6 and 12 in App.tsx

npm i
npm run lint
# No errors shown
keithamus commented 1 year ago

I am unable to reproduce this:

npm run lint

> vite-react-ts@0.0.0 lint
> eslint .eslintrc.json --ext ts,tsx src

./vite-react-ts/src/App.tsx
  6:7  warning  'fn' is assigned a value but never used  @typescript-eslint/no-unused-vars

✖ 1 problem (0 errors, 1 warning)

Additionally you're unlikely to get any errors from escompat as you don't have a .browserslistrc or a browserslist field in your package.json.

I'll close this for now. Let me know if you experience any other issues with this!

gkiely commented 1 year ago

I added a browserlist field and updated the example.

This is what I see:

image

I was expecting to see an error for using 0n, should i not?

gkiely commented 1 year ago

It works, I just didn't have the browserlist field set correctly.