How to use JavaScript in Brackets Text editor
JavaScript is a Programming or Scripting language that changes the behavior of web pages.
It is easy to code JavaScript in Brackets similar to how you code HTML or CSS.
Brackets JavaScript Code Hinting
The code hints in JavaScript helps to avoid lots of manual typing. These hints also helps to remember the syntax.
While typing your code, Brackets will automatically provide suggestions and code hints.
JavaScript Linting
Sometimes, you do mistakes in your JavaScript code like spelling mistakes, syntax errors, wrong way of handling errors, poor style of coding, etc.
To avoid these mistakes, Linting tools are the best tools to auto detect any bugs in your JavaScript code.
Some of the best Linters are JSLint, JSHint, ESLint or JSCS.
Brackets JSLint Engine
Brackets JSLint engine is the inbuilt linter available in Brackets.
If you are working on JavaScript code, this tool will show the warning which can be an error as well.
Brackets JavaScript Errors - ESLint
If the Linting is enabled, Brackets is the best tool to automatically detect any errors or bugs in the JavaScript code using ESLint.
This Linting is extremely helpful as it detects any error with your JavaScript code and provides instant feedback.
Relatively, it is better than JSLint as it is more flexible, better ES6 support and clear and crisp error messages.
How to disable Linting
If you wish to disable the Linting in Brackets, then navigate to –
View -> Lint files on save and uncheck this option
How do you run JavaScript code in Brackets console?
Install the Extension console Plus and use the shortcut key F9.
This is a Brackets Extension to see console.log & console.error without any developer tools.
Using this, you can also filter out only those particular logs coming from a live preview window.
The GitHub link of Brackets console Plus is here.