Skip to content

Commit a4779fd

Browse files
leeyi45RichDom2185
andauthoredMar 24, 2024
Import Analyzer and Augmentations (#1507)
* Relocate localimports folder * Relocate module loading code into separate folder * Add new preprocessor and tests * Remove old test code * Allow ec-evaluator to handle all types of ImportSpecifiers * Allow stepper to handle all ImportSpecifier types * Fix spelling error and add new creators * Update import file paths * Updated interpreter * Update syntax tests * Add new and unify error types * Fix module types and import paths * Made svml compile function async * Fix analyzer not detecting some duplicates and add tests * Provide a different module for default import testing * Enable transpiler to handle all ImportSpecifier types * Made ExportAllDeclarations and ImportNamespaceSpecifiers available to the library parser * Add new helper utilities * Update babel preset * Rename UtilMap to Dict * Misc changes * Ran format * Add some documentation * Relocated ast creator * Fix some broken options * Made name extractor fully async * Modify hoistAndMergeImports to always try to combine ImportDefaultSpecifiers * Simplify preprocessor code * Make assert available to modules * Move dummy astCreator * Fix some regressions and refactor testing code for name extractor * Ran format * Update documentation * Move shouldAddFileName option to IOptions * Fix broken IOptions code * Ran format * Fix broken tests * Ran format * Tidy up code and add documentation * Make sure name-extractor doesn't load docs for local modules * Fix options not being passed to preprocessor * Make Source module wrapping required * Create utility function for getting module source values * Update removeExports * Update documentation and run format * Ran format * Fix bug where programs with syntax errors would not cause the linker to return with an error * Ran format * Add linker tests * Fix naming * Add new functionality to dict type * Add new tests for linker and refactor analyzer tests * Use two separate tsconfigs to allow tests to be part of one tsconfig * Ran format * Relocate formatting for module documentation to name extractor * Run format * Finish merge from master * Properly finish merge * Run format * Fix incorrect type being used in moduleLoaderAsync * Run format * Update eslint configuration to detect duplicate imports * Add handling for unknown types generated by typedoc * Use array type for function param docs to respect parameter order * Fix eslint plugins * Clean up es type import * Refactor to use guard clause * Fix imports post-merge * Remove old code * Fix format --------- Co-authored-by: Richard Dominick <[email protected]>
1 parent caf8c3a commit a4779fd

File tree

114 files changed

+5341
-2705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+5341
-2705
lines changed
 

‎.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["es2015", "stage-2"]
2+
"presets": ["@babel/preset-env"]
33
}

‎.eslintrc.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@
1616
"sourceType": "module"
1717
},
1818
"plugins": [
19-
"@typescript-eslint",
20-
"simple-import-sort"
19+
"import",
20+
"@typescript-eslint"
2121
],
2222
"rules": {
23-
"@typescript-eslint/no-unsafe-argument": "off", // TODO: Remove
24-
"@typescript-eslint/no-unsafe-enum-comparison": "off", // TODO: Remove
23+
"import/no-duplicates": ["warn", { "prefer-inline": true }],
24+
"import/order": "warn",
2525
"@typescript-eslint/no-base-to-string": "off", // TODO: Remove
26-
"@typescript-eslint/no-redundant-type-constituents": "off", // TODO: Remove
27-
"@typescript-eslint/no-duplicate-type-constituents": "off", // TODO: Remove
2826
"prefer-const": "off", // TODO: Remove
2927
"no-var": "off", // TODO: Remove
3028
"@typescript-eslint/ban-ts-comment": "warn",
@@ -33,32 +31,35 @@
3331
"@typescript-eslint/explicit-function-return-type": "off",
3432
"@typescript-eslint/explicit-module-boundary-types": "off",
3533
"@typescript-eslint/interface-name-prefix": "off",
34+
"@typescript-eslint/no-duplicate-type-constituents": "off",
3635
"@typescript-eslint/no-empty-function": "off",
3736
"@typescript-eslint/no-explicit-any": "off",
3837
"@typescript-eslint/no-floating-promises": "off",
3938
"@typescript-eslint/no-implied-eval": "off",
4039
"@typescript-eslint/no-inferrable-types": "off",
4140
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
4241
"@typescript-eslint/no-non-null-assertion": "off",
42+
"@typescript-eslint/no-redundant-type-constituents": "off",
4343
"@typescript-eslint/no-unnecessary-type-assertion": "off",
44+
"@typescript-eslint/no-unsafe-argument": "off",
4445
"@typescript-eslint/no-unsafe-assignment": "off",
4546
"@typescript-eslint/no-unsafe-call": "off",
47+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
4648
"@typescript-eslint/no-unsafe-member-access": "off",
4749
"@typescript-eslint/no-unsafe-return": "off",
4850
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
4951
"@typescript-eslint/no-var-requires": "off",
50-
"@typescript-eslint/require-await": "off",
52+
"@typescript-eslint/require-await": "error",
5153
"@typescript-eslint/restrict-plus-operands": "off",
5254
"@typescript-eslint/restrict-template-expressions": "off",
5355
"@typescript-eslint/unbound-method": "off",
54-
"prefer-rest-params": "off",
55-
"simple-import-sort/imports": "warn"
56+
"prefer-rest-params": "off"
5657
},
5758
"overrides": [{
5859
"files": ["src/**/__tests__/**", "src/**/__mocks__/**"],
59-
"plugins": ["simple-import-sort"],
60+
"plugins": ["import"],
6061
"rules": {
61-
"simple-import-sort/imports": "warn"
62+
"import/order": "warn"
6263
}
6364
}]
6465
}

0 commit comments

Comments
 (0)