edx/eslint-config-edx

Name: eslint-config-edx

Owner: edX

Description: ESLint configs for edX JavaScript code.

Created: 2016-06-16 16:39:03.0

Updated: 2018-02-14 21:11:09.0

Pushed: 2018-03-21 14:55:19.0

Homepage:

Size: 58

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

edX ESLint configs

Build Status

ESLint configs for edX JavaScript code.

Table of Contents
  1. Overview
  2. License
  3. Dependencies
  4. Usage
  5. The Configs
Overview

In order to standardize and enforce edX's JavaScript coding style across multiple codebases, edX has adopted ESLint and these shared ESLint configs. Two configs are published from this repository:

License

The code in this repository is released under the Apache 2.0 license unless otherwise noted. Please see the LICENSE file for details.

Dependencies

ESLint is required to use either config, and NodeJS 4.0 or greater is required to use ESLint. Both configs are tested with the Node version bundled in the most recent edX devstack setup.

Usage

To begin using the edX ESLint configs in a codebase, install the desired config from NPM:

npm install --save-dev eslint-config-edx

or

npm install --save-dev eslint-config-edx-es5

Then, configure your project's ESLint config to extend eslint-config-edx or eslint-config-edx-es5 (see the ESLint docs on Using a Shareable Config). If you do not plan on adding custom rules beyond those in eslint-config-edx to your project, the easiest place to configure this is probably in your package.json:

"devDependencies": {
    "eslint-config-edx": "^2.0.0"
},
"eslintConfig": {
    "extends": "eslint-config-edx"
}

If you plan on adding additional customization, you can configure your project with an .eslintrc.js/.eslintrc.json file.

The Configs

More documentation on the rules specified by each config is available in:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.