forked from treehouse/mastodon
Remove comments for eslint-disable (#3691)
parent
f3e8bc9f8f
commit
3690f04e4a
|
@ -43,7 +43,10 @@ rules:
|
||||||
- prefer-single
|
- prefer-single
|
||||||
no-catch-shadow: error
|
no-catch-shadow: error
|
||||||
no-cond-assign: error
|
no-cond-assign: error
|
||||||
no-console: warn
|
no-console:
|
||||||
|
- warn
|
||||||
|
- allow:
|
||||||
|
- error
|
||||||
no-fallthrough: error
|
no-fallthrough: error
|
||||||
no-irregular-whitespace: error
|
no-irregular-whitespace: error
|
||||||
no-mixed-spaces-and-tabs: warn
|
no-mixed-spaces-and-tabs: warn
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Notification extends ImmutablePureComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
render () { // eslint-disable-line consistent-return
|
render () {
|
||||||
const { notification } = this.props;
|
const { notification } = this.props;
|
||||||
const account = notification.get('account');
|
const account = notification.get('account');
|
||||||
const displayName = account.get('display_name').length > 0 ? account.get('display_name') : account.get('username');
|
const displayName = account.get('display_name').length > 0 ? account.get('display_name') : account.get('username');
|
||||||
|
@ -82,6 +82,8 @@ class Notification extends ImmutablePureComponent {
|
||||||
case 'reblog':
|
case 'reblog':
|
||||||
return this.renderReblog(notification, link);
|
return this.renderReblog(notification, link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export default function errorsMiddleware() {
|
||||||
|
|
||||||
dispatch(showAlert(title, message));
|
dispatch(showAlert(title, message));
|
||||||
} else {
|
} else {
|
||||||
console.error(action.error); // eslint-disable-line no-console
|
console.error(action.error);
|
||||||
dispatch(showAlert('Oops!', 'An unexpected error occurred.'));
|
dispatch(showAlert('Oops!', 'An unexpected error occurred.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,5 @@ import main from '../mastodon/main';
|
||||||
import loadPolyfills from '../mastodon/load_polyfills';
|
import loadPolyfills from '../mastodon/load_polyfills';
|
||||||
|
|
||||||
loadPolyfills().then(main).catch(e => {
|
loadPolyfills().then(main).catch(e => {
|
||||||
console.error(e); // eslint-disable-line no-console
|
console.error(e);
|
||||||
});
|
});
|
||||||
|
|
|
@ -93,5 +93,5 @@ function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPolyfills().then(main).catch(error => {
|
loadPolyfills().then(main).catch(error => {
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
||||||
|
|
||||||
/* eslint global-require: 0 */
|
|
||||||
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
const CompressionPlugin = require('compression-webpack-plugin');
|
const CompressionPlugin = require('compression-webpack-plugin');
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
||||||
|
|
||||||
/* eslint global-require: 0 */
|
|
||||||
/* eslint import/no-dynamic-require: 0 */
|
|
||||||
|
|
||||||
const { existsSync } = require('fs');
|
const { existsSync } = require('fs');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const { basename, dirname, join, relative, resolve, sep } = require('path');
|
const { basename, dirname, join, relative, resolve, sep } = require('path');
|
||||||
|
|
|
@ -38,7 +38,6 @@ const validateLanguages = (languages, validators) => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (invalidLanguages.length > 0) {
|
if (invalidLanguages.length > 0) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error(`
|
console.error(`
|
||||||
Error: Specified invalid LANGUAGES:
|
Error: Specified invalid LANGUAGES:
|
||||||
${invalidLanguages.map(({ language, error }) => `* ${language}: ${error.message}`).join('\n')}
|
${invalidLanguages.map(({ language, error }) => `* ${language}: ${error.message}`).join('\n')}
|
||||||
|
@ -73,7 +72,6 @@ ${availableLanguages.join(', ')}
|
||||||
|
|
||||||
// check if message directory exists
|
// check if message directory exists
|
||||||
if (!fs.existsSync(messagesDirectory)) {
|
if (!fs.existsSync(messagesDirectory)) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error(`
|
console.error(`
|
||||||
Error: messagesDirectory not exists
|
Error: messagesDirectory not exists
|
||||||
(${messagesDirectory})
|
(${messagesDirectory})
|
||||||
|
|
Loading…
Reference in New Issue