mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 15:26:48 +00:00
ui: Add selective no-console eslint rule (#11938)
This commit is contained in:
parent
31dee2340f
commit
6d0a73c0eb
@ -1,8 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extends: ['./.eslintrc.js'],
|
|
||||||
rules: {
|
|
||||||
'no-console': 'warn',
|
|
||||||
'no-unused-vars': ['error', { args: 'none' }],
|
|
||||||
'ember/routes-segments-snake-case': 'warn',
|
|
||||||
},
|
|
||||||
};
|
|
@ -14,6 +14,7 @@ module.exports = {
|
|||||||
browser: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
'no-console': ['error', {allow: ['error', 'info']}],
|
||||||
'no-unused-vars': ['error', { args: 'none' }],
|
'no-unused-vars': ['error', { args: 'none' }],
|
||||||
'ember/no-new-mixins': ['warn'],
|
'ember/no-new-mixins': ['warn'],
|
||||||
'ember/no-jquery': 'warn',
|
'ember/no-jquery': 'warn',
|
||||||
|
@ -240,7 +240,7 @@ export default class FSMWithOptionalLocation {
|
|||||||
*/
|
*/
|
||||||
transitionTo(url) {
|
transitionTo(url) {
|
||||||
if (this.router.currentRouteName.startsWith('docs') && url.startsWith('console://')) {
|
if (this.router.currentRouteName.startsWith('docs') && url.startsWith('console://')) {
|
||||||
console.log(`location.transitionTo: ${url.substr(10)}`);
|
console.info(`location.transitionTo: ${url.substr(10)}`);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const previousOptional = Object.entries(this.optionalParams());
|
const previousOptional = Object.entries(this.optionalParams());
|
||||||
|
@ -2,7 +2,6 @@ import OAuth2CodeProvider from 'torii/providers/oauth2-code';
|
|||||||
import { runInDebug } from '@ember/debug';
|
import { runInDebug } from '@ember/debug';
|
||||||
|
|
||||||
export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
||||||
|
|
||||||
name = 'oidc-with-url';
|
name = 'oidc-with-url';
|
||||||
|
|
||||||
buildUrl() {
|
buildUrl() {
|
||||||
@ -23,7 +22,9 @@ export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
|||||||
authorizationCode: decodeURIComponent(authData[responseType]),
|
authorizationCode: decodeURIComponent(authData[responseType]),
|
||||||
provider: name,
|
provider: name,
|
||||||
};
|
};
|
||||||
runInDebug(_ => console.log('Retrieved the following creds from the OAuth Provider', creds))
|
runInDebug(_ =>
|
||||||
|
console.info('Retrieved the following creds from the OAuth Provider', creds)
|
||||||
|
);
|
||||||
return creds;
|
return creds;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -34,6 +35,4 @@ export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
|||||||
return popup.close();
|
return popup.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
"lint": "FORCE_COLOR=1 npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
|
"lint": "FORCE_COLOR=1 npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
|
||||||
"lint:hbs": "ember-template-lint .",
|
"lint:hbs": "ember-template-lint .",
|
||||||
"lint:js": "eslint .",
|
"lint:js": "eslint .",
|
||||||
"_lint:dev:js": "eslint -c .dev.eslintrc.js --fix ./*.js ./.*.js app config lib server tests",
|
|
||||||
"format": "npm-run-all format:*",
|
"format": "npm-run-all format:*",
|
||||||
"format:js": "prettier --write \"{app,config,lib,server,vendor,tests}/**/*.js\" ./*.js ./.*.js",
|
"format:js": "prettier --write \"{app,config,lib,server,vendor,tests}/**/*.js\" ./*.js ./.*.js",
|
||||||
"format:sass": "prettier --write \"app/**/*.scss\"",
|
"format:sass": "prettier --write \"app/**/*.scss\"",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user