{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/11003","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/11003/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/11003/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/11003/events","html_url":"https://github.com/eslint/eslint/issues/11003","id":372431218,"node_id":"MDU6SXNzdWUzNzI0MzEyMTg=","number":11003,"title":"allow relative and absolute globs","user":{"login":"plexigras","id":8838132,"node_id":"MDQ6VXNlcjg4MzgxMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/8838132?v=4","gravatar_id":"","url":"https://api.github.com/users/plexigras","html_url":"https://github.com/plexigras","followers_url":"https://api.github.com/users/plexigras/followers","following_url":"https://api.github.com/users/plexigras/following{/other_user}","gists_url":"https://api.github.com/users/plexigras/gists{/gist_id}","starred_url":"https://api.github.com/users/plexigras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plexigras/subscriptions","organizations_url":"https://api.github.com/users/plexigras/orgs","repos_url":"https://api.github.com/users/plexigras/repos","events_url":"https://api.github.com/users/plexigras/events{/privacy}","received_events_url":"https://api.github.com/users/plexigras/received_events","type":"User","site_admin":false},"labels":[{"id":45711354,"node_id":"MDU6TGFiZWw0NTcxMTM1NA==","url":"https://api.github.com/repos/eslint/eslint/labels/triage","name":"triage","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-22T08:18:54Z","updated_at":"2018-10-22T16:50:01Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n    ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).\r\n\r\n    This template is for requesting a change that is not a bug fix, rule change, or new rule. If you are here for another reason, please see below:\r\n\r\n    1. To report a bug: https://eslint.org/docs/developer-guide/contributing/reporting-bugs\r\n    2. To request a rule change: https://eslint.org/docs/developer-guide/contributing/rule-changes\r\n    3. To propose a new rule: https://eslint.org/docs/developer-guide/contributing/new-rules\r\n    4. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint\r\n\r\n    Note that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue.\r\n-->\r\n\r\n**The version of ESLint you are using.**\r\n\r\n`5.7.0`\r\n\r\n**The problem you want to solve.**\r\n\r\ni ran into this while doing\r\n\r\n```\r\neslint --config=./configs/eslint.js test\r\n```\r\n\r\nbut globs like `../test/*` and even absolute paths like `/**/test/*` and `process.cwd() + '/test/*'` are prohibited\r\n\r\nhttps://github.com/eslint/eslint/blob/master/lib/config/config-ops.js#L364\r\n\r\n**Your take on the correct solution to problem.**\r\n\r\nall i see that would need to be changed is to also check against the absolute path.\r\n\r\nhttps://github.com/eslint/eslint/blob/master/lib/config.js#L296"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/431894266","html_url":"https://github.com/eslint/eslint/issues/11003#issuecomment-431894266","issue_url":"https://api.github.com/repos/eslint/eslint/issues/11003","id":431894266,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTg5NDI2Ng==","user":{"login":"not-an-aardvark","id":11638619,"node_id":"MDQ6VXNlcjExNjM4NjE5","avatar_url":"https://avatars2.githubusercontent.com/u/11638619?v=4","gravatar_id":"","url":"https://api.github.com/users/not-an-aardvark","html_url":"https://github.com/not-an-aardvark","followers_url":"https://api.github.com/users/not-an-aardvark/followers","following_url":"https://api.github.com/users/not-an-aardvark/following{/other_user}","gists_url":"https://api.github.com/users/not-an-aardvark/gists{/gist_id}","starred_url":"https://api.github.com/users/not-an-aardvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/not-an-aardvark/subscriptions","organizations_url":"https://api.github.com/users/not-an-aardvark/orgs","repos_url":"https://api.github.com/users/not-an-aardvark/repos","events_url":"https://api.github.com/users/not-an-aardvark/events{/privacy}","received_events_url":"https://api.github.com/users/not-an-aardvark/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T16:50:01Z","updated_at":"2018-10-22T16:50:01Z","author_association":"MEMBER","body":"Hi, thanks for creating an issue. For the sake of having all the discussion in one place, I'll restate what I mentioned in the Gitter channel earlier:\r\n\r\n---\r\n\r\nTo clarify the original motivation for disallowing `..`: If I have a folder called `src/` and also a folder called `tests/`, and `tests/.eslintrc` contains an override for `\"../src/**/*.js\"`, then what should be the behavior of `eslint src/`? Either\r\n\r\n* the override in `tests/.eslintrc` gets applied (which would require ESLint to somehow realize that `tests/.eslintrc` exists, despite the fact that it's not looking in tests), or\r\n* the override in `tests/.eslintrc` does not get applied, in which case the config for `src/` would be different depending on whether `tests/` is linted at the same time.\r\nNeither of these options seem good, so the solution was to disallow `..` in overrides.\r\n\r\nThe fact that overrides with `..` are also disallowed in configs when using the `--config` flag is a side-effect of the above dilemma and not a direct part of the design. That said, I'm not sure if there's a good way to improve it -- it seems like it could also be confusing for a directive to only be valid when the surrounding config file is used with `--config`, and not be valid otherwise. It also sees potentially confusing if `--config` changes how relative paths are resolved.\r\n\r\nIn other words, I don't think a solution for this would be as simple as allowing `..` and absolute paths in `overrides`, because that would introduce cases where ESLint behaves incorrectly/inconsistently when there's a config file in a sibling folder that has an override with `..`."}}
{"actor":{"display_login":"not-an-aardvark"}}