Skip to content

Commit

Permalink
Lint rules for equivalence and arrow func spacing (Kong#3897)
Browse files Browse the repository at this point in the history
  • Loading branch information
develohpanda authored Aug 12, 2021
1 parent bac0928 commit 18e7f49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ module.exports = {
'camelcase': ['error', { allow: ['__export_format', '__export_date', '__export_source'] }],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'consistent-return': 'warn',
'default-case': 'error',
'default-case-last': 'error',
'filenames/match-exported': ['error', 'kebab'],
'indent': ['error', 2, { SwitchCase: 1 }],
'eol-last': ['error', 'always'],
'eqeqeq': ['error', 'smart'],
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
'keyword-spacing': 'off', // successor('@typescript-eslint/keyword-spacing')
'no-async-promise-executor': 'off',
'no-case-declarations': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default async function(
// @ts-expect-error -- TSCONVERSION
codeVerifier = _base64UrlEncode(crypto.randomBytes(32));

if (pkceMethod == c.PKCE_CHALLENGE_S256) {
if (pkceMethod === c.PKCE_CHALLENGE_S256) {
// @ts-expect-error -- TSCONVERSION
codeChallenge = _base64UrlEncode(crypto.createHash('sha256').update(codeVerifier).digest());
} else {
Expand Down

0 comments on commit 18e7f49

Please sign in to comment.