Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit 81b7f3d

Browse files
committed
chore: Lock dependencies, fix tests and eslint
Locked and bumped all dependencies versions so we can use renovate to automate these updates. Fixed tests as new versions of deps brought some errors. Changed style guide from AirBnB to Standard in ESLint.
1 parent 36fbfd0 commit 81b7f3d

37 files changed

Lines changed: 4584 additions & 3093 deletions

.eslintrc.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

.eslintrc.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"jest": true
6+
},
7+
"extends": [
8+
"plugin:react/recommended",
9+
"standard",
10+
"prettier",
11+
"prettier/standard",
12+
"prettier/react"
13+
],
14+
"parser": "@typescript-eslint/parser",
15+
"parserOptions": {
16+
"ecmaFeatures": {
17+
"jsx": true
18+
},
19+
"ecmaVersion": 12,
20+
"sourceType": "module"
21+
},
22+
"plugins": [
23+
"react",
24+
"@typescript-eslint",
25+
"prettier",
26+
"react-hooks",
27+
"import-helpers"
28+
],
29+
"rules": {
30+
"react/jsx-uses-react": "off",
31+
"react/react-in-jsx-scope": "off",
32+
"react/prop-types": "off",
33+
"react-hooks/rules-of-hooks": "error",
34+
"react-hooks/exhaustive-deps": "warn",
35+
"prettier/prettier": "error",
36+
"import-helpers/order-imports": [
37+
"warn",
38+
{
39+
"newlinesBetween": "always",
40+
"groups": [
41+
["/^react/"],
42+
["module", "absolute"],
43+
"/^@/",
44+
["parent", "sibling", "index"]
45+
],
46+
"alphabetize": { "order": "asc", "ignoreCase": true }
47+
}
48+
]
49+
},
50+
"settings": {
51+
"react": {
52+
"version": "detect"
53+
}
54+
}
55+
}

.lintstagedrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"src/**/*.{js,ts,tsx}": [
3-
"eslint --ext js,ts,tsx --fix",
4-
"git add"
3+
"eslint --ext js,ts,tsx --fix"
54
]
65
}

babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
// just for react native testing
3+
presets: ['module:metro-react-native-babel-preset'],
4+
}

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
22
extends: ['rocketseat'],
3-
};
3+
}

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ module.exports = {
1616
moduleNameMapper: {
1717
'@unform/(.*)': '<rootDir>/packages/$1/lib',
1818
},
19-
};
19+
}

package.json

Lines changed: 46 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,51 @@
1717
"tsc": "tsc --skipLibCheck"
1818
},
1919
"devDependencies": {
20-
"@babel/core": "^7.4.3",
21-
"@commitlint/cli": "^7.6.1",
22-
"@commitlint/config-conventional": "^7.6.0",
23-
"@commitlint/travis-cli": "^7.6.1",
24-
"@testing-library/jest-dom": "^4.2.4",
25-
"@testing-library/react": "^9.3.2",
26-
"@types/dot-object": "^1.7.0",
27-
"@types/jest": "^24.0.11",
28-
"@types/react": "^16.9.16",
29-
"@types/react-dom": "^16.9.4",
30-
"@types/react-native": "^0.60.24",
31-
"@types/react-test-renderer": "^16.8.1",
32-
"@types/yup": "^0.26.12",
33-
"@typescript-eslint/eslint-plugin": "^2.15.0",
34-
"@typescript-eslint/parser": "^2.15.0",
35-
"commitlint-config-rocketseat": "^0.0.1",
36-
"coveralls": "^3.0.3",
37-
"eslint": "^5.16.0",
38-
"eslint-config-airbnb": "^17.1.0",
39-
"eslint-config-prettier": "^4.1.0",
40-
"eslint-import-resolver-typescript": "^1.1.1",
41-
"eslint-plugin-import": "^2.17.2",
42-
"eslint-plugin-import-helpers": "^0.1.4",
43-
"eslint-plugin-jest": "^22.4.1",
44-
"eslint-plugin-jsx-a11y": "^6.2.1",
45-
"eslint-plugin-prettier": "^3.0.1",
46-
"eslint-plugin-react": "^7.12.4",
47-
"eslint-plugin-react-hooks": "^1.6.0",
48-
"husky": "^1.3.1",
49-
"jest": "^24.7.1",
50-
"jest-dom": "^3.2.2",
51-
"lerna": "^3.13.1",
52-
"lint-staged": "^8.1.5",
53-
"prettier": "^1.17.0",
54-
"react": "^16.12.0",
55-
"react-dom": "^16.12.0",
56-
"react-native": "^0.61.5",
57-
"react-test-renderer": "^16.12.0",
58-
"rimraf": "^2.6.3",
59-
"rollup": "^1.27.9",
60-
"rollup-plugin-babel": "^4.3.3",
61-
"rollup-plugin-commonjs": "^10.1.0",
62-
"rollup-plugin-node-resolve": "^5.2.0",
63-
"rollup-plugin-terser": "^5.1.2",
64-
"rollup-plugin-typescript2": "^0.25.3",
65-
"rollup-plugin-url": "^3.0.1",
66-
"ts-jest": "^24.0.2",
67-
"typescript": "^3.7.4"
20+
"@babel/core": "7.12.10",
21+
"@commitlint/cli": "11.0.0",
22+
"@commitlint/config-conventional": "11.0.0",
23+
"@commitlint/travis-cli": "11.0.0",
24+
"@testing-library/jest-dom": "5.11.9",
25+
"@testing-library/react": "11.2.3",
26+
"@types/dot-object": "2.1.2",
27+
"@types/jest": "26.0.20",
28+
"@types/react": "17.0.0",
29+
"@types/react-dom": "17.0.0",
30+
"@types/react-native": "0.63.46",
31+
"@types/react-test-renderer": "17.0.0",
32+
"@typescript-eslint/eslint-plugin": "4.14.1",
33+
"@typescript-eslint/parser": "4.14.1",
34+
"commitlint-config-rocketseat": "0.0.1",
35+
"coveralls": "3.1.0",
36+
"eslint": "7.18.0",
37+
"eslint-config-prettier": "7.2.0",
38+
"eslint-config-standard": "16.0.2",
39+
"eslint-plugin-import": "2.22.1",
40+
"eslint-plugin-import-helpers": "1.1.0",
41+
"eslint-plugin-node": "11.1.0",
42+
"eslint-plugin-prettier": "3.3.1",
43+
"eslint-plugin-promise": "4.2.1",
44+
"eslint-plugin-react": "7.22.0",
45+
"eslint-plugin-react-hooks": "4.2.0",
46+
"husky": "4.3.8",
47+
"jest": "26.6.3",
48+
"jest-dom": "4.0.0",
49+
"lerna": "3.22.1",
50+
"lint-staged": "10.5.3",
51+
"prettier": "2.2.1",
52+
"react": "17.0.1",
53+
"react-dom": "17.0.1",
54+
"react-native": "0.63.4",
55+
"react-test-renderer": "17.0.1",
56+
"rimraf": "3.0.2",
57+
"rollup": "2.38.0",
58+
"rollup-plugin-babel": "4.4.0",
59+
"rollup-plugin-commonjs": "10.1.0",
60+
"rollup-plugin-node-resolve": "5.2.0",
61+
"rollup-plugin-terser": "7.0.2",
62+
"rollup-plugin-typescript2": "0.29.0",
63+
"rollup-plugin-url": "3.0.1",
64+
"ts-jest": "26.4.4",
65+
"typescript": "4.1.3"
6866
}
6967
}

0 commit comments

Comments
 (0)