Skip to content

Commit

Permalink
Fix scripts (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Dorr <timdorr@users.noreply.github.com>
  • Loading branch information
nickmccurdy and timdorr committed Jul 3, 2020
1 parent 936939b commit 78b5489
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"trailingComma": "es5",
"singleQuote": true
}
1 change: 1 addition & 0 deletions __mocks__/fileMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['react-app'],
};
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css|less)$':
'<rootDir>/__mocks__/fileMock.ts',
},
setupFilesAfterEnv: ['<rootDir>/template/src/setupTests.ts'],
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "cra-template-redux-typescript",
"version": "1.0.1",
"scripts": {
"prettify": "prettier --trailing-comma es5 --single-quote --write './template/src/**/*.{ts,tsx}'",
"prettify": "prettier --write './template/src/**/*.{ts,tsx}'",
"lint": "eslint './template/src/**/*.{ts,tsx}'",
"type-check": "cd template && tsc --noEmit"
"test": "jest",
"type-check": "tsc"
},
"keywords": [
"react",
Expand Down
1 change: 1 addition & 0 deletions react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="react-scripts" />
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
}
}

0 comments on commit 78b5489

Please sign in to comment.