1.2.2 • Published 12 months ago

eslint-plugin-jaicp v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

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:

  1. Install the JAICP extension for VS Code.
  2. 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:

RuleStatus
no-undefDisabled. The plugin does not detect whether a referenced value is defined in a required JavaScript file or init block, or actually not defined.
no-unused-varsDisabled in plugin:jaicp/es5 config. The plugin does not detect whether variables defined in required 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

1.2.2

12 months ago

1.2.0

1 year ago

1.2.1

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago