Why did you made this module, if people can just use Lebab or Custom-standard?
- Lebab on its own is pretty nice, but the output formatting is not that readable specially on long arrays/objects.
- Prettier itself is a beautifier which is used by some bigger companies, but is not a transpiler, it doesn't transform your code to ES6/ES7 syntax.
- So instead of using individually to attain a better syntax, i made this.
- Node V8.x and higher for Async/Await and Promisify features.
- Converts your codes to a readable syntax using the latest features from ES6/ES7
- Customizable, you can set how you like you code to look.
- Since this module relies on both Lebab and Prettier, their
caveatsare also this module's caveats.
//for local usenpm install es7lint --save//for development usenpm install es7lint --save-dev//for global usenpm install es7lint -g
.es7rc is where es7lint reads the options. Simple create a
.es7rc file on your application root and put all options on this file.
es7lint uses Lebab and Custom-Standard to
format and fix your code syntax. All options available on the said modules are also available on es7lint.
.es7rc must have the following format:
"files": "*.js" /** glob pattern for files to format */"output": "inherit" /** set this to inherit or prefix */"format":"lebab": /** lebab options */"standard":"rules":"space-before-function-paren": 2 "never"
Is a glob pattern for all files that you want to format. This can be an array of globs or a single glob string.
inheritwill write the formatted code to the same file.
prefixwill write the formatted code to the same directory with new filename prefixed with
Is where all options pertaining to Lebab goes to.
.es7rc is missing on your root directory, it will use the default options found on the module's folder
If an argument is passed via cli(command) this will override the files set on your
//local usage/node_modules/bin/es7lint src/*.js scripts/**/*js//global usagees7lint src/*.js scripts/**/*js
es7lintalso checks for any syntax errors before saving them, and will output any errors found.
- If an error is found,
es7lintwill stop formatting and exits.