Skip to content

Commit

Permalink
migrate from tslint to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Raice Hannay committed Mar 5, 2020
1 parent 9e8c3e4 commit 57dcadc
Show file tree
Hide file tree
Showing 6 changed files with 994 additions and 102 deletions.
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["voodoocreation"],
"parserOptions": {
"project": "tsconfig.lint.json"
}
}
31 changes: 19 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Raice Hannay <voodoocreation@gmail.com>",
"description": "A set of classes to make setting up React components for unit tests easy.",
"license": "ISC",
"version": "2.0.1",
"version": "2.0.2",
"keywords": [
"component",
"enzyme",
Expand All @@ -26,9 +26,10 @@
],
"scripts": {
"format": "prettier --write \"**/*.{js,jsx,json,ts,tsx}\"",
"lint": "tslint \"./{types,src,pages}/**/*.ts?(x)\"",
"lint": "eslint \"./src/**/*.ts?(x)\"",
"lint:fix": "eslint \"./src/**/*.ts?(x)\" --fix",
"test": "cross-env NODE_ENV=test jest --no-cache --config ./jest.config.js",
"test:all": "npm-run-all format typecheck lint test:coverage",
"test:all": "npm-run-all format typecheck lint:fix test:coverage",
"test:coverage": "cross-env NODE_ENV=test jest --no-cache --coverage --config ./jest.config.js",
"typecheck": "tsc"
},
Expand All @@ -43,11 +44,11 @@
"homepage": "https://github.com/voodoocreation/react-test-wrapper#readme",
"types": "dist/index.d.ts",
"peerDependencies": {
"enzyme": "^3.10.0",
"react": "^16.12.0",
"react-intl": "^3.9.1",
"react-redux": "^7.1.3",
"redux": "^4.0.4"
"enzyme": ">= 3.0.0",
"react": ">= 16.0.0",
"react-intl": ">= 3.0.0",
"react-redux": ">= 7.0.0",
"redux": ">= 4.0.0"
},
"peerDependenciesMeta": {
"react-intl": {
Expand All @@ -66,10 +67,19 @@
"@types/jest": "^24.0.23",
"@types/react": "^16.9.15",
"@types/react-redux": "^7.1.5",
"@typescript-eslint/eslint-plugin": "^2.22.0",
"cross-env": "^6.0.3",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"enzyme-to-json": "^3.4.3",
"eslint": "^6.8.0",
"eslint-config-voodoocreation": "^1.0.7",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.8.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prefer-arrow": "^1.1.7",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^2.5.0",
"jest": "^24.9.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
Expand All @@ -79,14 +89,11 @@
"react-redux": "^7.1.3",
"redux": "^4.0.4",
"ts-jest": "^24.2.0",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0",
"tslint-react": "^4.1.0",
"typescript": "^3.7.3",
"typescript-fsa": "^3.0.0",
"typescript-fsa-reducers": "^1.2.1"
},
"dependencies": {
"ts-deepmerge": "^1.0.2"
"ts-deepmerge": "^1.0.4"
}
}
10 changes: 5 additions & 5 deletions src/WrapperWithRedux.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ export default abstract class WrapperWithRedux<
this.dispatchedActions = [];
};

protected abstract createStore(
initialState: DeepPartial<S>,
middlewares: Middleware[]
): Store;

protected beforeMount = () => {
this.reduxStore = this.createStore(this.mergedReduxState, [
this.reduxHistoryMiddleware
Expand All @@ -111,4 +106,9 @@ export default abstract class WrapperWithRedux<

this.scenarioReduxState = {};
}

protected abstract createStore(
initialState: DeepPartial<S>,
middlewares: Middleware[]
): Store;
}
4 changes: 4 additions & 0 deletions tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"include": ["./src/*"]
}
17 changes: 0 additions & 17 deletions tslint.json

This file was deleted.

Loading

0 comments on commit 57dcadc

Please sign in to comment.