5.0.4 • Published 2 years ago

@repay/eslint-config v5.0.4

Weekly downloads
139
License
MIT
Repository
github
Last release
2 years ago

@repay/eslint-config

The eslint-config used at REPAY.

Usage

To use this configuration you will need to follow three steps:

  1. install this package via your package manager of choice yarn add -D @repay/eslint-config eslint
  2. install the peer dependencies and configurations yarn repay-eslint install
  3. Ensure that your project has a Babel config file so that the included parser knows how to interpret your code.

To run the linter you should add a "script" to the root package.json such as:

{
  "scripts": {
    "lint": "eslint \"**/*.{js,jsx}\"",
    "fmt": "yarn lint --fix"
  }
}

You will then be able to run the linter using the command: yarn lint. Adding the --fix argument will auto fix any issues which can be listed as yarn fmt above.

Configuring .eslintrc

You may want to extend from @repay/eslint-config in your project's .eslintrc file so that you can make project-specific adjustments.

JS Project

// .eslintrc
{
  "extends": ["@repay/eslint-config"],
  "overrides": [{
    // override any linting rules here
  }]
}

TS Project

// .eslintrc
{
  "extends": ["@repay/eslint-config/ts"],
  "overrides": [{
    // override any linting rules here
  }]
}

If you are configuring this eslint in a TypeScript project, we recommend that you follow the typescript-eslint guidelines for linting with type information found here.

Design Principles

The following priciples should be considered when adding rules.

  • Stylistic options are limited to those exposed by Prettier to reduce bike-shedding
  • Rules should be added with specific purpose in mind to avoid bloat
  • Rules should be either "error" or "off" save for the following two exceptions:
    • very complex rules which are not always accurate
    • new rules that are added in a patch, which will be an error in the next minor version.
5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.0.0

3 years ago

3.2.0

3 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3-alpha.1

5 years ago

1.0.3-alpha.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago

1.0.0-alpha.0

5 years ago

0.2.0-beta.1

5 years ago

0.2.0-beta.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago