Registry / testing / pyjslint

pyjslint

JSON →
library0.3.4pypiunverified

pyjslint is a Python wrapper for JSLint, designed to integrate JavaScript linting into Python projects. It bundles an old version of JSLint and appears to be unmaintained. The current version is 0.3.4, released in 2013, indicating an abandoned project.

pip install pyjslint
INSTALL
IMPORT
SIG · PYJSLINT
P
pyjslint
testingenv0.3.4
Install
2.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PyJsLint
from pyjslint.pyjslint import PyJsLint
from pyjslint import PyJsLint
The `PyJsLint` class is located within a submodule named `pyjslint` inside the top-level package, requiring the double `pyjslint` in the import path.

This quickstart demonstrates how to initialize `PyJsLint` and use its `lint()` method to analyze a string of JavaScript code. The method returns a list of error dictionaries or `None` if no errors are found.

from pyjslint.pyjslint import PyJsLint # Example JavaScript code to lint code_to_lint = """ var a = 1; var b = 2; var c = a + b // Missing semicolon, will be flagged """ # Initialize the linter linter = PyJsLint() # Lint the code result = linter.lint(code_to_lint) if result: print("Linting errors found:") for error in result: print(f" Line {error.get('line')}, Character {error.get('character')}: {error.get('reason')}") else: print("No linting errors.")
Debug
Known issues
breakingProject is abandoned and unmaintained since 2013. Expect no new features, bug fixes, or compatibility updates.
fix
This library is not suitable for modern development. Consider using actively maintained JavaScript linters like ESLint (run via subprocess or a dedicated Python wrapper if available) or other static analysis tools for JavaScript.
affects: All versions
gotchaThe bundled JSLint version is severely outdated (from 2013 or earlier). It will not understand modern JavaScript syntax (ES6+, ES2015+) and its linting rules are not configurable to modern standards.
fix
There is no direct fix within this library. For linting modern JavaScript, you must use an external, up-to-date linter like ESLint.
affects: All versions
gotchaPotential Python 3 compatibility issues. The package was released when Python 2 was prevalent, and it has `requires_python: None`.
fix
The library was likely written for Python 2.x. While it might run on some Python 3 environments, expect potential `SyntaxError` (e.g., `print` statement vs. function), `TypeError` (e.g., string handling), or other runtime errors. Thorough testing on your target Python 3 version is crucial, but migration to a modern tool is highly recommended.
affects: All Python 3.x versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyjslint.pyjslint'
Incorrect import path used for the `PyJsLint` class.
fix
The class is nested within a submodule. Change `from pyjslint import PyJsLint` to `from pyjslint.pyjslint import PyJsLint`.
SyntaxError: Missing parentheses in call to 'print'
This error typically occurs when running Python 2 code on a Python 3 interpreter, as `print` became a function in Python 3.
fix
This specific `SyntaxError` (and others) indicate fundamental incompatibility with Python 3. The library is unmaintained and not updated for Python 3. There is no simple fix other than to abandon `pyjslint` for a modern alternative or run it in a Python 2 environment (not recommended for new projects).
AttributeError: 'NoneType' object has no attribute 'get'
Attempting to access attributes on the result of `linter.lint()` without checking if it returned `None`.
fix
The `lint()` method returns `None` if no errors are found, or a list of dictionaries if errors are present. Always check for `None` before attempting to iterate or access elements: `result = linter.lint(code); if result: for error in result: ...`.
Upgrade
Version history
0.3.4latest on PyPI · released Mar 24, 2013
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources

No resource links recorded.

pyjslint — pip install pyjslint · libregistry