Gathering detailed insights and metrics for @codemirror/lang-javascript
Gathering detailed insights and metrics for @codemirror/lang-javascript
Gathering detailed insights and metrics for @codemirror/lang-javascript
Gathering detailed insights and metrics for @codemirror/lang-javascript
JavaScript language support for the CodeMirror code editor
npm install @codemirror/lang-javascript
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
59 Stars
171 Commits
29 Forks
7 Watching
1 Branches
10 Contributors
Updated on 27 Nov 2024
Minified
Minified + Gzipped
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
0.5%
134,024
Compared to previous day
Last week
8.5%
779,508
Compared to previous week
Last month
8.1%
3,164,780
Compared to previous month
Last year
81.7%
28,837,315
Compared to previous year
[ WEBSITE | ISSUES | FORUM | CHANGELOG ]
This package implements JavaScript language support for the CodeMirror code editor.
The project page has more information, a number of examples and the documentation.
This code is released under an MIT license.
We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.
javascript(config?: {jsx?: boolean, typescript?: boolean} = {}) → LanguageSupport
JavaScript support. Includes snippet and local variable completion.
javascriptLanguage: LRLanguage
A language provider based on the Lezer JavaScript parser, extended with highlighting and indentation information.
typescriptLanguage: LRLanguage
A language provider for TypeScript.
jsxLanguage: LRLanguage
Language provider for JSX.
tsxLanguage: LRLanguage
Language provider for JSX + TypeScript.
autoCloseTags: Extension
Extension that will automatically insert JSX close tags when a >
or
/
is typed.
snippets: readonly Completion[]
A collection of JavaScript-related snippets.
typescriptSnippets: Completion[]
A collection of snippet completions for TypeScript. Includes the JavaScript snippets.
localCompletionSource(context: CompletionContext) → CompletionResult | null
Completion source that looks up locally defined names in JavaScript code.
completionPath(context: CompletionContext) → {path: readonly string[], name: string} | null
Helper function for defining JavaScript completion sources. It
returns the completable name and object path for a completion
context, or null if no name/property completion should happen at
that position. For example, when completing after a.b.c
it will
return {path: ["a", "b"], name: "c"}
. When completing after x
it will return {path: [], name: "x"}
. When not in a property or
name, it will return null if context.explicit
is false, and
{path: [], name: ""}
otherwise.
scopeCompletionSource(scope: any) → CompletionSource
Defines a completion source that
completes from the given scope object (for example globalThis
).
Will enter properties of the object when completing properties on
a directly-named path.
esLint(eslint: any, config?: any) → fn(view: EditorView) → Diagnostic[]
Connects an ESLint linter to CodeMirror's
lint integration. eslint
should be an instance of the
Linter
class, and config
an optional ESLint configuration. The return
value of this function can be passed to linter
to create a JavaScript linting extension.
Note that ESLint targets node, and is tricky to run in the browser. The eslint-linter-browserify package may help with that (see example).
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
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