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 6 commits
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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[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
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ respective licenses below.
Released under the MIT, BSD, and GPL Licenses.


- JSLint - ./src/thirdparty/jslint
- JSLint - ./src/extensions/default/JSLint/thirdparty/jslint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!


Copyright (c) 2002 Douglas Crockford (www.JSLint.com)

Expand Down
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 @@ -81,7 +81,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 @@ -93,7 +92,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 @@ -109,18 +109,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