From 1f86ac3aaaec2a26490a87ecf3222e934f63cd0f Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Mon, 30 Jul 2018 20:29:30 -0400 Subject: [PATCH] feat(node): add new eslint-node rules --- rules/node.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/rules/node.js b/rules/node.js index f7ccca9..82445be 100644 --- a/rules/node.js +++ b/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 = { @@ -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, };