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
Size: 58
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ESLint configs for edX JavaScript code.
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:
eslint-config-edx
, for linting ES2015+ codeeslint-config-edx-es5
, for linting ES5 codeThe code in this repository is released under the Apache 2.0 license unless otherwise noted. Please see the LICENSE file for details.
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.
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.
More documentation on the rules specified by each config is available in: