freelint v4.0.0
freelint
a lint tool based on standard-engine and rules follow the Airbnb javascript standard.
We are followed SamVer 2.0, this started from version 2.0.0, then we will try our best to avoide the dependency hell.
Install (Global)
npm install -g freelintor use yarn
yarn global add freelintInstall (Local)
npm install freelint --save-devor use yarn
yarn add freelint --dev# ...
# Add npm task in package.json.
"script": {
"freelint": "freelint",
...
}Usage (Global)
In your project's directiry.
freelintUsage (Local)
npm run freelintor use yarn
yarn run freelintThat's all.
Know Issues
- If you are using ES6 import/export feature, and webpack like build tool with a resolve setting, you should extract the resolve settings to a new file named
webpack.resolve.js, and place it toconfigdir in root dir, we know it's a dirty code, if you have any good solution, don't hesitated to create a pull request.(e.g.Demo)
How do I make the output all colorful and pretty?
snazzy is the default output format for cmd freelint now, you can also use any other
format library, just need to use the base cmd freelint-base, like:
$ freelint-base | customFormatHow do I ignore files?
The paths node_modules/**, *.min.js, bundle.js, coverage/**, hidden files/folders
(beginning with .), and all patterns in a project's root .gitignore file are
automatically ignored.
Sometimes you need to ignore additional folders or specific minified files. To do that, add
a freelint.ignore property to package.json:
"freelint-base": {
"ignore": [
"**/out/",
"/lib/select2/",
"/lib/ckeditor/",
"tmp.js"
]
}TODO
- Add reporter function by setting from cli
7 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago