ERROR No eslint configuration defined please create a .eslintrc file with the desired linting rules

Hello team, my name is Curtis from Uganda and I am new to CHT. I m getting an error trying to create a blank project, I have followed the steps from the tutorial but seems I am missing something. here is the error:
ERROR No eslint configuration defined please create a .eslintrc file with the desired linting rules

2 Likes

Hi Curtis,

Welcome to the CHT Forum, it’s great to have you here!

There is a similar discussion in earlier post. As @diana has suggested in the previous post, may be you can try installing dependencies by running npm install @medic/eslint-config. Please let us know if it resolves the issue.

1 Like

hello @niraj @diana @jkuester

Am running into a similar issue here

cliff@cliffs-MacBook-Pro config % cht --url=https://medic:******@<domain-name> compile-app-settings backup-app-settings upload-app-settings

WARN No project package.json file found at /Users/cliff/Documents/projects/mydhi-cht-config/config/config/package.json 
WARN Project has no dependency on cht-conf. 
INFO Checking that https://medic:****@<domain-name> /medic/ is available... 
INFO Processing config in config. 
INFO Actions:
     - compile-app-settings
     - backup-app-settings
     - upload-app-settings 
INFO Starting action: compile-app-settings… 
INFO Error: No eslint configuration defined please create a .eslintrc file with the desired linting rules
    at compileAppSettingsForProject (/Users/cliff/.nvm/versions/node/v20.0.0/lib/node_modules/cht-conf/src/fn/compile-app-settings.js:65:11)
    at Object.compileAppSettings [as execute] (/Users/cliff/.nvm/versions/node/v20.0.0/lib/node_modules/cht-conf/src/fn/compile-app-settings.js:38:25)
    at executeAction (/Users/cliff/.nvm/versions/node/v20.0.0/lib/node_modules/cht-conf/src/lib/main.js:259:40)
    at module.exports (/Users/cliff/.nvm/versions/node/v20.0.0/lib/node_modules/cht-conf/src/lib/main.js:194:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /Users/cliff/.nvm/versions/node/v20.0.0/lib/node_modules/cht-conf/src/bin/index.js:16:5 
ERROR No eslint configuration defined please create a .eslintrc file with the desired linting rules 
cliff@cliffs-MacBook-Pro config %

i have run npm install @medic/eslint-config as seen below

cliff@cliffs-MacBook-Pro config % npm install @medic/eslint-config
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated fsevents@1.2.11: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated move-concurrently@1.0.1: This package is no longer supported.
npm WARN deprecated request-promise-native@1.0.8: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated figgy-pudding@3.5.1: This module is no longer supported.
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint'
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated opn@6.0.0: The package has been renamed to `open`
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated copy-concurrently@1.0.5: This package is no longer supported.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated glob@7.1.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated @hapi/formula@1.2.0: Moved to 'npm install @sideway/formula'
npm WARN deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated glob@7.1.2: Glob versions prior to v9 are no longer supported
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated 
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm WARN deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated fs-write-stream-atomic@1.0.10: This package is no longer supported.
npm WARN deprecated google-p12-pem@2.0.4: Package is no longer maintained
npm WARN deprecated eslint-loader@3.0.3: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated uuid@3.3.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.2.1: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/hoek@8.5.0: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated messageformat@2.3.0: Package renamed as '@messageformat/core', see messageformat.github.io for more details. 'messageformat@4' will eventually provide a polyfill for Intl.MessageFormat, once it's been defined by Unicode & ECMA.
npm WARN deprecated json2csv@4.5.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @hapi/joi@16.1.8: Switch to 'npm install joi'
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated puppeteer@1.20.0: < 22.8.2 is no longer supported
npm WARN deprecated medic-conf@3.1.0: This package is no longer maintained. Please migrate to cht-conf instead.
npm WARN deprecated medic-conf-test-harness@0.1.19: This package is no longer maintained. Please migrate to cht-conf-test-harness instead.

added 736 packages, and audited 804 packages in 35s

20 packages are looking for funding
  run `npm fund` for details

73 vulnerabilities (3 low, 15 moderate, 49 high, 6 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

but still getting ERROR No eslint configuration defined please create a .eslintrc file with the desired linting rules

Fixed this , working well now

was in a wrong configuration folder :slightly_smiling_face:

3 Likes