-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* scaffolding for typescript * add jest types so tests will compile * remove rollup-plugin-typescript2, probably don't need it * add missing eslint-import * fix linting errors
- Loading branch information
Showing
10 changed files
with
404 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ const { NODE_ENV } = process.env | |
|
||
module.exports = { | ||
presets: [ | ||
'@babel/typescript', | ||
[ | ||
'@babel/env', | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,43 @@ | ||
module.exports = { | ||
extends: 'react-app', | ||
|
||
parser: '@typescript-eslint/parser', | ||
|
||
plugins: ['@typescript-eslint'], | ||
|
||
settings: { | ||
react: { | ||
version: '16.8' | ||
}, | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'] | ||
}, | ||
'import/resolver': { | ||
// use <root>/tsconfig.json | ||
typescript: {} | ||
} | ||
}, | ||
|
||
rules: { | ||
'jsx-a11y/href-no-hash': 'off' | ||
'jsx-a11y/href-no-hash': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
vars: 'all', | ||
args: 'after-used', | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_' // ignore unused variables whose name is '_' | ||
} | ||
] | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: 'test/**/*.js', | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
jest: true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.