-
Notifications
You must be signed in to change notification settings - Fork 14
/
package.json
172 lines (172 loc) · 6.14 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
"name": "arduino-simulator",
"version": "1.2.0",
"homepage": "./",
"private": true,
"dependencies": {
"@awmottaz/prettier-plugin-void-html": "1.5.0",
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/preset-typescript": "7.23.3",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.19",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"depcheck": "1.4.7",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-prettier": "5.1.3",
"jest": "29.7.0",
"jsdom": "24.0.0",
"pre-commit": "1.2.2",
"prettier": "3.2.5",
"puppeteer": "22.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"react-test-renderer": "18.2.0",
"typescript": "4.9.5"
},
"overrides": {
"optionator": "0.9.3",
"nth-check": "2.1.1",
"prettier": "3.2.5",
"semver": "7.5.3",
"svgo": "3.0.0"
},
"scripts": {
"start": "(ren README.md README2.md && ren README2.md README.md && npm run start:windows && exit || npm run start:linux)",
"start:linux": "export BROWSER=none && react-scripts start",
"start:windows": "set \"BROWSER=none\" && react-scripts start",
"start:pipeline": "export BROWSER=none && react-scripts start > /dev/null & cd .",
"build": "(ren README.md README2.md && ren README2.md README.md && npm run build:windows && exit || npm run build:linux)",
"build:linux": "export GENERATE_SOURCEMAP=false && export IMAGE_INLINE_SIZE_LIMIT=100000 && react-scripts build && cp ./build/static/js/main.*.js ./build/ArduinoSimulator.js && rm ./build/asset-manifest.json && rm -r ./build/static && rm ./build/index.html && cp ./.github/pages/index.html ./build/index.html",
"build:windows": "set \"GENERATE_SOURCEMAP=false\" && set \"IMAGE_INLINE_SIZE_LIMIT=100000\" && react-scripts build && cd build\\static\\js && ren main.*.js ArduinoSimulator.js && copy ArduinoSimulator.js ..\\.. && cd .. && cd .. && del asset-manifest.json && del /s /q static && rd /s /q static && del index.html && copy ..\\.github\\pages\\index.html index.html",
"lint": "eslint .",
"lint:fix": "eslint --fix",
"prettier": "prettier --check .",
"prettier:fix": "prettier --write .",
"check-types": "tsc --noemit",
"test": "npm run build && npm run test:dependency && npm run test:benchmark && npm run test:unit && npm run test:e2e",
"test:dependency": "depcheck --ignores=\"@awmottaz/*,@babel/*,babel*,@types/*,typescript-eslint,pre-commit\" --ignore-patterns=\"ArduinoSimulatorInterpreter.js\"",
"test:benchmark": "jest --testPathPattern='.benchmark.test.js' --testTimeout=600000",
"test:unit": "jest --testPathIgnorePatterns='.e2e.test.js' --testPathIgnorePatterns='client.js' --testPathIgnorePatterns='benchmark.test.js' --testTimeout=600000",
"test:e2e": "jest --testPathPattern='.e2e.test.js' --testTimeout=600000"
},
"babel": {
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
]
},
"prettier": {
"arrowParens": "always",
"plugins": [
"@awmottaz/prettier-plugin-void-html"
],
"printWidth": 85,
"semi": false,
"tabWidth": 2,
"trailingComma": "es5"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-alert": "error",
"no-console": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-shadow": "error",
"no-tabs": "error",
"no-undef": "error",
"no-unused-expressions": "error",
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "all",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "err",
"ignoreRestSiblings": false
}
],
"no-restricted-syntax": [
"error",
{
"selector": "BinaryExpression[operator=/^(==|===|!=|!==)$/][left.raw=/^(true|false)$/], BinaryExpression[operator=/^(==|===|!=|!==)$/][right.raw=/^(true|false)$/]",
"message": "Don't compare for equality against boolean literals"
},
{
"selector": "[callee.property.name='map'] > ArrowFunctionExpression[params.1.name='undefined']",
"message": "Missing the index value in map()."
},
{
"selector": "[callee.property.name='map'] > ArrowFunctionExpression > JSXElement JSXOpeningElement[attributes.0.name.name!='key']",
"message": "The first property must be the key."
},
{
"selector": "[callee.property.name='map'] > ArrowFunctionExpression > JSXFragment",
"message": "Fragment don't allowed for the first JSXElement in map()."
},
{
"selector": "MemberExpression > Identifier[name='Array']",
"message": "Array don't allowed. Use map() instead."
}
],
"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/no-empty-function": "off"
}
},
"eslintIgnore": [
"build/*",
"public/ArduinoEditor.js",
"public/ArduinoSimulatorInterpreter.js",
"public/ArduinoSimulatorInterpreter.min.js",
"public\\ArduinoEditor.js",
"public\\ArduinoSimulatorInterpreter.js",
"public\\ArduinoSimulatorInterpreter.min.js"
],
"jest": {
"moduleNameMapper": {
"\\.(css|less|jpg|jpeg|png|gif|svg|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "jest"
},
"setupFiles": [
"<rootDir>/__tests__/__mocks__/client.js"
]
},
"pre-commit": [
"build",
"lint",
"prettier",
"check-types",
"test:dependency",
"test:benchmark",
"test:unit",
"test:e2e"
],
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}