ui: Add selective no-console eslint rule (#11938)
This commit is contained in:
parent
be78d76416
commit
45b5742973
|
@ -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,
|
||||
},
|
||||
rules: {
|
||||
'no-console': ['error', {allow: ['error', 'info']}],
|
||||
'no-unused-vars': ['error', { args: 'none' }],
|
||||
'ember/no-new-mixins': ['warn'],
|
||||
'ember/no-jquery': 'warn',
|
||||
|
|
|
@ -240,7 +240,7 @@ export default class FSMWithOptionalLocation {
|
|||
*/
|
||||
transitionTo(url) {
|
||||
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;
|
||||
}
|
||||
const previousOptional = Object.entries(this.optionalParams());
|
||||
|
|
|
@ -2,7 +2,6 @@ import OAuth2CodeProvider from 'torii/providers/oauth2-code';
|
|||
import { runInDebug } from '@ember/debug';
|
||||
|
||||
export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
||||
|
||||
name = 'oidc-with-url';
|
||||
|
||||
buildUrl() {
|
||||
|
@ -23,7 +22,9 @@ export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
|||
authorizationCode: decodeURIComponent(authData[responseType]),
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
@ -34,6 +35,4 @@ export default class OAuth2CodeWithURLProvider extends OAuth2CodeProvider {
|
|||
return popup.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
"lint": "FORCE_COLOR=1 npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
|
||||
"lint:hbs": "ember-template-lint .",
|
||||
"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:js": "prettier --write \"{app,config,lib,server,vendor,tests}/**/*.js\" ./*.js ./.*.js",
|
||||
"format:sass": "prettier --write \"app/**/*.scss\"",
|
||||
|
|
Loading…
Reference in New Issue