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

cozy-harvest-lib lint does not handle ts files #2306

Open
paultranvan opened this issue Oct 11, 2023 · 0 comments
Open

cozy-harvest-lib lint does not handle ts files #2306

paultranvan opened this issue Oct 11, 2023 · 0 comments

Comments

@paultranvan
Copy link
Contributor

When running yarn lint in cozy-harvest-lib dir, it does not include ts files: "lint": "cd .. && yarn eslint --ext js,jsx packages/cozy-harvest-lib".
And, when trying to add ts support, it fails with Error: Error while loading rule '@typescript-eslint/dot-notation': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser. .

This finally works when changing the .eslintrc file at the cozy-libs root:

{
   "root": true,                                                                                                                         
   "extends": "cozy-app/react",                                                                                                          
   "globals": {                                                                                                                          
     __DEV__: "readonly"                                                                                                                 
   },                                                                                                                                    
   "parserOptions": {                                                                                                                    
     "project": "tsconfig.json"                                                                                                          
   }
 }

But there might be a better way?

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

No branches or pull requests

1 participant