I have written a custom ESLint rule as follows:
//------------------------------------------------------------------------------ // Rule Definition //--------