1.2.2 • Published 12 months ago
eslint-plugin-jaicp v1.2.2
eslint-plugin-jaicp
An ESLint plugin to extract and lint scripts from JAICP DSL projects.
Installation
You’ll need to install ESLint and this plugin using npm:
npm i --save-dev eslint eslint-plugin-jaicp
Configuration
Add one of the following configs to the extends
section of your .eslintrc
configuration file:
plugin:jaicp/es5
if you use the old JavaScript runtime.plugin:jaicp/es6
if you use the new JavaScript runtime with ECMAScript 6 support.
{
"extends": [
// Other configs you use, e.g. "eslint:recommended"
"plugin:jaicp/es5"
]
}
Usage
Command line
npx eslint src/
Editor integrations
Use the ESLint extension to integrate ESLint into Visual Studio Code.
Note that you also need to teach VS Code to recognize .sc
files as JAICP DSL:
- Install the JAICP extension for VS Code.
In the editor settings, add
jaicp
to the list of language IDs that ESLint will validate:{ "eslint.validate": [ "jaicp", "javascript" ] }
For other editors, refer to their respective plugins, e.g. SublimeLinter-eslint for Sublime Text.
Rules
The following ESLint rules are modified by the plugin configs:
Rule | Status |
---|---|
no-undef | Disabled. The plugin does not detect whether a referenced value is defined in a require d JavaScript file or init block, or actually not defined. |
no-unused-vars | Disabled in plugin:jaicp/es5 config. The plugin does not detect whether variables defined in require d JavaScript files are actually used. |
To enforce other rules, use other configs like eslint:recommended
or airbnb-base/legacy
.
Limitations
- Doesn’t lint JavaScript expressions after
if
/elseif
/else
tags or within{{double curly brackets}}
.
License
Apache-2.0 © Just AI