Skip to content

Commit 57dcadc

Browse files
author
Raice Hannay
committed
migrate from tslint to eslint
1 parent 9e8c3e4 commit 57dcadc

File tree

6 files changed

+994
-102
lines changed

6 files changed

+994
-102
lines changed

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["voodoocreation"],
3+
"parserOptions": {
4+
"project": "tsconfig.lint.json"
5+
}
6+
}

package.json

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Raice Hannay <[email protected]>",
44
"description": "A set of classes to make setting up React components for unit tests easy.",
55
"license": "ISC",
6-
"version": "2.0.1",
6+
"version": "2.0.2",
77
"keywords": [
88
"component",
99
"enzyme",
@@ -26,9 +26,10 @@
2626
],
2727
"scripts": {
2828
"format": "prettier --write \"**/*.{js,jsx,json,ts,tsx}\"",
29-
"lint": "tslint \"./{types,src,pages}/**/*.ts?(x)\"",
29+
"lint": "eslint \"./src/**/*.ts?(x)\"",
30+
"lint:fix": "eslint \"./src/**/*.ts?(x)\" --fix",
3031
"test": "cross-env NODE_ENV=test jest --no-cache --config ./jest.config.js",
31-
"test:all": "npm-run-all format typecheck lint test:coverage",
32+
"test:all": "npm-run-all format typecheck lint:fix test:coverage",
3233
"test:coverage": "cross-env NODE_ENV=test jest --no-cache --coverage --config ./jest.config.js",
3334
"typecheck": "tsc"
3435
},
@@ -43,11 +44,11 @@
4344
"homepage": "https://github.com/voodoocreation/react-test-wrapper#readme",
4445
"types": "dist/index.d.ts",
4546
"peerDependencies": {
46-
"enzyme": "^3.10.0",
47-
"react": "^16.12.0",
48-
"react-intl": "^3.9.1",
49-
"react-redux": "^7.1.3",
50-
"redux": "^4.0.4"
47+
"enzyme": ">= 3.0.0",
48+
"react": ">= 16.0.0",
49+
"react-intl": ">= 3.0.0",
50+
"react-redux": ">= 7.0.0",
51+
"redux": ">= 4.0.0"
5152
},
5253
"peerDependenciesMeta": {
5354
"react-intl": {
@@ -66,10 +67,19 @@
6667
"@types/jest": "^24.0.23",
6768
"@types/react": "^16.9.15",
6869
"@types/react-redux": "^7.1.5",
70+
"@typescript-eslint/eslint-plugin": "^2.22.0",
6971
"cross-env": "^6.0.3",
7072
"enzyme": "^3.10.0",
7173
"enzyme-adapter-react-16": "^1.15.1",
7274
"enzyme-to-json": "^3.4.3",
75+
"eslint": "^6.8.0",
76+
"eslint-config-voodoocreation": "^1.0.7",
77+
"eslint-plugin-import": "^2.20.1",
78+
"eslint-plugin-jest": "^23.8.1",
79+
"eslint-plugin-jsx-a11y": "^6.2.3",
80+
"eslint-plugin-prefer-arrow": "^1.1.7",
81+
"eslint-plugin-react": "^7.18.3",
82+
"eslint-plugin-react-hooks": "^2.5.0",
7383
"jest": "^24.9.0",
7484
"npm-run-all": "^4.1.5",
7585
"prettier": "^1.19.1",
@@ -79,14 +89,11 @@
7989
"react-redux": "^7.1.3",
8090
"redux": "^4.0.4",
8191
"ts-jest": "^24.2.0",
82-
"tslint": "^5.20.0",
83-
"tslint-config-prettier": "^1.18.0",
84-
"tslint-react": "^4.1.0",
8592
"typescript": "^3.7.3",
8693
"typescript-fsa": "^3.0.0",
8794
"typescript-fsa-reducers": "^1.2.1"
8895
},
8996
"dependencies": {
90-
"ts-deepmerge": "^1.0.2"
97+
"ts-deepmerge": "^1.0.4"
9198
}
9299
}

src/WrapperWithRedux.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ export default abstract class WrapperWithRedux<
8686
this.dispatchedActions = [];
8787
};
8888

89-
protected abstract createStore(
90-
initialState: DeepPartial<S>,
91-
middlewares: Middleware[]
92-
): Store;
93-
9489
protected beforeMount = () => {
9590
this.reduxStore = this.createStore(this.mergedReduxState, [
9691
this.reduxHistoryMiddleware
@@ -111,4 +106,9 @@ export default abstract class WrapperWithRedux<
111106

112107
this.scenarioReduxState = {};
113108
}
109+
110+
protected abstract createStore(
111+
initialState: DeepPartial<S>,
112+
middlewares: Middleware[]
113+
): Store;
114114
}

tsconfig.lint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["./src/*"]
4+
}

tslint.json

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

0 commit comments

Comments
 (0)