项目作者: editorconfig-checker

项目描述 :
A tool to verify that your files are in harmony with your .editorconfig
高级语言: Makefile
项目地址: git://github.com/editorconfig-checker/editorconfig-checker.javascript.git
创建时间: 2017-03-18T12:37:12Z
项目社区:https://github.com/editorconfig-checker/editorconfig-checker.javascript

开源协议:MIT License

下载


editorconfig-checker

Logo

npm
Build Status
[Conventionnal Commits](https://conventionalcommits.org)
Semantic Release

Buy Me A Coffee

What?

This is a tool to check if your files consider your .editorconfig rules.
Most tools—like linters, for example—only test one filetype and need an extra configuration.
This tool only needs your .editorconfig to check all files.

Example Screenshot

Important

This is only a wrapper for the core editorconfig-checker.
You should have a look at this repository to know how this tool can be used and what possibilities/caveats are there.
This version can be used in the same way as the core as every argument is simply passed down to it.

Installation

Installation via npm/yarn is recommended:

  1. npm install --save-dev editorconfig-checker
  2. yarn add --dev editorconfig-checker

Otherwise you could clone the repository and execute the script manually.

  1. git clone https://github.com/editorconfig-checker/editorconfig-checker.javascript
  2. cd editorconfig-checker.javascript
  3. npm install
  4. npm run build
  5. npm test
  6. npm start

Usage

There is an alias from editorconfig-checker to ec so you can exchange every occurrence of editorconfig-checker with ec.

If you installed it via npm you have a binary in your node_modules/.bin folder called editorconfig-checker.
Then you could create a script in your package.json like this:

  1. "scripts": {
  2. "lint:editorconfig": "editorconfig-checker"
  3. }

Usage output:

  1. USAGE:
  2. -config string
  3. config
  4. -debug
  5. print debugging information
  6. -disable-end-of-line
  7. disables the trailing whitespace check
  8. -disable-indent-size
  9. disables only the indent-size check
  10. -disable-indentation
  11. disables the indentation check
  12. -disable-insert-final-newline
  13. disables the final newline check
  14. -disable-trim-trailing-whitespace
  15. disables the trailing whitespace check
  16. -dry-run
  17. show which files would be checked
  18. -exclude string
  19. a regex which files should be excluded from checking - needs to be a valid regular expression
  20. -h print the help
  21. -help
  22. print the help
  23. -ignore-defaults
  24. ignore default excludes
  25. -init
  26. creates an initial configuration
  27. -no-color
  28. dont print colors
  29. -v print debugging information
  30. -verbose
  31. print debugging information
  32. -version
  33. print the version number

Support

If you have any questions, suggestions or just want to chat join #editorconfig-checker on freenode(IRC).
If you don’t have an IRC-client set up you can use the freenode webchat.