mirror of
https://github.com/scratchfoundation/eslint-config-scratch.git
synced 2025-08-28 22:40:13 -04:00
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.
This commit is contained in:
parent
35832c7bb0
commit
e00a1210ac
2 changed files with 12 additions and 10 deletions
12
index.js
12
index.js
|
@ -113,18 +113,10 @@ module.exports = {
|
|||
}],
|
||||
'require-jsdoc': [1],
|
||||
'semi': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'always'],
|
||||
|
||||
// Node/CommonJS
|
||||
'global-require': [2],
|
||||
'handle-callback-err': [1],
|
||||
'no-mixed-requires': [2],
|
||||
'no-new-require': [2],
|
||||
'no-path-concat': [2],
|
||||
'space-before-function-paren': [2, 'always']
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true
|
||||
commonjs: true
|
||||
},
|
||||
extends: ['eslint:recommended']
|
||||
};
|
||||
|
|
10
node.js
Normal file
10
node.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
module.exports = {
|
||||
rules: {
|
||||
// Node/CommonJS
|
||||
'global-require': [2],
|
||||
'handle-callback-err': [1],
|
||||
'no-mixed-requires': [2],
|
||||
'no-new-require': [2],
|
||||
'no-path-concat': [2]
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue