Skip to content

Commit fe0318b

Browse files
committed
updates
1 parent fe72f8b commit fe0318b

File tree

2 files changed

+25
-34
lines changed

2 files changed

+25
-34
lines changed

README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
2-
ESLint plugin for React Native
3-
==============================
4-
5-
# Project update
6-
7-
Dear users, first of all, thanks for using the plugin! At the moment development activity is low, I've personally not worked with React Native for many years and have little time to continue updating the plugin. I'll do my best to update the plugin to ensure compatibility with new eslint versions, but unfortunately I do not have time to asses new features/pull requests. Thanks for your understanding!
1+
# ESLint plugin for React Native
82

93
[![Greenkeeper badge](https://badges.greenkeeper.io/Intellicode/eslint-plugin-react-native.svg)](https://greenkeeper.io/)
104

115
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Coverage Status][coverage-image]][coverage-url] [![Code Climate][climate-image]][climate-url] [![BCH compliance][bettercode-image]][bettercode-url]
126

13-
React Native specific linting rules for ESLint. This repository is structured like (and contains code from) the excellent [eslint-plugin-react](http://github.com/yannickcr/eslint-plugin-react).
7+
React Native specific linting rules for ESLint. This repository is structured like (and contains code from) the excellent [eslint-plugin-react](http://github.com/yannickcr/eslint-plugin-react).
148

159
# Installation
1610

@@ -28,9 +22,8 @@ $ npm install --save-dev eslint-plugin-react
2822

2923
Similarly, install eslint-plugin-react-native
3024

31-
3225
```sh
33-
$ npm install --save-dev eslint-plugin-react-native
26+
$ npm install --save-dev @peterpme/eslint-plugin-react-native
3427
```
3528

3629
# Configuration
@@ -39,10 +32,7 @@ Add `plugins` section and specify ESLint-plugin-React (optional) and ESLint-plug
3932

4033
```json
4134
{
42-
"plugins": [
43-
"react",
44-
"react-native"
45-
]
35+
"plugins": ["react", "react-native"]
4636
}
4737
```
4838

@@ -51,14 +41,14 @@ If it is not already the case you must also configure `ESLint` to support JSX.
5141
```json
5242
{
5343
"parserOptions": {
54-
"ecmaFeatures": {
55-
"jsx": true
56-
}
44+
"ecmaFeatures": {
45+
"jsx": true
46+
}
5747
}
5848
}
5949
```
6050

61-
In order to whitelist all *browser-like* globals, add `react-native/react-native` to your config.
51+
In order to whitelist all _browser-like_ globals, add `react-native/react-native` to your config.
6252

6353
```json
6454
{
@@ -86,35 +76,32 @@ Finally, enable all of the rules that you would like to use.
8676
"react-native/no-inline-styles": 2,
8777
"react-native/no-color-literals": 2,
8878
"react-native/no-raw-text": 2,
89-
"react-native/no-single-element-style-arrays": 2,
79+
"react-native/no-single-element-style-arrays": 2
9080
}
9181
}
9282
```
9383

9484
# List of supported rules
9585

96-
* [no-unused-styles](docs/rules/no-unused-styles.md): Detect `StyleSheet` rules which are not used in your React components
97-
* [sort-styles](docs/rules/sort-styles.md): Require style definitions to be sorted alphabetically
98-
* [split-platform-components](docs/rules/split-platform-components.md): Enforce using platform specific filenames when necessary
99-
* [no-inline-styles](docs/rules/no-inline-styles.md): Detect JSX components with inline styles that contain literal values
100-
* [no-color-literals](docs/rules/no-color-literals.md): Detect `StyleSheet` rules and inline styles containing color literals instead of variables
101-
* [no-raw-text](docs/rules/no-raw-text.md): Detect raw text outside of `Text` component
102-
* [no-single-element-style-arrays](docs/rules/no-single-element-style-arrays.md): No style arrays that have 1 element only `<View style={[{height: 10}]}/>`
86+
- [no-unused-styles](docs/rules/no-unused-styles.md): Detect `StyleSheet` rules which are not used in your React components
87+
- [sort-styles](docs/rules/sort-styles.md): Require style definitions to be sorted alphabetically
88+
- [split-platform-components](docs/rules/split-platform-components.md): Enforce using platform specific filenames when necessary
89+
- [no-inline-styles](docs/rules/no-inline-styles.md): Detect JSX components with inline styles that contain literal values
90+
- [no-color-literals](docs/rules/no-color-literals.md): Detect `StyleSheet` rules and inline styles containing color literals instead of variables
91+
- [no-raw-text](docs/rules/no-raw-text.md): Detect raw text outside of `Text` component
92+
- [no-single-element-style-arrays](docs/rules/no-single-element-style-arrays.md): No style arrays that have 1 element only `<View style={[{height: 10}]}/>`
10393

10494
[npm-url]: https://npmjs.org/package/eslint-plugin-react-native
10595
[npm-image]: http://img.shields.io/npm/v/eslint-plugin-react-native.svg?style=flat-square
106-
10796
[coverage-url]: https://coveralls.io/r/Intellicode/eslint-plugin-react-native?branch=master
10897
[coverage-image]: http://img.shields.io/coveralls/Intellicode/eslint-plugin-react-native/master.svg?style=flat-square
109-
11098
[climate-url]: https://codeclimate.com/github/Intellicode/eslint-plugin-react-native
11199
[climate-image]: http://img.shields.io/codeclimate/github/Intellicode/eslint-plugin-react-native.svg?style=flat-square
112-
113100
[status-url]: https://github.com/Intellicode/eslint-plugin-react-native/pulse
114101
[status-image]: http://img.shields.io/badge/status-maintained-brightgreen.svg?style=flat-square
115-
116102
[bettercode-image]: https://bettercodehub.com/edge/badge/Intellicode/eslint-plugin-react-native
117103
[bettercode-url]: https://bettercodehub.com
104+
118105
# Shareable configurations
119106

120107
## All
@@ -132,3 +119,7 @@ This plugin also exports an `all` configuration that includes every available ru
132119
```
133120

134121
**Note**: These configurations will import `eslint-plugin-react-native` and enable JSX in [parser options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options).
122+
123+
## Thanks
124+
125+
Thanks to [@intellicode](https://github.com/Intellicode/eslint-plugin-react-native) for creating and maintaining this after all these years

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@peterpme/eslint-plugin-react-native",
3-
"version": "4.0.0",
3+
"version": "4.1.0",
44
"author": "Tom Hastjarjanto <[email protected]>",
55
"description": "React Native specific linting rules for ESLint",
66
"main": "index.js",
@@ -18,10 +18,10 @@
1818
],
1919
"repository": {
2020
"type": "git",
21-
"url": "https://github.com/intellicode/eslint-plugin-react-native"
21+
"url": "https://github.com/peterpme/eslint-plugin-react-native"
2222
},
23-
"homepage": "https://github.com/intellicode/eslint-plugin-react-native",
24-
"bugs": "https://github.com/intellicode/eslint-plugin-react-native/issues",
23+
"homepage": "https://github.com/peterpme/eslint-plugin-react-native",
24+
"bugs": "https://github.com/peterpme/eslint-plugin-react-native/issues",
2525
"devDependencies": {
2626
"@babel/eslint-parser": "^7.16.3",
2727
"@typescript-eslint/parser": "^5.3.1",

0 commit comments

Comments
 (0)