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

Commit 7aec80c

Browse files
committed
🚨 Remove jsx-wrap-multiline due to false positive
1 parent 959f0e6 commit 7aec80c

File tree

20 files changed

+4
-34
lines changed

20 files changed

+4
-34
lines changed

app/components/Button/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const href = 'http://mxstbr.com';
1212
const children = <h1>Test</h1>;
1313
const renderComponent = (props: Props & { type?: any } = {}) => {
1414
const utils = render(
15-
// tslint:disable-next-line: jsx-wrap-multiline
1615
<Button href={href} {...props}>
1716
{children}
1817
</Button>,

app/components/Footer/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe('<Footer />', () => {
1717
it('should render and match the snapshot', () => {
1818
const renderedComponent = renderer
1919
.create(
20-
// tslint:disable-next-line: jsx-wrap-multiline
2120
<Provider store={store}>
2221
<IntlProvider locale="en">
2322
<Footer />

app/components/Header/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ describe('<Header />', () => {
1414

1515
it('should render a div', () => {
1616
const { container } = render(
17-
// tslint:disable-next-line: jsx-wrap-multiline
1817
<Provider store={store}>
1918
<IntlProvider locale="en">
2019
<ConnectedRouter history={history}>

app/components/ReposList/tests/index.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ describe('<ReposList />', () => {
1616

1717
it('should render an error if loading failed', () => {
1818
const { queryByText } = render(
19-
// tslint:disable-next-line: jsx-wrap-multiline
2019
<IntlProvider locale="en">
2120
<ReposList loading={false} error={{ message: 'Loading failed!' }} />
2221
</IntlProvider>,
@@ -52,7 +51,6 @@ describe('<ReposList />', () => {
5251
},
5352
] as Repo[];
5453
const { container } = render(
55-
// tslint:disable-next-line: jsx-wrap-multiline
5654
<Provider store={store}>
5755
<IntlProvider locale="en">
5856
<ReposList repos={repos} error={false} loading={false}/>

app/components/Toggle/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe('<Toggle />', () => {
1919
},
2020
});
2121
const { container } = render(
22-
// tslint:disable-next-line: jsx-wrap-multiline
2322
<IntlProvider locale="en">
2423
<Toggle values={['en', 'de']} messages={messages} />
2524
</IntlProvider>,

app/components/ToggleOption/tests/index.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ describe('<ToggleOption />', () => {
1414
},
1515
});
1616
const { container } = render(
17-
// tslint:disable-next-line: jsx-wrap-multiline
1817
<IntlProvider locale="en">
1918
<ToggleOption value="en" message={message.enMessage} />
2019
</IntlProvider>,
@@ -24,7 +23,6 @@ describe('<ToggleOption />', () => {
2423

2524
it('should display `value`(two letter language code) when `message` is absent', () => {
2625
const { queryByText } = render(
27-
// tslint:disable-next-line: jsx-wrap-multiline
2826
<IntlProvider locale="de">
2927
<ToggleOption value="de" />
3028
</IntlProvider>,

app/containers/FeaturePage/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ describe('<FeaturePage />', () => {
99
const {
1010
container: { firstChild },
1111
} = render(
12-
// tslint:disable-next-line: jsx-wrap-multiline
1312
<IntlProvider locale="en">
1413
<FeaturePage />
1514
</IntlProvider>,

app/containers/HomePage/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jest.mock('containers/App/actions');
1818

1919
const renderHomePage = store =>
2020
render(
21-
// tslint:disable-next-line: jsx-wrap-multiline
2221
<Provider store={store}>
2322
<IntlProvider locale="en">
2423
<HomePage />

app/containers/LanguageProvider/tests/index.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ describe('<LanguageProvider />', () => {
2828
const text = 'Test';
2929
const children = <h1>{text}</h1>;
3030
const { queryByText } = render(
31-
// tslint:disable-next-line: jsx-wrap-multiline
3231
<Provider store={store}>
3332
<LanguageProvider messages={messages}>
3433
{children}
@@ -40,7 +39,6 @@ describe('<LanguageProvider />', () => {
4039

4140
it('should render the default language messages', () => {
4241
const { queryByText } = render(
43-
// tslint:disable-next-line: jsx-wrap-multiline
4442
<Provider store={store}>
4543
<LanguageProvider messages={translationMessages}>
4644
<FormattedMessage {...messages.someMessage} />

app/containers/LocaleToggle/tests/index.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ describe('<LocaleToggle />', () => {
2727

2828
it('should match the snapshot', () => {
2929
const { container } = render(
30-
// tslint:disable-next-line: jsx-wrap-multiline
3130
<Provider store={store}>
3231
<LanguageProvider messages={translationMessages}>
3332
<LocaleToggle />
@@ -39,7 +38,6 @@ describe('<LocaleToggle />', () => {
3938

4039
it('should present the default `en` english language option', () => {
4140
const { queryByDisplayValue } = render(
42-
// tslint:disable-next-line: jsx-wrap-multiline
4341
<Provider store={store}>
4442
<LanguageProvider messages={translationMessages}>
4543
<LocaleToggle />
@@ -51,7 +49,6 @@ describe('<LocaleToggle />', () => {
5149

5250
it('should dispatch changeLocale when user selects a new option', () => {
5351
const { container } = render(
54-
// tslint:disable-next-line: jsx-wrap-multiline
5552
<Provider store={store}>
5653
<LanguageProvider messages={translationMessages}>
5754
<LocaleToggle />

app/containers/NotFoundPage/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import messages from '../messages';
1212
describe('<NotFound />', () => {
1313
it('should render the Page Not Found text', () => {
1414
const { queryByText } = render(
15-
// tslint:disable-next-line: jsx-wrap-multiline
1615
<IntlProvider locale="en">
1716
<NotFound />
1817
</IntlProvider>,

app/containers/RepoListItem/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const renderComponent = (item, currentUser) => {
2626
initialState, history);
2727

2828
return render(
29-
// tslint:disable-next-line: jsx-wrap-multiline
3029
<Provider store={store}>
3130
<IntlProvider locale="en">
3231
<RepoListItem item={item} />

app/utils/tests/injectReducer.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ describe('useInjectReducer hook', () => {
108108

109109
it('should inject a given reducer', () => {
110110
render(
111-
// tslint:disable-next-line: jsx-wrap-multiline
112111
<Provider store={store}>
113112
<ComponentWithReducer />
114113
</Provider>,

app/utils/tests/injectSaga.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('injectSaga decorator', () => {
5454
it('should inject given saga, mode, and props', () => {
5555
const props = { test: 'test' };
5656
renderer.create(
57-
// tslint:disable-next-line: jsx-wrap-multiline
5857
<Provider store={store}>
5958
<ComponentWithSaga {...props} />
6059
</Provider>,
@@ -71,7 +70,6 @@ describe('injectSaga decorator', () => {
7170
it('should eject on unmount with a correct saga key', () => {
7271
const props = { test: 'test' };
7372
const renderedComponent = renderer.create(
74-
// tslint:disable-next-line: jsx-wrap-multiline
7573
<Provider store={store}>
7674
<ComponentWithSaga {...props} />
7775
</Provider>,
@@ -92,7 +90,6 @@ describe('injectSaga decorator', () => {
9290
it('should propagate props', () => {
9391
const props = { testProp: 'test' };
9492
const renderedComponent = renderer.create(
95-
// tslint:disable-next-line: jsx-wrap-multiline
9693
<Provider store={store}>
9794
<ComponentWithSaga {...props} />
9895
</Provider>,
@@ -136,7 +133,6 @@ describe('useInjectSaga hook', () => {
136133
it('should inject given saga and mode', () => {
137134
const props = { test: 'test' };
138135
render(
139-
// tslint:disable-next-line: jsx-wrap-multiline
140136
<Provider store={store}>
141137
<ComponentWithSaga {...props} />
142138
</Provider>,
@@ -152,7 +148,6 @@ describe('useInjectSaga hook', () => {
152148
it('should eject on unmount with a correct saga key', () => {
153149
const props = { test: 'test' };
154150
const { unmount } = render(
155-
// tslint:disable-next-line: jsx-wrap-multiline
156151
<Provider store={store}>
157152
<ComponentWithSaga {...props} />
158153
</Provider>,

internals/generators/container/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@ module.exports = {
187187
actions.push({
188188
type: 'modify',
189189
path: '../../app/types/index.d.ts',
190-
pattern: new RegExp(/.*\/\/.*\[IMPORT NEW CONTAINERSTATE ABOVE\].+\n\n*/),
190+
pattern: new RegExp(/.*\/\/.*\[IMPORT NEW CONTAINERSTATE ABOVE\].+\n/),
191191
templateFile: './container/importContainerState.hbs',
192192
abortOnFail: true,
193193
});
194194
actions.push({
195195
type: 'modify',
196196
path: '../../app/types/index.d.ts',
197-
pattern: new RegExp(/.*\/\/.*\[INSERT NEW REDUCER KEY ABOVE\].+\n\n*/),
197+
pattern: new RegExp(/.*\/\/.*\[INSERT NEW REDUCER KEY ABOVE\].+\n/),
198198
templateFile: './container/appendApplicationRootState.hbs',
199199
abortOnFail: true,
200200
});

internals/templates/containers/HomePage/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ describe('<HomePage />', () => {
1313
const {
1414
container: { firstChild },
1515
} = render(
16-
// tslint:disable-next-line: jsx-wrap-multiline
1716
<IntlProvider locale="en">
1817
<HomePage />
1918
</IntlProvider>,

internals/templates/containers/NotFoundPage/tests/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ describe('<NotFound />', () => {
1212
const {
1313
container: { firstChild },
1414
} = render(
15-
// tslint:disable-next-line: jsx-wrap-multiline
1615
<IntlProvider locale="en">
1716
<NotFound />
1817
</IntlProvider>,

internals/templates/utils/tests/injectReducer.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ describe('useInjectReducer hook', () => {
111111

112112
it('should inject a given reducer', () => {
113113
render(
114-
// tslint:disable-next-line: jsx-wrap-multiline
115114
<Provider store={store}>
116115
<ComponentWithReducer />
117116
</Provider>,

internals/templates/utils/tests/injectSaga.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('injectSaga decorator', () => {
5454
it('should inject given saga, mode, and props', () => {
5555
const props = { test: 'test' };
5656
renderer.create(
57-
// tslint:disable-next-line: jsx-wrap-multiline
5857
<Provider store={store}>
5958
<ComponentWithSaga {...props} />
6059
</Provider>,
@@ -71,7 +70,6 @@ describe('injectSaga decorator', () => {
7170
it('should eject on unmount with a correct saga key', () => {
7271
const props = { test: 'test' };
7372
const renderedComponent = renderer.create(
74-
// tslint:disable-next-line: jsx-wrap-multiline
7573
<Provider store={store}>
7674
<ComponentWithSaga {...props} />
7775
</Provider>,
@@ -92,7 +90,6 @@ describe('injectSaga decorator', () => {
9290
it('should propagate props', () => {
9391
const props = { testProp: 'test' };
9492
const renderedComponent = renderer.create(
95-
// tslint:disable-next-line: jsx-wrap-multiline
9693
<Provider store={store}>
9794
<ComponentWithSaga {...props} />
9895
</Provider>,
@@ -135,7 +132,6 @@ describe('useInjectSaga hook', () => {
135132
it('should inject given saga and mode', () => {
136133
const props = { test: 'test' };
137134
render(
138-
// tslint:disable-next-line: jsx-wrap-multiline
139135
<Provider store={store}>
140136
<ComponentWithSaga {...props} />
141137
</Provider>,
@@ -151,7 +147,6 @@ describe('useInjectSaga hook', () => {
151147
it('should eject on unmount with a correct saga key', () => {
152148
const props = { test: 'test' };
153149
const { unmount } = render(
154-
// tslint:disable-next-line: jsx-wrap-multiline
155150
<Provider store={store}>
156151
<ComponentWithSaga {...props} />
157152
</Provider>,

tslint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"no-implicit-dependencies": false,
2424
"no-submodule-imports": false,
2525
"no-empty": false,
26-
"jsx-alignment": false
26+
"jsx-alignment": false,
27+
"jsx-wrap-multiline": false
2728
},
2829
"linterOptions": {
2930
"exclude": ["**/*.js"]

0 commit comments

Comments
 (0)