Unexpected empty async method 'delete'
63 * @async
64 * @param {Number} id
65 */
66 async delete(id){} 67}
68
69/**
Unexpected empty async method 'update'
55 * @param {Number} id
56 * @throws {Error('Entity not found')}
57 */
58 async update(id){} 59
60
61 /**
Unexpected empty async method 'findOne'
47 * @returns {Object.object}
48 * @throws {Error('Entity not found')}
49 */
50 async findOne(){} 51
52 /**
53 * Updates an entity in the database
Unexpected empty async method 'findMany'
38 * @async
39 * @returns {Array}
40 */
41 async findMany(){} 42
43
44 /**
Unexpected empty async method 'create'
31 * @async
32 * @param {Object.object} data
33 */
34 async create(data){} 35
36 /**
37 * Finds all entities in the database
Unexpected empty static async method 'validate'
27 }
28 }
29
30 static async validate(req, res){31 32 }33}
34
35export default ProductController
Unexpected empty static async method 'validate'
46 }
47 }
48
49 static async validate(req, res){50 51 }52
53}
54
Unexpected empty async method 'recover'
72
73 }
74
75 async recover(req, res){76 77 }78
79}
80
Description
Having empty functions hurts readability, and is considered a code-smell. There's almost always a way to avoid using them. If you must use one, consider adding a comment to inform the reader of its purpose.
Bad Practice
getUser('SwaGaLisTiQuE', () => {})
function f() {}
Recommended
getUser('SwaGaLisTiQuE', () => {
// empty because <reason>
})
function f() {
// intentionally empty. <reason>
}