Skip to content

Commit 3062680

Browse files
authored
Cleanup: update deps, add linting, add tests, add pre-commit hooks (#10)
* add linting * update deps * add jest and tests * add pre commit hooks * fix linting errors * add coverage dir to gitignore
1 parent c7e9fc9 commit 3062680

File tree

12 files changed

+24801
-22483
lines changed

12 files changed

+24801
-22483
lines changed

.eslintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"parser": "babel-eslint",
6+
"ecmaFeatures": {
7+
"jsx": true
8+
},
9+
"extends": "eslint-config-airbnb",
10+
"rules": {
11+
"import/no-extraneous-dependencies": 0,
12+
"indent": ["error", 4],
13+
"react/jsx-indent": ["error", 4],
14+
"react/prop-types": 0,
15+
"comma-dangle": ["error", "never"],
16+
"class-methods-use-this": 0
17+
}
18+
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
.idea
33
npm-debug.log
4-
lib/*.map
4+
lib/*.map
5+
coverage

.jestrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"resetMocks": true,
3+
"roots": [
4+
"<rootDir>/test",
5+
"<rootDir>/src"
6+
],
7+
"testRegex" : ".*test.jsx",
8+
"testPathIgnorePatterns": [
9+
"__snapshots__",
10+
"<rootDir>/node_modules/"
11+
],
12+
13+
"coverageDirectory": "./coverage",
14+
"coverageThreshold": {
15+
"global": {
16+
"lines": 93
17+
}
18+
},
19+
"coverageReporters": [
20+
"lcov",
21+
"text"
22+
]
23+
}

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
demo
2+
test

0 commit comments

Comments
 (0)