mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: enable no-alert & no-console eslint rules
This commit is contained in:
@ -60,6 +60,7 @@ class PluginApi {
|
||||
opts = opts || {};
|
||||
|
||||
if (this.container.cache[resolverName]) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`"${resolverName}" was already cached in the container. Changes won't be applied.`
|
||||
);
|
||||
@ -68,6 +69,7 @@ class PluginApi {
|
||||
const klass = this.container.factoryFor(resolverName);
|
||||
if (!klass) {
|
||||
if (!opts.ignoreMissing) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`"${resolverName}" was not found by modifyClass`);
|
||||
}
|
||||
return;
|
||||
@ -686,6 +688,7 @@ class PluginApi {
|
||||
*/
|
||||
addNavigationBarItem(item) {
|
||||
if (!item["name"]) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
"A 'name' is required when adding a Navigation Bar Item.",
|
||||
item
|
||||
@ -806,6 +809,7 @@ function getPluginApi(version) {
|
||||
}
|
||||
return _pluginv01;
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Plugin API v${version} is not supported`);
|
||||
}
|
||||
}
|
||||
@ -843,6 +847,7 @@ export function resetPluginApi() {
|
||||
}
|
||||
|
||||
export function decorateCooked() {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
"`decorateCooked` has been removed. Use `getPluginApi(version).decorateCooked` instead"
|
||||
);
|
||||
|
Reference in New Issue
Block a user