Introduction Writing Guidelines Colors & Icons Javascript Forms Grid Blankslate Avatars Buttons Alerts Modals Tooltips Panels Popovers Tables Navigation Utilities & Markdown Miscellaneous

# Javascript

JS style is enforced using Eslint. Instal the plugins for your editor (Atom, Sublime Text or emacs).

Each JS project should include eslint dependencies in the `package.json`:

    {
        ...
        "devDependencies": {
            "gitbook-styleguide": "*",
            "eslint": "*"
        },
        "scripts": {
            "lint": "eslint ./",
            "test": "npm run lint"
        }
    }

and an `.eslintrc` configuration file:

    {
        "extends": "gitbook-styleguide/eslint"
    }