Lint JavaScript within BBEdit using ESLint. Resulting errors and warnings are opened in a results window within BBEdit using the BBEdit command line tool bbresults (introduced in BBEdit 11.6).
The ESLint.bbpackage packages a single script for passing the frontmost document open in BBEdit to ESLint command line interface.
- BBEdit version 11.6 or greater
- BBEdit command line tools (“BBEdit > Install Command Line Tools”)
- ESLint CLI installed and configured
- Download and unzip the package: ESLint.bbpackage_v3.0.0.zip.
- Double–click the ESLint.bbpackage, BBEdit will prompt you to install (or update), and restart.
The package file will be copied to the Packages directory in BBEdit’s Application Support directory. Delete it from here should you wish uninstall later.
As noted in the requirements, this package does not install ESLint itself. The contained script presumes eslint
is installed and configured with a configuration file (such as .eslintrc.js or a eslintConfig
field in a package.json).
Once installed the script Lint JavaScript will appear in the BBEdit scripts menu. In addition Lint JavaScript will appear in the Scripts palette where you can assign your own keyboard shortcut.
Open a JavaScript file in BBEdit and trigger Lint JavaScript. A BBEdit results window should open listing any ESLint feedback. If there are no warnings or errors to report nothing will happen.
In your Terminal:
cd BBEdit-ESLint/
make
to also install the fresh build:
make install