Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
ficristo committed Dec 15, 2015
2 parents 498be1e + d31b6f7 commit cc823f2
Show file tree
Hide file tree
Showing 390 changed files with 19,260 additions and 18,487 deletions.
2 changes: 1 addition & 1 deletion .brackets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"defaultExtension": "js",
"language": {
"javascript": {
"linting.prefer": ["JSLint", "JSHint"],
"linting.prefer": ["ESLint", "JSLint"],
"linting.usePreferredOnly": true
}
},
Expand Down
70 changes: 70 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"env": {
"node": true
},
"rules": {
"no-bitwise": 0,
"curly": 2,
"eqeqeq": 2,
"guard-for-in": 0,
"wrap-iife": [2, "outside"],
"no-use-before-define": 0,
"new-cap": [0, {
"capIsNewExceptions": [
"$.Deferred",
"$.Event",
"CodeMirror.Pos",
"Immutable.Map",
"Immutable.List",
"JSLINT"
]}],
"no-caller": 2,
"no-empty": 0,
"no-new": 2,
"no-invalid-regexp": 2,
"no-control-regex": 2,
"no-regex-spaces": 2,
"no-undef": 2,
"strict": 0,
"no-unused-vars": [0, {"vars": "all", "args": "none"}],
"semi": 2,

"no-iterator": 2,
"no-loop-func": 2,
"no-multi-str": 2,
"no-fallthrough": 2,
"no-proto": 2,
"no-script-url": 2,
"no-shadow": 0,
"no-shadow-restricted-names": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-new-require": 2,
"new-parens": 2,
"no-new-object": 2,
"no-invalid-this": 0,
indent: [0, 4],

"valid-jsdoc": 0,
"valid-typeof": 2,

"no-trailing-spaces": 0,
"eol-last": 0
},
"globals": {
"brackets": false,

"window": false,
"alert": false,
"document": false,
"localStorage": false,
"navigator": false,
"setTimeout": false,

"require": false,
"define": false,
"$": false,
"PathUtils": false,
"Mustache": false
}
}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url = https://github.com/janl/mustache.js.git
[submodule "src/extensions/default/JavaScriptCodeHints/thirdparty/tern"]
path = src/extensions/default/JavaScriptCodeHints/thirdparty/tern
url = https://github.com/marijnh/tern.git
url = https://github.com/ternjs/tern.git
[submodule "src/extensions/default/JavaScriptCodeHints/thirdparty/acorn"]
path = src/extensions/default/JavaScriptCodeHints/thirdparty/acorn
url = https://github.com/marijnh/acorn.git
Expand Down
21 changes: 10 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function (grunt) {
'use strict';

// load dependencies
require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-targethtml', 'grunt-usemin', 'grunt-cleanempty']});
require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-targethtml', 'grunt-usemin', 'grunt-cleanempty', 'grunt-eslint']});
grunt.loadTasks('tasks');

// Project configuration.
Expand Down Expand Up @@ -241,19 +241,19 @@ module.exports = function (grunt) {
watch: {
all : {
files: ['**/*', '!**/node_modules/**'],
tasks: ['jshint']
tasks: ['eslint']
},
grunt : {
files: ['<%= meta.grunt %>', 'tasks/**/*'],
tasks: ['jshint:grunt']
tasks: ['eslint:grunt']
},
src : {
files: ['<%= meta.src %>', 'src/**/*'],
tasks: ['jshint:src']
tasks: ['eslint:src']
},
test : {
files: ['<%= meta.test %>', 'test/**/*'],
tasks: ['jshint:test']
tasks: ['eslint:test']
}
},
/* FIXME (jasonsanjose): how to handle extension tests */
Expand Down Expand Up @@ -299,13 +299,12 @@ module.exports = function (grunt) {
'jasmine_node': {
projectRoot: 'src/extensibility/node/spec/'
},
jshint: {
eslint: {
grunt: '<%= meta.grunt %>',
src: '<%= meta.src %>',
test: '<%= meta.test %>',
/* use strict options to mimic JSLINT until we migrate to JSHINT in Brackets */
options: {
jshintrc: '.jshintrc'
quiet: true
}
},
shell: {
Expand All @@ -320,16 +319,16 @@ module.exports = function (grunt) {
grunt.registerTask('install', ['write-config', 'less']);

// task: test
grunt.registerTask('test', ['jshint', 'jasmine', 'nls-check']);
// grunt.registerTask('test', ['jshint', 'jasmine', 'jasmine_node']);
grunt.registerTask('test', ['eslint', 'jasmine', 'nls-check']);
// grunt.registerTask('test', ['eslint', 'jasmine', 'jasmine_node', 'nls-check']);

// task: set-release
// Update version number in package.json and rewrite src/config.json
grunt.registerTask('set-release', ['update-release-number', 'write-config']);

// task: build
grunt.registerTask('build', [
'jshint:src',
'eslint:src',
'jasmine',
'clean',
'less',
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"grunt-cli": "0.1.9",
"phantomjs": "1.9.18",
"grunt-lib-phantomjs": "0.3.0",
"grunt-contrib-jshint": "0.6.0",
"grunt-eslint": "17.1.0",
"grunt-contrib-watch": "0.4.3",
"grunt-contrib-jasmine": "0.4.2",
"grunt-template-jasmine-requirejs": "0.1.0",
Expand All @@ -36,7 +36,6 @@
"load-grunt-tasks": "0.2.0",
"q": "0.9.2",
"semver": "^4.1.0",
"jshint": "2.1.4",
"xmldoc": "^0.1.2",
"grunt-cleanempty": "1.0.3"
},
Expand Down
4 changes: 2 additions & 2 deletions samples/cs/Getting Started/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h3>Rychlá úprava pro CSS a JavaScript</h3>
<kbd>ESC</kbd> mimo rychle vložený editor, skryjí se tyto editory všechny. Rychlá úprava najde také
předpisy definované v LESS a SCSS souborech, včetně těch vnořených.
</p>

<samp>
Chcete to vidět v akci? Umístěte kurzor na značku <!-- <samp> --> výše a stiskněte
<kbd>Cmd/Ctrl + E</kbd>. Pod danou značkou by se měla objevit rychlá úprava CSS, zobrazující související
Expand Down Expand Up @@ -206,4 +206,4 @@ <h2>Zapojte se</h2>
-->

<!-- Last translated for e3ecc9e7ac7b94f1107a8e3ca7064ac39b345280 -->
<!-- Last translated for 12ee7cd7c2c0eefb3fdee209eea92a82b66f1693 -->
46 changes: 23 additions & 23 deletions src/LiveDevelopment/Agents/CSSAgent.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*
*/


Expand Down Expand Up @@ -54,7 +54,7 @@ define(function CSSAgent(require, exports, module) {
*/
var _getAllStyleSheetsNotFound;

/**
/**
* Create a canonicalized version of the given URL, stripping off query strings and hashes.
* @param {string} url the URL to canonicalize
* @return the canonicalized URL
Expand Down Expand Up @@ -125,7 +125,7 @@ define(function CSSAgent(require, exports, module) {
function clearCSSForDocument(doc) {
return reloadCSSForDocument(doc, "");
}

/**
* @private
* @param {jQuery.Event} event
Expand All @@ -136,34 +136,34 @@ define(function CSSAgent(require, exports, module) {
existing = styleForURL(res.header.sourceURL),
styleSheetId = res.header.styleSheetId,
duplicate;

// detect duplicates
duplicate = _.some(existing, function (styleSheet) {
return styleSheet && styleSheet.styleSheetId === styleSheetId;
});
if (duplicate) {
return;
}

_styleSheetDetails[styleSheetId] = res.header;
_styleSheetDetails[styleSheetId].canonicalizedURL = url; // canonicalized URL

exports.trigger("styleSheetAdded", url, res.header);
}

/**
* @private
* @param {jQuery.Event} event
* @param {styleSheetId: StyleSheetId}
*/
function _styleSheetRemoved(event, res) {
var header = _styleSheetDetails[res.styleSheetId];

delete _styleSheetDetails[res.styleSheetId];

exports.trigger("styleSheetRemoved", header.canonicalizedURL, header);
}

/**
* @private
* Attempt to use deleted API CSS.getAllStyleSheets
Expand Down Expand Up @@ -226,8 +226,8 @@ define(function CSSAgent(require, exports, module) {
Inspector.Page.off(".CSSAgent");
Inspector.CSS.off(".CSSAgent");
}


EventDispatcher.makeEventDispatcher(exports);

// Export public functions
Expand Down
28 changes: 14 additions & 14 deletions src/LiveDevelopment/Agents/ConsoleAgent.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*
*/


Expand Down Expand Up @@ -74,7 +74,7 @@ define(function ConsoleAgent(require, exports, module) {
function _onMessagesCleared(event, res) {
// res = {}
}

/**
* Enable the inspector Console domain
* @return {jQuery.Promise} A promise resolved when the Console.enable() command is successful.
Expand All @@ -100,4 +100,4 @@ define(function ConsoleAgent(require, exports, module) {
exports.enable = enable;
exports.load = load;
exports.unload = unload;
});
});
Loading

0 comments on commit cc823f2

Please sign in to comment.