It can locate hundreds of common mistakes, enforce your preferred coding style (spaces not tabs!), and is infinitely configurable.
When problems are found in a file, they appear in CodeKit's log:
The line number of the issue appears in the black rectangle. The character where the problem starts is highlighted in red. The name of the ESLint rule that triggered the warning is shown in grey, after the warning itself.
Log entries in CodeKit are collapsible. Click the main log entry to expand or collapse detailed information, including syntax issues.
Issues are separated by file. Here, prefix.js is prepended to main.js:
Skipping Issues In Linked Files
You can tell CodeKit to ignore issues in a linked file. (For example, if you prepend jquery.js, you don't care about the 600 warnings in jQuery; it's not your code.)
The affected file will still be checked for issues along with the rest of the chain, but any problems won't produce a warning. The file's issues will automatically be collapsed in the log.
Open Project Settings, then choose the ESLint category under Syntax Checkers:
ESLint may warn about "undefined" variables and functions in your code. If those items are defined outside of your script, add them to this field to eliminate the warnings.
By default, Globals are read-only. If your script attempts to write a value to a Global, you'll be warned. To eliminate that warning, add :write after the global's name.
Check the environments where your script runs and ESLint will automatically include Globals appropriate for that environment. For example, when Browser is checked, the console.log() function will not produce a "console is undefined" warning.
ESLint Config Files
You can configure ESLint using special files named .eslintrc. By default, CodeKit merges settings from any such files with those in the app's UI. If a setting is specified in both places, the value from CodeKit's UI is used. You can change that in the ESLint Config Files pop-up button.
If you're working with other developers who don't use CodeKit, your team may want to configure ESLint solely from .eslintrc files. Select the appropriate option in the pop-up button to do this.
To control what ESLint considers a syntax error, you enable specific rules. The master list of rules is on ESLint's website. CodeKit includes every rule, organized into the same sections:
To enable a rule, simply check the box next to its name.
Some rules have options. You control these by setting specific strings in the Options text field for each Rule.
Warning: The syntax that ESLint expects for an option varies from rule to rule. Some are simple strings. Some are JSON-style objects or arrays. Before you change an option string, be sure to read the documentation for the associated rule. An incorrect entry or typo will cause ESLint to fail.
Click the Question Mark button to instantly view a rule's documentation in a popover:
You probably don't want to customize ESLint every time you start a new Project. You don't have to. Read Defaults For New Projects.