Skip to content

Commit

Permalink
[SDK-1576] Linting (#4)
Browse files Browse the repository at this point in the history
* Add prettier
* Add eslint
  • Loading branch information
adamjmcgrath authored May 4, 2020
1 parent da68bd7 commit b7094d0
Show file tree
Hide file tree
Showing 10 changed files with 1,420 additions and 126 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/camelcase': 'off',
},
};
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"printWidth": 80
}
2 changes: 1 addition & 1 deletion __tests__/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const createWrapper = ({
domain = '__test_domain__',
}: Partial<Auth0ClientOptions> = {}) => ({
children,
}: PropsWithChildren<{}>) => (
}: PropsWithChildren<{}>): JSX.Element => (
<Auth0Provider domain={domain} client_id={client_id}>
{children}
</Auth0Provider>
Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
preset: 'ts-jest',
reporters: [
'default',
['jest-junit', { outputDirectory: 'test-results/jest' }]
['jest-junit', { outputDirectory: 'test-results/jest' }],
],
testRegex: '/__tests__/.+test\.tsx?$'
testRegex: '/__tests__/.+test.tsx?$',
};
Loading

0 comments on commit b7094d0

Please sign in to comment.