Skip to content

Commit 19fedc5

Browse files
author
Kadi Kraman
committed
Update prettier and eslint rules to enforce trailing comma
1 parent ac996b2 commit 19fedc5

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ rules:
1616
- off
1717
arrow-parens:
1818
- off
19+
comma-dangle:
20+
- 2
21+
- always-multiline

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"printWidth": 100,
3-
"singleQuote": true
3+
"singleQuote": true,
4+
"semi": true
45
}

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export default class AppAuth {
6161
return await fetch(openidConfig.revocation_endpoint, {
6262
method: 'POST',
6363
headers: {
64-
'Content-Type': 'application/x-www-form-urlencoded'
64+
'Content-Type': 'application/x-www-form-urlencoded',
6565
},
66-
body: `token=${tokenToRevoke}${sendClientId ? `&client_id=${this.config.clientId}` : ''}`
66+
body: `token=${tokenToRevoke}${sendClientId ? `&client_id=${this.config.clientId}` : ''}`,
6767
}).catch(error => {
6868
throw new Error('Failed to revoke token', error);
6969
});

index.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ jest.mock('react-native', () => ({
44
NativeModules: {
55
RNAppAuth: {
66
authorize: jest.fn(),
7-
refresh: jest.fn()
8-
}
9-
}
7+
refresh: jest.fn(),
8+
},
9+
},
1010
}));
1111

1212
describe('AppAuth', () => {
@@ -16,7 +16,7 @@ describe('AppAuth', () => {
1616
const config = {
1717
issuer: 'test-issuer',
1818
redirectUrl: 'test-redirectUrl',
19-
clientId: 'test-clientId'
19+
clientId: 'test-clientId',
2020
};
2121

2222
beforeAll(() => {

0 commit comments

Comments
 (0)