Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
new linter
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Aug 6, 2016
1 parent e86d404 commit 3c16509
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 148 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
sudo: false
language: node_js
node_js:
- "4.2.1"
- "4"
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
notifications:
email: false
email: false
112 changes: 0 additions & 112 deletions Gruntfile.js

This file was deleted.

82 changes: 82 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* sublimetext-gulpfile.js
* https://github.com/idleberg/sublimetext-gulpfile.js
*
* Copyright (c) 2014-2016 Jan T. Sott
* Licensed under the MIT license.
*/

// Dependencies
var gulp = require('gulp'),
debug = require('gulp-debug'),
jsonlint = require('gulp-json-lint');
ymlVal = require('gulp-yaml-validate');
xmlVal = require('gulp-xml-validator');

// Supported files
var jsonFiles = [
'!node_modules/**/*',
'**/*.JSON-sublime-syntax',
'**/*.JSON-tmLanguage',
'**/*.JSON-tmTheme',
'**/*.sublime-build',
'**/*.sublime-commands',
'**/*.sublime-completions',
'**/*.sublime-keymap',
'**/*.sublime-macro',
'**/*.sublime-menu',
'**/*.sublime-settings',
'**/*.sublime-theme',
'messages.json'
];

var xmlFiles = [
'!node_modules/**/*',
'**/*.plist',
'**/*.PLIST-sublime-syntax',
'**/*.PLIST-tmLanguage',
'**/*.PLIST-tmTheme',
'**/*.sublime-snippet',
'**/*.tmCommand',
'**/*.tmLanguage',
'**/*.tmPreferences',
'**/*.tmSnippet',
'**/*.tmTheme',
'**/*.xml',
'*.bbcolors',
'*.dvtcolortheme',
'*.icls',
'*.itermcolors',
'*.terminal'
];

var ymlFiles = [
'!node_modules/**/*',
'**/*.sublime-syntax',
'**/*.YAML-tmLanguage',
'**/*.YAML-tmTheme'
];

// Available tasks
gulp.task('lint', ['lint:json', 'lint:xml', 'lint:yml']);

// Lint JSON
gulp.task('lint:json', function(){
return gulp.src(jsonFiles)
.pipe(debug({title: 'lint:json'}))
.pipe(jsonlint())
});

// Validate XML
gulp.task('lint:xml', function() {
return gulp.src(xmlFiles)
.pipe(debug({title: 'lint:xml'}))
.pipe(xmlVal());
});

// Validate YAML
gulp.task('lint:yml', function() {
return gulp.src(ymlFiles)
.pipe(debug({title: 'lint:yml'}))
.pipe(ymlVal({ safe: true }));
});
42 changes: 8 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,18 @@
{
"name": "sublimetext-gruntfile.js",
"description": "Lint tasks for Sublime Text packages",
"name": "sublimetext-gulpfile.js",
"version": "0.1.0",
"author": "Jan T. Sott",
"repositoy": "https://github.com/idleberg/sublimetext-gulpfile.js",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/idleberg/sublimetext-gruntfile.js"
},
"bugs": {
"url": "https://github.com/idleberg/sublimetext-gruntfile.js/issues"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-watch": "^0.6.1",
"grunt-jsonlint": "^1.0.7",
"grunt-pylint": "^1.3.0",
"grunt-xml-validator": "^1.1.2",
"grunt-yamllint": "^0.2.0"
"gulp": "^3.9.1",
"gulp-debug": "^2.1.2",
"gulp-json-lint": "^0.1.0",
"gulp-xml-validator": "^0.1.1",
"gulp-yaml-validate": "^1.0.2"
},
"files": [
".travis.yml",
"Gruntfile.js"
],
"readmeFilename": "README.md",
"keywords": [
"lint",
"linter",
"linting",
"sublime package",
"sublime packages",
"sublime text 2",
"sublime text 3",
"sublime text",
"travis ci",
"travis"
],
"scripts": {
"test": "grunt lint --verbose"
"test": "gulp lint"
}
}

0 comments on commit 3c16509

Please sign in to comment.