Skip to content

Commit 26e4e23

Browse files
committed
Updated test rules.
1 parent 9aa5b39 commit 26e4e23

File tree

34 files changed

+2223
-875
lines changed

34 files changed

+2223
-875
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
dist/
1+
dist/
2+
src/index.d.ts

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"no-unused-expressions": "off",
1515
"react/jsx-filename-extension": "off",
1616
"react/no-did-update-set-state": "off",
17-
"react/prop-types": "off"
17+
"react/prop-types": "off",
18+
"no-unexpected-multiline": "off"
1819
},
1920
"plugins": ["react", "react-native"],
2021
"parserOptions": {

package.json

Lines changed: 119 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,125 @@
11
{
2-
"name": "@muratoner/semantic-ui-react-native",
3-
"version": "1.0.22",
4-
"description": "Semantic UI React Native - User Interface is the language of the mobile",
5-
"main": "src/index.js",
6-
"files": [
7-
"src",
8-
"!**/__tests__"
2+
"name": "@muratoner/semantic-ui-react-native",
3+
"version": "1.0.22",
4+
"description": "Semantic UI React Native - User Interface is the language of the mobile",
5+
"main": "src/index.js",
6+
"files": [
7+
"src",
8+
"!**/__tests__"
9+
],
10+
"types": "src/index.d.ts",
11+
"keywords": [
12+
"react-native",
13+
"reactjs",
14+
"reactnative",
15+
"bootstrap"
16+
],
17+
"scripts": {
18+
"test": "jest",
19+
"test:update": "jest -u",
20+
"test:ci": "jest --runInBand",
21+
"test:watch": "jest --watch",
22+
"postinstall": "opencollective-postinstall || exit 0",
23+
"lint": "eslint --ext js,ts",
24+
"prettify": "prettier",
25+
"clean-install": "rimraf node_modules && yarn",
26+
"changelog": "auto-changelog -p"
27+
},
28+
"author": "Murat ÖNER",
29+
"license": "MIT",
30+
"bugs": {
31+
"url": "https://github.com/muratoner/semantic-ui-react-native/issues"
32+
},
33+
"dependencies": {
34+
"@types/react-native-vector-icons": "^6.4.6",
35+
"color": "^3.1.2",
36+
"deepmerge": "^4.2.2",
37+
"hoist-non-react-statics": "^3.3.2",
38+
"lodash.isequal": "^4.5.0",
39+
"opencollective-postinstall": "^2.0.3",
40+
"prop-types": "^15.7.2",
41+
"react-native-ratings": "^7.3.0",
42+
"react-native-safe-area-context": "^3.1.9",
43+
"react-native-size-matters": "^0.4.0"
44+
},
45+
"devDependencies": {
46+
"@react-native-community/eslint-config": "^2.0.0",
47+
"@testing-library/react-native": "^7.0.2",
48+
"@types/jest": "^26.0.19",
49+
"@types/prop-types": "^15.7.3",
50+
"@types/react": "^16.9.0",
51+
"@types/react-native": "^0.63.2",
52+
"auto-changelog": "^2.2.1",
53+
"babel-jest": "^26.3.0",
54+
"enzyme": "^3.11.0",
55+
"enzyme-adapter-react-16": "^1.15.4",
56+
"enzyme-to-json": "^3.5.0",
57+
"eslint": "^7.9.0",
58+
"husky": "^4.3.0",
59+
"jest": "^26.6.3",
60+
"jest-transform-stub": "^2.0.0",
61+
"lint-staged": "^10.4.0",
62+
"metro-react-native-babel-preset": "^0.63.0",
63+
"react": "16.13.1",
64+
"react-dom": "16.13.1",
65+
"react-native": "0.63.2",
66+
"react-native-vector-icons": "^7.0.0",
67+
"react-test-renderer": "^16.13.1",
68+
"rimraf": "^3.0.2",
69+
"typescript": "^3.9.5"
70+
},
71+
"peerDependencies": {
72+
"react-native-vector-icons": ">7.0.0"
73+
},
74+
"jest": {
75+
"preset": "react-native",
76+
"timers": "fake",
77+
"coverageDirectory": "./coverage/",
78+
"testPathIgnorePatterns": [
79+
"./src/searchbar/__tests__/common.js",
80+
"<rootDir>/node_modules"
981
],
10-
"types": "src/index.d.ts",
11-
"keywords": [
12-
"react-native",
13-
"reactjs",
14-
"reactnative",
15-
"bootstrap"
82+
"coveragePathIgnorePatterns": [
83+
"./src/searchbar/__tests__/common.js"
1684
],
17-
"scripts": {
18-
"test": "jest",
19-
"test:update": "jest -u",
20-
"test:ci": "jest --runInBand",
21-
"test:watch": "jest --watch",
22-
"postinstall": "opencollective-postinstall || exit 0",
23-
"lint": "eslint --ext js,ts",
24-
"prettify": "prettier",
25-
"clean-install": "rimraf node_modules && yarn",
26-
"changelog": "auto-changelog -p"
27-
},
28-
"author": "Murat ÖNER",
29-
"license": "MIT",
30-
"bugs": {
31-
"url": "https://github.com/muratoner/semantic-ui-react-native/issues"
32-
},
33-
"dependencies": {
34-
"@types/react-native-vector-icons": "^6.4.6",
35-
"color": "^3.1.2",
36-
"deepmerge": "^4.2.2",
37-
"hoist-non-react-statics": "^3.3.2",
38-
"lodash.isequal": "^4.5.0",
39-
"opencollective-postinstall": "^2.0.3",
40-
"prop-types": "^15.7.2",
41-
"react-native-ratings": "^7.3.0",
42-
"react-native-safe-area-context": "^3.1.9",
43-
"react-native-size-matters": "^0.4.0"
44-
},
45-
"devDependencies": {
46-
"@react-native-community/eslint-config": "^2.0.0",
47-
"@testing-library/react-native": "^7.0.2",
48-
"@types/jest": "^26.0.19",
49-
"@types/prop-types": "^15.7.3",
50-
"@types/react": "^16.9.0",
51-
"@types/react-native": "^0.63.2",
52-
"auto-changelog": "^2.2.1",
53-
"babel-jest": "^26.3.0",
54-
"enzyme": "^3.11.0",
55-
"enzyme-adapter-react-16": "^1.15.4",
56-
"enzyme-to-json": "^3.5.0",
57-
"eslint": "^7.9.0",
58-
"husky": "^4.3.0",
59-
"jest": "^26.4.2",
60-
"jest-transform-stub": "^2.0.0",
61-
"lint-staged": "^10.4.0",
62-
"metro-react-native-babel-preset": "^0.63.0",
63-
"react": "16.13.1",
64-
"react-dom": "16.13.1",
65-
"react-native": "0.63.2",
66-
"react-native-vector-icons": "^7.0.0",
67-
"react-test-renderer": "^16.13.1",
68-
"rimraf": "^3.0.2",
69-
"typescript": "^3.9.5"
70-
},
71-
"peerDependencies": {
72-
"react-native-vector-icons": ">7.0.0"
73-
},
74-
"jest": {
75-
"preset": "react-native",
76-
"timers": "fake",
77-
"coverageDirectory": "./coverage/",
78-
"testPathIgnorePatterns": [
79-
"./src/searchbar/__tests__/common.js",
80-
"<rootDir>/node_modules"
81-
],
82-
"coveragePathIgnorePatterns": [
83-
"./src/searchbar/__tests__/common.js"
84-
],
85-
"collectCoverageFrom": [
86-
"src/**/*.js",
87-
"!src/index.js",
88-
"!src/helpers/*.js"
89-
],
90-
"collectCoverage": true,
91-
"globals": {
92-
"__DEV__": true
93-
},
94-
"setupFilesAfterEnv": [
95-
"<rootDir>/.ci/setupTests.js"
96-
],
97-
"transform": {
98-
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
99-
}
100-
},
101-
"lint-staged": {
102-
"src/**/*.js": [
103-
"eslint --fix",
104-
"jest --bail --findRelatedTests"
105-
],
106-
"src/index.d.ts": [
107-
"eslint --fix"
108-
],
109-
"**/*.md": [
110-
"prettier --single-quote --trailing-comma=es5 --write"
111-
]
112-
},
113-
"directories": {
114-
"doc": "docs"
115-
},
116-
"repository": {
117-
"type": "git",
118-
"url": "git+https://github.com/muratoner/semantic-ui-react-native.git"
85+
"collectCoverageFrom": [
86+
"src/**/*.js",
87+
"!src/index.js",
88+
"!src/helpers/*.js"
89+
],
90+
"collectCoverage": true,
91+
"globals": {
92+
"__DEV__": true
11993
},
120-
"husky": {
121-
"hooks": {
122-
"pre-commit": "lint-staged"
123-
}
94+
"setupFilesAfterEnv": [
95+
"<rootDir>/.ci/setupTests.js"
96+
],
97+
"transform": {
98+
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
99+
}
100+
},
101+
"lint-staged": {
102+
"src/**/*.js": [
103+
"eslint",
104+
"jest --bail --findRelatedTests"
105+
],
106+
"src/index.d.ts": [
107+
"eslint"
108+
],
109+
"**/*.md": [
110+
"prettier --single-quote --trailing-comma=es5 --write"
111+
]
112+
},
113+
"directories": {
114+
"doc": "docs"
115+
},
116+
"repository": {
117+
"type": "git",
118+
"url": "git+https://github.com/muratoner/semantic-ui-react-native.git"
119+
},
120+
"husky": {
121+
"hooks": {
122+
"pre-commit": "lint-staged"
124123
}
124+
}
125125
}

src/avatar/Avatar.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useMemo, useState } from 'react'
1+
import React, {useMemo, useState} from 'react'
22
import {
33
ActivityIndicator,
44
ImageBackground,
@@ -8,9 +8,8 @@ import {
88
View
99
} from 'react-native'
1010
import Icon from '../icons/Icon'
11-
import { AvatarProps } from '../index'
12-
import { Styles } from '../mixins'
13-
import { UtilColor } from '../utils'
11+
import {Styles} from '../mixins'
12+
import {UtilColor} from '../utils'
1413

1514
const Component = ({
1615
title,
@@ -29,7 +28,7 @@ const Component = ({
2928
bordered,
3029
raised,
3130
loading = true
32-
}: AvatarProps) => {
31+
}) => {
3332
const [avatarLoaded, setAvatarLoaded] = useState(false)
3433
const [defaultBg] = useState('#b1b1b1')
3534
const [defaultTextColor] = useState('#fff')

0 commit comments

Comments
 (0)