]> git.proxmox.com Git - pve-eslint.git/blame - eslint/docs/developer-guide/source-code.md
import 7.12.1 upstream release
[pve-eslint.git] / eslint / docs / developer-guide / source-code.md
CommitLineData
eb39fafa
DC
1# Source Code
2
3ESLint is hosted at [GitHub](https://github.com/eslint/eslint) and uses [Git](https://git-scm.com/) for source control. In order to obtain the source code, you must first install Git on your system. Instructions for installing and setting up Git can be found at [https://help.github.com/articles/set-up-git/](https://help.github.com/articles/set-up-git/).
4
5If you simply want to create a local copy of the source to play with, you can clone the main repository using this command:
6
7 git clone git://github.com/eslint/eslint.git
8
9If you're planning on contributing to ESLint, then it's a good idea to fork the repository. You can find instructions for forking a repository at [https://help.github.com/articles/fork-a-repo/](https://help.github.com/articles/fork-a-repo/). After forking the ESLint repository, you'll want to create a local copy of your fork.
10
11## Start Developing
12
13Before you can get started developing, you'll need to have a couple of things installed:
14
15* [Node.JS](https://nodejs.org)
16* [npm](https://www.npmjs.com/)
17
18Once you have a local copy and have Node.JS and npm installed, you'll need to install the ESLint dependencies:
19
20 cd eslint
21 npm install
22
23Now when you run `eslint`, it will be running your local copy and showing your changes.
24
6f036462 25**Note:** It's a good idea to re-run `npm install` whenever you pull from the main repository to ensure you have the latest development dependencies.
eb39fafa
DC
26
27## Directory structure
28
29The ESLint directory and file structure is as follows:
30
31* `bin` - executable files that are available when ESLint is installed
32* `conf` - default configuration information
33* `docs` - documentation for the project
34* `lib` - contains the source code
35 * `formatters` - all source files defining formatters
36 * `rules` - all source files defining rules
37* `tests` - the main unit test folder
38 * `lib` - tests for the source code
39 * `formatters` - tests for the formatters
40 * `rules` - tests for the rules