Skip to content

Commit 8e40382

Browse files
authored
Merge pull request #225 from alexandr-g/fix/test-deps
Update ESLint dependencies and rules
2 parents 31d6c28 + 619635a commit 8e40382

File tree

7 files changed

+259
-92
lines changed

7 files changed

+259
-92
lines changed

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
// Disable <Fragment> => <> replacement. Feel free to change
1919
"react/jsx-fragments": "off",
2020
// Disable prefer default export
21-
"import/prefer-default-export": "off"
21+
"import/prefer-default-export": "off",
22+
"@typescript-eslint/object-curly-spacing": "off",
23+
"react/jsx-filename-extension": [0],
24+
"import/extensions": "off",
25+
"import/no-extraneous-dependencies": "off"
2226
},
2327
"overrides": [
2428
{

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
"@types/react-router-dom": "^5.1.3",
4545
"@types/redux-mock-store": "^1.0.1",
4646
"@typescript-eslint/eslint-plugin": "^4.8.1",
47-
"@typescript-eslint/parser": "^4.8.1",
47+
"@typescript-eslint/parser": "5.9.0",
4848
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.0",
4949
"enzyme": "^3.11.0",
5050
"eslint": "^7.11.0",
51-
"eslint-config-airbnb-typescript": "^12.0.0",
51+
"eslint-config-airbnb-typescript": "^16.1.0",
5252
"eslint-config-prettier": "^6.15.0",
5353
"eslint-plugin-import": "^2.22.0",
5454
"eslint-plugin-jsx-a11y": "^6.4.1",

src/components/counter/Counter.spec.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ describe('Counter', () => {
1717
// Add jest mock spy to watch for store.dispatch method. See https://jestjs.io/docs/en/jest-object#jestspyonobject-methodname for more info
1818
jest.spyOn(store, 'dispatch')
1919

20-
beforeEach(() => {
21-
// Clear any saved mock data from previous tests, because jest saves calls data for spies and mocks, https://jestjs.io/docs/en/mock-function-api#mockfnmockclear
22-
store.dispatch.mockClear()
23-
})
24-
2520
it('renders without crashing.', () => {
2621
const wrapper = mount(
2722
<Provider store={store}>

src/features/counter/counterReducer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable @typescript-eslint/default-param-last */
2+
13
import { INCREMENT_COUNTER, DECREMENT_COUNTER } from './actionTypes'
24
import { CounterActionTypes } from './types'
35

template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"@types/react-router-dom": "5.1.3",
1111
"@types/redux-mock-store": "^1.0.1",
1212
"@typescript-eslint/eslint-plugin": "4.8.1",
13-
"@typescript-eslint/parser": "4.8.1",
13+
"@typescript-eslint/parser": "5.9.0",
1414
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.0",
1515
"enzyme": "3.11.0",
1616
"eslint": "7.11.0",
17-
"eslint-config-airbnb-typescript": "12.0.0",
17+
"eslint-config-airbnb-typescript": "16.1.0",
1818
"eslint-config-prettier": "6.15.0",
1919
"eslint-plugin-import": "2.22.0",
2020
"eslint-plugin-jsx-a11y": "6.4.1",

template/.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
"react/jsx-fragments": "off",
1717
// Disable prefer default export
1818
"import/prefer-default-export": "off",
19-
"comma-dangle": "off"
19+
"comma-dangle": "off",
20+
"@typescript-eslint/object-curly-spacing": "off",
21+
"react/jsx-filename-extension": [0],
22+
"import/extensions": "off",
23+
"import/no-extraneous-dependencies": "off"
2024
},
2125
"overrides": [
2226
{

0 commit comments

Comments
 (0)