Skip to content

Commit 1ad3a2e

Browse files
committed
eslint --fix updated printWidth
1 parent a615f86 commit 1ad3a2e

File tree

1,697 files changed

+7011
-24791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,697 files changed

+7011
-24791
lines changed

.mocharc.client.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ Object.assign(
2222

2323
module.exports = {
2424
...base, // see https://github.com/mochajs/mocha/issues/3916
25-
require: [
26-
...base.require,
27-
'./tests/setup/registerWebApiMocks.ts',
28-
'./tests/setup/cleanupTestingLibrary.ts',
29-
],
25+
require: [...base.require, './tests/setup/registerWebApiMocks.ts', './tests/setup/cleanupTestingLibrary.ts'],
3026
exit: false,
3127
slow: 200,
3228
spec: ['client/**/*.spec.ts', 'client/**/*.spec.tsx'],

.scripts/check-i18n.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ const checkFiles = async (sourcePath, sourceFile, fix = false) => {
101101

102102
(async () => {
103103
try {
104-
await checkFiles(
105-
'./packages/rocketchat-i18n/i18n',
106-
'en.i18n.json',
107-
process.argv[2] === '--fix',
108-
);
104+
await checkFiles('./packages/rocketchat-i18n/i18n', 'en.i18n.json', process.argv[2] === '--fix');
109105
} catch (e) {
110106
console.error(e);
111107
process.exit(1);

.scripts/make-migration.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ function main(number: string, comment: string): void {
4343
const [, , number, comment = ''] = process.argv;
4444

4545
if (!number || (comment && !comment.trim())) {
46-
console.error(
47-
'Usage:\n\tmeteor npm run migration:add <migration number> [migration comment: optional]\n',
48-
);
46+
console.error('Usage:\n\tmeteor npm run migration:add <migration number> [migration comment: optional]\n');
4947
process.exit(1);
5048
}
5149

.scripts/start.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ function startProcess(opts, callback) {
9494
process.exit(exitCode);
9595
})
9696
.catch((error) => {
97-
console.error(
98-
`Error waiting port ${appOptions.env.PORT} to be released, exiting with code ${exitCode}`,
99-
);
97+
console.error(`Error waiting port ${appOptions.env.PORT} to be released, exiting with code ${exitCode}`);
10098
console.error(error);
10199
process.exit(exitCode);
102100
});
@@ -132,9 +130,7 @@ function startChimp() {
132130
// params: ['2'],
133131
options: {
134132
env: Object.assign({}, process.env, {
135-
NODE_PATH: `${
136-
process.env.NODE_PATH + path.delimiter + srcDir + path.delimiter + srcDir
137-
}/node_modules`,
133+
NODE_PATH: `${process.env.NODE_PATH + path.delimiter + srcDir + path.delimiter + srcDir}/node_modules`,
138134
}),
139135
},
140136
});

.scripts/translationDiff.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@ async function translationDiff(source, target) {
2323
return diff;
2424
}
2525

26-
const sourceTranslations = JSON.parse(
27-
await readFile(`${translationDir}/${source}.i18n.json`, 'utf8'),
28-
);
29-
const targetTranslations = JSON.parse(
30-
await readFile(`${translationDir}/${target}.i18n.json`, 'utf8'),
31-
);
26+
const sourceTranslations = JSON.parse(await readFile(`${translationDir}/${source}.i18n.json`, 'utf8'));
27+
const targetTranslations = JSON.parse(await readFile(`${translationDir}/${target}.i18n.json`, 'utf8'));
3228

3329
return diffKeys(sourceTranslations, targetTranslations);
3430
}
3531

36-
console.log(
37-
'Note: You can set the source and target language of the comparison with env-variables SOURCE/TARGET_LANGUAGE',
38-
);
32+
console.log('Note: You can set the source and target language of the comparison with env-variables SOURCE/TARGET_LANGUAGE');
3933
const sourceLang = process.env.SOURCE_LANGUAGE || 'en';
4034
const targetLang = process.env.TARGET_LANGUAGE || 'de';
4135
translationDiff(sourceLang, targetLang).then((diff) => {

.storybook/main.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ module.exports = {
6262

6363
config.plugins.push(
6464
new webpack.NormalModuleReplacementPlugin(/^meteor/, require.resolve('./mocks/meteor.js')),
65-
new webpack.NormalModuleReplacementPlugin(
66-
/(app)\/*.*\/(server)\/*/,
67-
require.resolve('./mocks/empty.ts'),
68-
),
65+
new webpack.NormalModuleReplacementPlugin(/(app)\/*.*\/(server)\/*/, require.resolve('./mocks/empty.ts')),
6966
);
7067

7168
config.mode = 'development';

.storybook/mocks/providers/QueryClientProviderMock.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ const queryClient = new QueryClient({
1313
queryCache,
1414
});
1515

16-
const QueryClientProviderMock: FC = ({ children }) => (
17-
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
18-
);
16+
const QueryClientProviderMock: FC = ({ children }) => <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
1917

2018
export default QueryClientProviderMock;

.storybook/mocks/providers/ServerProviderMock.tsx

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
import { action } from '@storybook/addon-actions';
22
import React, { ContextType, FC } from 'react';
33

4-
import {
5-
ServerContext,
6-
ServerMethodName,
7-
ServerMethodParameters,
8-
ServerMethodReturn,
9-
} from '../../../client/contexts/ServerContext';
4+
import { ServerContext, ServerMethodName, ServerMethodParameters, ServerMethodReturn } from '../../../client/contexts/ServerContext';
105
import { Serialized } from '../../../definition/Serialized';
11-
import {
12-
MatchPathPattern,
13-
Method,
14-
OperationParams,
15-
OperationResult,
16-
PathFor,
17-
} from '../../../definition/rest';
6+
import { MatchPathPattern, Method, OperationParams, OperationResult, PathFor } from '../../../definition/rest';
187

198
const logAction = action('ServerProvider');
209

21-
const randomDelay = (): Promise<void> =>
22-
new Promise((resolve) => setTimeout(resolve, Math.random() * 1000));
10+
const randomDelay = (): Promise<void> => new Promise((resolve) => setTimeout(resolve, Math.random() * 1000));
2311

2412
const absoluteUrl = (path: string): string => new URL(path, '/').toString();
2513

@@ -43,10 +31,7 @@ const callEndpoint = <TMethod extends Method, TPath extends PathFor<TMethod>>(
4331
const uploadToEndpoint = (endpoint: string, params: any, formData: any): Promise<void> =>
4432
Promise.resolve(logAction('uploadToEndpoint', endpoint, params, formData)).then(randomDelay);
4533

46-
const getStream = (
47-
streamName: string,
48-
options: {} = {},
49-
): (<T>(eventName: string, callback: (data: T) => void) => () => void) => {
34+
const getStream = (streamName: string, options: {} = {}): (<T>(eventName: string, callback: (data: T) => void) => () => void) => {
5035
logAction('getStream', streamName, options);
5136

5237
return (eventName, callback): (() => void) => {
@@ -61,10 +46,7 @@ const getStream = (
6146
};
6247
};
6348

64-
const ServerProviderMock: FC<Partial<ContextType<typeof ServerContext>>> = ({
65-
children,
66-
...overrides
67-
}) => (
49+
const ServerProviderMock: FC<Partial<ContextType<typeof ServerContext>>> = ({ children, ...overrides }) => (
6850
<ServerContext.Provider
6951
children={children}
7052
value={{

.storybook/mocks/providers/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import i18next from 'i18next';
22
import React, { PropsWithChildren, ReactElement } from 'react';
33

4-
import {
5-
TranslationContext,
6-
TranslationContextValue,
7-
} from '../../../client/contexts/TranslationContext';
4+
import { TranslationContext, TranslationContextValue } from '../../../client/contexts/TranslationContext';
85

96
let contextValue: TranslationContextValue;
107

app/2fa/client/TOTPGoogle.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ const loginWithGoogleAndTOTP = function (options, code, callback) {
3030
options.loginUrlParameters.hd = Accounts._options.restrictCreationByEmailDomain;
3131
}
3232

33-
const credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(
34-
callback,
35-
code,
36-
);
33+
const credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback, code);
3734
Google.requestCredential(options, credentialRequestCompleteCallback);
3835
};
3936

0 commit comments

Comments
 (0)