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

"An empty interface is equivalent to {}" lint error on new empty project #3839

Closed
ufoscout opened this issue Feb 11, 2022 · 0 comments · Fixed by #4077
Closed

"An empty interface is equivalent to {}" lint error on new empty project #3839

ufoscout opened this issue Feb 11, 2022 · 0 comments · Fixed by #4077

Comments

@ufoscout
Copy link

Describe the bug

The SvelteKit demo app application with TypeScript enabled fails the npm run lint phase:

$ npm run format
...
$ npm run lint

> my-app@0.0.1 lint
> prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .

Checking formatting...
All matched files use Prettier code style!

/home/ufo/workspaces/temp/my-app/src/app.d.ts
  10:12  error  An empty interface is equivalent to `{}`  @typescript-eslint/no-empty-interface
  12:12  error  An empty interface is equivalent to `{}`  @typescript-eslint/no-empty-interface
  14:12  error  An empty interface is equivalent to `{}`  @typescript-eslint/no-empty-interface

/home/ufo/workspaces/temp/my-app/src/lib/form.ts
  68:15  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 4 problems (3 errors, 1 warning)

Reproduction

  • Create a new project from scratch with: npm init svelte@next my-app
  • Select "SvelteKit demo app", Typescript yes, ESLint yes, Prettier yes
  • run npm run format
  • run npm run lint

Logs

No response

System Info

System:
    OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 6.41 GB / 31.31 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.13.1 - ~/Programs/node/bin/node
    Yarn: 1.22.17 - ~/Programs/node/bin/yarn
    npm: 8.1.2 - ~/Programs/node/bin/npm
  Browsers:
    Chrome: 98.0.4758.80
    Chromium: 98.0.4758.80
    Firefox: 96.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.17 
    @sveltejs/kit: next => 1.0.0-next.265 
    svelte: ^3.46.0 => 3.46.4

Severity

serious, but I can work around it

Additional Information

No response

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

Successfully merging a pull request may close this issue.

2 participants