Developer Mise à jour de l'outil il y a 2 jours

JavaScript (JS) Hint and Lint

JavaScript Hint and Lint is a browser-based editor that flags syntax errors and type hints as you type. Paste a script, load a public .js URL, or start from an empty buffer, and the editor shows diagnostics in the gutter and a summary bar.

It uses the Monaco editor's built-in JavaScript and TypeScript language service. That gives you bracket matching, syntax checking and some type inference without running the code. It is not a full ESLint setup, and it does not execute the script.

The editor runs locally. Code you paste stays in the page; only a URL you explicitly load is fetched from its host.

JS Lint Find Errors Code Hint Validate Script

Utilisation JavaScript (JS) Hint and Lint

Conseils et vérification syntaxique JavaScript

Saisissez du code, obtenez des suggestions et visualisez les problèmes de lint en temps réel dans Monaco Editor.

Monaco Editor
Chargez le code dans l'éditeur à partir d'une URL, puis examinez en temps réel les suggestions et les problèmes de lint.

Rédacteur en chef

Language: JAVASCRIPT Lint: idle
No code yet.
Input: 0 chars
Terminé
Lien vers l'outil
Copié dans le presse-papiers.
Aidez-nous à améliorer cet outil
33
Temps passé
31
Nombre total d'utilisateurs
5+ années
Servi
Dernière révision en il y a 2 semaines. Les chiffres d'utilisation sont mis à jour lors d'audits périodiques. (Rapports depuis 21 Feb 2022)
Signaler une incohérence

Lire le contenu

Découvrez comment fonctionne cet outil et dans quelles circonstances l'utiliser.

What the tool does

The page presents a Monaco editor configured for JavaScript, with an ES2021 target and browser libraries. As you type, a debounced check asks the language worker for diagnostics. Errors and warnings appear in the editor gutter, and a badge reports a clean file or a count of problems. A summary line shows the first message so you do not have to hunt for the marker.

The toolbar includes a URL field, Paste and Load buttons, a Clear action and a character counter. Loading a URL fetches the file as text and places it in the editor. There is no Run button, because the tool is a checker rather than a JavaScript console.

Monaco is the same editor component used by many code editors, but the diagnostics here come from its default language service. They are useful for catching syntax mistakes, unbalanced brackets and obvious type mismatches. They are not a substitute for a project linter with your own rules and plugins.

How to lint a script

  1. Paste code into the editor, or enter a public .js URL and click Load.
  2. Wait for the status badge to change from checking to clean or a problem count.
  3. Click a marker in the gutter to read the message and the line.
  4. Fix the code and watch the diagnostics update after a short delay.
  5. Use Clear to empty the editor before starting another file.

The check is debounced, so it may take a moment after the last keystroke. If the badge says the service is unavailable, the editor or its worker may not have loaded; reload the page and try again.

Loading a file from a URL

The URL loader uses a direct browser fetch. The server hosting the file must allow cross-origin requests. A public CDN or a raw file host often does, while many application servers do not. If the fetch is blocked, the page reports that it could not load the URL; that is a CORS restriction, not a problem with the JavaScript itself.

The loader does not follow a private server path, log in to a repository or read a local file by path. Use the Paste button or your clipboard for code that is not publicly reachable. The URL field is a convenience, not a project browser.

What the diagnostics cover

The language service understands JavaScript syntax, common browser APIs and the ES2021 library. It can flag a missing parenthesis, an undeclared variable in some configurations, a property that does not exist on a known type, and a function called with the wrong number of arguments. It can also infer types from assignments and JSDoc comments.

It does not know your bundler aliases, your framework's global helpers or your project's custom types unless they are declared in the file. Imports are not resolved against node_modules, so an import path may be underlined even when the package is installed. That is expected in a standalone editor.

It does not enforce style rules such as indentation, quote marks, semicolons or naming conventions. It also does not run security rules, accessibility rules or framework-specific lint plugins. For those, use ESLint or your project's own toolchain.

What it does not execute

Nothing in the editor is run. A syntax-valid script that calls a network API, changes the DOM or loops forever will not do any of those things here. That makes the page safe for inspecting unfamiliar code, but it also means the tool cannot tell you whether the code behaves correctly at runtime.

If you need to test behaviour, copy the code into a sandboxed environment with the right dependencies. A linter and a runtime are different tools. Passing the checker only means the code is syntactically plausible, not that it is correct or secure.

Practical uses

  • Quick syntax check: paste a snippet before committing or sharing it.
  • Learning: see how the language service reacts to a misplaced brace or a wrong argument.
  • Code review: inspect a public file without cloning the repository.
  • Debugging a copy/paste error: find the line where an editor lost a bracket.
  • Teaching: demonstrate the difference between a syntax error and a runtime bug.
  • Pre-flight check: catch obvious problems before running a larger test suite.

Limits and privacy

The editor is limited by the browser's memory and the Monaco worker. Very large files can be slow to load and check. There is no file upload, no project folder and no persistent history; refreshing the page clears the buffer.

Pasted code stays in the browser and is not sent to Newisty. A URL you load is requested directly from its host, which may log the request. Do not load a private URL that requires a session cookie; the fetch will not have your credentials unless the host explicitly allows them.

If the editor fails to load, check whether a content blocker is preventing the Monaco assets. The tool has no server-side fallback, so a blocked editor means no diagnostics.

Reading Monaco diagnostics

Monaco reports three levels: errors, warnings and hints. An error usually means the parser cannot understand the code. A warning may indicate an unused variable, an unreachable branch or a type mismatch that is legal JavaScript but suspicious. A hint is a lighter suggestion, often about a missing type or a deprecated API.

The gutter marker points to the line, and the message explains the problem. Do not assume every marker is a real bug. A global injected by a script tag, a framework macro or a build-time replacement can be flagged because the editor cannot see the surrounding project. Read the message, then decide whether it applies to your environment.

The summary bar shows the first message only. Open the Problems panel or click each marker to see the full list. Fix errors first, then warnings. A single missing brace can produce a cascade of misleading messages further down the file.

Using the linter in a review

For a quick review, paste the changed function rather than the whole bundle. The editor is easier to read at function scale, and the diagnostics are less likely to be dominated by unrelated project globals. If the code depends on imports, add a short comment or a JSDoc type so the checker understands the shape.

Do not treat a clean badge as a security review. The linter does not know whether a value is user-controlled, whether a URL is safe or whether a secret is hard-coded. Pair the syntax check with a manual review and your project's security tooling.

Use the character counter to catch a truncated paste. If the count is much lower than the source file, the clipboard may have cut off the end.

Frequently Asked Questions

FAQ

Des réponses succinctes aux questions que se posent les utilisateurs avant de se fier au résultat.

No. It only parses and checks the code in the editor. Nothing is executed, so network calls and DOM changes do not happen.

No. It uses Monaco's built-in JavaScript language service for syntax and type hints. It does not load your ESLint config, plugins or style rules.

The host may not allow cross-origin requests. The loader uses a direct browser fetch, so a CORS error blocks the file even if it is publicly reachable in a browser tab.

Only what is declared in the file. Imports are not resolved against node_modules, and framework globals may be flagged unless you provide types or declarations.

No. Pasted code stays in the browser. Only a URL you explicitly load is requested from its host.

The editor is configured for JavaScript with checkJs enabled. It offers some type inference, but it is not a full TypeScript project checker.

Commentaires (0)

Pour les discussions entre utilisateurs, les cas particuliers et les conseils complémentaires.
Laisser un commentaire
Votre commentaire sera visible par tous après sa publication.
Aucun commentaire pour l'instant. Soyez le premier à laisser un commentaire !
Faites-le-nous savoir !
Signaler un problème avec cet outil

Décrivez le problème que vous avez rencontré afin que nous puissions l'examiner et améliorer l'outil.

Ce qui aide le plus
Veuillez indiquer la saisie effectuée, le résultat attendu, le résultat obtenu, le navigateur ou l'appareil utilisé, ainsi qu'une capture d'écran si cela peut être utile.
Le bouton « Capture d'écran » permet de capturer la page affichée dans le navigateur et d'ajouter l'image générée à ce formulaire.
Capture d'écran en pleine page
Capturé dans votre navigateur avec newisty.
Aucune capture d'écran n'a encore été réalisée.
Outil Rapport