virtual-labs-archive / problem-solving-iiith

Other
4 stars 435 forks source link

Expected method shorthand. (object-shorthand) #460

Open BSravanthi opened 6 years ago

BSravanthi commented 6 years ago

ECMAScript 6 provides a concise form for defining object literal methods and properties. This syntax can make defining complex object literals much cleaner. In ECMAScript 6:


//Bad:
var foo = {
    x: function() {},
    y: function *() {},
    z: z
};

//Good:
var foo = {
    x() {},
    *y() {},
    z
};

Please refer to the following link to fix similar issues.

https://app.codacy.com/app/BSravanthi/problem-solving-iiith/issues?&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiQ29kZSBTdHlsZSJdfSx7ImlkIjoiTGV2ZWwiLCJ2YWx1ZXMiOltudWxsXX0seyJpZCI6IlBhdHRlcm4iLCJ2YWx1ZXMiOlsxNjE5XX0seyJpZCI6IkF1dGhvciIsInZhbHVlcyI6W251bGxdfSx7InZhbHVlcyI6W119XQ==

AksharaMayreddy commented 6 years ago

commit id's : 2ec86b76963c6ce21318ec4373472cbb814525f2 (autocompletion.js) f461b77ad8e4829c32e88b191546f8b9cbba0cbe (exp3/charmap.js) 61832bc89edf6432e8305480943546e31a40800d (exp6/charmap.js) 0bcafaa50f7080ef476d0cd100513e8f4c47bdd8 (exp10/edit_area_full.js) d86f8fea68a93a290944fa2e467f1fdc1454b383 (exp3/edit_area_full.js) 175d448484e827f67601bf3357bd0561a332526e (exp5/edit_area_full.js) eb812268f2359e8af7d71278fe5c1153f1cf8d2d (exp7/edit_area_full.js)

niveditareddy commented 6 years ago

Valid fix@AksharaMayreddy

VINEETHREDDYSHERI commented 6 years ago

Valid fix @AksharaMayreddy

thecoderxman commented 5 years ago

Validated @AksharaMayreddy