Skip to content

Commit b7094d0

Browse files
authored
[SDK-1576] Linting (auth0#4)
* Add prettier * Add eslint
1 parent da68bd7 commit b7094d0

File tree

10 files changed

+1420
-126
lines changed

10 files changed

+1420
-126
lines changed

.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
ecmaVersion: 2020,
5+
sourceType: 'module',
6+
ecmaFeatures: {
7+
jsx: true,
8+
},
9+
},
10+
settings: {
11+
react: {
12+
version: 'detect',
13+
},
14+
},
15+
extends: [
16+
'plugin:react/recommended',
17+
'plugin:@typescript-eslint/recommended',
18+
],
19+
rules: {
20+
'@typescript-eslint/camelcase': 'off',
21+
},
22+
};

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 80
4+
}

__tests__/helpers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const createWrapper = ({
77
domain = '__test_domain__',
88
}: Partial<Auth0ClientOptions> = {}) => ({
99
children,
10-
}: PropsWithChildren<{}>) => (
10+
}: PropsWithChildren<{}>): JSX.Element => (
1111
<Auth0Provider domain={domain} client_id={client_id}>
1212
{children}
1313
</Auth0Provider>

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
preset: 'ts-jest',
66
reporters: [
77
'default',
8-
['jest-junit', { outputDirectory: 'test-results/jest' }]
8+
['jest-junit', { outputDirectory: 'test-results/jest' }],
99
],
10-
testRegex: '/__tests__/.+test\.tsx?$'
10+
testRegex: '/__tests__/.+test.tsx?$',
1111
};

0 commit comments

Comments
 (0)