示例#1
0
 def create_command(self, file):
     cmd = 'jsonlint'
     if npm_exists('jsonlint', self.working_dir):
         cmd = os.path.join(self.working_dir, 'node_modules', '.bin',
                            'jsonlint')
     command = [cmd, '-q', '-c', file]
     return command
示例#2
0
 def create_command(self, files):
     cmd = 'sass-lint'
     if npm_exists('sass-lint', self.working_dir):
         cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'sass-lint')
     command = [cmd, '-v', '-f', 'checkstyle']
     command += files
     return command
示例#3
0
 def create_command(self, files):
     cmd = 'stylelint'
     if npm_exists('stylelint', self.working_dir):
         cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'stylelint')
     command = [cmd, '--no-color', '-f', 'json']
     command += files
     return command
示例#4
0
 def create_command(self, files):
     cmd = 'jscs'
     if npm_exists('jscs', self.working_dir):
         cmd = os.path.join(self.working_dir, 'node_modules', '.bin',
                            'jscs')
     command = [cmd, '--reporter=checkstyle']
     command += files
     return command
示例#5
0
 def create_command(self, files):
     cmd = 'csslint'
     if npm_exists('csslint', self.working_dir):
         cmd = os.path.join(self.working_dir, 'node_modules', '.bin',
                            'csslint')
     command = [cmd, '--format=checkstyle-xml']
     command += files
     return command
示例#6
0
 def is_usable(self):
     return in_path('jsonlint') or npm_exists('jsonlint', self.working_dir)