Skip to content

Commit 45daf72

Browse files
authored
Merge pull request #143 from davidpelfree/feature/davidp-97-add-linter
Feature/davidp 97 add linter
2 parents 4e0fbd5 + a49a29f commit 45daf72

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.eslintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"plugins": [
3+
"react-native"
4+
],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:react-native/all"
8+
],
9+
"parser": "babel-eslint",
10+
"env": {
11+
"react-native/react-native": true
12+
},
13+
"parserOptions": {
14+
"ecmaFeatures": {
15+
"jsx": true
16+
}
17+
},
18+
"rules":{
19+
"react-native/no-unused-styles": 2,
20+
"react-native/split-platform-components": 2,
21+
"react-native/no-inline-styles": 2,
22+
"react-native/no-color-literals": 2,
23+
"react-native/no-raw-text": 2
24+
}
25+
}

.github/workflows/expo.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ name: Expo Build
22
on: [push,pull_request]
33

44
jobs:
5+
eslint:
6+
name: Linter
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: stefanoeb/[email protected]
11+
with:
12+
files: src/
513
build:
614
name: Build
715
runs-on: ubuntu-latest

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.1.2",
44
"private": true,
55
"devDependencies": {
6+
"babel-eslint": "^10.1.0",
7+
"eslint": "^6.8.0",
8+
"eslint-plugin-react-native": "^3.8.1",
69
"jest-expo": "^35.0.0",
710
"react-test-renderer": "16.0.0",
811
"standard": "^14.3.1"
@@ -47,4 +50,4 @@
4750
"redux-thunk": "^2.3.0",
4851
"remote-redux-devtools": "^0.5.16"
4952
}
50-
}
53+
}

0 commit comments

Comments
 (0)