]> git.proxmox.com Git - pve-eslint.git/blob - eslint/docs/src/developer-guide/source-code.md
build: add missing dh-nodejs to build-dependencies
[pve-eslint.git] / eslint / docs / src / developer-guide / source-code.md
1 ---
2 title: Source Code
3 layout: doc
4 eleventyNavigation:
5 key: getting the source code
6 parent: developer guide
7 title: Getting the Source Code
8 order: 1
9
10 ---
11
12 ESLint 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/).
13
14 If you simply want to create a local copy of the source to play with, you can clone the main repository using this command:
15
16 ```shell
17 git clone git://github.com/eslint/eslint.git
18 ```
19
20 If 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.
21
22 ## Start Developing
23
24 Before you can get started developing, you'll need to have a couple of things installed:
25
26 * [Node.JS](https://nodejs.org)
27 * [npm](https://www.npmjs.com/)
28
29 Once you have a local copy and have Node.JS and npm installed, you'll need to install the ESLint dependencies:
30
31 ```shell
32 cd eslint
33 npm install
34 ```
35
36 Now when you run `eslint`, it will be running your local copy and showing your changes.
37
38 **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.
39
40 ## Directory structure
41
42 The ESLint directory and file structure is as follows:
43
44 * `bin` - executable files that are available when ESLint is installed
45 * `conf` - default configuration information
46 * `docs` - documentation for the project
47 * `lib` - contains the source code
48 * `formatters` - all source files defining formatters
49 * `rules` - all source files defining rules
50 * `tests` - the main unit test folder
51 * `lib` - tests for the source code
52 * `formatters` - tests for the formatters
53 * `rules` - tests for the rules