-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Vite conversion; all but web workers are now online. * Clean out old package.json dependnecies * remove core's webpack config and other unused packages * Restore working engine-web 'test' and 'build-stdlib' scripts * repair 'yarn test' * update browserslist target to match vite's target https://vitejs.dev/guide/build#browser-compatibility * repair yarn build/start by fixing a bug in how we passed 'max_old_space_size' * build improvements - remove sentry.io - .gitignore 'dist' - include 'embed.html' in the output * yarn fmt * Add vite-env.d.ts to provide vite environment types * Add type-aware linting rules per Vite best practice * Apply updated formatting * eslint: restore common react/* linting rules * eslint: restore recommended rules. * eslint: restore some of the typescript-eslint basic rules * eslint: apply linting to .cjs files; restore additional typescript-eslint rules * restore the remaining typescript-eslint rules that we can * s/MapBox/Mapbox * eslint rules triage complete & global yarn fmt * Updates to tsconfig.json * gitignore tsbuildinfo * fix most of the typescript errors; add tsx to 'check' command; add prettier caching; sundry * Flag the remaining typescript build errors with todo's so we have a clean build * add preview:core to package.json * (repair webworkers) replace promise.resolve().then with setTimeout - Turns out promise.resolve().then() doesn't actually accomplish the equivalent of a setImmediate. I was mislead by something online, oh well... setTimeout works. - The main simulation worker was breaking when you used the 'run' functionality because the thread would lock. A setTimeout (and previously, setImmediate) was needed to allow other events in the thread. * Spacing fix in husky's pre-push * Update vercel.json for new vite build * Remove auto-types.ts and hardcode its relevant items into types.ts This file was ignored and persisted across branches, thus causing fresh checkouts to break (as Vite no longer generates this) but existing checkouts to act "normal". I've removed the files and its special cases entirely, and added its contents into types.ts. This now repairs the build. Next up is pruning out the unused generated items and only keeping the relevant ones. * Remove unused types from types.ts * adjust package.json lint and fmt commands to work cross-platform * .gitignore .vercel
- Loading branch information
1 parent
f2be7a2
commit efe1801
Showing
518 changed files
with
8,761 additions
and
33,720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
jsx: true, | ||
useJSXTextNode: true, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
project: ["./tsconfig.json"], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
env: { browser: true, es2020: true, node: true }, | ||
ignorePatterns: ["dist"], | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
"plugin:react/jsx-runtime", | ||
"plugin:react/recommended", | ||
"prettier", | ||
], | ||
plugins: ["@typescript-eslint", "react-hooks", "react", "import"], | ||
rules: { | ||
// Augmentations | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": [ | ||
"warn", | ||
{ | ||
additionalHooks: "(^useModal$)|(^useUserGatedEffect$)", | ||
}, | ||
], | ||
|
||
// Preferences | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ argsIgnorePattern: "^_+", varsIgnorePattern: "^_+" }, | ||
], | ||
"no-unused-expressions": "error", | ||
"prefer-const": "error", | ||
"react/jsx-key": "error", | ||
"react/jsx-no-useless-fragment": "error", | ||
"react/self-closing-comp": "error", | ||
eqeqeq: ["error", "always", { null: "ignore" }], | ||
|
||
// Disabled due to tech debt | ||
// Ideally each of these would be brought back into play, but they're not small potatoes. | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unsafe-enum-comparison": "off", | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/unbound-method": "off", | ||
"@typescript-eslint/prefer-nullish-coalescing": [ | ||
"error", | ||
{ ignoreMixedLogicalExpressions: true, ignorePrimitives: true }, | ||
], | ||
|
||
// Deliberately disabled to ease use of React/Redux | ||
"@typescript-eslint/await-thenable": "off", // Redux/Dispatch uses this a lot. | ||
"@typescript-eslint/no-empty-function": "off", // React uses this a lot. | ||
"@typescript-eslint/no-floating-promises": "off", // redux 'dispatch' and other react hooks create lots of floating promises. | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ | ||
checksVoidReturn: false, // Void-returned promises come up a lot in react | ||
}, | ||
], | ||
"react/prop-types": [ | ||
"error", | ||
{ skipUndeclared: true, ignore: ["children"] }, // 'children' prop type detection is buggy | ||
], | ||
"react/display-name": "off", // Set automatically during transpilation, so disable it here. | ||
"react/no-unescaped-entities": "off", // Permits more natural language in html, e.g. aprostrophies. | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
coverage | ||
|
||
# auto-generated types for API queries | ||
src/util/api/auto-types.ts | ||
dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.