Skip to content

Commit

Permalink
feat(node): add new eslint-node rules
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMi11er committed Jul 31, 2018
1 parent dc95aa8 commit 1f86ac3
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion rules/node.js
@@ -1,3 +1,16 @@
const parserOptions = {
ecmaVersion: 2019,
};

const env = {
es6: true,
node: true,
};

const globals = {
Atomics: false,
SharedArrayBuffer: false,
};
const plugins = ['node'];

const rules = {
Expand All @@ -11,12 +24,22 @@ const rules = {
'node/no-unpublished-bin': 'error',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'error',
'node/no-unsupported-features': 'error',
'node/no-unsupported-features/es-builtins': 'error',
'node/no-unsupported-features/es-syntax': 'error',
'node/no-unsupported-features/node-builtins': 'error',
'node/prefer-global/buffer': 'off',
'node/prefer-global/console': 'off',
'node/prefer-global/process': 'off',
'node/prefer-global/url-search-params': 'off',
'node/prefer-global/url': 'off',
'node/process-exit-as-throw': 'error',
'node/shebang': 'error',
};

module.exports = {
parserOptions,
env,
globals,
plugins,
rules,
};

0 comments on commit 1f86ac3

Please sign in to comment.