Skip to content

Commit

Permalink
feat(node): add eslint-plugin-node
Browse files Browse the repository at this point in the history
fix #24
  • Loading branch information
MatthewMi11er committed Jul 13, 2018
1 parent 305c757 commit ccfb468
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const extendedConfigs = [
'./rules/base',
'./rules/node',
'./rules/security',
'./rules/prettier',
].map(require.resolve);
Expand Down
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"eslint-plugin-import": "2.13.0",
"eslint-plugin-jsx-a11y": "6.1.1",
"eslint-plugin-no-unsafe-innerhtml": "1.0.16",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-optimize-regex": "1.1.5",
"eslint-plugin-react": "7.10.0",
"eslint-plugin-scanjs-rules": "0.2.1",
Expand All @@ -73,6 +74,7 @@
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-no-unsafe-innerhtml": "^1.0.16",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-optimize-regex": "^1.1.5",
"eslint-plugin-react": "^7.7.0",
"eslint-plugin-scanjs-rules": "^0.2.1",
Expand Down
22 changes: 22 additions & 0 deletions rules/node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const plugins = ['node'];

const rules = {
'no-process-exit': 'error',
'node/exports-style': 'off',
'node/no-deprecated-api': 'error',
'node/no-extraneous-import': 'off',
'node/no-extraneous-require': 'error',
'node/no-missing-import': 'off',
'node/no-missing-require': 'error',
'node/no-unpublished-bin': 'error',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'error',
'node/no-unsupported-features': 'error',
'node/process-exit-as-throw': 'error',
'node/shebang': 'error',
};

module.exports = {
plugins,
rules,
};

0 comments on commit ccfb468

Please sign in to comment.