Skip to content

Commit d122155

Browse files
a-tarasyukerictraut
authored andcommitted
eslint-plugin-reactxp (#1155)
* add eslint-plugin-reactxp to hello-world, ImageList samples * add eslint-plugin-reactxp to README
1 parent c3b091c commit d122155

File tree

10 files changed

+469
-363
lines changed

10 files changed

+469
-363
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ This will create a directory called **AppName** inside the current working direc
4343
* [Node.Js](https://nodejs.org/) ([Setup Instructions](https://nodejs.org/en/download/package-manager/))
4444
* [React Native](https://facebook.github.io/react-native/) ([Setup Instructions](https://facebook.github.io/react-native/docs/getting-started))
4545

46+
## ESLint rules
47+
48+
> [TSLint will be deprecated some time in 2019](https://github.com/palantir/tslint)
49+
50+
If you plan to migrate your projects from TSLint to ESlint and want to continue using the [_rules_](https://github.com/microsoft/reactxp/tree/master/src/tslint) to automate search common problems in *ReactXP* usage, you can use [eslint-plugin-reactxp](https://github.com/a-tarasyuk/eslint-plugin-reactxp).
51+
4652
## Contributing
4753

4854
We welcome contributions to ReactXP. See the [CONTRIBUTING](./CONTRIBUTING.md) file for how to help out.

samples/ImageList/.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"sourceType": "module",
88
"project": "./tsconfig.json"
99
},
10-
"plugins": ["@typescript-eslint", "react", "jest"],
10+
"plugins": ["@typescript-eslint", "reactxp", "react", "jest"],
1111
"extends": [
1212
"eslint:recommended",
1313
"plugin:@typescript-eslint/eslint-recommended",
1414
"plugin:@typescript-eslint/recommended",
1515
"plugin:@typescript-eslint/recommended-requiring-type-checking",
16+
"plugin:reactxp/recommended",
1617
"plugin:react/recommended",
1718
"plugin:jest/recommended"
1819
],
@@ -26,7 +27,7 @@
2627
"indent": "off",
2728
"@typescript-eslint/indent": ["error", 4],
2829
"react/jsx-curly-brace-presence": [2, { "props": "always" }],
29-
"max-len": ["error", 140],
30+
"max-len": ["error", 140]
3031
},
3132
"globals": {
3233
"__DEV__": true

samples/ImageList/package-lock.json

Lines changed: 267 additions & 225 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/ImageList/package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,32 @@
2020
"lint": "eslint --config .eslintrc --ext .ts,.tsx src"
2121
},
2222
"devDependencies": {
23-
"@babel/core": "7.6.2",
23+
"@babel/core": "7.6.4",
2424
"@babel/plugin-proposal-decorators": "7.6.0",
25-
"@babel/preset-env": "7.6.2",
25+
"@babel/preset-env": "7.6.3",
2626
"@react-native-community/cli": "1.10.0",
2727
"@types/enzyme": "3.10.3",
28-
"@types/jest": "24.0.18",
29-
"@typescript-eslint/eslint-plugin": "2.3.3",
30-
"@typescript-eslint/parser": "2.3.3",
28+
"@types/jest": "24.0.19",
29+
"@typescript-eslint/eslint-plugin": "2.5.0",
30+
"@typescript-eslint/parser": "2.5.0",
3131
"babel-loader": "8.0.6",
3232
"compression-webpack-plugin": "3.0.0",
3333
"cross-env": "6.0.3",
3434
"enzyme": "3.10.0",
35-
"enzyme-adapter-react-16": "1.14.0",
36-
"enzyme-to-json": "3.4.2",
35+
"enzyme-adapter-react-16": "1.15.1",
36+
"enzyme-to-json": "3.4.3",
3737
"eslint": "6.5.1",
3838
"eslint-loader": "3.0.2",
39-
"eslint-plugin-jest": "22.17.0",
39+
"eslint-plugin-jest": "22.20.0",
4040
"eslint-plugin-react": "7.16.0",
41-
"fork-ts-checker-webpack-plugin": "1.5.0",
41+
"eslint-plugin-reactxp": "0.1.6",
42+
"fork-ts-checker-webpack-plugin": "1.5.1",
4243
"html-webpack-plugin": "3.2.0",
4344
"jest": "24.9.0",
4445
"metro-react-native-babel-preset": "0.56.0",
45-
"rnpm-plugin-windows": "0.3.5",
46-
"typescript": "3.6.3",
47-
"webpack": "4.41.0",
46+
"rnpm-plugin-windows": "0.3.7",
47+
"typescript": "3.6.4",
48+
"webpack": "4.41.2",
4849
"webpack-cli": "3.3.9",
4950
"webpack-dev-server": "3.8.2",
5051
"webpack-merge": "4.2.2"

samples/hello-world/.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"sourceType": "module",
88
"project": "./tsconfig.json"
99
},
10-
"plugins": ["@typescript-eslint", "react", "jest"],
10+
"plugins": ["@typescript-eslint", "reactxp", "react", "jest"],
1111
"extends": [
1212
"eslint:recommended",
1313
"plugin:@typescript-eslint/eslint-recommended",
1414
"plugin:@typescript-eslint/recommended",
1515
"plugin:@typescript-eslint/recommended-requiring-type-checking",
16+
"plugin:reactxp/recommended",
1617
"plugin:react/recommended",
1718
"plugin:jest/recommended"
1819
],
@@ -26,7 +27,7 @@
2627
"indent": "off",
2728
"@typescript-eslint/indent": ["error", 4],
2829
"react/jsx-curly-brace-presence": [2, { "props": "always" }],
29-
"max-len": ["error", 140],
30+
"max-len": ["error", 140]
3031
},
3132
"globals": {
3233
"__DEV__": true

0 commit comments

Comments
 (0)