UNPKG

@fellow/eslint-plugin-coffee

Version:

Transpiles coffee files (.coffee, .cjsx) and runs through eslint. Reports errors with original line numbers.

12 lines (7 loc) 386 B
import g from './globals' export arrayToObject = (arr) -> Object.assign {}, ...arr.map (item) -> [Array.isArray(item) and item[0] or item]: Array.isArray(item) and item[1] or item export isLiterate = (filename) -> filename.toLocaleLowerCase().split('.')[-1..][0].startsWith('lit') export isCoffeeFile = (f) -> f.match new RegExp g.CoffeeExtensions.join('|').replace(/\./g,'\\.')