Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Commit 0c1047d

Browse files
author
joseph.stiles
committed
v1.0.1
1 parent bb28060 commit 0c1047d

File tree

5 files changed

+427
-109
lines changed

5 files changed

+427
-109
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
63+
# Local npmrc
64+
.npmrc

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
# eslint-config-standard-react-strict
22
A strict and subjective ruleset for React projects.
33

4-
Usage:
5-
1. `npm install --save-dev eslint-config-standard-react-strict`
6-
2. add `"extends": ["eslint-config-standard-react-strict]` to an .eslintrc
4+
## Overview
5+
* Extends [eslint-config-standard-react](https://www.npmjs.com/package/eslint-config-standard-react) and [eslint-config-react-app](https://www.npmjs.com/package/eslint-config-react-app).
6+
* Includes [sort-imports-es6-autofix/sort-imports-es6](https://www.npmjs.com/package/eslint-plugin-sort-imports-es6-autofix).
7+
* Adds strict and subjective rules.
8+
9+
## Usage
10+
```bash
11+
npm install --save-dev eslint-config-standard-react-strict
12+
```
13+
Extend "eslint-config-standard-react-strict" in an eslint config.
14+
```
15+
{
16+
"extends": ["standard-react-strict"]
17+
}
18+
```
19+
*Note: The `eslint-config-` prefix is automatically assumed by ESLint.*
20+
21+
You can override settings from the shareable config by adding them directly into your eslint config.
22+
23+
## Notes
24+
* Focuses on auto-fixing.
25+
* Intended to increase code consistency in a team environment.
26+
* Includes packages that are required by eslint-config-standard-react but not installed with eslint-config-standard-react.
27+
* New rules will be added in minor version increments. Using a fixed version is recommended to avoid build failures.
28+

index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ module.exports = {
3333
rules: {
3434
'arrow-body-style': [2, 'as-needed'],
3535
'arrow-parens': [2, 'as-needed'],
36+
'camelcase': [2, {
37+
allow: [
38+
'UNSAFE_componentWillMount',
39+
'UNSAFE_componentWillReceiveProps',
40+
'UNSAFE_omponentWillUpdate'
41+
]
42+
}],
3643
'consistent-return': [2],
3744
'comma-style': [2],
3845
'no-nested-ternary': [2],
@@ -78,7 +85,7 @@ module.exports = {
7885
],
7986
'react/no-multi-comp': [1, { ignoreStateless: true }],
8087
'react/sort-comp': [1],
81-
// Planned expansion:
88+
// Future
8289
// 'multiline-ternary': [2]
8390
},
8491
settings: {

0 commit comments

Comments
 (0)