eslint-plugin-esplus
A plugin that will lint ESPlus syntax.
What is ESPlus?
ESPlus is simply a collective name for the resulting syntax of combining the following gulp packages in the build step with ES2015/ES2016:
gulp-module-import-async on NPM
Extends import statements with an 'async' property (e.g. import MyButton from "./buttons/MyButton" async
);
gulp-transform-enum on NPM
Enables Java-style enum support. Maps to strings, not integers.
enum MyEnum {
DOG, CAT, MOUSE
}
gulp-transform-interface on NPM
Enables basic Java-style interfaces.
interface FooBar {
isFoo = Boolean;
barCollection = Map;
sayFoo(arg1, arg2);
doBar();
}
How does the ESLint plugin work?
It acts as a preprocessor which will recompile the code that ESLint sees to ordinary, valid ES2015 code.
This means that it will fit with your existing config and you can code without worrying about linting errors.
Installation
Install eslint-plugin-esplus
as a developer dependency:
npm install eslint-plugin-esplus --save-dev
Usage
To use it, declare it as a plugin in your .eslintrc.js
config file:
module.exports = {
"plugins": ["esplus"]
};
Currently there are no custom rules available. It will fallback to the original string material if parsing goes wrong for some reason.
Useful warnings or errors might be introduced in the future. For now, you have to live with token errors in case the parser isn't happy
about your ESPlus code.
License
Copyright (c) 2016 Dlmma IVS. Released under the MIT license.