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

Compatibility with TypeScript #52

Open
foretix opened this issue Feb 8, 2024 · 0 comments
Open

Compatibility with TypeScript #52

foretix opened this issue Feb 8, 2024 · 0 comments

Comments

@foretix
Copy link

foretix commented Feb 8, 2024

Hi,

I use TypeScript for developing the app (as written in the documentation), but adding Homey ESLint config to .eslintrc.json it breaks importing rules.

With

"extends": "athom"

or

"extends": [
  "athom",
  "athom/homey-app"
]

I get error on all imports referencing .ts, as example:
import { Test } from './Test';
with errors:

Unable to resolve path to module './Test'.eslint[import/no-unresolved]
Missing file extension for "./Test"eslint[import/extensions]
"./Test" is not found.eslint[node/no-missing-import]

However, when I switch to Typescript ESLint as descibed here https://typescript-eslint.io/getting-started/, then it works OK, no error.

"extends": [
  "eslint:recommended",
  "plugin:@typescript-eslint/recommended"
]

Once I add "athom" or "athom/homey-app", it breaks .ts imports.

Is there some missing configuration with new app creation, or some new version breaks the Typescript support ?

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

No branches or pull requests

1 participant