-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
266 additions
and
2 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 @@ | ||
node_modules/ |
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,74 @@ | ||
{ | ||
"maxerr" : 50, | ||
|
||
"indent" : 2, | ||
"bitwise" : true, | ||
"camelcase" : true, | ||
"curly" : true, | ||
"eqeqeq" : true, | ||
"forin" : true, | ||
"immed" : false, | ||
"latedef" : false, | ||
"newcap" : true, | ||
"noarg" : true, | ||
"noempty" : true, | ||
"nonew" : false, | ||
"plusplus" : false, | ||
"quotmark" : "single", | ||
"undef" : true, | ||
"unused" : true, | ||
"strict" : false, | ||
"trailing" : false, | ||
"maxparams" : 4, | ||
"maxdepth" : 3, | ||
"maxstatements" : 20, | ||
"maxcomplexity" : 20, | ||
"maxlen" : 120, | ||
|
||
"asi" : false, | ||
"boss" : false, | ||
"debug" : false, | ||
"eqnull" : false, | ||
"es5" : false, | ||
"esnext" : false, | ||
"moz" : false, | ||
"evil" : false, | ||
"expr" : false, | ||
"funcscope" : false, | ||
"globalstrict" : false, | ||
"iterator" : false, | ||
"lastsemic" : false, | ||
"laxbreak" : false, | ||
"laxcomma" : false, | ||
"loopfunc" : false, | ||
"multistr" : false, | ||
"proto" : false, | ||
"scripturl" : false, | ||
"smarttabs" : true, | ||
"shadow" : false, | ||
"sub" : false, | ||
"supernew" : false, | ||
"validthis" : false, | ||
|
||
"browser" : true, | ||
"couch" : false, | ||
"devel" : true, | ||
"dojo" : false, | ||
"jquery" : false, | ||
"mootools" : false, | ||
"node" : false, | ||
"nonstandard" : false, | ||
"prototypejs" : false, | ||
"rhino" : false, | ||
"worker" : false, | ||
"wsh" : false, | ||
"yui" : false, | ||
|
||
"nomen" : false, | ||
"onevar" : false, | ||
"passfail" : false, | ||
"white" : false, | ||
|
||
"globals" : { | ||
} | ||
} |
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,48 @@ | ||
module.exports = function(grunt) { | ||
'use strict'; | ||
|
||
var sourceFiles = [ | ||
'*.js', '!Gruntfile.js' | ||
]; | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
sync: { | ||
all: { | ||
options: { | ||
sync: ['author', 'name', 'version', 'main', | ||
'private', 'license', 'keywords', 'homepage'], | ||
} | ||
} | ||
}, | ||
|
||
jshint: { | ||
all: sourceFiles, | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
|
||
eslint: { | ||
target: sourceFiles, | ||
options: { | ||
config: 'eslint.json', | ||
rulesdir: ['./node_modules/eslint-rules'] | ||
} | ||
}, | ||
|
||
jscs: { | ||
src: sourceFiles, | ||
options: { | ||
config: 'jscs.json' | ||
} | ||
} | ||
}); | ||
|
||
var plugins = require('matchdep').filterDev('grunt-*'); | ||
plugins.forEach(grunt.loadNpmTasks); | ||
|
||
grunt.registerTask('lint', ['jshint', 'eslint', 'jscs']); | ||
grunt.registerTask('default', ['nice-package', 'deps-ok', 'sync', 'lint']); | ||
}; |
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,29 @@ | ||
{ | ||
"name": "code-snippets", | ||
"main": "turtles.js", | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/bahmutov/code-snippets", | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"docs", | ||
"Gruntfile.js", | ||
"package.json", | ||
"index.html" | ||
], | ||
"author": "Gleb Bahmutov <[email protected]>", | ||
"keywords": [ | ||
"testing", | ||
"test", | ||
"exploratory", | ||
"mock", | ||
"chrome", | ||
"devtools", | ||
"code", | ||
"snippets" | ||
] | ||
} |
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,41 @@ | ||
{ | ||
// this is JSON file, but ESLint allows C-style comments | ||
|
||
"env": { | ||
"browser": true, | ||
"node": false | ||
}, | ||
|
||
// 0 - turn rule off | ||
// 1 - rule generates warnings | ||
// 2 - rule generates errors | ||
"rules": { | ||
"camelcase": 0, | ||
"camel_case": 0, | ||
"strict": 0, | ||
"no-undef": 1, | ||
"no-console": 0, | ||
"no-unused-vars": 1, | ||
"no-underscore-dangle": 1, | ||
"quotes": [2, "single"], | ||
"brace-style": [2, "1tbs"], | ||
"eol-last": 1, | ||
"semi": [2, "always"], | ||
"no-extra-strict": 0, | ||
"no-single-line-objects": 2, | ||
"no-nested-ternary": 2, | ||
"no-space-before-semi": 2, | ||
"no-shadow": 2, | ||
"no-undef-init": 2, | ||
"no-undefined": 0, | ||
"no-sequences": 2, | ||
"no-for-loops": 2, | ||
"no-process-exit": 0 | ||
}, | ||
|
||
"globals": { | ||
"navigator": true, | ||
"console": true, | ||
"Promise": true | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"requireCurlyBraces": true, | ||
"requireDotNotation": true, | ||
"requireSpaceAfterLineComment": true, | ||
"validateQuoteMarks": "'", | ||
"validateIndentation": 2, | ||
"requireSpacesInFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"requireSpacesInAnonymousFunctionExpression": { | ||
"beforeOpeningRoundBrace": true, | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"requireSpacesInsideObjectBrackets": "all" | ||
} |
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
// runs application digest cycle starting from root scope | ||
/* global angular */ | ||
angular.element(document).injector().get('$rootScope').$apply(); |
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,48 @@ | ||
{ | ||
"name": "code-snippets", | ||
"description": "Chrome DevTools code snippets ", | ||
"version": "0.1.0", | ||
"author": "Gleb Bahmutov <[email protected]>", | ||
"bugs": { | ||
"url": "https://github.com/bahmutov/code-snippets/issues" | ||
}, | ||
"contributors": [], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"eslint-rules": "0.1.1", | ||
"grunt": "0.4.5", | ||
"grunt-contrib-jshint": "0.10.0", | ||
"grunt-deps-ok": "0.5.1", | ||
"grunt-eslint": "2.1.0", | ||
"grunt-gh-pages": "0.9.1", | ||
"grunt-jscs": "1.0.0", | ||
"grunt-nice-package": "0.9.2", | ||
"grunt-npm2bower-sync": "0.4.0", | ||
"matchdep": "0.3.0", | ||
"pre-git": "0.1.1" | ||
}, | ||
"engines": { | ||
"node": "> 0.10.*" | ||
}, | ||
"homepage": "https://github.com/bahmutov/code-snippets", | ||
"keywords": [ | ||
"testing", | ||
"test", | ||
"exploratory", | ||
"mock", | ||
"chrome", | ||
"devtools", | ||
"code", | ||
"snippets" | ||
], | ||
"license": "MIT", | ||
"main": "turtles.js", | ||
"pre-commit": "npm test", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:bahmutov/code-snippets.git" | ||
}, | ||
"scripts": { | ||
"test": "grunt" | ||
} | ||
} |
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