Skip to content

Commit 5f9fe3c

Browse files
committed
my first commit
1 parent 381c54b commit 5f9fe3c

22 files changed

+4716
-4860
lines changed

.eslintignore

+10
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,13 @@ package.json
5353
*.css.d.ts
5454
*.sass.d.ts
5555
*.scss.d.ts
56+
57+
.github
58+
.vscode
59+
configs
60+
internals
61+
test
62+
63+
azure-pipelines.yml
64+
report.*.html
65+
stats.*.json

.eslintrc.js

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
module.exports = {
2-
extends: 'erb/typescript',
2+
extends: [
3+
'erb/typescript',
4+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
5+
],
36
rules: {
47
// A temporary hack related to IDE not resolving correct package.json
5-
'import/no-extraneous-dependencies': 'off'
8+
'import/no-extraneous-dependencies': 'off',
69
},
710
settings: {
811
'import/resolver': {
912
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
1013
node: {},
1114
webpack: {
12-
config: require.resolve('./configs/webpack.config.eslint.js')
13-
}
14-
}
15-
}
15+
config: require.resolve('./configs/webpack.config.eslint.js'),
16+
},
17+
},
18+
},
19+
parserOptions: {
20+
tsConfigRootDir: __dirname,
21+
project: ['./tsconfig.json'],
22+
},
1623
};

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ npm-debug.log.*
4848
*.css.d.ts
4949
*.sass.d.ts
5050
*.scss.d.ts
51+
52+
report.*.html
53+
stats.*.json
54+
e2e.json

app/actions/counter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export const DECREMENT_COUNTER = 'DECREMENT_COUNTER';
55

66
export function increment() {
77
return {
8-
type: INCREMENT_COUNTER
8+
type: INCREMENT_COUNTER,
99
};
1010
}
1111

1212
export function decrement() {
1313
return {
14-
type: DECREMENT_COUNTER
14+
type: DECREMENT_COUNTER,
1515
};
1616
}
1717

app/app.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
if (scripts.length) {
4141
document.write(
4242
scripts
43-
.map(script => `<script defer src="${script}"><\/script>`)
43+
.map((script) => `<script defer src="${script}"><\/script>`)
4444
.join('')
4545
);
4646
}

app/components/Counter.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Counter(props: Props) {
1717
incrementIfOdd,
1818
incrementAsync,
1919
decrement,
20-
counter
20+
counter,
2121
} = props;
2222

2323
return (

app/containers/CounterPage.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import {
55
increment,
66
decrement,
77
incrementIfOdd,
8-
incrementAsync
8+
incrementAsync,
99
} from '../actions/counter';
1010
import { counterStateType } from '../reducers/types';
1111

1212
function mapStateToProps(state: counterStateType) {
1313
return {
14-
counter: state.counter
14+
counter: state.counter,
1515
};
1616
}
1717

@@ -21,7 +21,7 @@ function mapDispatchToProps(dispatch: Dispatch) {
2121
increment,
2222
decrement,
2323
incrementIfOdd,
24-
incrementAsync
24+
incrementAsync,
2525
},
2626
dispatch
2727
);

app/main.dev.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const installExtensions = async () => {
4242
const extensions = ['REACT_DEVELOPER_TOOLS', 'REDUX_DEVTOOLS'];
4343

4444
return Promise.all(
45-
extensions.map(name => installer.default(installer[name], forceDownload))
45+
extensions.map((name) => installer.default(installer[name], forceDownload))
4646
).catch(console.log);
4747
};
4848

@@ -61,11 +61,11 @@ const createWindow = async () => {
6161
webPreferences:
6262
process.env.NODE_ENV === 'development' || process.env.E2E_BUILD === 'true'
6363
? {
64-
nodeIntegration: true
64+
nodeIntegration: true,
6565
}
6666
: {
67-
preload: path.join(__dirname, 'dist/renderer.prod.js')
68-
}
67+
preload: path.join(__dirname, 'dist/renderer.prod.js'),
68+
},
6969
});
7070

7171
mainWindow.loadURL(`file://${__dirname}/app.html`);
@@ -108,7 +108,9 @@ app.on('window-all-closed', () => {
108108
}
109109
});
110110

111-
app.on('ready', createWindow);
111+
app.on('ready', () => {
112+
createWindow();
113+
});
112114

113115
app.on('activate', () => {
114116
// On macOS it's common to re-create a window in the app when the

0 commit comments

Comments
 (0)