Skip to content

Commit e80c188

Browse files
committed
Updated the boilerplate
- switched to Webpack 5, and updated the configuration - switched webpack configuration to plain js, as plugins are still not up to date with the new integrated definitions in Webpack 5 - updated eslint config to lint properly js and ts files - removed unneeded local eslint plugin - updated tsconfig with jsx-source - make sure that hot reload works - updated test - updated libraries - updated landing page somewhat and updated link to point to Github documentation - switched to pnpm
1 parent 5ff3708 commit e80c188

24 files changed

+10329
-244
lines changed

.babelrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintplugin.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 62 deletions
This file was deleted.

.eslintrc.json

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:prettier/recommended"
11+
],
12+
"globals": {
13+
"Atomics": "readonly",
14+
"SharedArrayBuffer": "readonly"
15+
},
16+
"parser": "@babel/eslint-parser",
17+
"parserOptions": {
18+
"ecmaFeatures": {
19+
"jsx": true
20+
},
21+
"ecmaVersion": 2020,
22+
"sourceType": "module"
23+
},
24+
"ignorePatterns": [
25+
"dist/*"
26+
],
27+
"overrides": [
28+
{
29+
"files": [
30+
"*.ts",
31+
"*.tsx"
32+
],
33+
"parser": "@typescript-eslint/parser",
34+
"extends": [
35+
"eslint:recommended",
36+
"plugin:@typescript-eslint/recommended",
37+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
38+
"plugin:jsx-a11y/recommended",
39+
"plugin:import/errors",
40+
"plugin:import/warnings",
41+
"plugin:import/typescript",
42+
"plugin:jest/recommended",
43+
"plugin:jest/style",
44+
"plugin:testing-library/recommended",
45+
"plugin:jest-dom/recommended",
46+
"plugin:json/recommended",
47+
"plugin:eslint-comments/recommended",
48+
"plugin:prettier/recommended",
49+
"prettier/@typescript-eslint"
50+
],
51+
"rules": {
52+
"@typescript-eslint/explicit-function-return-type": [
53+
"warn",
54+
{
55+
"allowExpressions": true
56+
}
57+
],
58+
"react/jsx-uses-react": "off",
59+
"react/react-in-jsx-scope": "off"
60+
},
61+
"parserOptions": {
62+
"sourceType": "module",
63+
"ecmaFeatures": {
64+
"impliedStrict": true,
65+
"jsx": true
66+
},
67+
"ecmaVersion": 2020,
68+
"project": "./tsconfig.json"
69+
},
70+
"settings": {
71+
"import/parsers": {
72+
"@typescript-eslint/parser": [
73+
".ts",
74+
".tsx"
75+
]
76+
},
77+
"import/resolver": {
78+
// "node": {},
79+
"typescript": {}
80+
}
81+
},
82+
"env": {
83+
"es2020": true,
84+
"browser": true,
85+
"jest": true
86+
}
87+
}
88+
]
89+
}

.prettierrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

babel.config.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"presets": [
3+
"solid",
4+
"@babel/typescript"
5+
],
6+
"env": {
7+
"test": {
8+
"presets": [
9+
[
10+
"@babel/env",
11+
{
12+
"targets": {
13+
"node": true
14+
}
15+
}
16+
]
17+
]
18+
}
19+
}
20+
}

package.json

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"build": "webpack --mode production",
88
"coverage": "jest --coverage",
9-
"dev": "webpack-dev-server --hot --port 3000 --mode development",
9+
"dev": "webpack serve --mode development",
1010
"lint": "eslint --ext .ts,.tsx src/",
1111
"open:coverage": "npm run coverage && open-cli ./coverage/lcov-report/index.html",
1212
"start": "npm run dev -- --open",
@@ -17,55 +17,52 @@
1717
"license": "ISC",
1818
"dependencies": {
1919
"clean-webpack-plugin": "^3.0.0",
20-
"solid-js": "^0.18.7"
20+
"solid-js": "^0.23.10"
2121
},
2222
"devDependencies": {
23-
"@babel/core": "^7.10.2",
24-
"@babel/preset-env": "^7.10.2",
25-
"@babel/preset-typescript": "^7.10.1",
26-
"@testing-library/dom": "^7.16.1",
27-
"@testing-library/jest-dom": "^5.10.1",
28-
"@types/html-webpack-plugin": "^3.2.3",
29-
"@types/jest": "^26.0.0",
30-
"@types/mini-css-extract-plugin": "^0.9.1",
31-
"@types/node": "^14.0.13",
32-
"@types/optimize-css-assets-webpack-plugin": "^5.0.1",
33-
"@types/terser-webpack-plugin": "^3.0.0",
34-
"@types/webpack": "^4.41.17",
35-
"@types/webpack-dev-server": "^3.11.0",
36-
"@typescript-eslint/eslint-plugin": "^3.3.0",
37-
"@typescript-eslint/parser": "^3.3.0",
38-
"babel-loader": "^8.1.0",
39-
"babel-preset-solid": "^0.18.7",
40-
"css-loader": "^3.6.0",
41-
"eslint": "^7.2.0",
42-
"eslint-config-prettier": "^6.11.0",
43-
"eslint-import-resolver-typescript": "^2.0.0",
44-
"eslint-loader": "^4.0.2",
45-
"eslint-plugin-import": "^2.21.2",
46-
"eslint-plugin-jest": "^23.13.2",
47-
"eslint-plugin-jest-dom": "^3.0.1",
48-
"eslint-plugin-jsx-a11y": "^6.2.3",
49-
"eslint-plugin-local": "^1.0.0",
50-
"eslint-plugin-prettier": "^3.1.4",
51-
"eslint-plugin-testing-library": "^3.3.0",
52-
"file-loader": "^6.0.0",
53-
"fork-ts-checker-webpack-plugin": "^5.0.1",
54-
"html-webpack-plugin": "^4.3.0",
55-
"jest": "^26.0.1",
56-
"jest-environment-jsdom-sixteen": "^1.0.3",
57-
"mini-css-extract-plugin": "^0.9.0",
23+
"@babel/core": "^7.12.10",
24+
"@babel/eslint-parser": "^7.12.1",
25+
"@babel/preset-env": "^7.12.11",
26+
"@babel/preset-typescript": "^7.12.7",
27+
"@testing-library/dom": "^7.29.2",
28+
"@testing-library/jest-dom": "^5.11.8",
29+
"@types/jest": "^26.0.20",
30+
"@typescript-eslint/eslint-plugin": "^4.12.0",
31+
"@typescript-eslint/parser": "^4.12.0",
32+
"babel-loader": "^8.2.2",
33+
"babel-preset-solid": "^0.23.8",
34+
"css-loader": "^5.0.1",
35+
"css-minimizer-webpack-plugin": "^1.2.0",
36+
"eslint": "^7.17.0",
37+
"eslint-config-prettier": "^7.1.0",
38+
"eslint-import-resolver-typescript": "^2.3.0",
39+
"eslint-plugin-eslint-comments": "^3.2.0",
40+
"eslint-plugin-import": "^2.22.1",
41+
"eslint-plugin-jest": "^24.1.3",
42+
"eslint-plugin-jest-dom": "^3.6.5",
43+
"eslint-plugin-json": "^2.1.2",
44+
"eslint-plugin-jsx-a11y": "^6.4.1",
45+
"eslint-plugin-prettier": "^3.3.1",
46+
"eslint-plugin-testing-library": "^3.10.1",
47+
"eslint-webpack-plugin": "^2.4.1",
48+
"fork-ts-checker-webpack-plugin": "^6.1.0",
49+
"html-webpack-plugin": "^4.5.1",
50+
"jest": "^26.6.3",
51+
"mini-css-extract-plugin": "^1.3.3",
5852
"open-cli": "^6.0.1",
59-
"optimize-css-assets-webpack-plugin": "^5.0.3",
60-
"prettier": "^2.0.5",
61-
"terser-webpack-plugin": "^3.0.5",
62-
"ts-jest": "^26.1.0",
63-
"ts-node": "^8.10.2",
64-
"tsconfig-paths-webpack-plugin": "^3.2.0",
65-
"typescript": "^3.9.5",
66-
"webpack": "^4.43.0",
67-
"webpack-cli": "^3.3.11",
68-
"webpack-dev-server": "^3.11.0"
53+
"prettier": "^2.2.1",
54+
"style-loader": "^2.0.0",
55+
"terser-webpack-plugin": "^5.1.1",
56+
"ts-jest": "^26.4.4",
57+
"ts-node": "^9.1.1",
58+
"tsconfig-paths-webpack-plugin": "^3.3.0",
59+
"typescript": "^4.1.3",
60+
"webpack": "^5.12.2",
61+
"webpack-cli": "^4.3.1",
62+
"webpack-dev-server": "^3.11.1"
63+
},
64+
"prettier": {
65+
"singleQuote": true
6966
},
7067
"jest": {
7168
"globals": {
@@ -97,7 +94,7 @@
9794
]
9895
},
9996
"browserslist": {
100-
"development": [
97+
"production": [
10198
"last 1 chrome version",
10299
"last 1 firefox version"
103100
]

0 commit comments

Comments
 (0)