iTwin / eslint-plugin

MIT License
0 stars 0 forks source link

Warning message when using typescript 5 and @itwin/eslint-plugin 3.7.8 #47

Open mdastous-bentley opened 1 year ago

mdastous-bentley commented 1 year ago

Following error message appears when trying to use @itwin/eslint-plugin 3.7.8 and typescript 5 in the same project: WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree. You may find that it works just fine, or you may not. SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0 YOUR TYPESCRIPT VERSION: 5.0.4 Please only submit bug reports when using the officially supported version.

Upgrading to version '^4.0.0-dev.44' gives a new error message: ESLint couldn't find the config "plugin:@itwin/ui" to extend from. Please check that the name of the config is correct.

To solve the problem I had to remove this section from my package.json: eslintConfig": { "plugins": [ "@itwin" ], "extends": "plugin:@itwin/ui" }, and also needed to upgrade to eslint '^8.44.0' and create a eslint.config.js file (this last bit is mentioned in the README.MD, not quite clear which version of @itwin/eslint-plugin requires it though)

The upgrade path is a bit rough. and its still unclear if it's fine to go with a dev version (i.e 4.0.0-dev.44') into production.

MichaelBelousov commented 1 year ago

the dev prerelease version of this package is not compatible with eslint@7, so you can't extend plugin:@itwin/*. Ideally #46 would resolve this