Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

can't use scoped packages #114

Open
iamnewton opened this issue Jul 19, 2019 · 4 comments
Open

can't use scoped packages #114

iamnewton opened this issue Jul 19, 2019 · 4 comments

Comments

@iamnewton
Copy link

Doesn't seem to play nice with scoped packages; much like the other configs, I'd expect that the following, given my main directive in the package is set to index and my echint.extends:

  "echint": {
    "extends": "@scope"
  },

would look into ./node_modules/@scope/echint-config/index for its EditorConfig file. Instead I'm getting the following error:

#9546: $ npm run test:editor
> echint *.js

/node_modules/lintspaces/lib/Validator.js:666
	throw new Error(message);
	^

Error: The editorconfig file "/node_modules/echint-config-<scope>/dist/scripts/index.js" wasn't found.
    at Validator._fail (/node_modules/lintspaces/lib/Validator.js:666:8)
    at Validator._loadSettingsEditorconfig (/node_modules/lintspaces/lib/Validator.js:193:9)
    at Validator._loadSettings (/node_modules/lintspaces/lib/Validator.js:137:7)
    at Validator.validate (/node_modules/lintspaces/lib/Validator.js:65:8)
    at files.forEach.file (/node_modules/echint/lib/index.js:116:16)
    at Array.forEach (<anonymous>)
    at echint (/node_modules/echint/lib/index.js:102:9)
    at Object.<anonymous> (/node_modules/echint/lib/bin.js:23:1)
    at Module._compile (internal/modules/cjs/loader.js:707:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test:editor: `echint *.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test:editor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     .npm/_logs/2019-07-19T04_37_20_208Z-debug.log
@iamnewton
Copy link
Author

Also I'm not able to use echint . to run this on my entire lib and instead have to pass some glob pattern; I'd prefer to run echint . and it scan my entire directory excluding node_modules.

@stefanmaric
Copy link
Collaborator

  "echint": {
    "extends": "@scope"
  },

Maybe the package name is missing, was it a typo? — "@scope/echint-config" instead of "@scope" alone.

Also I'm not able to use echint .

Did you try echint? Without the dot.

@iamnewton
Copy link
Author

Yeah, still failing on that same file. It appears to be looking at the current packages main (dist/scripts/index.js) rather than within the scoped packages main which is only editorconfig.

@iamnewton
Copy link
Author

It looks like this is due to the auto prefixing not taking in account scopes. Any chance you can help or point me in the right direction?

> echint

/components/node_modules/lintspaces/lib/Validator.js:666
	throw new Error(message);
	^

Error: The editorconfig file "/components/node_modules/echint-config-@scope/dist/scripts/index.js" wasn't found.

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

No branches or pull requests

2 participants