eslint-plugin-lodash
Version:
Lodash specific linting rules for ESLint
271 lines (270 loc) • 8.3 kB
JavaScript
'use strict';
module.exports = {
aliases: {
extend: 'assignIn',
extendWith: 'assignInWith',
each: 'forEach',
eachRight: 'forEachRight',
first: 'head'
},
wrapper: ['concat', 'join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'],
wrapperAliases: {
toJSON: 'value',
valueOf: 'value'
},
shorthand: ['differenceBy', 'dropRightWhile', 'dropWhile', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLastIndex', 'findLastKey', 'flatMapDeep', 'flatMapDepth', 'groupBy', 'intersectionBy', 'invertBy', 'map', 'mapValues', 'maxBy', 'minBy', 'overSome', 'overEvery', 'partition', 'reject', 'remove', 'some', 'sortedIndexBy', 'sortedLastIndexBy', 'sumBy', 'takeRightWhile', 'takeWhile', 'unionBy', 'uniqBy', 'xorBy'],
chainable: ['after', 'ary', 'assign', 'assignIn', 'assignInWith', 'assignWith', 'at', 'before', 'bind', 'bindAll', 'bindKey', 'castArray', 'chain', 'chunk', 'commit', 'compact', 'concat', 'conforms', 'constant', 'countBy', 'create', 'curry', 'debounce', 'defaults', 'defaultsDeep', 'defer', 'delay', 'difference', 'differenceBy', 'differenceWith', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'fill', 'filter', 'flatMap', 'flatMapDeep', 'flatMapDepth', 'flatten', 'flattenDeep', 'flattenDepth', 'flip', 'flow', 'flowRight', 'fromPairs', 'functions', 'functionsIn', 'groupBy', 'initial', 'intersection', 'intersectionBy', 'intersectionWith', 'invert', 'invertBy', 'invokeMap', 'iteratee', 'keyBy', 'keys', 'keysIn', 'map', 'mapKeys', 'mapValues', 'matches', 'matchesProperty', 'memoize', 'merge', 'mergeWith', 'method', 'methodOf', 'mixin', 'negate', 'nthArg', 'omit', 'omitBy', 'once', 'orderBy', 'over', 'overArgs', 'overEvery', 'overSome', 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'plant', 'property', 'propertyOf', 'pull', 'pullAll', 'pullAllBy', 'pullAllWith', 'pullAt', 'push', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'rest', 'reverse', 'sampleSize', 'set', 'setWith', 'shuffle', 'slice', 'sort', 'sortBy', 'splice', 'spread', 'tail', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'toArray', 'toPairs', 'toPairsIn', 'toPath', 'toPlainObject', 'transform', 'unary', 'union', 'unionBy', 'unionWith', 'uniq', 'uniqBy', 'uniqWith', 'unset', 'unshift', 'unzip', 'unzipWith', 'update', 'updateWith', 'values', 'valuesIn', 'without', 'wrap', 'xor', 'xorBy', 'xorWith', 'zip', 'zipObject', 'zipObjectDeep', 'zipWith'],
iteratee: {
any: ['cloneDeepWith', 'cloneWith', 'countBy', 'dropRightWhile', 'dropWhile', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flatMapDepth', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'groupBy', 'indexBy', 'invertBy', 'keyBy', 'map', 'mapKeys', 'mapValues', 'maxBy', 'meanBy', 'minBy', 'omitBy', 'partition', 'pickBy', 'reduce', 'reduceRight', 'reject', 'remove', 'some', 'sortedUniqBy', 'sumBy', 'takeRightWhile', 'takeWhile', 'tap', 'thru', 'times', 'transform', 'uniqBy', 'unzipWith', 'xorBy'],
differentIndex: {
pullAllBy: 2,
sortedIndex: 2,
sortedIndexBy: 2,
sortedLastIndex: 2,
sortedLastIndexBy: 2
}
},
args: {
add: 2,
after: 2,
ary: 2,
before: 2,
camelCase: 1,
capitalize: 1,
castArray: 1,
ceil: 2,
chain: 1,
chunk: 2,
clamp: 3,
clone: 1,
cloneDeep: 1,
cloneDeepWith: 2,
cloneWith: 2,
compact: 1,
cond: 1,
conforms: 1,
constant: 1,
countBy: 2,
create: 2,
curry: 2,
curryRight: 2,
debounce: 3,
deburr: 1,
divide: 2,
drop: 2,
dropRight: 2,
dropRightWhile: 3,
dropWhile: 3,
endsWith: 3,
eq: 2,
escape: 1,
escapeRegExp: 1,
every: 2,
fill: 4,
filter: 2,
find: 3,
findIndex: 3,
findKey: 2,
findLast: 3,
findLastIndex: 3,
findLastKey: 2,
flatMap: 2,
flatMapDeep: 2,
flatMapDepth: 3,
flatten: 1,
flattenDeep: 1,
flattenDepth: 2,
flip: 1,
floor: 2,
forEach: 2,
forEachRight: 2,
forIn: 2,
forInRight: 2,
forOwn: 2,
forOwnRight: 2,
fromPairs: 1,
functions: 1,
functionsIn: 1,
get: 3,
groupBy: 2,
gt: 2,
gte: 2,
has: 2,
hasIn: 2,
head: 1,
identity: 1,
inRange: 3,
includes: 3,
indexOf: 3,
initial: 1,
invert: 1,
invertBy: 2,
isArguments: 1,
isArray: 1,
isArrayBuffer: 1,
isArrayLike: 1,
isArrayLikeObject: 1,
isBoolean: 1,
isBuffer: 1,
isDate: 1,
isElement: 1,
isEmpty: 1,
isEqual: 2,
isEqualWith: 3,
isError: 1,
isFinite: 1,
isFunction: 1,
isInteger: 1,
isLength: 1,
isMatch: 2,
isMatchWith: 3,
isNaN: 1,
isNative: 1,
isNil: 1,
isNull: 1,
isNumber: 1,
isObject: 1,
isObjectLike: 1,
isPlainObject: 1,
isRegExp: 1,
isSafeInteger: 1,
isSet: 1,
isString: 1,
isSymbol: 1,
isTypedArray: 1,
isUndefined: 1,
isWeakMap: 1,
isWeakSet: 1,
join: 2,
kebabCase: 1,
keyBy: 2,
keys: 1,
keysIn: 1,
last: 1,
lastIndexOf: 3,
lowerCase: 1,
lowerFirst: 1,
lt: 2,
lte: 2,
map: 2,
mapKeys: 2,
mapValues: 2,
matches: 1,
matchesProperty: 2,
max: 1,
maxBy: 2,
mean: 1,
meanBy: 2,
memoize: 2,
min: 1,
minBy: 2,
mixin: 3,
multiply: 2,
negate: 1,
noConflict: 0,
noop: 0,
now: 0,
nth: 2,
nthArg: 1,
once: 1,
orderBy: 3,
pad: 3,
padEnd: 3,
padStart: 3,
parseInt: 2,
partition: 2,
property: 1,
propertyOf: 1,
pullAll: 2,
pullAllBy: 3,
pullAllWith: 3,
random: 3,
range: 3,
rangeRight: 3,
reduce: 3,
reduceRight: 3,
reject: 2,
remove: 2,
repeat: 2,
rest: 2,
result: 3,
reverse: 1,
round: 2,
runInContext: 1,
sample: 1,
sampleSize: 2,
set: 3,
setWith: 4,
shuffle: 1,
size: 1,
slice: 3,
snakeCase: 1,
some: 2,
sortedIndex: 2,
sortedIndexBy: 3,
sortedIndexOf: 2,
sortedLastIndex: 2,
sortedLastIndexBy: 3,
sortedLastIndexOf: 2,
sortedUniq: 1,
sortedUniqBy: 2,
split: 3,
spread: 2,
startCase: 1,
startsWith: 3,
stubArray: 0,
stubFalse: 0,
stubObject: 0,
stubString: 0,
stubTrue: 0,
subtract: 2,
sum: 1,
sumBy: 2,
tail: 1,
take: 2,
takeRight: 2,
takeRightWhile: 2,
takeWhile: 2,
tap: 2,
template: 2,
throttle: 3,
thru: 2,
times: 2,
toArray: 1,
toInteger: 1,
toLength: 1,
toLower: 1,
toNumber: 1,
toPairs: 1,
toPairsIn: 1,
toPath: 1,
toPlainObject: 1,
toSafeInteger: 1,
toString: 1,
toUpper: 1,
transform: 3,
trim: 2,
trimEnd: 2,
trimStart: 2,
truncate: 3,
unary: 1,
unescape: 1,
uniq: 1,
uniqBy: 2,
uniqWith: 2,
uniqueId: 1,
unset: 2,
unzip: 1,
unzipWith: 2,
update: 3,
updateWith: 4,
upperCase: 1,
upperFirst: 1,
values: 1,
valuesIn: 1,
words: 2,
wrap: 2,
zipObject: 2,
zipObjectDeep: 2
}
};