{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/445","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/445/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/445/events","html_url":"https://github.com/stylelint/stylelint/issues/445","id":112725407,"number":445,"title":"property-whitelist issues","user":{"login":"ntwb","id":1016458,"avatar_url":"https://avatars.githubusercontent.com/u/1016458?v=3","gravatar_id":"","url":"https://api.github.com/users/ntwb","html_url":"https://github.com/ntwb","followers_url":"https://api.github.com/users/ntwb/followers","following_url":"https://api.github.com/users/ntwb/following{/other_user}","gists_url":"https://api.github.com/users/ntwb/gists{/gist_id}","starred_url":"https://api.github.com/users/ntwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntwb/subscriptions","organizations_url":"https://api.github.com/users/ntwb/orgs","repos_url":"https://api.github.com/users/ntwb/repos","events_url":"https://api.github.com/users/ntwb/events{/privacy}","received_events_url":"https://api.github.com/users/ntwb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stylelint/stylelint/labels/status:%20discussion","name":"status: discussion","color":"0023ee"},{"url":"https://api.github.com/repos/stylelint/stylelint/labels/type:%20bug","name":"type: bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-22T03:41:26Z","updated_at":"2015-10-22T13:36:52Z","closed_at":null,"body":"Given the following rule configuration: `\"property-whitelist\": [ 2, \"margin\" ],` with this CSS:\r\n\r\n```css\r\n.test {\r\n\targin: 0;\r\n}\r\n```\r\n\r\nI'd expect this to show a warning: `Unexpected property \"argin\" (property-whitelist)` and it doesn't.\r\n\r\nA few more CSS examples other than `argin` where no warning is shown are `rgin`, `gin`, `in`, `n` :smirk:\r\n\r\nUsing `yolo: 0;` correctly warns with: `Unexpected property \"yolo\" (property-whitelist)`\r\nUsing `www: 0;` correctly warns with: `Unexpected property \"www\" (property-whitelist)`\r\nUsing `mmargin: 0;` correctly warns with: `Unexpected property \"mmargin\" (property-whitelist)`\r\nUsing `marginn: 0;` correctly warns with: `Unexpected property \"marginn\" (property-whitelist)`\r\nUsing `arin: 0;` correctly warns with: `Unexpected property \"arin\" (property-whitelist)`\r\n\r\nI'm guessing it's a regex issue somewhere in that \"any\" set of characters in the same order as the string contained in the option value are ignored/skipped and not detected as invalid.\r\n\r\nIf it's not obvious, I'm trying to detect a typo of the word `margin` :wink: "},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/150225665","html_url":"https://github.com/stylelint/stylelint/issues/445#issuecomment-150225665","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/445","id":150225665,"user":{"login":"davidtheclark","id":628431,"avatar_url":"https://avatars.githubusercontent.com/u/628431?v=3","gravatar_id":"","url":"https://api.github.com/users/davidtheclark","html_url":"https://github.com/davidtheclark","followers_url":"https://api.github.com/users/davidtheclark/followers","following_url":"https://api.github.com/users/davidtheclark/following{/other_user}","gists_url":"https://api.github.com/users/davidtheclark/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtheclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtheclark/subscriptions","organizations_url":"https://api.github.com/users/davidtheclark/orgs","repos_url":"https://api.github.com/users/davidtheclark/repos","events_url":"https://api.github.com/users/davidtheclark/events{/privacy}","received_events_url":"https://api.github.com/users/davidtheclark/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T13:36:51Z","updated_at":"2015-10-22T13:36:51Z","body":"There is not currently a way to check that the option is itself an array. It was built to check every item in the array. This will take a little time to change correctly. In the meantime, I think that @jeddy3's suggestion (to use `[\"margin\"]` instead of `\"margin\"`) might do the trick.\r\n\r\nBTW: I am going to start dedicating most of my freetime over the next month to preparing my talk for http://cssday.io/. So although I will try to pitch in for bug fixes I probably will not spend much time developing new features, for a little while."}}