4.0.0 • Published 8 years ago

eslint-config-healthsparq v4.0.0

Weekly downloads
18
License
ISC
Repository
-
Last release
8 years ago

HealthSparq standards and ESLint configs with dependencies for JavaScript projects.

Installing

Adding this package as a dev dependency will also add all of the dependencies needed to run the ESLint plugins. Prettier must be installed as a project dependency, this ensures that editors use the correct version.

npm i eslint-config-healthsparq prettier --D

If you are using the web configuration, install the webpack resolver as well:

npm i eslint-import-resolver-webpack --D

Usage

The package includes separate configurations for web and Node projects, extend the appropriate config:

Web project

// .eslintrc.js
module.exports = { extends: 'healthsparq/web' }

Node project

// .eslintrc.js
module.exports = { extends: 'healthsparq/node' }

Code quality standards

Code quality linting uses the Airbnb rule set. The only rule that is different is no-use-before-define, which has option functions true. This lets us always declare Component propTypes before the Component definition, even for functional stateless components, by using function declarations:

import React from 'react'

HealthCare.propTypes = {
  description: string
}

HealthCare.defaultProps = {
  description: 'RAD'
}

export default function HealthCare({ description }) {
 return <h1>HealthSparq makes health care {description}!</h1>
}

Code formatting standards

All code formatting is done by Prettier. HealthSparq uses the following Prettier configs:

  • Print Width 84: Using a slightly wider print width gives us 80 useable characters for code, even inside of class methods.
  • Single Quotes: Easier to type!
  • No Semis: Less noise makes code more readable.
4.0.0

8 years ago

3.2.1

8 years ago

3.2.0

8 years ago

3.1.0

8 years ago

3.0.0

8 years ago

2.4.0

8 years ago

2.3.0

8 years ago

2.2.0

8 years ago

1.2.0

8 years ago

2.1.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago