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

Fail compile-app-settings if there is no .eslintrc file #333

Closed
newtewt opened this issue Jun 8, 2020 · 5 comments
Closed

Fail compile-app-settings if there is no .eslintrc file #333

newtewt opened this issue Jun 8, 2020 · 5 comments
Assignees
Labels
Help wanted Good for first time contributions Priority: 2 - Medium Normal priority. Type: Bug Fix something that isn't working as intended
Milestone

Comments

@newtewt
Copy link
Contributor

newtewt commented Jun 8, 2020

When running medic-conf compile-app-settings we should fail early if there is no .eslintrc file when running actions that require it. Otherwise the user is given the error below and it is not very clear what is needed to correct.

    ERROR in ./tasks.js
    Module Error (from ../medic-conf/node_modules/eslint-loader/dist/cjs.js):
    
    /home/newt/dev/test-medic-conf-dir/tasks.js
      1:1  error  'module' is not defined  no-undef

@garethbowen
Copy link
Member

Alternatively investigate if there's a way to provide a default eslint config so the app builder only needs to create it if they want to change the default.

@garethbowen garethbowen added Type: Bug Fix something that isn't working as intended Priority: 2 - Medium Normal priority. labels Jun 8, 2020
@garethbowen garethbowen added the Help wanted Good for first time contributions label Jun 12, 2020
@newtewt
Copy link
Contributor Author

newtewt commented Jul 16, 2020

With the proposed solution from @garethbowen we should also ensure that if a user is trying to apply standard of default configs from cht-core. Eslintrc should respect the default config and not go looking at parent directories for estlintrc files.

@njogz
Copy link
Contributor

njogz commented Jul 20, 2021

Ready for AT on 333-fail-compile-app-settings-if-there-is-no-eslint-file

@meghna-khemka meghna-khemka self-assigned this Sep 10, 2021
@meghna-khemka
Copy link

meghna-khemka commented Sep 10, 2021

Tested above issue and issue seems to be working fine using medic-conf.js
Still need to test using index.js, will retest once index.js is merged to the branch as it seems to be missing from this branch.

image

@meghna-khemka
Copy link

Tested with index.js and issue seems to be working fine.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Good for first time contributions Priority: 2 - Medium Normal priority. Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

5 participants