2.2.0 • Published 3 years ago

@salestrip/eslint-config v2.2.0

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

@salestrip/eslint-config

If you'd like to add or change an eslint rule open a PR and use gh-polls to solicit team voting: https://app.gh-polls.com/.

Install

Install peer dependencies along with the module.

npm i -D eslint
npm i -D eslint-plugin-jest
npm i -D eslint-plugin-prettier
npm i -D prettier
npm i -D prettier-eslint-cli
npm i -D @salestrip/eslint-config

Use

Create the following .eslintrc file in your project root.

{
  "extends": "@salestrip",
  "root": true
}

Then create a test/.eslintrc file with the following content.

{
  "extends": "@salestrip/eslint-config/configs/jest"
}

This module provides a format binary that executes prettier code formatting followed by an eslint 'stroustrup' brace style and property quote corrections to align with eslint config. Add the following npm task to your package.json.

"scripts": {
  "format": "format '{lib,test}/**/*.js'"
}

Lint

A pre-lint script symlinks the project to itself so you can dog food the config settings while a post-lint script removes the symlinks. Note that this would remove any existing global symlink so you would need to run npm link again to restore it.

npm run lint
2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.5.0

7 years ago

0.4.0

7 years ago