{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/fecs/issues/75","labels_url":"https://api.github.com/repos/ecomfe/fecs/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/fecs/issues/75/comments","events_url":"https://api.github.com/repos/ecomfe/fecs/issues/75/events","html_url":"https://github.com/ecomfe/fecs/issues/75","id":64427778,"number":75,"title":"fecs的文件配置的bug?","user":{"login":"wzhscript","id":5771319,"avatar_url":"https://avatars.githubusercontent.com/u/5771319?v=3","gravatar_id":"","url":"https://api.github.com/users/wzhscript","html_url":"https://github.com/wzhscript","followers_url":"https://api.github.com/users/wzhscript/followers","following_url":"https://api.github.com/users/wzhscript/following{/other_user}","gists_url":"https://api.github.com/users/wzhscript/gists{/gist_id}","starred_url":"https://api.github.com/users/wzhscript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzhscript/subscriptions","organizations_url":"https://api.github.com/users/wzhscript/orgs","repos_url":"https://api.github.com/users/wzhscript/repos","events_url":"https://api.github.com/users/wzhscript/events{/privacy}","received_events_url":"https://api.github.com/users/wzhscript/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-26T03:02:21Z","updated_at":"2015-03-26T04:53:31Z","closed_at":null,"body":"在一个单独文件中，我定义了一个类，供其他页面使用，如下所示:\r\n``` javascript\r\nvar MyClass = (function(){...})();\r\n```\r\n我不想检查全局的unused vars，但想继续检查局部的unused vars，所以尝试了如下的文件级别配置，以避免MyClass 被识别成 unused vars (http://eslint.org/docs/rules/no-unused-vars.html)。\r\n``` javascript\r\n/*eslint no-unused-vars: [2, {\"vars\": \"local\", \"args\": \"after-used\"}]*/\r\nvar MyClass = (function(){...})();\r\n```\r\n\r\n可是这个配置貌似在fecs中不好使，MyClass仍然会被识别为unused vars。\r\n但我发现在eslint自带的command-line工具中 (http://eslint.org/docs/user-guide/command-line-interface)却是可行的，能够正常识别上面的配置。\r\n\r\n我现在用了一个替代方案（看起来比较捉急），如下：\r\n``` javascript\r\n/*eslint-disable no-unused-vars*/\r\nvar MyClass = (function(){\r\n/*eslint-enable no-unused-vars*/\r\n    ...\r\n    ...\r\n})();\r\n\r\n```\r\n\r\n\r\n请教各位大神，面对这个问题，如何更加优雅地配置？"},"comment":{"url":"https://api.github.com/repos/ecomfe/fecs/issues/comments/86342740","html_url":"https://github.com/ecomfe/fecs/issues/75#issuecomment-86342740","issue_url":"https://api.github.com/repos/ecomfe/fecs/issues/75","id":86342740,"user":{"login":"wzhscript","id":5771319,"avatar_url":"https://avatars.githubusercontent.com/u/5771319?v=3","gravatar_id":"","url":"https://api.github.com/users/wzhscript","html_url":"https://github.com/wzhscript","followers_url":"https://api.github.com/users/wzhscript/followers","following_url":"https://api.github.com/users/wzhscript/following{/other_user}","gists_url":"https://api.github.com/users/wzhscript/gists{/gist_id}","starred_url":"https://api.github.com/users/wzhscript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzhscript/subscriptions","organizations_url":"https://api.github.com/users/wzhscript/orgs","repos_url":"https://api.github.com/users/wzhscript/repos","events_url":"https://api.github.com/users/wzhscript/events{/privacy}","received_events_url":"https://api.github.com/users/wzhscript/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T04:53:31Z","updated_at":"2015-03-26T04:53:31Z","body":"我的版本是fecs 0.3.0-beta.1\r\n我搞错了，在.fecsrc中确实是可以关掉no-unused-vars\r\n但是如下配置还是会提示\"[建议] 可能会导致代码质量下降的问题。（MyClass is defined but never used）\"\r\n```json\r\n\"no-unused-vars\": [1, {\"vars\": \"local\", \"args\": \"none\"}]\r\n```\r\n根据官方的[解释](http://eslint.org/docs/rules/no-unused-vars.html)，上面的配置不应该提示全局变量MyClass。\r\n而eslint官方的[command-line](http://eslint.org/docs/user-guide/command-line-interface)确实是这样实现的，没有问题。\r\n"}}