Gathering detailed insights and metrics for @daotl/typescript-eslint-scope-manager
Gathering detailed insights and metrics for @daotl/typescript-eslint-scope-manager
npm install @daotl/typescript-eslint-scope-manager
Typescript
Module System
Min. Node Version
Node Version
NPM Version
76.7
Supply Chain
99.1
Quality
77.3
Maintenance
100
Vulnerability
100
License
TypeScript (88.51%)
MDX (7.76%)
JavaScript (3.21%)
CSS (0.48%)
Vue (0.04%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
288
Last Day
1
Last Week
3
Last Month
13
Last Year
68
MIT License
15,521 Stars
5,808 Commits
2,772 Forks
91 Watchers
23 Branches
704 Contributors
Updated on Feb 20, 2025
Minified
Minified + Gzipped
Latest Version
5.40.0
Package Id
@daotl/typescript-eslint-scope-manager@5.40.0
Unpacked Size
563.29 kB
Size
93.85 kB
File Count
547
NPM Version
8.19.1
Node Version
18.9.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
50%
3
Compared to previous week
Last Month
160%
13
Compared to previous month
Last Year
-39.8%
68
Compared to previous year
This is a fork of eslint-scope
, enhanced to support TypeScript functionality.
You can view the original license for the code here.
This package is consumed automatically by @typescript-eslint/parser
.
You probably don't want to use it directly.
You can find our Getting Started docs here
1$ yarn add -D typescript @typescript-eslint/scope-manager 2$ npm i --save-dev typescript @typescript-eslint/scope-manager
analyze(tree, options)
Analyses a given AST and returns the resulting ScopeManager
.
1interface AnalyzeOptions { 2 /** 3 * Known visitor keys. 4 */ 5 childVisitorKeys?: Record<string, string[]> | null; 6 7 /** 8 * Which ECMAScript version is considered. 9 * Defaults to `2018`. 10 * `'latest'` is converted to 1e8 at parser. 11 */ 12 ecmaVersion?: EcmaVersion | 1e8; 13 14 /** 15 * Whether the whole script is executed under node.js environment. 16 * When enabled, the scope manager adds a function scope immediately following the global scope. 17 * Defaults to `false`. 18 */ 19 globalReturn?: boolean; 20 21 /** 22 * Implied strict mode (if ecmaVersion >= 5). 23 * Defaults to `false`. 24 */ 25 impliedStrict?: boolean; 26 27 /** 28 * The identifier that's used for JSX Element creation (after transpilation). 29 * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement"). 30 * Defaults to `"React"`. 31 */ 32 jsxPragma?: string; 33 34 /** 35 * The identifier that's used for JSX fragment elements (after transpilation). 36 * If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment). 37 * This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment"). 38 * Defaults to `null`. 39 */ 40 jsxFragmentName?: string | null; 41 42 /** 43 * The lib used by the project. 44 * This automatically defines a type variable for any types provided by the configured TS libs. 45 * For more information, see https://www.typescriptlang.org/tsconfig#lib 46 * 47 * Defaults to the lib for the provided `ecmaVersion`. 48 */ 49 lib?: Lib[]; 50 51 /** 52 * The source type of the script. 53 */ 54 sourceType?: 'script' | 'module'; 55 56 /** 57 * Emit design-type metadata for decorated declarations in source. 58 * Defaults to `false`. 59 */ 60 emitDecoratorMetadata?: boolean; 61}
Example usage:
1import { analyze } from '@typescript-eslint/scope-manager'; 2import { parse } from '@typescript-eslint/typescript-estree'; 3 4const code = `const hello: string = 'world';`; 5const ast = parse(code, { 6 // note that scope-manager requires ranges on the AST 7 range: true, 8}); 9const scope = analyze(ast, { 10 ecmaVersion: 2020, 11 sourceType: 'module', 12});
No vulnerabilities found.
Reason
30 commit(s) and 27 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 16/20 approved changesets -- score normalized to 8
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More