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

Fix #3094: Refactor JSLint into an extension #3143

Merged
merged 8 commits into from
Mar 28, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
[submodule "src/thirdparty/path-utils"]
path = src/thirdparty/path-utils
url = https://github.com/jblas/path-utils.git
[submodule "src/thirdparty/jslint"]
path = src/thirdparty/jslint
url = https://github.com/douglascrockford/JSLint.git
[submodule "src/thirdparty/smart-auto-complete"]
path = src/thirdparty/smart-auto-complete
url = https://github.com/laktek/jQuery-Smart-Auto-Complete.git
[submodule "src/thirdparty/mustache"]
path = src/thirdparty/mustache
url = https://github.com/janl/mustache.js.git
[submodule "src/extensions/default/jslint/thirdparty/jslint"]
path = src/extensions/default/jslint/thirdparty/jslint
url = https://github.com/douglascrockford/JSLint.git
9 changes: 0 additions & 9 deletions src/base-config/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,6 @@
"navigate.gotoDefinition": [
"Ctrl-T"
],
"navigate.gotoJSLintError": [
{
"key": "F8"
},
{
"key": "Cmd-'",
"platform": "mac"
}
],
"navigate.nextDoc": [
{
"key": "Ctrl-Tab"
Expand Down
1 change: 0 additions & 1 deletion src/brackets.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"app_title" : "Brackets",
"app_name_about" : "Brackets",
"about_icon" : "styles/images/brackets_icon.svg",
"enable_jslint" : true,
"update_info_url" : "http://dev.brackets.io/updates/stable/",
"how_to_use_url" : "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
"forum_url" : "https://groups.google.com/forum/?fromgroups#!forum/brackets-dev",
Expand Down
2 changes: 0 additions & 2 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ define(function (require, exports, module) {
Commands = require("command/Commands"),
CommandManager = require("command/CommandManager"),
CodeHintManager = require("editor/CodeHintManager"),
JSLintUtils = require("language/JSLintUtils"),
PerfUtils = require("utils/PerfUtils"),
FileIndexManager = require("project/FileIndexManager"),
QuickOpen = require("search/QuickOpen"),
Expand Down Expand Up @@ -129,7 +128,6 @@ define(function (require, exports, module) {
EditorManager : EditorManager,
Commands : Commands,
WorkingSetView : WorkingSetView,
JSLintUtils : JSLintUtils,
PerfUtils : PerfUtils,
JSUtils : JSUtils,
CommandManager : CommandManager,
Expand Down
2 changes: 0 additions & 2 deletions src/command/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ define(function (require, exports, module) {
exports.VIEW_RESTORE_FONT_SIZE = "view.restoreFontSize";
exports.VIEW_SCROLL_LINE_UP = "view.scrollLineUp";
exports.VIEW_SCROLL_LINE_DOWN = "view.scrollLineDown";
exports.TOGGLE_JSLINT = "debug.jslint";
exports.SORT_WORKINGSET_BY_ADDED = "view.sortWorkingSetByAdded";
exports.SORT_WORKINGSET_BY_NAME = "view.sortWorkingSetByName";
exports.SORT_WORKINGSET_BY_TYPE = "view.sortWorkingSetByType";
Expand All @@ -92,7 +91,6 @@ define(function (require, exports, module) {
exports.NAVIGATE_SHOW_IN_FILE_TREE = "navigate.showInFileTree";
exports.NAVIGATE_QUICK_OPEN = "navigate.quickOpen";
exports.NAVIGATE_GOTO_DEFINITION = "navigate.gotoDefinition";
exports.NAVIGATE_GOTO_JSLINT_ERROR = "navigate.gotoJSLintError";
exports.NAVIGATE_GOTO_LINE = "navigate.gotoLine";
exports.TOGGLE_QUICK_EDIT = "navigate.toggleQuickEdit";
exports.QUICK_EDIT_NEXT_MATCH = "navigate.nextMatch";
Expand Down
4 changes: 0 additions & 4 deletions src/command/DefaultMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,14 @@ define(function (require, exports, module) {
menu.addMenuItem(Commands.VIEW_INCREASE_FONT_SIZE);
menu.addMenuItem(Commands.VIEW_DECREASE_FONT_SIZE);
menu.addMenuItem(Commands.VIEW_RESTORE_FONT_SIZE);
menu.addMenuDivider();
menu.addMenuItem(Commands.TOGGLE_JSLINT);

/*
* Navigate menu
*/
menu = Menus.addMenu(Strings.NAVIGATE_MENU, Menus.AppMenuBar.NAVIGATE_MENU);
menu.addMenuItem(Commands.NAVIGATE_QUICK_OPEN);
menu.addMenuItem(Commands.NAVIGATE_GOTO_LINE);

menu.addMenuItem(Commands.NAVIGATE_GOTO_DEFINITION);
menu.addMenuItem(Commands.NAVIGATE_GOTO_JSLINT_ERROR);
menu.addMenuDivider();
menu.addMenuItem(Commands.NAVIGATE_NEXT_DOC);
menu.addMenuItem(Commands.NAVIGATE_PREV_DOC);
Expand Down
1 change: 0 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"app_title": "Brackets",
"app_name_about": "Brackets",
"about_icon": "styles/images/brackets_icon.svg",
"enable_jslint": true,
"update_info_url": "http://dev.brackets.io/updates/stable/",
"how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
"forum_url": "https://groups.google.com/forum/?fromgroups#!forum/brackets-dev",
Expand Down
6 changes: 6 additions & 0 deletions src/extensions/default/jslint/htmlContent/bottom-panel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div id="jslint-results" class="bottom-panel vert-resizable top-resizer no-focus">
<div class="toolbar simple-toolbar-layout">
<div class="title">{{JSLINT_ERRORS}}</div>
</div>
<div class="table-container resizable-content"></div>
</div>
11 changes: 11 additions & 0 deletions src/extensions/default/jslint/htmlContent/results-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<table class="zebra-striped condensed-table">
<tbody>
{{#reportList}}
<tr>
<td class="line" data-character="{{character}}">{{line}}</td>
<td>{{reason}}</td>
<td>{{evidence}}</td>
</tr>
{{/reportList}}
</tbody>
</table>
14 changes: 14 additions & 0 deletions src/extensions/default/jslint/jslint.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.jslint-disabled {
font-size: 1em;
color: #808080;
}

.jslint-errors {
font-size: 1em;
color: #dc322f;
}

.jslint-valid {
font-size: 1em;
color: #FFC81C;
}
11 changes: 11 additions & 0 deletions src/extensions/default/jslint/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"gotoFirstError": [
{
"key": "F8"
},
{
"key": "Cmd-'",
"platform": "mac"
}
]
}
Loading