linting: enable eslint-plugin-n recommended rules

And fixes a lot of related issues.
This commit is contained in:
Julien Fontanet
2022-03-23 11:18:37 +01:00
parent 94df05566a
commit 7e27e0bda8
21 changed files with 69 additions and 21 deletions
+3
View File
@@ -2,6 +2,9 @@
module.exports = {
rules: {
'n/no-process-exit': 'off',
'n/no-unpublished-require': 'off',
'n/shebang': 'off',
'no-console': 'off',
},
}
+15
View File
@@ -13,6 +13,21 @@ module.exports = {
},
sourceType: 'module',
},
rules: {
// Native module (and this rule) requires file extensions, but Babel does not
'n/no-missing-import': 'off',
'n/no-unsupported-features/es-syntax': 'off',
'n/shebang': [
'error',
{
convertPath: {
'src/**/*.{,c,m}js': ['^src/(.+)$', 'dist/$1'],
},
},
],
},
},
],
}