@eslint-react/jsx 0.8.6-beta.0 → 0.8.6-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@eslint-react/ast/dist/index.cjs +958 -0
- package/node_modules/@eslint-react/ast/dist/index.d.mts +1185 -0
- package/node_modules/@eslint-react/ast/dist/index.d.ts +1185 -0
- package/node_modules/@eslint-react/ast/dist/index.js +958 -0
- package/node_modules/@eslint-react/ast/dist/index.mjs +878 -0
- package/node_modules/@eslint-react/ast/package.json +52 -0
- package/node_modules/@eslint-react/tools/dist/index.cjs +9195 -0
- package/node_modules/@eslint-react/tools/dist/index.d.mts +173 -0
- package/node_modules/@eslint-react/tools/dist/index.d.ts +173 -0
- package/node_modules/@eslint-react/tools/dist/index.js +9195 -0
- package/node_modules/@eslint-react/tools/dist/index.mjs +9174 -0
- package/node_modules/@eslint-react/tools/package.json +46 -0
- package/node_modules/@eslint-react/types/dist/index.cjs +2 -0
- package/node_modules/@eslint-react/types/dist/index.d.mts +65 -0
- package/node_modules/@eslint-react/types/dist/index.d.ts +65 -0
- package/node_modules/@eslint-react/types/dist/index.js +2 -0
- package/node_modules/@eslint-react/types/dist/index.mjs +1 -0
- package/node_modules/@eslint-react/types/package.json +49 -0
- package/node_modules/@typescript-eslint/scope-manager/LICENSE +21 -0
- package/node_modules/@typescript-eslint/scope-manager/README.md +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts +4 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ID.js +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ID.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts +75 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +185 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts +56 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/analyze.js +42 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/analyze.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/assert.js +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/assert.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts +39 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js +19 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js +18 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js +30 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts +9 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/index.js +31 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/index.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts +16 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js +23 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js +23 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +75 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +1436 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js +23 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js +16 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js +55 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js +30 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js +13 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +46 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js +19 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js +16 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js +19 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js +28 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js +17 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +26 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js +16 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +116 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js +30 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js +19 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js +17 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +18 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +93 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +189 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js +18 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js +9 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +34 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +589 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +29 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +321 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js +84 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js +50 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts +29 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +108 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts +89 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +107 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +86 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +539 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts +33 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +229 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts +13 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js +41 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js +80 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts +2 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js +6 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js +17 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts +13 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js +36 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts +18 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js +39 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts +107 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js +358 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js +25 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js +22 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts +20 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js +36 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts +34 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts +25 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js +19 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts +18 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js +33 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts +44 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js +39 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js +10 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/package.json +72 -0
- package/node_modules/@typescript-eslint/types/LICENSE +21 -0
- package/node_modules/@typescript-eslint/types/README.md +12 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +1881 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +202 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/index.d.ts +5 -0
- package/node_modules/@typescript-eslint/types/dist/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/index.js +24 -0
- package/node_modules/@typescript-eslint/types/dist/index.js.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts +3 -0
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/lib.js +7 -0
- package/node_modules/@typescript-eslint/types/dist/lib.js.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +40 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.js +3 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.js.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts +14 -0
- package/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/types/dist/ts-estree.js +28 -0
- package/node_modules/@typescript-eslint/types/dist/ts-estree.js.map +1 -0
- package/node_modules/@typescript-eslint/types/package.json +94 -0
- package/node_modules/micro-memoize/CHANGELOG.md +226 -0
- package/{LICENSE → node_modules/micro-memoize/LICENSE} +1 -1
- package/node_modules/micro-memoize/README.md +557 -0
- package/node_modules/micro-memoize/dist/micro-memoize.cjs.js +373 -0
- package/node_modules/micro-memoize/dist/micro-memoize.cjs.js.map +1 -0
- package/node_modules/micro-memoize/dist/micro-memoize.esm.js +371 -0
- package/node_modules/micro-memoize/dist/micro-memoize.esm.js.map +1 -0
- package/node_modules/micro-memoize/dist/micro-memoize.js +379 -0
- package/node_modules/micro-memoize/dist/micro-memoize.js.map +1 -0
- package/node_modules/micro-memoize/dist/micro-memoize.min.js +1 -0
- package/node_modules/micro-memoize/index.d.ts +132 -0
- package/node_modules/micro-memoize/mjs/index.d.mts +132 -0
- package/node_modules/micro-memoize/mjs/index.mjs +371 -0
- package/node_modules/micro-memoize/mjs/index.mjs.map +1 -0
- package/node_modules/micro-memoize/package.json +106 -0
- package/package.json +13 -7
|
@@ -0,0 +1,958 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tools = require('@eslint-react/tools');
|
|
4
|
+
var scopeManager = require('@typescript-eslint/scope-manager');
|
|
5
|
+
var rambda = require('rambda');
|
|
6
|
+
var types = require('@typescript-eslint/types');
|
|
7
|
+
var utils = require('@typescript-eslint/utils');
|
|
8
|
+
var eslintUtils = require('@eslint-community/eslint-utils');
|
|
9
|
+
var stringTs = require('string-ts');
|
|
10
|
+
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var eslintUtils__namespace = /*#__PURE__*/_interopNamespaceDefault(eslintUtils);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @since 2.0.0
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @category type lambdas
|
|
36
|
+
* @since 2.0.0
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Tests if a value is a `function`.
|
|
41
|
+
*
|
|
42
|
+
* @param input - The value to test.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* import { isFunction } from 'effect/Predicate'
|
|
46
|
+
*
|
|
47
|
+
* assert.deepStrictEqual(isFunction(isFunction), true)
|
|
48
|
+
* assert.deepStrictEqual(isFunction("function"), false)
|
|
49
|
+
*
|
|
50
|
+
* @category guards
|
|
51
|
+
* @since 2.0.0
|
|
52
|
+
*/
|
|
53
|
+
const isFunction$2 = input => typeof input === "function";
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Tests if a value is a `string`.
|
|
57
|
+
*
|
|
58
|
+
* @param input - The value to test.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* import { isString } from "effect/Predicate"
|
|
62
|
+
*
|
|
63
|
+
* assert.deepStrictEqual(isString("a"), true)
|
|
64
|
+
*
|
|
65
|
+
* assert.deepStrictEqual(isString(1), false)
|
|
66
|
+
*
|
|
67
|
+
* @category guards
|
|
68
|
+
* @since 2.0.0
|
|
69
|
+
*/
|
|
70
|
+
const isString = input => typeof input === "string";
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Tests if a value is a `function`.
|
|
74
|
+
*
|
|
75
|
+
* @param input - The value to test.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* import { isFunction } from "effect/Predicate"
|
|
79
|
+
*
|
|
80
|
+
* assert.deepStrictEqual(isFunction(isFunction), true)
|
|
81
|
+
*
|
|
82
|
+
* assert.deepStrictEqual(isFunction("function"), false)
|
|
83
|
+
*
|
|
84
|
+
* @category guards
|
|
85
|
+
* @since 2.0.0
|
|
86
|
+
*/
|
|
87
|
+
const isFunction$1 = isFunction$2;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Tests if a value is an `object`.
|
|
91
|
+
*
|
|
92
|
+
* @param input - The value to test.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* import { isObject } from "effect/Predicate"
|
|
96
|
+
*
|
|
97
|
+
* assert.deepStrictEqual(isObject({}), true)
|
|
98
|
+
* assert.deepStrictEqual(isObject([]), true)
|
|
99
|
+
*
|
|
100
|
+
* assert.deepStrictEqual(isObject(null), false)
|
|
101
|
+
* assert.deepStrictEqual(isObject(undefined), false)
|
|
102
|
+
*
|
|
103
|
+
* @category guards
|
|
104
|
+
* @since 2.0.0
|
|
105
|
+
*/
|
|
106
|
+
const isObject = input => typeof input === "object" && input !== null || isFunction$1(input);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* A guard that succeeds when the input is `null` or `undefined`.
|
|
110
|
+
*
|
|
111
|
+
* @param input - The value to test.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* import { isNullable } from "effect/Predicate"
|
|
115
|
+
*
|
|
116
|
+
* assert.deepStrictEqual(isNullable(null), true)
|
|
117
|
+
* assert.deepStrictEqual(isNullable(undefined), true)
|
|
118
|
+
*
|
|
119
|
+
* assert.deepStrictEqual(isNullable({}), false)
|
|
120
|
+
* assert.deepStrictEqual(isNullable([]), false)
|
|
121
|
+
*
|
|
122
|
+
* @category guards
|
|
123
|
+
* @since 2.0.0
|
|
124
|
+
*/
|
|
125
|
+
const isNullable = input => input === null || input === undefined;
|
|
126
|
+
|
|
127
|
+
const t=Symbol.for("@ts-pattern/matcher"),e=Symbol.for("@ts-pattern/isVariadic"),n="@ts-pattern/anonymous-select-key",r=t=>Boolean(t&&"object"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return !1;if(Array.isArray(n)){if(!Array.isArray(o))return !1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o);}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(o.length<t.length+r.length)return !1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Object.keys(n).every(e=>{const r=n[e];return (e in o||i(a=r)&&"optional"===a[t]().matcherType)&&s(r,o[e],c);var a;})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>l(t),and:e=>m(t,e),or:e=>y(t,e),select:e=>void 0===e?p(t):p(e,t)})}function h(t){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[e]:!0});}}))(t),{optional:()=>h(l(t)),select:e=>h(void 0===e?p(t):p(e,t))})}function l(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e;};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:"optional"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return !1;return !0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return !1;return !0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e;};return {matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:"and"})})}function y(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e;};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:"or"})})}function d(e){return {[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function p(...e){const r="string"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return {matched:void 0===i||s(i,t,(t,n)=>{e[t]=n;}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return "number"==typeof t}function b(t){return "string"==typeof t}function w(t){return "bigint"==typeof t}const S=u(d(function(t){return !0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,d(t=>b(t)&&t.startsWith(n)))));var n;},endsWith:e=>{return j(m(t,(n=e,d(t=>b(t)&&t.endsWith(n)))));var n;},minLength:e=>j(m(t,(t=>d(e=>b(e)&&e.length>=t))(e))),maxLength:e=>j(m(t,(t=>d(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,d(t=>b(t)&&t.includes(n)))));var n;},regex:e=>{return j(m(t,(n=e,d(t=>b(t)&&Boolean(t.match(n))))));var n;}}),E=j(d(b)),K=t=>Object.assign(u(t),{between:(e,n)=>K(m(t,((t,e)=>d(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>K(m(t,(t=>d(e=>v(e)&&e<t))(e))),gt:e=>K(m(t,(t=>d(e=>v(e)&&e>t))(e))),lte:e=>K(m(t,(t=>d(e=>v(e)&&e<=t))(e))),gte:e=>K(m(t,(t=>d(e=>v(e)&&e>=t))(e))),int:()=>K(m(t,d(t=>v(t)&&Number.isInteger(t)))),finite:()=>K(m(t,d(t=>v(t)&&Number.isFinite(t)))),positive:()=>K(m(t,d(t=>v(t)&&t>0))),negative:()=>K(m(t,d(t=>v(t)&&t<0)))}),A=K(d(v)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>d(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>d(e=>w(e)&&e<t))(e))),gt:e=>x(m(t,(t=>d(e=>w(e)&&e>t))(e))),lte:e=>x(m(t,(t=>d(e=>w(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>d(e=>w(e)&&e>=t))(e))),positive:()=>x(m(t,d(t=>w(t)&&t>0))),negative:()=>x(m(t,d(t=>w(t)&&t<0)))}),P=x(d(w)),T=u(d(function(t){return "boolean"==typeof t})),k=u(d(function(t){return "symbol"==typeof t})),B=u(d(function(t){return null==t}));var _={__proto__:null,matcher:t,optional:l,array:function(...e){return h({[t]:()=>({match:t=>{if(!Array.isArray(t))return {matched:!1};if(0===e.length)return {matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[];}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e]);};return {matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return {matched:!1};let n={};if(0===t.size)return {matched:!0,selections:n};if(0===e.length)return {matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e]);},i=e[0];return {matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return {matched:!1};let n={};if(0===t.size)return {matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e]);};if(0===e.length)return {matched:!0};var i;if(1===e.length)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return {matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:y,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:d,select:p,any:S,_:O,string:E,number:A,bigint:P,boolean:T,symbol:k,nullish:B,instanceOf:function(t){return u(d(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(d(a(t)))}};const W={matched:!1,value:void 0};function N(t){return new $(t,W)}class ${constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e;}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&"function"==typeof t[1]?(r.push(t[0]),i=t[1]):t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e;},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?W:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new $(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new $(this.input,n?{matched:!0,value:e(this.input,this.input)}:W)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){return this.run()}run(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input);}catch(e){t=this.input;}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}returnType(){return this}}
|
|
128
|
+
|
|
129
|
+
const NodeType = types.AST_NODE_TYPES;
|
|
130
|
+
const is = utils.ASTUtils.isNodeOfType;
|
|
131
|
+
const isOneOf = utils.ASTUtils.isNodeOfTypes;
|
|
132
|
+
const isFunction = isOneOf([
|
|
133
|
+
NodeType.ArrowFunctionExpression,
|
|
134
|
+
NodeType.FunctionDeclaration,
|
|
135
|
+
NodeType.FunctionExpression
|
|
136
|
+
]);
|
|
137
|
+
const isFunctionType = isOneOf([
|
|
138
|
+
NodeType.ArrowFunctionExpression,
|
|
139
|
+
NodeType.FunctionDeclaration,
|
|
140
|
+
NodeType.FunctionExpression,
|
|
141
|
+
NodeType.TSCallSignatureDeclaration,
|
|
142
|
+
NodeType.TSConstructSignatureDeclaration,
|
|
143
|
+
NodeType.TSDeclareFunction,
|
|
144
|
+
NodeType.TSEmptyBodyFunctionExpression,
|
|
145
|
+
NodeType.TSFunctionType,
|
|
146
|
+
NodeType.TSMethodSignature
|
|
147
|
+
]);
|
|
148
|
+
const isClass = isOneOf([
|
|
149
|
+
NodeType.ClassDeclaration,
|
|
150
|
+
NodeType.ClassExpression
|
|
151
|
+
]);
|
|
152
|
+
const isLoop = isOneOf([
|
|
153
|
+
NodeType.DoWhileStatement,
|
|
154
|
+
NodeType.ForInStatement,
|
|
155
|
+
NodeType.ForOfStatement,
|
|
156
|
+
NodeType.ForStatement,
|
|
157
|
+
NodeType.WhileStatement
|
|
158
|
+
]);
|
|
159
|
+
const isArrayTupleType = isOneOf([
|
|
160
|
+
NodeType.TSArrayType,
|
|
161
|
+
NodeType.TSTupleType
|
|
162
|
+
]);
|
|
163
|
+
const isProperty = isOneOf([
|
|
164
|
+
NodeType.PropertyDefinition,
|
|
165
|
+
NodeType.TSIndexSignature,
|
|
166
|
+
NodeType.TSParameterProperty,
|
|
167
|
+
NodeType.TSPropertySignature
|
|
168
|
+
]);
|
|
169
|
+
const isJSXElement = is(NodeType.JSXElement);
|
|
170
|
+
const isJSXFragment = is(NodeType.JSXFragment);
|
|
171
|
+
const isJSX = isOneOf([
|
|
172
|
+
NodeType.JSXAttribute,
|
|
173
|
+
NodeType.JSXSpreadChild,
|
|
174
|
+
NodeType.JSXClosingElement,
|
|
175
|
+
NodeType.JSXClosingFragment,
|
|
176
|
+
NodeType.JSXElement,
|
|
177
|
+
NodeType.JSXEmptyExpression,
|
|
178
|
+
NodeType.JSXExpressionContainer,
|
|
179
|
+
NodeType.JSXFragment,
|
|
180
|
+
NodeType.JSXIdentifier,
|
|
181
|
+
NodeType.JSXMemberExpression,
|
|
182
|
+
NodeType.JSXNamespacedName,
|
|
183
|
+
NodeType.JSXOpeningElement,
|
|
184
|
+
NodeType.JSXOpeningFragment,
|
|
185
|
+
NodeType.JSXSpreadAttribute,
|
|
186
|
+
NodeType.JSXSpreadChild,
|
|
187
|
+
NodeType.JSXText
|
|
188
|
+
]);
|
|
189
|
+
const isJSXTagNameExpression = isOneOf([
|
|
190
|
+
NodeType.JSXIdentifier,
|
|
191
|
+
NodeType.JSXMemberExpression,
|
|
192
|
+
NodeType.JSXNamespacedName
|
|
193
|
+
]);
|
|
194
|
+
const isDestructuringPattern = isOneOf([
|
|
195
|
+
NodeType.ArrayPattern,
|
|
196
|
+
NodeType.AssignmentPattern,
|
|
197
|
+
NodeType.ObjectPattern,
|
|
198
|
+
NodeType.RestElement
|
|
199
|
+
]);
|
|
200
|
+
const isTypeDeclaration = isOneOf([
|
|
201
|
+
NodeType.TSInterfaceDeclaration,
|
|
202
|
+
NodeType.TSTypeAliasDeclaration
|
|
203
|
+
]);
|
|
204
|
+
const isLeftHandSideExpression = isOneOf([
|
|
205
|
+
NodeType.ArrayExpression,
|
|
206
|
+
NodeType.ArrayPattern,
|
|
207
|
+
NodeType.ArrowFunctionExpression,
|
|
208
|
+
NodeType.CallExpression,
|
|
209
|
+
NodeType.ClassExpression,
|
|
210
|
+
NodeType.FunctionExpression,
|
|
211
|
+
NodeType.Identifier,
|
|
212
|
+
NodeType.JSXElement,
|
|
213
|
+
NodeType.JSXFragment,
|
|
214
|
+
NodeType.Literal,
|
|
215
|
+
NodeType.TemplateLiteral,
|
|
216
|
+
NodeType.MemberExpression,
|
|
217
|
+
NodeType.MetaProperty,
|
|
218
|
+
NodeType.ObjectExpression,
|
|
219
|
+
NodeType.ObjectPattern,
|
|
220
|
+
NodeType.SequenceExpression,
|
|
221
|
+
NodeType.Super,
|
|
222
|
+
NodeType.TaggedTemplateExpression,
|
|
223
|
+
NodeType.ThisExpression
|
|
224
|
+
]);
|
|
225
|
+
const isLeftHandSideExpressionType = isOneOf([
|
|
226
|
+
NodeType.ArrayExpression,
|
|
227
|
+
NodeType.ArrayPattern,
|
|
228
|
+
NodeType.ArrowFunctionExpression,
|
|
229
|
+
NodeType.CallExpression,
|
|
230
|
+
NodeType.ClassExpression,
|
|
231
|
+
NodeType.FunctionExpression,
|
|
232
|
+
NodeType.Identifier,
|
|
233
|
+
NodeType.JSXElement,
|
|
234
|
+
NodeType.JSXFragment,
|
|
235
|
+
NodeType.Literal,
|
|
236
|
+
NodeType.TemplateLiteral,
|
|
237
|
+
NodeType.MemberExpression,
|
|
238
|
+
NodeType.MetaProperty,
|
|
239
|
+
NodeType.ObjectExpression,
|
|
240
|
+
NodeType.ObjectPattern,
|
|
241
|
+
NodeType.SequenceExpression,
|
|
242
|
+
NodeType.Super,
|
|
243
|
+
NodeType.TaggedTemplateExpression,
|
|
244
|
+
NodeType.ThisExpression,
|
|
245
|
+
NodeType.TSAsExpression,
|
|
246
|
+
NodeType.TSNonNullExpression,
|
|
247
|
+
NodeType.TSTypeAssertion
|
|
248
|
+
]);
|
|
249
|
+
|
|
250
|
+
const Construction = tools.Data.taggedEnum();
|
|
251
|
+
const None = Construction.None();
|
|
252
|
+
/**
|
|
253
|
+
* Get a function that detects the construction of a given node.
|
|
254
|
+
* @param context The rule context
|
|
255
|
+
* @returns A function that detects the construction of a given node
|
|
256
|
+
*/ function constructionDetector(context) {
|
|
257
|
+
/**
|
|
258
|
+
* Detect if a node is a constructed value.
|
|
259
|
+
* @param node The AST node to detect the construction of
|
|
260
|
+
* @param scope The scope of the node
|
|
261
|
+
* @returns The construction of the node
|
|
262
|
+
*/ // eslint-disable-next-line sonarjs/cognitive-complexity
|
|
263
|
+
const detect = (node, scope = context.getScope())=>{
|
|
264
|
+
return N(node).when(is(NodeType.ArrayExpression), (node)=>Construction.Array({
|
|
265
|
+
node,
|
|
266
|
+
usage: tools.O.none()
|
|
267
|
+
})).when(is(NodeType.ObjectExpression), (node)=>Construction.ObjectExpression({
|
|
268
|
+
node,
|
|
269
|
+
usage: tools.O.none()
|
|
270
|
+
})).when(is(NodeType.ClassExpression), (node)=>Construction.ClassExpression({
|
|
271
|
+
node,
|
|
272
|
+
usage: tools.O.none()
|
|
273
|
+
})).when(is(NodeType.JSXElement), (node)=>Construction.JSXElement({
|
|
274
|
+
node,
|
|
275
|
+
usage: tools.O.none()
|
|
276
|
+
})).when(is(NodeType.JSXFragment), (node)=>Construction.JSXFragment({
|
|
277
|
+
node,
|
|
278
|
+
usage: tools.O.none()
|
|
279
|
+
})).when(is(NodeType.NewExpression), (node)=>Construction.NewExpression({
|
|
280
|
+
node,
|
|
281
|
+
usage: tools.O.none()
|
|
282
|
+
})).when(isOneOf([
|
|
283
|
+
NodeType.FunctionExpression,
|
|
284
|
+
NodeType.ArrowFunctionExpression
|
|
285
|
+
]), (node)=>{
|
|
286
|
+
return Construction.FunctionExpression({
|
|
287
|
+
node,
|
|
288
|
+
usage: tools.O.none()
|
|
289
|
+
});
|
|
290
|
+
}).when(is(NodeType.MemberExpression), (node)=>{
|
|
291
|
+
if (!("object" in node)) {
|
|
292
|
+
return None;
|
|
293
|
+
}
|
|
294
|
+
const object = detect(node.object);
|
|
295
|
+
if (object._tag === "None") {
|
|
296
|
+
return object;
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
...object,
|
|
300
|
+
usage: tools.O.some(node.object)
|
|
301
|
+
};
|
|
302
|
+
}).when(is(NodeType.AssignmentExpression), (node)=>{
|
|
303
|
+
if (!("right" in node)) {
|
|
304
|
+
return None;
|
|
305
|
+
}
|
|
306
|
+
const right = detect(node.right);
|
|
307
|
+
if (right._tag === "None") {
|
|
308
|
+
return right;
|
|
309
|
+
}
|
|
310
|
+
return Construction.AssignmentExpression({
|
|
311
|
+
node: right.node,
|
|
312
|
+
usage: tools.O.some(node)
|
|
313
|
+
});
|
|
314
|
+
}).when(is(NodeType.LogicalExpression), (node)=>{
|
|
315
|
+
if (!("left" in node && "right" in node)) {
|
|
316
|
+
return None;
|
|
317
|
+
}
|
|
318
|
+
const left = detect(node.left);
|
|
319
|
+
if (left._tag === "None") {
|
|
320
|
+
return None;
|
|
321
|
+
}
|
|
322
|
+
return detect(node.right);
|
|
323
|
+
}).when(is(NodeType.ConditionalExpression), (node)=>{
|
|
324
|
+
if (!("consequent" in node && "alternate" in node && !rambda.isNil(node.alternate))) {
|
|
325
|
+
return None;
|
|
326
|
+
}
|
|
327
|
+
const consequent = detect(node.consequent);
|
|
328
|
+
if (consequent._tag === "None") {
|
|
329
|
+
return None;
|
|
330
|
+
}
|
|
331
|
+
return detect(node.alternate);
|
|
332
|
+
}).when(is(NodeType.Identifier), (node)=>{
|
|
333
|
+
if (!("name" in node && isString(node.name))) {
|
|
334
|
+
return None;
|
|
335
|
+
}
|
|
336
|
+
const maybeLatestDef = tools.O.fromNullable(scope.set.get(node.name)?.defs.at(-1));
|
|
337
|
+
if (tools.O.isNone(maybeLatestDef)) {
|
|
338
|
+
return None;
|
|
339
|
+
}
|
|
340
|
+
const latestDef = maybeLatestDef.value;
|
|
341
|
+
if (latestDef.type !== scopeManager.DefinitionType.Variable && latestDef.type !== scopeManager.DefinitionType.FunctionName) {
|
|
342
|
+
return None;
|
|
343
|
+
}
|
|
344
|
+
if (latestDef.node.type === NodeType.FunctionDeclaration) {
|
|
345
|
+
return Construction.FunctionDeclaration({
|
|
346
|
+
node: latestDef.node,
|
|
347
|
+
usage: tools.O.some(node)
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
if (!("init" in latestDef.node) || latestDef.node.init === null) {
|
|
351
|
+
return None;
|
|
352
|
+
}
|
|
353
|
+
return detect(latestDef.node.init);
|
|
354
|
+
}).when(is(NodeType.Literal), (node)=>{
|
|
355
|
+
if ("regex" in node) {
|
|
356
|
+
return Construction.RegExpLiteral({
|
|
357
|
+
node,
|
|
358
|
+
usage: tools.O.none()
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return None;
|
|
362
|
+
}).when(isOneOf([
|
|
363
|
+
NodeType.TSAsExpression,
|
|
364
|
+
NodeType.TSTypeAssertion
|
|
365
|
+
]), ()=>{
|
|
366
|
+
if (!("expression" in node) || !isObject(node.expression)) {
|
|
367
|
+
return None;
|
|
368
|
+
}
|
|
369
|
+
return detect(node.expression);
|
|
370
|
+
}).otherwise(()=>None);
|
|
371
|
+
};
|
|
372
|
+
return detect;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const unstableAssignmentPatternTypes = [
|
|
376
|
+
NodeType.JSXElement,
|
|
377
|
+
NodeType.ArrayExpression,
|
|
378
|
+
NodeType.ObjectExpression,
|
|
379
|
+
NodeType.FunctionExpression,
|
|
380
|
+
NodeType.ArrowFunctionExpression,
|
|
381
|
+
NodeType.ClassExpression,
|
|
382
|
+
NodeType.NewExpression,
|
|
383
|
+
NodeType.CallExpression
|
|
384
|
+
];
|
|
385
|
+
/**
|
|
386
|
+
* Check if the given node is an unstable assignment pattern (will change between assignments)
|
|
387
|
+
* @param node The AST node to check
|
|
388
|
+
* @param node.right The right side of the assignment
|
|
389
|
+
*/ function isUnstableAssignmentPattern(node) {
|
|
390
|
+
const { right } = node;
|
|
391
|
+
if (right.type === NodeType.Literal) {
|
|
392
|
+
return "regex" in right;
|
|
393
|
+
}
|
|
394
|
+
return isOneOf(unstableAssignmentPatternTypes)(right);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// Ported from: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/utils/src/ast-utils/eslint-utils/astUtilities.ts
|
|
398
|
+
/**
|
|
399
|
+
* Get the proper location of a given function node to report.
|
|
400
|
+
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionheadlocation}
|
|
401
|
+
*/ const getFunctionHeadLocation = eslintUtils__namespace.getFunctionHeadLocation;
|
|
402
|
+
/**
|
|
403
|
+
* Get the name and kind of a given function node.
|
|
404
|
+
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionnamewithkind}
|
|
405
|
+
*/ const getFunctionNameWithKind = eslintUtils__namespace.getFunctionNameWithKind;
|
|
406
|
+
/**
|
|
407
|
+
* Get the property name of a given property node.
|
|
408
|
+
* If the node is a computed property, this tries to compute the property name by the getStringIfConstant function.
|
|
409
|
+
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getpropertyname}
|
|
410
|
+
* @returns The property name of the node. If the property name is not constant then it returns `null`.
|
|
411
|
+
*/ const getPropertyName = eslintUtils__namespace.getPropertyName;
|
|
412
|
+
/**
|
|
413
|
+
* Get the value of a given node if it can decide the value statically.
|
|
414
|
+
* If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the
|
|
415
|
+
* given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have
|
|
416
|
+
* not been modified.
|
|
417
|
+
* For example, it considers `Symbol.iterator`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static.
|
|
418
|
+
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue}
|
|
419
|
+
* @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the
|
|
420
|
+
* static value of the node, it returns `null`.
|
|
421
|
+
*/ const getStaticValue = eslintUtils__namespace.getStaticValue;
|
|
422
|
+
/**
|
|
423
|
+
* Get the string value of a given node.
|
|
424
|
+
* This function is a tiny wrapper of the getStaticValue function.
|
|
425
|
+
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstringifconstant}
|
|
426
|
+
*/ const getStringIfConstant = eslintUtils__namespace.getStringIfConstant;
|
|
427
|
+
/**
|
|
428
|
+
* Check whether a given node has any side effect or not.
|
|
429
|
+
* The side effect means that it may modify a certain variable or object member. This function considers the node which
|
|
430
|
+
* contains the following types as the node which has side effects:
|
|
431
|
+
* - `AssignmentExpression`
|
|
432
|
+
* - `AwaitExpression`
|
|
433
|
+
* - `CallExpression`
|
|
434
|
+
* - `ImportExpression`
|
|
435
|
+
* - `NewExpression`
|
|
436
|
+
* - `UnaryExpression([operator = "delete"])`
|
|
437
|
+
* - `UpdateExpression`
|
|
438
|
+
* - `YieldExpression`
|
|
439
|
+
* - When `options.considerGetters` is `true`:
|
|
440
|
+
* - `MemberExpression`
|
|
441
|
+
* - When `options.considerImplicitTypeConversion` is `true`:
|
|
442
|
+
* - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])`
|
|
443
|
+
* - `MemberExpression([computed = true])`
|
|
444
|
+
* - `MethodDefinition([computed = true])`
|
|
445
|
+
* - `Property([computed = true])`
|
|
446
|
+
* - `UnaryExpression([operator = "-" | "+" | "!" | "~"])`
|
|
447
|
+
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#hassideeffect}
|
|
448
|
+
*/ const hasSideEffect = eslintUtils__namespace.hasSideEffect;
|
|
449
|
+
const isParenthesized = eslintUtils__namespace.isParenthesized;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Gets nested identifiers in a node
|
|
453
|
+
* @param node The AST node
|
|
454
|
+
* @returns The nested identifiers
|
|
455
|
+
*/ function getNestedIdentifiers(node) {
|
|
456
|
+
const identifiers = [];
|
|
457
|
+
if (node.type === NodeType.Identifier) {
|
|
458
|
+
identifiers.push(node);
|
|
459
|
+
}
|
|
460
|
+
if ("arguments" in node) {
|
|
461
|
+
node.arguments.forEach((x)=>{
|
|
462
|
+
identifiers.push(...getNestedIdentifiers(x));
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
if ("elements" in node) {
|
|
466
|
+
node.elements.forEach((x)=>{
|
|
467
|
+
if (x !== null) {
|
|
468
|
+
identifiers.push(...getNestedIdentifiers(x));
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
if ("properties" in node) {
|
|
473
|
+
node.properties.forEach((x)=>{
|
|
474
|
+
identifiers.push(...getNestedIdentifiers(x));
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
if ("expressions" in node) {
|
|
478
|
+
node.expressions.forEach((x)=>{
|
|
479
|
+
identifiers.push(...getNestedIdentifiers(x));
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
if (node.type === NodeType.Property) {
|
|
483
|
+
identifiers.push(...getNestedIdentifiers(node.value));
|
|
484
|
+
}
|
|
485
|
+
if (node.type === NodeType.SpreadElement) {
|
|
486
|
+
identifiers.push(...getNestedIdentifiers(node.argument));
|
|
487
|
+
}
|
|
488
|
+
if (node.type === NodeType.MemberExpression) {
|
|
489
|
+
identifiers.push(...getNestedIdentifiers(node.object));
|
|
490
|
+
}
|
|
491
|
+
if (node.type === NodeType.UnaryExpression) {
|
|
492
|
+
identifiers.push(...getNestedIdentifiers(node.argument));
|
|
493
|
+
}
|
|
494
|
+
if (node.type === NodeType.ChainExpression) {
|
|
495
|
+
identifiers.push(...getNestedIdentifiers(node.expression));
|
|
496
|
+
}
|
|
497
|
+
if (node.type === NodeType.TSNonNullExpression) {
|
|
498
|
+
identifiers.push(...getNestedIdentifiers(node.expression));
|
|
499
|
+
}
|
|
500
|
+
return identifiers;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Gets nested return statements in a node
|
|
505
|
+
* @param node The AST node
|
|
506
|
+
* @returns The nested return statements
|
|
507
|
+
*/ function getNestedReturnStatements(node) {
|
|
508
|
+
const returnStatements = [];
|
|
509
|
+
if (node.type === NodeType.ReturnStatement) {
|
|
510
|
+
returnStatements.push(node);
|
|
511
|
+
}
|
|
512
|
+
if ("body" in node && !rambda.isNil(node.body)) {
|
|
513
|
+
Array.isArray(node.body) ? node.body.forEach((x)=>{
|
|
514
|
+
returnStatements.push(...getNestedReturnStatements(x));
|
|
515
|
+
}) : returnStatements.push(...getNestedReturnStatements(node.body));
|
|
516
|
+
}
|
|
517
|
+
if ("consequent" in node) {
|
|
518
|
+
Array.isArray(node.consequent) ? node.consequent.forEach((x)=>{
|
|
519
|
+
returnStatements.push(...getNestedReturnStatements(x));
|
|
520
|
+
}) : returnStatements.push(...getNestedReturnStatements(node.consequent));
|
|
521
|
+
}
|
|
522
|
+
if ("alternate" in node && node.alternate !== null) {
|
|
523
|
+
Array.isArray(node.alternate) ? node.alternate.forEach((x)=>{
|
|
524
|
+
returnStatements.push(...getNestedReturnStatements(x));
|
|
525
|
+
}) : returnStatements.push(...getNestedReturnStatements(node.alternate));
|
|
526
|
+
}
|
|
527
|
+
if ("cases" in node) {
|
|
528
|
+
node.cases.forEach((x)=>{
|
|
529
|
+
returnStatements.push(...getNestedReturnStatements(x));
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
if ("block" in node) {
|
|
533
|
+
returnStatements.push(...getNestedReturnStatements(node.block));
|
|
534
|
+
}
|
|
535
|
+
if ("handler" in node && node.handler !== null) {
|
|
536
|
+
returnStatements.push(...getNestedReturnStatements(node.handler));
|
|
537
|
+
}
|
|
538
|
+
if ("finalizer" in node && node.finalizer !== null) {
|
|
539
|
+
returnStatements.push(...getNestedReturnStatements(node.finalizer));
|
|
540
|
+
}
|
|
541
|
+
if ("expression" in node && node.expression !== true && node.expression !== false) {
|
|
542
|
+
returnStatements.push(...getNestedReturnStatements(node.expression));
|
|
543
|
+
}
|
|
544
|
+
if ("test" in node && node.test !== null) {
|
|
545
|
+
returnStatements.push(...getNestedReturnStatements(node.test));
|
|
546
|
+
}
|
|
547
|
+
return returnStatements;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Checks if the given node is a function expression or arrow function expression of a object method.
|
|
552
|
+
* @param node The node to check.
|
|
553
|
+
* @returns `true` if the node is a function expression or arrow function expression of a object method, `false` otherwise.
|
|
554
|
+
*/ const isFunctionOfObjectMethod = a({
|
|
555
|
+
type: _.union([
|
|
556
|
+
NodeType.FunctionExpression,
|
|
557
|
+
NodeType.ArrowFunctionExpression
|
|
558
|
+
]),
|
|
559
|
+
parent: {
|
|
560
|
+
type: NodeType.Property,
|
|
561
|
+
parent: {
|
|
562
|
+
type: NodeType.ObjectExpression
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
/**
|
|
567
|
+
* Checks if the given node is a function expression or arrow function expression of a class method.
|
|
568
|
+
* @param node The node to check.
|
|
569
|
+
* @returns `true` if the node is a function expression or arrow function expression of a class method, `false` otherwise.
|
|
570
|
+
*/ const isFunctionOfClassMethod = a({
|
|
571
|
+
type: _.union([
|
|
572
|
+
NodeType.FunctionExpression,
|
|
573
|
+
NodeType.ArrowFunctionExpression
|
|
574
|
+
]),
|
|
575
|
+
parent: {
|
|
576
|
+
type: NodeType.MethodDefinition,
|
|
577
|
+
parent: {
|
|
578
|
+
type: NodeType.ClassBody
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
/**
|
|
583
|
+
* Checks if the given node is a function expression or arrow function expression of a class property.
|
|
584
|
+
* @param node The node to check.
|
|
585
|
+
* @returns `true` if the node is a function expression or arrow function expression of a class property, `false` otherwise.
|
|
586
|
+
*/ const isFunctionOfClassProperty = a({
|
|
587
|
+
type: _.union([
|
|
588
|
+
NodeType.FunctionExpression,
|
|
589
|
+
NodeType.ArrowFunctionExpression
|
|
590
|
+
]),
|
|
591
|
+
parent: {
|
|
592
|
+
type: NodeType.Property,
|
|
593
|
+
parent: {
|
|
594
|
+
type: NodeType.ClassBody
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Checks if a node is an identifier with a given name
|
|
601
|
+
* @param node The AST node
|
|
602
|
+
* @param name The name
|
|
603
|
+
* @returns `true if the node is an identifier with the given name
|
|
604
|
+
*/ function isIdentifierWithName(node, name) {
|
|
605
|
+
return node.type === NodeType.Identifier && node.name === name;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Checks if a node is an identifier with one of names
|
|
609
|
+
* @param node The AST node
|
|
610
|
+
* @param name The name
|
|
611
|
+
* @returns `true` if the node is an identifier with one of names
|
|
612
|
+
*/ function isIdentifierWithOneOfNames(node, name) {
|
|
613
|
+
return node.type === NodeType.Identifier && name.includes(node.name);
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Gets FunctionDeclaration's identifier or FunctionExpression's parent identifier if it exists
|
|
617
|
+
* @param node The AST node to check
|
|
618
|
+
* @returns function identifier or null
|
|
619
|
+
*/ function getFunctionIdentifier(node) {
|
|
620
|
+
if (node.id) {
|
|
621
|
+
return node.id;
|
|
622
|
+
}
|
|
623
|
+
if (isOneOf([
|
|
624
|
+
NodeType.ArrowFunctionExpression,
|
|
625
|
+
NodeType.FunctionExpression
|
|
626
|
+
])(node)) {
|
|
627
|
+
return "id" in node.parent && node.parent.id?.type === NodeType.Identifier ? node.parent.id : null;
|
|
628
|
+
}
|
|
629
|
+
return null;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Gets class identifier from ClassDeclaration or ClassExpression
|
|
633
|
+
* @param node The AST node to check
|
|
634
|
+
* @returns class identifier or null
|
|
635
|
+
*/ function getClassIdentifier(node) {
|
|
636
|
+
return N(node).with({
|
|
637
|
+
type: NodeType.ClassDeclaration
|
|
638
|
+
}, (x)=>x.id).with({
|
|
639
|
+
type: NodeType.ClassExpression,
|
|
640
|
+
parent: {
|
|
641
|
+
type: NodeType.VariableDeclarator,
|
|
642
|
+
id: {
|
|
643
|
+
type: NodeType.Identifier
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}, (x)=>x.parent.id).otherwise(()=>null);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Determines whether node equals to another node
|
|
651
|
+
* @param a node to compare
|
|
652
|
+
* @param b node to compare
|
|
653
|
+
* @returns `true` if node equal
|
|
654
|
+
* @see https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/util/isNodeEqual.ts
|
|
655
|
+
*/ function isNodeEqual(a, b) {
|
|
656
|
+
if (a.type !== b.type) {
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
if (a.type === NodeType.ThisExpression && b.type === NodeType.ThisExpression) {
|
|
660
|
+
return true;
|
|
661
|
+
}
|
|
662
|
+
if (a.type === NodeType.Literal && b.type === NodeType.Literal) {
|
|
663
|
+
return a.value === b.value;
|
|
664
|
+
}
|
|
665
|
+
if (a.type === NodeType.Identifier && b.type === NodeType.Identifier) {
|
|
666
|
+
return a.name === b.name;
|
|
667
|
+
}
|
|
668
|
+
if (a.type === NodeType.MemberExpression && b.type === NodeType.MemberExpression) {
|
|
669
|
+
return isNodeEqual(a.property, b.property) && isNodeEqual(a.object, b.object);
|
|
670
|
+
}
|
|
671
|
+
return false;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
function isRegExpLiteral(node) {
|
|
675
|
+
return node.type === NodeType.Literal && "regex" in node;
|
|
676
|
+
}
|
|
677
|
+
function isStringLiteral(node) {
|
|
678
|
+
return node?.type === NodeType.Literal && isString(node.value);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Check if a node is multiline
|
|
683
|
+
* @param node The AST node to check
|
|
684
|
+
* @returns `true` if the node is multiline
|
|
685
|
+
*/ function isMultiLine(node) {
|
|
686
|
+
return node.loc.start.line !== node.loc.end.line;
|
|
687
|
+
}
|
|
688
|
+
function unsafeIsToStringCall(node) {
|
|
689
|
+
return a({
|
|
690
|
+
type: NodeType.CallExpression,
|
|
691
|
+
callee: {
|
|
692
|
+
type: NodeType.MemberExpression,
|
|
693
|
+
property: {
|
|
694
|
+
type: NodeType.Identifier,
|
|
695
|
+
name: "toString"
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}, node);
|
|
699
|
+
}
|
|
700
|
+
function unsafeIsStringCall(node) {
|
|
701
|
+
return a({
|
|
702
|
+
type: NodeType.CallExpression,
|
|
703
|
+
callee: {
|
|
704
|
+
type: NodeType.Identifier,
|
|
705
|
+
name: "String"
|
|
706
|
+
}
|
|
707
|
+
}, node);
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Unsafe check whether given node or its parent is directly inside `Array.from` call
|
|
711
|
+
* @param node The AST node to check
|
|
712
|
+
* @returns `true` if node is directly inside `Array.from` call, `false` if not
|
|
713
|
+
*/ function unsafeIsArrayFromCall(node) {
|
|
714
|
+
return a({
|
|
715
|
+
type: NodeType.CallExpression,
|
|
716
|
+
callee: {
|
|
717
|
+
type: NodeType.MemberExpression,
|
|
718
|
+
property: {
|
|
719
|
+
name: "from"
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}, node);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Unsafe check whether given node or its parent is directly inside `map` call
|
|
726
|
+
* ```jsx
|
|
727
|
+
* _ = <div>{items.map(item => <li />)}</div>
|
|
728
|
+
* ` ^^^^^^^^^^^^^^ `
|
|
729
|
+
* ```
|
|
730
|
+
* @param node The AST node to check
|
|
731
|
+
* @returns `true` if node is directly inside `map` call, `false` if not
|
|
732
|
+
*/ function unsafeIsMapCall(node) {
|
|
733
|
+
return a({
|
|
734
|
+
callee: {
|
|
735
|
+
type: NodeType.MemberExpression,
|
|
736
|
+
property: {
|
|
737
|
+
name: "map"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}, node);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
function isPropertyOfObjectExpression(node) {
|
|
744
|
+
return node.parent?.type === NodeType.Property;
|
|
745
|
+
}
|
|
746
|
+
function isPropertyWithIdentifierKey(node, key) {
|
|
747
|
+
return node.type === NodeType.Property && isIdentifierWithName(node.key, key);
|
|
748
|
+
}
|
|
749
|
+
function findPropertyWithIdentifierKey(properties, key) {
|
|
750
|
+
return properties.find((x)=>isPropertyWithIdentifierKey(x, key));
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Returns human readable node type for given AST node
|
|
755
|
+
* @param node AST node
|
|
756
|
+
* @returns Human readable node type
|
|
757
|
+
*/ function readableNodeType(node) {
|
|
758
|
+
if (node.type === NodeType.Literal) {
|
|
759
|
+
if ("regex" in node) {
|
|
760
|
+
return "RegExp literal";
|
|
761
|
+
}
|
|
762
|
+
return `${rambda.type(node.value)} literal`;
|
|
763
|
+
}
|
|
764
|
+
if (isJSX(node)) {
|
|
765
|
+
return `JSX ${stringTs.toLowerCase(stringTs.delimiterCase(stringTs.replace(node.type, "JSX", ""), " "))}`;
|
|
766
|
+
}
|
|
767
|
+
return stringTs.toLowerCase(stringTs.delimiterCase(node.type, " "));
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Traverses up the AST tree until the predicate returns `true` or the root node is reached
|
|
772
|
+
* @param node The AST node to start traversing from
|
|
773
|
+
* @param predicate The predicate to check each node
|
|
774
|
+
* @returns The first node that matches the predicate or `null` if no node matches
|
|
775
|
+
*/ function traverseUp(node, predicate) {
|
|
776
|
+
const { parent } = node;
|
|
777
|
+
if (!parent || parent.type === NodeType.Program) {
|
|
778
|
+
return null;
|
|
779
|
+
}
|
|
780
|
+
return predicate(parent) ? parent : traverseUp(parent, predicate);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Traverses up the AST tree until the predicate returns `true` or the root node is reached
|
|
784
|
+
* @template T
|
|
785
|
+
* @param node The AST node to start traversing from
|
|
786
|
+
* @param predicate The predicate to check each node. **must be a type guard**
|
|
787
|
+
* @returns The first node that matches the predicate or `null` if no node matches
|
|
788
|
+
*/ function traverseUpGuard(node, predicate) {
|
|
789
|
+
const { parent } = node;
|
|
790
|
+
if (!parent || parent.type === NodeType.Program) {
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
793
|
+
return predicate(parent) ? parent : traverseUpGuard(parent, predicate);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function isDeclaredInNode({ functionNode, reference, scopeManager }) {
|
|
797
|
+
const scope = scopeManager.acquire(functionNode);
|
|
798
|
+
return !!scope?.set.has(reference.identifier.name);
|
|
799
|
+
}
|
|
800
|
+
function getExternalRefs(params) {
|
|
801
|
+
const { node, scopeManager, sourceCode } = params;
|
|
802
|
+
const scope = scopeManager.acquire(node);
|
|
803
|
+
if (!scope) {
|
|
804
|
+
return [];
|
|
805
|
+
}
|
|
806
|
+
const references = scope.references.filter((x)=>x.isRead() && !scope.set.has(x.identifier.name)).map((x)=>{
|
|
807
|
+
const referenceNode = traverseUpGuard(x.identifier, isOneOf([
|
|
808
|
+
NodeType.MemberExpression,
|
|
809
|
+
NodeType.Identifier
|
|
810
|
+
]));
|
|
811
|
+
if (!referenceNode) {
|
|
812
|
+
return null;
|
|
813
|
+
}
|
|
814
|
+
return {
|
|
815
|
+
node: referenceNode,
|
|
816
|
+
text: sourceCode.getText(referenceNode),
|
|
817
|
+
variable: x
|
|
818
|
+
};
|
|
819
|
+
}).filter((x)=>x !== null);
|
|
820
|
+
const localRefIds = new Set([
|
|
821
|
+
...scope.set.values()
|
|
822
|
+
].map((x)=>sourceCode.getText(x.identifiers[0])));
|
|
823
|
+
const externalRefs = references.filter((x)=>rambda.isNil(x.variable.resolved) || !localRefIds.has(x.text));
|
|
824
|
+
return tools.uniqueBy(externalRefs, (x)=>x.text).map((x)=>x.variable);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Get all unary operators in a nested unary expression.
|
|
829
|
+
* @param node The node to get the operators from.
|
|
830
|
+
* @returns All unary operators in a nested unary expression.
|
|
831
|
+
*/ function getNestedUnaryOperators(node) {
|
|
832
|
+
const { operator } = node;
|
|
833
|
+
const { argument } = node;
|
|
834
|
+
if (argument.type === NodeType.UnaryExpression) {
|
|
835
|
+
return [
|
|
836
|
+
operator,
|
|
837
|
+
...getNestedUnaryOperators(argument)
|
|
838
|
+
];
|
|
839
|
+
}
|
|
840
|
+
return [
|
|
841
|
+
operator
|
|
842
|
+
];
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Find a variable through a list of variables by name
|
|
847
|
+
* @param name The name of the variable to find
|
|
848
|
+
*/ function findVariableByName(name) {
|
|
849
|
+
/**
|
|
850
|
+
* @param variables The variables to search through
|
|
851
|
+
*/ return (variables)=>{
|
|
852
|
+
return tools.O.fromNullable(variables.find((variable)=>variable.name === name));
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Get all variables from the given scope up to the global scope
|
|
857
|
+
* @param startScope The scope to start from
|
|
858
|
+
*/ function getVariablesUpToGlobal(startScope) {
|
|
859
|
+
const scopeRef = tools.MutRef.make(startScope);
|
|
860
|
+
const variablesRef = tools.MutRef.make(tools.MutRef.get(scopeRef).variables);
|
|
861
|
+
while(tools.MutRef.get(scopeRef).type !== scopeManager.ScopeType.global){
|
|
862
|
+
tools.MutRef.set(scopeRef, tools.MutRef.get(scopeRef).upper);
|
|
863
|
+
tools.MutRef.update(variablesRef, (variables)=>variables.concat(tools.MutRef.get(scopeRef).variables));
|
|
864
|
+
}
|
|
865
|
+
return tools.MutRef.get(variablesRef).reverse();
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Find a variable through a list of variables by name, starting from the given scope and going up to the global scope
|
|
869
|
+
* @param name The name of the variable to find
|
|
870
|
+
* @param startScope The scope to start from
|
|
871
|
+
*/ function findVariableByNameUpToGlobal(name, startScope) {
|
|
872
|
+
return findVariableByName(name)(getVariablesUpToGlobal(startScope));
|
|
873
|
+
}
|
|
874
|
+
function resolveDefinitionInit(def) {
|
|
875
|
+
if ("init" in def.node && !isNullable(def.node.init)) {
|
|
876
|
+
return tools.O.some(def.node.init);
|
|
877
|
+
}
|
|
878
|
+
// TODO: support other types of definitions
|
|
879
|
+
return tools.O.none();
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Get the init node of the nth definition of a variable
|
|
883
|
+
* @param at The index number of def in defs
|
|
884
|
+
* @returns A function that takes a variable and returns the init node of the nth definition of that variable
|
|
885
|
+
*/ function getVariableInit(at) {
|
|
886
|
+
return (variable)=>{
|
|
887
|
+
return tools.F.pipe(tools.O.some(variable), tools.O.flatMapNullable((v)=>v.defs.at(at)), tools.O.flatMap(resolveDefinitionInit));
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
function isInitExpression(node) {
|
|
891
|
+
return node.type !== NodeType.VariableDeclaration;
|
|
892
|
+
}
|
|
893
|
+
function getVariableInitExpression(at) {
|
|
894
|
+
return (variable)=>{
|
|
895
|
+
return tools.F.pipe(tools.O.some(variable), tools.O.flatMapNullable((v)=>v.defs.at(at)), tools.O.flatMap(resolveDefinitionInit), tools.O.filter(isInitExpression));
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
exports.Construction = Construction;
|
|
900
|
+
exports.NodeType = NodeType;
|
|
901
|
+
exports.constructionDetector = constructionDetector;
|
|
902
|
+
exports.findPropertyWithIdentifierKey = findPropertyWithIdentifierKey;
|
|
903
|
+
exports.findVariableByName = findVariableByName;
|
|
904
|
+
exports.findVariableByNameUpToGlobal = findVariableByNameUpToGlobal;
|
|
905
|
+
exports.getClassIdentifier = getClassIdentifier;
|
|
906
|
+
exports.getExternalRefs = getExternalRefs;
|
|
907
|
+
exports.getFunctionHeadLocation = getFunctionHeadLocation;
|
|
908
|
+
exports.getFunctionIdentifier = getFunctionIdentifier;
|
|
909
|
+
exports.getFunctionNameWithKind = getFunctionNameWithKind;
|
|
910
|
+
exports.getNestedIdentifiers = getNestedIdentifiers;
|
|
911
|
+
exports.getNestedReturnStatements = getNestedReturnStatements;
|
|
912
|
+
exports.getNestedUnaryOperators = getNestedUnaryOperators;
|
|
913
|
+
exports.getPropertyName = getPropertyName;
|
|
914
|
+
exports.getStaticValue = getStaticValue;
|
|
915
|
+
exports.getStringIfConstant = getStringIfConstant;
|
|
916
|
+
exports.getVariableInit = getVariableInit;
|
|
917
|
+
exports.getVariableInitExpression = getVariableInitExpression;
|
|
918
|
+
exports.getVariablesUpToGlobal = getVariablesUpToGlobal;
|
|
919
|
+
exports.hasSideEffect = hasSideEffect;
|
|
920
|
+
exports.is = is;
|
|
921
|
+
exports.isArrayTupleType = isArrayTupleType;
|
|
922
|
+
exports.isClass = isClass;
|
|
923
|
+
exports.isDeclaredInNode = isDeclaredInNode;
|
|
924
|
+
exports.isDestructuringPattern = isDestructuringPattern;
|
|
925
|
+
exports.isFunction = isFunction;
|
|
926
|
+
exports.isFunctionOfClassMethod = isFunctionOfClassMethod;
|
|
927
|
+
exports.isFunctionOfClassProperty = isFunctionOfClassProperty;
|
|
928
|
+
exports.isFunctionOfObjectMethod = isFunctionOfObjectMethod;
|
|
929
|
+
exports.isFunctionType = isFunctionType;
|
|
930
|
+
exports.isIdentifierWithName = isIdentifierWithName;
|
|
931
|
+
exports.isIdentifierWithOneOfNames = isIdentifierWithOneOfNames;
|
|
932
|
+
exports.isJSX = isJSX;
|
|
933
|
+
exports.isJSXElement = isJSXElement;
|
|
934
|
+
exports.isJSXFragment = isJSXFragment;
|
|
935
|
+
exports.isJSXTagNameExpression = isJSXTagNameExpression;
|
|
936
|
+
exports.isLeftHandSideExpression = isLeftHandSideExpression;
|
|
937
|
+
exports.isLeftHandSideExpressionType = isLeftHandSideExpressionType;
|
|
938
|
+
exports.isLoop = isLoop;
|
|
939
|
+
exports.isMultiLine = isMultiLine;
|
|
940
|
+
exports.isNodeEqual = isNodeEqual;
|
|
941
|
+
exports.isOneOf = isOneOf;
|
|
942
|
+
exports.isParenthesized = isParenthesized;
|
|
943
|
+
exports.isProperty = isProperty;
|
|
944
|
+
exports.isPropertyOfObjectExpression = isPropertyOfObjectExpression;
|
|
945
|
+
exports.isPropertyWithIdentifierKey = isPropertyWithIdentifierKey;
|
|
946
|
+
exports.isRegExpLiteral = isRegExpLiteral;
|
|
947
|
+
exports.isStringLiteral = isStringLiteral;
|
|
948
|
+
exports.isTypeDeclaration = isTypeDeclaration;
|
|
949
|
+
exports.isUnstableAssignmentPattern = isUnstableAssignmentPattern;
|
|
950
|
+
exports.readableNodeType = readableNodeType;
|
|
951
|
+
exports.resolveDefinitionInit = resolveDefinitionInit;
|
|
952
|
+
exports.traverseUp = traverseUp;
|
|
953
|
+
exports.traverseUpGuard = traverseUpGuard;
|
|
954
|
+
exports.unsafeIsArrayFromCall = unsafeIsArrayFromCall;
|
|
955
|
+
exports.unsafeIsMapCall = unsafeIsMapCall;
|
|
956
|
+
exports.unsafeIsStringCall = unsafeIsStringCall;
|
|
957
|
+
exports.unsafeIsToStringCall = unsafeIsToStringCall;
|
|
958
|
+
exports.unstableAssignmentPatternTypes = unstableAssignmentPatternTypes;
|