eslint-config-exponent
v5.1.3
Published
Shared ESLint configs for Exponent
Downloads
1,247
Readme
eslint-config-exponent
Shared ESLint configs for Exponent's JS.
Installation
yarn add --dev eslint-config-exponent
You will also need to install eslint
, babel-eslint
, eslint-plugin-babel
, eslint-plugin-import
, and eslint-plugin-react
(if you want to lint React and JSX):
yarn add --dev eslint babel-eslint eslint-plugin-babel eslint-plugin-import eslint-plugin-react
Usage
Import this config into your own ESLint configuration using the extends
option. ESLint checks both package.json and .eslintrc.* files for its configuration:
package.json
{
"eslintConfig": {
"extends": "exponent"
}
}
.eslintrc.js
module.exports = {
extends: 'exponent',
};
React and JSX Support
There are two configs: one for JavaScript and one for React. The React configuration extends the JavaScript one and adds support and linter rules for JSX.
"eslintConfig": {
"extends": "exponent"
// or
"extends": "exponent/react"
}