linting: enable eslint-plugin-n recommended rules
And fixes a lot of related issues.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
module.exports = {
|
||||
rules: {
|
||||
'n/no-process-exit': 'off',
|
||||
'n/no-unpublished-require': 'off',
|
||||
'n/shebang': 'off',
|
||||
'no-console': 'off',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user