Skip to content

Commit d7682b8

Browse files
committed
Merge branch 'release/4.0.0'
2 parents 611e138 + b6edc53 commit d7682b8

20 files changed

+15518
-7345
lines changed

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
coverage
4+
out
5+
public
6+
jest.config.js
7+
webpack.config.js

.eslintrc

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,71 @@
22
"root": true,
33
"env": {
44
"browser": true,
5-
"node": true
5+
"node": true,
6+
"jest/globals": true
67
},
8+
"parserOptions": {
9+
"project": [
10+
"./tsconfig.json",
11+
"./tests/tsconfig.json"
12+
]
13+
},
14+
"plugins": [
15+
"@typescript-eslint",
16+
"jest",
17+
"import"
18+
],
719
"extends": [
820
"airbnb",
9-
"airbnb/hooks"
21+
"airbnb/hooks",
22+
"airbnb-typescript",
23+
"plugin:@typescript-eslint/recommended",
24+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
25+
"plugin:jest/recommended",
26+
"plugin:jest/style"
1027
],
1128
"rules": {
12-
"import/no-extraneous-dependencies": [
13-
"error",
14-
{
15-
"devDependencies": [
16-
"**/webpack.*",
17-
"test/**/*"
18-
]
19-
}
20-
],
2129
"max-len": [
2230
"warn",
2331
{
24-
"ignoreUrls": true
32+
"code": 80,
33+
"tabWidth": 2,
34+
"ignoreComments": true
2535
}
2636
],
27-
"sort-imports": "warn"
28-
},
29-
"settings": {
30-
"import/resolver": {
31-
"node": {
32-
"extensions": [
33-
".js",
34-
".jsx",
35-
".ts",
36-
".tsx"
37-
]
38-
},
39-
"webpack": {
40-
"config": "./webpack.config.js"
37+
// Already covered by TypeScript compiler
38+
"import/default": "off",
39+
// Already covered by TypeScript compiler
40+
"import/no-unresolved": "off",
41+
"import/order": [
42+
"error",
43+
{
44+
"alphabetize": {"order": "asc"}
4145
}
42-
}
46+
],
47+
"no-use-before-define": "off",
48+
"@typescript-eslint/require-await": "off",
49+
"@typescript-eslint/no-use-before-define": "warn",
50+
"@typescript-eslint/no-unused-vars": [
51+
"warn", { "argsIgnorePattern": "^_" }
52+
],
53+
"@typescript-eslint/lines-between-class-members": "off"
4354
},
4455
"overrides": [
4556
{
4657
"files": [
47-
"**/*.ts",
48-
"**/*.tsx"
49-
],
50-
"parser": "@typescript-eslint/parser",
51-
"parserOptions": {
52-
"project": "./tsconfig.json"
53-
},
54-
"plugins": [
55-
"@typescript-eslint"
56-
],
57-
"extends": [
58-
"plugin:@typescript-eslint/eslint-recommended",
59-
"plugin:@typescript-eslint/recommended",
60-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
58+
"*.spec.ts",
59+
"*.spec.tsx",
60+
"*.spec.js",
61+
"*.spec.jsx",
62+
"*.test.ts",
63+
"*.test.tsx",
64+
"*.test.js",
65+
"*.test.jsx"
6166
],
6267
"rules": {
63-
// This rule is already covered by the TypeScript compiler.
64-
"import/default": "off",
65-
// This rule is already covered by the TypeScript compiler.
66-
"import/no-unresolved": "off",
67-
"no-use-before-define": "off",
68-
"@typescript-eslint/no-use-before-define": "warn",
69-
"react/jsx-filename-extension": "off"
68+
"@typescript-eslint/no-non-null-assertion": "off"
7069
}
7170
}
7271
]
73-
}
72+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vscode/
2+
coverage/
23
dist/
34
node_modules/
45
out/

CHANGELOG.md renamed to CHANGELOG_PRE_V4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Changelog
2-
All notable changes to this project will be documented in this file.
1+
# Changelog (pre `v4`)
2+
All notable changes up to `v3.0.0` are documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

CHANGELOG_V4+.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Changelog `v4+`
2+
All notable changes to this project on `v4+` will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [v4.0.0] - 2022-07-22
10+
### Added
11+
- Jest as default unit testing framework, with sample test suite for `main`.
12+
- Integrated Electron preload pattern.
13+
- NPM scripts:
14+
- `watch-test` to run Jest in watch mode.
15+
- `next-rc`, `next-patch`, `next-minor` & `next-major` for quick
16+
package version number advance.
17+
18+
### Changed
19+
- Webpack will now take the module path alias from `tsconfig.json` and set it
20+
for you thanks to `tsconfig-paths-webpack-plugin`. Manually set up in Webpack
21+
config is no longer needed.
22+
- `tsconfig` now configured to use `ES2020` features, with module resolution
23+
set to `Node16` to match the NodeJS version used by Electron.
24+
- Migrated to the new `createRoot` API introduced in React `v18`.
25+
- Some APIs changed in Electron `main` entry script:
26+
- `mainWindow` now use `loadFile` API instead of `loadURL`.
27+
- Replaced `app.on('ready')` with `app.whenReady()` to align with syntax from
28+
[Electron official quick start guide](https://www.electronjs.org/docs/latest/tutorial/quick-start).
29+
- `electron-builder` now configured to build `universal` `dmg` for mac, 32 &
30+
64 bit `exe` for Windows.
31+
- Moved `electron-builder`, Webpack & Webpack-related packages to
32+
`optionalDependencies`.
33+
- Revamped `README`.
34+
- __*Starting from this version, the maintenance schedule will be on a monthly
35+
update basis to keep the package dependencies up to date and keep the
36+
development going.*__
37+
38+
### Fixed
39+
- Allow to use `import default` statement on non ES modules (e.g. React,
40+
lodash) by enabling `esModuleInterop` in `tsconfig`.
41+
[#14](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/issues/14)
42+
43+
### Removed
44+
- Mocha in favour of Jest.
45+
- Spectron as it ahs been deprecated.
46+
*See - [Spectron Deprecation Notice](https://www.electronjs.org/blog/spectron-deprecation-notice)*
47+
48+
### Updates on package dependencies
49+
### Added
50+
- `@types/jest`, `jest`, `ts-jest`, `eslint-plugin-jest` *- Jest support*
51+
- `eslint-config-airbnb-typescript` *- Enhance Airbnb's rules in TypeScript*
52+
- `ts-config-paths-webpack-plugin` *- Load `tsconfig` path alias into Webpack
53+
config*
54+
55+
### Updated
56+
- Major version updates:
57+
- `react` & `react-dom` - `17.0.1` -> `18.2.0`
58+
- `@types/react` - `17.0.0` -> `18.0.15`
59+
- `@types/react-dom` - `17.0.0` -> `18.0.6`
60+
- `@typescript-eslint/eslint-plugin` & `@typescript-eslint/parser` -
61+
`4.11.0` -> `5.30.7`
62+
- `electron` - `11.1.1` -> `19.0.9`
63+
- `eslint-config-airbnb` - `18.2.1` -> `19.0.4`
64+
- `copy-webpack-plugin` - `7.0.0` -> `11.0.0`
65+
- `css-loader` - `5.0.1` -> `6.7.1`
66+
- `electron-builder` - `22.9.1` -> `23.1.0`
67+
- `html-webpack-plugin` - `4.5.0` -> `5.5.0`
68+
- `style-loader` - `2.0.0` -> `3.3.1`
69+
- `ts-loader` - `8.0.12` -> `9.3.1`
70+
- `ts-config-paths` - `3.9.0` -> `4.0.0`
71+
- Minor & patch version updates:
72+
- `eslint-import-resolver-webpack` - `0.13.0` -> `0.13.2`
73+
- `eslint-plugin-import` - `2.22.1` -> `2.26.0`
74+
- `eslint-plugin-jsx-a11y` - `6.4.1` -> `6.6.1`
75+
- `eslint-plugin-react` - `7.21.5` -> `7.30.1`
76+
- `eslint-plugin-react-hoots` - `4.2.0` -> `4.6.0`
77+
- `lodash` - `4.17.20` -> `4.17.21`
78+
- `webpack` - `5.11.0` -> `5.73.0`
79+
- `webpack-cli` - `4.3.0` -> `4.10.0`
80+
81+
### Removed
82+
- `react-router`, `react-router-dom`, `@types/react-router`,
83+
`@types/react-router-dom`
84+
85+
*\- Not being used in any part of the boilerplate*
86+
- `@types/mocha`, `mocha`, `ts-node` *- Replaced by `@types/jest`, `jest` &
87+
`ts-jest`*
88+
- `spectron` *- Deprecated package; No replacement*
89+
90+
[Unreleased]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.0.0...HEAD
91+
[v4.0.0]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v3.0.0...v4.0.0

0 commit comments

Comments
 (0)