Skip to content

Commit e00a121

Browse files
author
Ray Schamp
committed
fix(node): Split Node rules out from base config
We don't want to include Node-specific rules for the base configuration. This allows projects to lint Node files separately from browser files.
1 parent 35832c7 commit e00a121

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

index.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,10 @@ module.exports = {
113113
}],
114114
'require-jsdoc': [1],
115115
'semi': [2, 'always'],
116-
'space-before-function-paren': [2, 'always'],
117-
118-
// Node/CommonJS
119-
'global-require': [2],
120-
'handle-callback-err': [1],
121-
'no-mixed-requires': [2],
122-
'no-new-require': [2],
123-
'no-path-concat': [2],
116+
'space-before-function-paren': [2, 'always']
124117
},
125118
env: {
126-
browser: true,
127-
node: true
119+
commonjs: true
128120
},
129121
extends: ['eslint:recommended']
130122
};

node.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
rules: {
3+
// Node/CommonJS
4+
'global-require': [2],
5+
'handle-callback-err': [1],
6+
'no-mixed-requires': [2],
7+
'no-new-require': [2],
8+
'no-path-concat': [2]
9+
}
10+
};

0 commit comments

Comments
 (0)