eslint-config-strawhouse
v5.0.0
Published
Strawhouse eslint configuration
Downloads
9
Readme
Out-of-the-box Prettier-compatible ESLint Configuration
eslint-config-strawhouse
Strawhouse's very own, opinionated eslint config, out-of-the-box ready for use with Prettier.
This package contains an extended version of the eslint-config-airbnb ESLint rules. It requires eslint
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-react
, and eslint-plugin-jsx-a11y
.
React function naming conventions
See this document for details on Strawhouse function naming conventions in react.
Steps to install
- Ensure packages are installed with correct version numbers (see below).
- If your project uses yarn, run
yarn
to update your yarn.lock for the new packages. - Add
"extends": "strawhouse"
to your .eslintrc.
The following command will install the correct versions of the required packages:
(
export PKG=eslint-config-strawhouse;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add --dev "$PKG@latest"
)
The above command produces and runs a command like:
yarn add --dev eslint-config-strawhouse eslint-config-airbnb@^#.#.# eslint@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-react@^#.#.#
Updating this NPM package
- Commit changes and merge to
master
. - Update the
CHANGELOG.md
with version number and notes on changes since the last version. - Make sure you are logged in to npm on the CLI:
npm login
. - Run
npm version <update_type>
.update_type
is one of the semantic versioning release types: "patch","minor", or "major".- This will update the
package.json
and tag the git repo.
- Commit and push versioning update and tags.
- Run
npm publish
. - Visit https://www.npmjs.com/package/eslint-config-strawhouse and ensure the correct version is displayed.
Futher reading:
NPM docs: Updating the package - https://docs.npmjs.com/getting-started/publishing-npm-packages#updating-the-package