Skip to content

Commit da2000a

Browse files
committed
Restrict use of certain packages
1 parent f8dedf8 commit da2000a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

etc/eslint/rules/nodejs.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,24 @@ rules[ 'no-process-env' ] = 'error';
171171
rules[ 'no-process-exit' ] = 'warn';
172172

173173
/**
174-
* Do not restrict the use of specific modules.
174+
* Restrict the use of specific modules.
175175
*
176176
* @name no-restricted-modules
177177
* @memberof rules
178-
* @type {string}
179-
* @default 'off'
178+
* @type {Array}
180179
* @see [no-restricted-modules]{@link http://eslint.org/docs/rules/no-restricted-modules}
181180
*/
182-
rules[ 'no-restricted-modules' ] = 'off';
181+
rules[ 'no-restricted-modules' ] = [ 'error', {
182+
'paths': [
183+
'underscore',
184+
'lodash',
185+
'async'
186+
],
187+
'patterns': [
188+
'lodash*',
189+
'async*'
190+
]
191+
}];
183192

184193
/**
185194
* Warn when using synchronous methods when an asynchronous version exists.

0 commit comments

Comments
 (0)