私は Sublime Text 3 で JSHint と SublimeLinter を使用していますが、Facebooks API を使用する場合、オブジェクト:
が構造内で二重になっているのが気に入りません。{ og:url: 'example.com' }
FB.api(
'me/objects/my-app:object',
'post',
{
og:url: http://samples.ogp.me/12345678910,
og:title: Sample Object,
og:type: my-app:object,
og:image: https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png,
og:description: ,
fb:app_id: 12345678910,
place:location:latitude: Sample Location: Latitude,
place:location:longitude: Sample Location: Longitude
},
function(response) {
// handle the response
}
);
プロジェクトのルートにある .jshintrc ファイル内の特定の変数と名前を無視する方法は知っていますが、この構造について不平を言うのを止める方法がわかりません。Facebook API は人気があるので、ここに投稿する価値があると思いました。