Skip to content

Commit

Permalink
Merge pull request #88 from kimberlythegeek/typescript
Browse files Browse the repository at this point in the history
Convert to TypeScript
  • Loading branch information
kimberlythegeek authored May 5, 2022
2 parents 0646fbf + 5a13e52 commit 469a0b6
Show file tree
Hide file tree
Showing 31 changed files with 2,000 additions and 759 deletions.
39 changes: 33 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ module.exports = {
sourceType: 'module',
},
plugins: ['react'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'implicit-arrow-linebreak': 'off',
'import/order': [
'error',
{
Expand Down Expand Up @@ -53,20 +61,39 @@ module.exports = {
'error',
{ ImportDeclaration: { multiline: true } },
],
// require line break after operator
'operator-linebreak': ['error', 'after'],
'operator-linebreak': 'off',
// error on prettier lint issues
'prettier/prettier': 'error',
'react/jsx-filename-extension': [
2,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
},
overrides: [
{
files: ['src/tests/**/*'],
files: ['src/tests/**/*.{js,jsx,ts,tsx}'],
extends: ['airbnb-typescript'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'react/prop-types': 'off',
'import/no-import-module-exports': 'off',
'import/no-extraneous-dependencies': 'off',
'function-paren-newline': 'off',
'implicit-arrow-linebreak': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-import-module-exports': 'off',
'@typescript-eslint/indent': 'off',
},
},
{
files: ['*.ts', '*.tsx'],
excludedFiles: 'src/tests/**',
extends: ['airbnb-typescript'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
// https://github.com/typescript-eslint/typescript-eslint/issues/1824
'@typescript-eslint/indent': 'off',
},
},
],
Expand Down
Loading

0 comments on commit 469a0b6

Please sign in to comment.