This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add eslint and deps + fix css errors
- Loading branch information
1 parent
6e45fec
commit aafff5e
Showing
4 changed files
with
103 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
'use strict'; | ||
|
||
/* globals module */ | ||
|
||
module.exports = function(grunt) { | ||
// configure project | ||
grunt.initConfig({ | ||
// make node configurations available | ||
pkg: grunt.file.readJSON('package.json'), | ||
csslint: { | ||
options: { | ||
csslintrc: '.csslintrc' | ||
}, | ||
src: ['css/*.css', 'src/css/*.css'] | ||
}, | ||
eslint: { | ||
options: { | ||
configFile: '.eslintrc', | ||
cache: true | ||
}, | ||
target: ['src/**/*.js'] | ||
}, | ||
githooks: { | ||
all: { | ||
'pre-commit': 'csslint htmlhint eslint' | ||
} | ||
}, | ||
htmlhint: { | ||
html1: { | ||
src: [ | ||
'src/**/*.html, index.html' | ||
] | ||
} | ||
}, | ||
}); | ||
|
||
// enable plugins | ||
grunt.loadNpmTasks('grunt-contrib-csslint'); | ||
grunt.loadNpmTasks('grunt-eslint'); | ||
grunt.loadNpmTasks('grunt-githooks'); | ||
grunt.loadNpmTasks('grunt-htmlhint'); | ||
|
||
// set default tasks to run when grunt is called without parameters | ||
grunt.registerTask('default', ['csslint', 'htmlhint', 'eslint']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "test-pages", | ||
"description": "Test pages", | ||
"keywords": [ | ||
"webrtc", | ||
"demos", | ||
"samples", | ||
"javascript" | ||
], | ||
"homepage": "https://github.com/webrtc/test-pages", | ||
"bugs": { | ||
"url": "https://github.com/webrtc/test-pages/issues" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "The WebRTC project authors", | ||
"main": "index.html", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/webrtc/test-pages.git" | ||
}, | ||
"scripts": { | ||
"lint": "grunt" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-webrtc": "^1.0.0", | ||
"express": "^4.14.1", | ||
"grunt": "^0.4.5", | ||
"grunt-cli": ">=0.1.9", | ||
"grunt-contrib-csslint": ">=0.3.1", | ||
"grunt-eslint": "^17.2.0", | ||
"grunt-githooks": "^0.3.1", | ||
"grunt-htmlhint": ">=0.9.12", | ||
"pem": "^1.9.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters