eslint-config-jhh
Version:
JHH ESLint config
20 lines (16 loc) • 570 B
JavaScript
/**
* These rules relate to code running in Node.js, or in browsers with CommonJS
*
* @see http://eslint.org/docs/rules/#nodejs-and-commonjs
*/
module.exports = {
rules: {
// require require() calls to be placed at top-level module scope
'global-require': 'error',
// disallow new operators with calls to require
'no-new-require': 'error',
// disallow string concatenation with __dirname and __filename
// Doesnt work anyway. You'll end up loading the whole directory.
'no-path-concat': 'error'
}
}