Skip to content

Gobie/gjslinter-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gjslinter-fixer

Stream wrapper to fix source files according to output of gjslinter wrapper for Google Closure Linter.

Google Closure Linter has autofixer for Javascript files. This fixer is aimed to solve the problem for Coffeescript files.

Getting Started

Install the module with:

npm install gjslinter-fixer

Execute the fixer

var glob = require('glob-stream');
var gjslinter = require('gjslinter');
var gjslinterfixer = require('gjslinter-fixer');

glob.create('./build/**/*.js')
  .pipe(gjslinter({
    flags: ['--nojsdoc']
  }))
  .pipe(gjslinterfixer({map: [
      from: /^.+build\/(.+).js$/
      to: (_0, _1) -> "src/#{_1}.coffee"
    ]
  }));

Supported fixes

  • Missing require [142] - inserts missing require at the beginning of the file
  • Missing provide [143] - inserts missing provide at the beginning of the file
  • Unnecessary require [144] - removes unnecessary require from the file
  • Unnecessary provide [145] - removes unnecessary provide from the file

About

Stream wrapper to fix source files according to output of Google Closure Linter for Coffeescript

Resources

License

Stars

Watchers

Forks

Packages

No packages published