You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know it sounds weirds, but I believe there is no place for really short JavaScript file, and that these tiny bits of code should be combined with other tiny bits of code to make a file of at least 5 lines.
I have tried to play with ESLint's default max-lines without much success (it always broke all the other problems from showing) so I decided to start with a very basic version, but with no luck yet:
'use strict'module.exports={meta: {type: 'suggestion',schema: [],},create(context){constsourceCode=context.getSourceCode();letlines=sourceCode.lines.map((text,i)=>({lineNumber: i+1,
text
}));return{"Program:exit"(){if(lines.length<5){context.report({node: node.property,message: 'File should have more lines',})}},}},}
Any help would be welcomed!
The text was updated successfully, but these errors were encountered:
I know it sounds weirds, but I believe there is no place for really short JavaScript file, and that these tiny bits of code should be combined with other tiny bits of code to make a file of at least 5 lines.
I have tried to play with ESLint's default max-lines without much success (it always broke all the other problems from showing) so I decided to start with a very basic version, but with no luck yet:
Any help would be welcomed!
The text was updated successfully, but these errors were encountered: