Hearsay Social's base JavaScript style.
Install this package, and eslint:
npm install --save-dev eslint eslint-config-hss
Add this extends
value to the root level of your .eslintrc
:
{
"extends": "eslint-config-hss",
// ...
}
ESLint allows you to "extend" from multiple base configurations. If you use any of the below features, you may add these additional specialized base configurations. Each configuration contains only the rules associated with the given feature so you may combine them as your project demands.
{
"extends": [
"eslint-config-hss",
"eslint-config-hss/es6"
],
// ...
}
Note: This config requires that the package being linted have
eslint-plugin-react@^6.7.1
installed .
{
"extends": [
"eslint-config-hss",
"eslint-config-hss/es6",
"eslint-config-hss/react"
],
// ...
}
When linting Underscore templates with eslint-plugin-microtemplates, some rules don't make sense. To ignore those rules, extend from this config. Note: This config should not be applied to any js files, just html files.
{
"extends": [
"eslint-config-hss/microtemplates"
],
// ...
}
- Add shared config for Underscore templates.
- Add shared config for React code.
- Convert
no-mixed-operators
andno-multi-spaces
from warnings to errors. - Disable
max-statements
.
- Begin enforcing indentation. (#7)