Skip to content

Commit

Permalink
Add eslint eol-last to require newline at end of files (#4985)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Baylon committed Dec 1, 2020
1 parent e719f43 commit 67398d8
Show file tree
Hide file tree
Showing 106 changed files with 106 additions and 105 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Expand Up @@ -22,6 +22,7 @@
"__DEV__": true
},
"rules": {
"eol-last": ["error", "always"],
"global-require": 0,
"no-undefined": 0,
"react/display-name": [2, { "ignoreTranspilerName": false }],
Expand Down
2 changes: 1 addition & 1 deletion app/actions/helpers/channels.ts
Expand Up @@ -419,4 +419,4 @@ async function getProfilesFromPromises(promises: Array<Promise<ActionResult>>):
} catch {
return null;
}
}
}
2 changes: 1 addition & 1 deletion app/actions/views/emoji.js
Expand Up @@ -97,4 +97,4 @@ async function getCustomEmojiByName(name) {
}

return null;
}
}
2 changes: 1 addition & 1 deletion app/actions/views/permalink.ts
Expand Up @@ -48,4 +48,4 @@ export function closePermalink() {
showingPermalink = false;
return dispatch(selectFocusedPostId(''));
};
}
}
2 changes: 1 addition & 1 deletion app/actions/views/post.test.js
Expand Up @@ -185,4 +185,4 @@ describe('Actions.Views.Post', () => {
const receivedStatuses = actionTypes.filter((type) => type === UserTypes.RECEIVED_STATUSES);
expect(receivedStatuses.length).toBe(1);
});
});
});
2 changes: 1 addition & 1 deletion app/actions/views/user.js
Expand Up @@ -242,4 +242,4 @@ export function setCurrentUserStatusOffline() {
}

/* eslint-disable no-import-assign */
HelperActions.forceLogoutIfNecessary = forceLogoutIfNecessary;
HelperActions.forceLogoutIfNecessary = forceLogoutIfNecessary;
2 changes: 1 addition & 1 deletion app/actions/websocket/channels.test.js
Expand Up @@ -176,4 +176,4 @@ describe('Websocket Chanel Events', () => {
const {channels} = store.getState().entities.channels;
assert.ok(Object.keys(channels).length);
});
});
});
2 changes: 1 addition & 1 deletion app/actions/websocket/general.test.js
Expand Up @@ -57,4 +57,4 @@ describe('Websocket General Events', () => {
assert.ok(config.EnableCustomEmoji === 'true');
assert.ok(config.EnableLinkPreviews === 'false');
});
});
});
2 changes: 1 addition & 1 deletion app/actions/websocket/general.ts
Expand Up @@ -24,4 +24,4 @@ export function handleLicenseChangedEvent(msg: WebSocketMessage): GenericAction
type: GeneralTypes.CLIENT_LICENSE_RECEIVED,
data,
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/groups.ts
Expand Up @@ -20,4 +20,4 @@ export function handleGroupUpdatedEvent(msg: WebSocketMessage) {
]));
return {data: true};
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/integrations.test.js
Expand Up @@ -44,4 +44,4 @@ describe('Websocket Integration Events', () => {
assert.ok(dialog.trigger_id === 'sometriggerid');
assert.ok(dialog.dialog);
});
});
});
2 changes: 1 addition & 1 deletion app/actions/websocket/integrations.ts
Expand Up @@ -11,4 +11,4 @@ export function handleOpenDialogEvent(msg: WebSocketMessage) {
dispatch({type: IntegrationTypes.RECEIVED_DIALOG, data: JSON.parse(data)});
return {data: true};
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/posts.ts
Expand Up @@ -206,4 +206,4 @@ export function handlePostUnread(msg: WebSocketMessage) {

return {data: null};
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/preferences.ts
Expand Up @@ -57,4 +57,4 @@ export function handlePreferencesDeletedEvent(msg: WebSocketMessage): GenericAct
const preferences = JSON.parse(msg.data.preferences);

return {type: PreferenceTypes.DELETED_PREFERENCES, data: preferences};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/reactions.test.js
Expand Up @@ -57,4 +57,4 @@ describe('Websocket Reaction Events', () => {
assert.ok(emojis);
assert.ok(emojis[created.id]);
});
});
});
2 changes: 1 addition & 1 deletion app/actions/websocket/reactions.ts
Expand Up @@ -38,4 +38,4 @@ export function handleReactionRemovedEvent(msg: WebSocketMessage): GenericAction
type: PostTypes.REACTION_DELETED,
data: reaction,
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/roles.ts
Expand Up @@ -30,4 +30,4 @@ export function handleRoleUpdatedEvent(msg: WebSocketMessage): GenericAction {
type: RoleTypes.RECEIVED_ROLE,
data: role,
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/teams.test.js
Expand Up @@ -103,4 +103,4 @@ describe('Websocket Team Events', () => {
const {myMembers} = store.getState().entities.teams;
assert.ifError(myMembers[team.id]);
});
});
});
2 changes: 1 addition & 1 deletion app/actions/websocket/teams.ts
Expand Up @@ -103,4 +103,4 @@ export function handleTeamAddedEvent(msg: WebSocketMessage) {

return {data: true};
};
}
}
2 changes: 1 addition & 1 deletion app/actions/websocket/users.test.js
Expand Up @@ -91,4 +91,4 @@ describe('Websocket User Events', () => {
assert.strictEqual(profiles[user.id].first_name, 'tester4');
});
});
});
});
2 changes: 1 addition & 1 deletion app/actions/websocket/users.ts
Expand Up @@ -202,4 +202,4 @@ export function handleUserUpdatedEvent(msg: WebSocketMessage) {
}
return {data: true};
};
}
}
2 changes: 1 addition & 1 deletion app/components/app_version.tsx
Expand Up @@ -35,4 +35,4 @@ const AppVersion = () => {
);
};

export default AppVersion;
export default AppVersion;
2 changes: 1 addition & 1 deletion app/components/at_mention/at_mention.test.js
Expand Up @@ -41,4 +41,4 @@ describe('AtMention', () => {
wrapper.setState({user: {username: 'Victor.Welch'}});
expect(wrapper.getElement()).toMatchSnapshot();
});
});
});
2 changes: 1 addition & 1 deletion app/components/autocomplete/autocomplete_section_header.js
Expand Up @@ -75,4 +75,4 @@ AutocompleteSectionHeader.propTypes = {
isFirstSection: PropTypes.bool,
};

export default AutocompleteSectionHeader;
export default AutocompleteSectionHeader;
Expand Up @@ -72,4 +72,4 @@ describe('components/autocomplete/emoji_suggestion', () => {
expect(wrapper.state('dataSource')).toEqual(output3);
}, 100);
});
});
});
2 changes: 1 addition & 1 deletion app/components/channel_loader/channel_loader.test.js
Expand Up @@ -18,4 +18,4 @@ describe('ChannelLoader', () => {
const wrapper = shallow(<ChannelLoader {...baseProps}/>);
expect(wrapper.getElement()).toMatchSnapshot();
});
});
});
2 changes: 1 addition & 1 deletion app/components/compass_icon/index.js
Expand Up @@ -4,4 +4,4 @@
import {createIconSetFromFontello} from 'react-native-vector-icons';
import fontelloConfig from '@assets/compass-icons.json';

export default createIconSetFromFontello(fontelloConfig, 'compass-icons', 'compass-icons.ttf');
export default createIconSetFromFontello(fontelloConfig, 'compass-icons', 'compass-icons.ttf');
2 changes: 1 addition & 1 deletion app/components/deleted_post.js
Expand Up @@ -79,4 +79,4 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
};
});

export default DeletedPost;
export default DeletedPost;
2 changes: 1 addition & 1 deletion app/components/edit_channel_info/edit_channel_info.test.js
Expand Up @@ -91,4 +91,4 @@ describe('EditChannelInfo', () => {
instance.onKeyboardDidShow();
expect(instance.scrollHeaderToTop).toHaveBeenCalledTimes(2);
});
});
});
2 changes: 1 addition & 1 deletion app/components/image_viewport.js
Expand Up @@ -52,4 +52,4 @@ export default class ImageViewPort extends PureComponent {
render() {
return null;
}
}
}
Expand Up @@ -125,4 +125,4 @@ describe('ActionButton', () => {
expect(dynamicButtonStyles).toBe(undefined);
expect(buttonTextChild.props.style.color).toBe(Preferences.THEMES.default.centerChannelColor);
});
});
});
Expand Up @@ -88,4 +88,4 @@ const styles = StyleSheet.create({
ActionButtonText.propTypes = {
message: PropTypes.string.isRequired,
style: PropTypes.object.isRequired,
};
};
Expand Up @@ -140,4 +140,4 @@ describe('ActionButtonText emojis', () => {
expect(emoticonChild.props.textStyle.fontSize).toBe(12);
});
});
});
});
2 changes: 1 addition & 1 deletion app/components/post_attachment_image/index.test.js
Expand Up @@ -20,4 +20,4 @@ describe('PostAttachmentImage', () => {

expect(wrapper.getElement()).toMatchSnapshot();
});
});
});
2 changes: 1 addition & 1 deletion app/components/post_body/index.test.js
Expand Up @@ -120,4 +120,4 @@ describe('makeMapStateToProps', () => {
mapStateToProps(defaultState, defaultOwnProps);
expect(canDeletePost).toHaveBeenCalledTimes(1);
});
});
});
2 changes: 1 addition & 1 deletion app/components/post_draft/archived/archived.js
Expand Up @@ -103,4 +103,4 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => ({
color: 'white',
fontWeight: 'bold',
},
}));
}));
2 changes: 1 addition & 1 deletion app/components/post_draft/index.test.js
Expand Up @@ -117,4 +117,4 @@ describe('mapStateToProps', () => {
permission: Permissions.USE_CHANNEL_MENTIONS,
});
});
});
});
Expand Up @@ -180,4 +180,4 @@ const style = StyleSheet.create({
justifyContent: 'center',
padding: 10,
},
});
});
Expand Up @@ -101,4 +101,4 @@ describe('FileQuickAction', () => {
expect(request).toHaveBeenCalled();
expect(hasPermission).toBe(true);
});
});
});
2 changes: 1 addition & 1 deletion app/components/post_draft/quick_actions/index.js
Expand Up @@ -17,4 +17,4 @@ function mapStateToProps(state) {
};
}

export default connect(mapStateToProps, null, null, {forwardRef: true})(QuickActions);
export default connect(mapStateToProps, null, null, {forwardRef: true})(QuickActions);
Expand Up @@ -88,4 +88,4 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
padding: 10,
},
};
});
});
2 changes: 1 addition & 1 deletion app/components/post_draft/quick_actions/quick_actions.js
Expand Up @@ -136,4 +136,4 @@ const style = StyleSheet.create({
flexDirection: 'row',
height: 44,
},
});
});
2 changes: 1 addition & 1 deletion app/components/post_draft/read_only/index.tsx
Expand Up @@ -67,4 +67,4 @@ const getStyle = makeStyleSheetFromTheme((theme: Theme) => ({
},
}));

export default ReadOnlyChannnel;
export default ReadOnlyChannnel;
2 changes: 1 addition & 1 deletion app/components/post_header/post_header.test.js
Expand Up @@ -154,4 +154,4 @@ describe('PostHeader', () => {
);
expect(wrapper.getElement()).toMatchSnapshot();
});
});
});
Expand Up @@ -53,4 +53,4 @@ describe('RetryBarIndicator', () => {
expect(Animated.timing).toHaveBeenCalledTimes(1);
});
});
});
});
2 changes: 1 addition & 1 deletion app/components/sidebars/drawer_layout/index.tsx
Expand Up @@ -54,4 +54,4 @@ const DrawerLayoutAdapter = (props: DrawerLayoutAdapterProps) => {
);
};

export default DrawerLayoutAdapter;
export default DrawerLayoutAdapter;
2 changes: 1 addition & 1 deletion app/components/sidebars/main/main_sidebar_base.js
Expand Up @@ -307,4 +307,4 @@ const style = StyleSheet.create({
swiperContent: {
flex: 1,
},
});
});
2 changes: 1 addition & 1 deletion app/components/sidebars/settings/settings_sidebar.ios.js
Expand Up @@ -175,4 +175,4 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
marginTop: 35,
},
};
});
});
2 changes: 1 addition & 1 deletion app/constants/emoji.js
Expand Up @@ -2,4 +2,4 @@
// See LICENSE.txt for license information.

export const ALL_EMOJIS = 'all_emojis';
export const MAX_ALLOWED_REACTIONS = 40;
export const MAX_ALLOWED_REACTIONS = 40;
2 changes: 1 addition & 1 deletion app/constants/types.js
Expand Up @@ -4,4 +4,4 @@
export default {
EMPTY_ARRAY: [],
EMTPY_OBJECT: {},
};
};
2 changes: 1 addition & 1 deletion app/init/fetch.test.js
Expand Up @@ -85,4 +85,4 @@ describe('Fetch', () => {
expect(Client4.serverVersion).toEqual(serverVersion1);
expect(emit).toHaveBeenCalledWith(General.SERVER_VERSION_CHANGED, serverVersion1);
});
});
});
2 changes: 1 addition & 1 deletion app/init/push_notifications.ts
Expand Up @@ -251,4 +251,4 @@ class PushNotifications {
};
}

export default new PushNotifications();
export default new PushNotifications();
2 changes: 1 addition & 1 deletion app/mattermost.test.js
Expand Up @@ -79,4 +79,4 @@ describe('componentDidDisappearListener', () => {
expect(EventEmitter.emit).toHaveBeenCalledTimes(1);
expect(EventEmitter.emit).toHaveBeenCalledWith(NavigationTypes.MAIN_SIDEBAR_DID_CLOSE);
});
});
});
2 changes: 1 addition & 1 deletion app/mm-redux/constants/roles.ts
Expand Up @@ -5,4 +5,4 @@ export default {
MEMBERS: 'members',
GUESTS: 'guests',
ADMINS: 'admins',
};
};
2 changes: 1 addition & 1 deletion app/mm-redux/reducers/entities/teams.test.js
Expand Up @@ -107,4 +107,4 @@ describe('Reducers.teams.myMembers', () => {
state = teamsReducer(state, testAction);
assert.deepEqual(state.myMembers, {team_id_1: myMember1});
});
});
});
2 changes: 1 addition & 1 deletion app/mm-redux/types/bots.ts
Expand Up @@ -17,4 +17,4 @@ export type BotPatch = {
username: string;
display_name: string;
description: string;
}
}
2 changes: 1 addition & 1 deletion app/mm-redux/types/files.ts
Expand Up @@ -31,4 +31,4 @@ export type FilesState = {
export type FileUploadResponse = {
file_infos: FileInfo[];
client_ids: string[];
}
}

0 comments on commit 67398d8

Please sign in to comment.