Added length rule for index files [warn]

- index.js files are meant to be an index, not contain behaviour or logic
- files longer than 50 lines are indicative of code in the wrong place, all though not definitive
- enabling this as a hint to get us to move code to better locations
This commit is contained in:
Hannah Wolfe 2021-05-07 21:00:39 +01:00
parent ba6f51850e
commit 8cff7b9cd6
No known key found for this signature in database
GPG Key ID: 9F8C7532D0A6BA55

View File

@ -16,6 +16,12 @@ module.exports = {
'one-var': [2, 'never']
},
overrides: [
{
files: '**/index.js',
rules: {
'max-lines': ['warn', {skipBlankLines: true, skipComments: true, max: 50}]
}
},
{
files: 'core/server/api/canary/*',
rules: {