{"action":"created","issue":{"url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/1123","repository_url":"https://api.github.com/repos/sonarwhal/sonarwhal","labels_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/1123/labels{/name}","comments_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/1123/comments","events_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/1123/events","html_url":"https://github.com/sonarwhal/sonarwhal/issues/1123","id":330072922,"node_id":"MDU6SXNzdWUzMzAwNzI5MjI=","number":1123,"title":"Test doesn't work using npm","user":{"login":"sarvaje","id":1581288,"node_id":"MDQ6VXNlcjE1ODEyODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false},"labels":[{"id":735478390,"node_id":"MDU6TGFiZWw3MzU0NzgzOTA=","url":"https://api.github.com/repos/sonarwhal/sonarwhal/labels/priority:high","name":"priority:high","color":"a4b22a","default":false},{"id":541186704,"node_id":"MDU6TGFiZWw1NDExODY3MDQ=","url":"https://api.github.com/repos/sonarwhal/sonarwhal/labels/type:bug","name":"type:bug","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":{"login":"sarvaje","id":1581288,"node_id":"MDQ6VXNlcjE1ODEyODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false},"assignees":[{"login":"sarvaje","id":1581288,"node_id":"MDQ6VXNlcjE1ODEyODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-06-07T00:02:39Z","updated_at":"2018-06-13T03:58:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"*Original issue at the end.* \r\n\r\nOn top of using package names, we should allow paths.\r\n\r\nThe scenarios that this unlocks are:\r\n\r\n* **Shared configurations in the same project** There are some rules that apply to all moments of the development process, but some others that are only valid when the site is in staging or in production. For example: I could test my website locally, but I'm probably not going to compress my assets using brotli all the time. This way we can have a common file that we can extend from and have those configurations as part of the project:\r\n\r\n```json\r\n{\r\n  \"extends\": \"./common/.sonarwhalrc\",\r\n  \"connector\": \"local\"\r\n}\r\n```\r\n\r\n* **Custom resources for the project** Having to create a package for a custom rule/parser is some overhead that not everybody is willing to do (and TBH, not worth it if it is very specific). This way there's no need to publish a package to create it (we might want to improve the wizard and just create a single file with no testing files for this scenario?):\r\n\r\n```json\r\n{\r\n  ...\r\n  \"rules\": {\r\n    \"./rules/my-custom-rule.js\": \"error\"\r\n  }\r\n}\r\n```\r\n\r\n- - - - - - - - - - - - - - - - - - -\r\n\r\nSteps to reproduce:\r\n1. Go to rule-no-vulnerable-javascript-libraries\r\n1. Run npm install\r\n1. Run npm test\r\n"},"comment":{"url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/comments/396806015","html_url":"https://github.com/sonarwhal/sonarwhal/issues/1123#issuecomment-396806015","issue_url":"https://api.github.com/repos/sonarwhal/sonarwhal/issues/1123","id":396806015,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjgwNjAxNQ==","user":{"login":"molant","id":606594,"node_id":"MDQ6VXNlcjYwNjU5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/606594?v=4","gravatar_id":"","url":"https://api.github.com/users/molant","html_url":"https://github.com/molant","followers_url":"https://api.github.com/users/molant/followers","following_url":"https://api.github.com/users/molant/following{/other_user}","gists_url":"https://api.github.com/users/molant/gists{/gist_id}","starred_url":"https://api.github.com/users/molant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molant/subscriptions","organizations_url":"https://api.github.com/users/molant/orgs","repos_url":"https://api.github.com/users/molant/repos","events_url":"https://api.github.com/users/molant/events{/privacy}","received_events_url":"https://api.github.com/users/molant/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T03:58:29Z","updated_at":"2018-06-13T03:58:29Z","author_association":"MEMBER","body":"*Original issue at the end.* \r\n\r\nOn top of using package names, we should allow paths.\r\n\r\nThe scenarios that this unlocks are:\r\n\r\n* **Shared configurations in the same project** There are some rules that apply to all moments of the development process, but some others that are only valid when the site is in staging or in production. For example: I could test my website locally, but I'm probably not going to compress my assets using brotli all the time. This way we can have a common file that we can extend from and have those configurations as part of the project:\r\n\r\n```json\r\n{\r\n  \"extends\": \"./common/.sonarwhalrc\",\r\n  \"connector\": \"local\"\r\n}\r\n```\r\n\r\n* **Custom resources for the project** Having to create a package for a custom rule/parser is some overhead that not everybody is willing to do (and TBH, not worth it if it is very specific). This way there's no need to publish a package to create it (we might want to improve the wizard and just create a single file with no testing files for this scenario?):\r\n\r\n```json\r\n{\r\n  ...\r\n  \"rules\": {\r\n    \"./rules/my-custom-rule.js\": \"error\"\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"molant"}}