{"_id":"editorconfig-tools","_rev":"22-04dd5f59db772becda0cdfe42157cc7d","name":"editorconfig-tools","description":"Tools for verifying/fixing code style based on an EditorConfig file","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.0":{"name":"editorconfig-tools","description":"Tools for verifying/fixing code style based on an EditorConfig file","version":"0.0.0","author":{"name":"Sean Lang","email":"slang800@gmail.com"},"bin":{"editorconfig-tools":"bin/index.js"},"bugs":{"url":"https://github.com/editorconfig/editorconfig-tools-js/issues"},"dependencies":{"cli-color":"~0.2.2","detect-indent":"^0.1.4","editorconfig":"~0.11.3","fobject":"0.0.0","gitlike-cli":"~0.0.10","indx":"^0.1.1","when":"^3.1.0"},"devDependencies":{"chai":"~1.7.2","coffee-script":"^1.7.1","mocha":"~1.12.0","sinon":"~1.7.3","sinon-chai":"~2.4.0"},"keywords":["editorconfig","tools","validate","fix","enforce","infer"],"license":"MIT","main":"lib","repository":{"type":"git","url":"git://github.com/editorconfig/editorconfig-tools-js.git"},"scripts":{"test":"mocha"},"homepage":"https://github.com/editorconfig/editorconfig-tools-js","_id":"editorconfig-tools@0.0.0","_shasum":"9e299dccc798d6cdf6de67e4d1555bd172aa8baa","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"slang800","email":"slang800@gmail.com"},"maintainers":[{"name":"slang800","email":"slang800@gmail.com"}],"dist":{"shasum":"9e299dccc798d6cdf6de67e4d1555bd172aa8baa","tarball":"https://registry.npmjs.org/editorconfig-tools/-/editorconfig-tools-0.0.0.tgz","integrity":"sha512-N9Vm06s331HmSGICvXszSlKveqNALkzCzuW12mA2kW+c8Gndv09o+m4WmLYwyvBoa0W0uTz2YVusPL2QXSoC1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwftdHm2TijPv56/zJVwnzhOjpsyQ8bPiY5MDDFsxMnQIgfFcM4ZpKCeorKKRma97iydIH4hB0aIgwiKkZfjydlTU="}]},"directories":{}},"0.0.1":{"name":"editorconfig-tools","description":"Tools for verifying/fixing code style based on an EditorConfig file","version":"0.0.1","author":{"name":"Sean Lang","email":"slang800@gmail.com"},"bin":{"editorconfig-tools":"bin/index.js"},"bugs":{"url":"https://github.com/slang800/editorconfig-tools/issues"},"dependencies":{"argparse":"^0.1.15","detect-indent":"^0.1.4","editorconfig":"~0.11.3","fobject":"0.0.2","graceful-fs":"^3.0.4","lodash":"^2.4.1","require-tree":"^0.3.3","when":"^3.1.0"},"devDependencies":{"coffee-script":"^1.7.1","mocha":"~1.12.0","should":"^4.1.0"},"keywords":["editorconfig","tools","validate","fix","enforce","code-quality","formatting","infer"],"license":"MIT","main":"lib","repository":{"type":"git","url":"git://github.com/slang800/editorconfig-tools.git"},"scripts":{"test":"mocha"},"gitHead":"c9fdf80a48f8f6d7e8ce1e65e573a3be72b1da7e","homepage":"https://github.com/slang800/editorconfig-tools","_id":"editorconfig-tools@0.0.1","_shasum":"5b9a0324e01a4cf241379d42642d5619ef85a2c9","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"slang800","email":"slang800@gmail.com"},"maintainers":[{"name":"slang800","email":"slang800@gmail.com"}],"dist":{"shasum":"5b9a0324e01a4cf241379d42642d5619ef85a2c9","tarball":"https://registry.npmjs.org/editorconfig-tools/-/editorconfig-tools-0.0.1.tgz","integrity":"sha512-USNze6roDk66pq+14HwtQJ7yDdIKbejcEqyVb/SysDfx+Di145nSz2FNHHs/cJRPxtEl89A4PfUdVoQd90ApTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzjRkTSMFpp8xL5u7TL1FNW4X00lLllG3UXajKW3I9yAIgQCeI2liiHLkDQASofsmeAI6xEDSQjz6JYzmCth9Ky6Y="}]},"directories":{}},"0.1.0":{"name":"editorconfig-tools","description":"Tools for verifying/fixing code style based on an EditorConfig file","version":"0.1.0","author":{"name":"Sean Lang","email":"slang800@gmail.com"},"bin":{"editorconfig-tools":"bin/index.js"},"bugs":{"url":"https://github.com/slang800/editorconfig-tools/issues"},"dependencies":{"argparse":"^0.1.15","detect-indent":"^0.1.4","editorconfig":"~0.11.3","fobject":"0.0.3","graceful-fs":"^3.0.4","lodash":"^2.4.1","require-tree":"^0.3.3","when":"^3.1.0"},"devDependencies":{"coffee-script":"^1.7.1","mocha":"^2.0.1","should":"^4.1.0"},"keywords":["editorconfig","tools","validate","fix","enforce","code-quality","formatting","infer"],"license":"MIT","main":"lib","repository":{"type":"git","url":"git://github.com/slang800/editorconfig-tools.git"},"scripts":{"test":"mocha"},"gitHead":"7faa224ae3a809f15f0ce754874c250d8ffbd69a","homepage":"https://github.com/slang800/editorconfig-tools","_id":"editorconfig-tools@0.1.0","_shasum":"843c2ba2ec0c6947d61004852319b0ec271c5260","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"slang800","email":"slang800@gmail.com"},"maintainers":[{"name":"slang800","email":"slang800@gmail.com"}],"dist":{"shasum":"843c2ba2ec0c6947d61004852319b0ec271c5260","tarball":"https://registry.npmjs.org/editorconfig-tools/-/editorconfig-tools-0.1.0.tgz","integrity":"sha512-C6pAKPQOT67m1WO9IcN07QQFtzfsXvs9bZNnEETcmzGLMPlPhBUsVK44/DfqKQINDDLJSaOt+eRjpfyBs39czw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/3I/wVBwHjf71G9pFzpApvFSkS56gSVmA9LWva58gyAiBBVZoqCPKtwfFZ822J6CIIC8kcqkQygjxI/llnIUHk+A=="}]},"directories":{}},"0.1.1":{"name":"editorconfig-tools","description":"Tools for verifying/fixing code style based on an EditorConfig file","version":"0.1.1","author":{"name":"Sean Lang","email":"slang800@gmail.com"},"bin":{"editorconfig-tools":"bin/index.js"},"bugs":{"url":"https://github.com/slang800/editorconfig-tools/issues"},"dependencies":{"argparse":"^0.1.15","detect-indent":"^0.1.4","editorconfig":"^0.12.1","fobject":"0.0.3","graceful-fs":"^3.0.4","lodash":"^2.4.1","require-tree":"^0.3.3","when":"^3.1.0"},"devDependencies":{"coffee-script":"^1.7.1","mocha":"^2.0.1","should":"^4.1.0"},"keywords":["editorconfig","tools","validate","fix","enforce","code-quality","formatting","infer"],"license":"MIT","main":"lib","repository":{"type":"git","url":"git://github.com/slang800/editorconfig-tools.git"},"scripts":{"test":"mocha"},"gitHead":"8704aa942b4c6b84aa627eab4491042ad7534f29","homepage":"https://github.com/slang800/editorconfig-tools","_id":"editorconfig-tools@0.1.1","_shasum":"6c38af1a3e56efe10a4adf56613fed742801888b","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"slang800","email":"slang800@gmail.com"},"maintainers":[{"name":"slang800","email":"slang800@gmail.com"}],"dist":{"shasum":"6c38af1a3e56efe10a4adf56613fed742801888b","tarball":"https://registry.npmjs.org/editorconfig-tools/-/editorconfig-tools-0.1.1.tgz","integrity":"sha512-damS/0It5JEpc/H8CR8pw7q93xTbWg6GgVoTrMulyrAVTwr6rH5eLogvZa/KfRxaxOJN1TnLELuHCmmNRn4G1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9sEGNlcA6mN7uUckBbPtOw0XojmPdcs3vgmyMmUjJJAiBEhU9sfTHJO8wbmDL6uQ1lPCgLUbmXoFIJz2rdMjzScg=="}]},"directories":{}}},"readme":"# editorconfig-tools\n[![Build Status](http://img.shields.io/travis/slang800/editorconfig-tools.svg?style=flat-square)](https://travis-ci.org/slang800/editorconfig-tools) [![NPM version](http://img.shields.io/npm/v/editorconfig-tools.svg?style=flat-square)](https://www.npmjs.org/package/editorconfig-tools) [![NPM license](http://img.shields.io/npm/l/editorconfig-tools.svg?style=flat-square)](https://www.npmjs.org/package/editorconfig-tools)\n\nThis tool-set is for validating or fixing code that doesn't adhere to settings defined in `.editorconfig`. It also is able to infer settings from existing code and generate an `.editorconfig` file that matches all the files that are passed to it. See the [EditorConfig Project](http://editorconfig.org/) for details about the `.editorconfig` file.\n\n## CLI\nThe CLI is (currently) the only way of using editorconfig-tools. The following sections detail the 3 subcommands that editorconfig-tools provides.\n\n### infer\nInfer `.editorconfig` settings from one or more files and generate an `.editorconfig` file that matches all the files that are passed to it.\n\nHere's an example using the files from this project. It is assumed that you have [globstar](http://www.linuxjournal.com/content/globstar-new-bash-globbing-option) enabled in your shell. While editorconfig-tools itself doesn't require it, these examples do use it to pass whole directories of files to editorconfig-tools.\n\n```bash\n$ editorconfig-tools infer ./* ./lib/**/* ./test/**/*\n[*]\nend_of_line = lf\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\nmax_line_length = 80\ntrim_trailing_whitespace = true\n\n[{./test/fixtures/end-of-line/file}]\nend_of_line = crlf\n\n[{./Makefile,./test/fixtures/indent-char-tab/file}]\nindent_style: tab\n\n[{./test/fixtures/insert-final-newline-false/file}]\ninsert_final_newline = false\n```\n\nAs you can see, a set of rules has been generated that matches all of the files that we passed in. If we were making an `.editorconfig` file for a project that doesn't already have one, we might want to write this out to a file:\n\n```bash\n$ editorconfig-tools infer ./* ./lib/**/* ./test/**/* > .editorconfig\n```\n\nWe would still probably want to add `root = true` to the file (if this is saved at the root of the project), but editorconfig-tools has done most of the work required to make an `.editorconfig` file.\n\n### check\nCheck (validate) that file(s) adhere to `.editorconfig` settings and return a non-zero exit code if errors are encountered (making it suitable for running as a test). For example, if we added some trailing whitespace to our readme, this would be the result:\n\n```bash\n$ editorconfig-tools check README.md\nREADME.md failed trim_trailing_whitespace on line 46: found setting 'false', should be 'true'\n```\n\n### fix\nFix formatting errors that disobey `.editorconfig` settings. This will modify your files without warning, so you should ensure that your project is under version control before running it.\n\nFor example, if we write a file with 4-space indentation, and then run the fix command (using the settings of this particular project) we will get back a 2-space indented file:\n\n```bash\n$ echo -e 'line one\\n    line two' > example-file\n$ editorconfig-tools fix ./example-file\n$ cat example-file\nline one\n  line two\n```\n\n## Similar Tools\n- [eclint](https://github.com/jedmao/eclint)\n- [treyhunner/editorconfig-tools](https://github.com/treyhunner/editorconfig-tools)\n","maintainers":[{"name":"slang","email":"slang800@gmail.com"}],"time":{"modified":"2022-06-16T05:26:01.650Z","created":"2014-05-12T10:59:18.953Z","0.0.0":"2014-05-12T10:59:18.953Z","0.0.1":"2014-11-02T03:26:51.893Z","0.1.0":"2015-03-03T19:00:45.313Z","0.1.1":"2015-03-04T18:45:08.688Z"},"homepage":"https://github.com/slang800/editorconfig-tools","keywords":["editorconfig","tools","validate","fix","enforce","code-quality","formatting","infer"],"repository":{"type":"git","url":"git://github.com/slang800/editorconfig-tools.git"},"author":{"name":"Sean Lang","email":"slang800@gmail.com"},"bugs":{"url":"https://github.com/slang800/editorconfig-tools/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mcandre":true,"samar":true,"cherenkevich":true,"yoksel":true,"shakakira":true,"tangchr":true,"ta2edchimp":true,"michaelfdias":true,"hiyangguo":true,"zoxon":true}}