Text of codeql.github.com › codeql-query-help › javascript › js-unknown-directive as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Unknown directive — CodeQL query help documentation

CodeQL query help documentation » CodeQL query help for JavaScript and TypeScript » Unknown directive ¶ ID: js/unknown-directive Kind: problem Security severity: Severity: warning Precision: high Tags: - quality - reliability - correctness Query suites: - javascript-code-quality.qls - javascript-security-and-quality.qls Click to see the query in the CodeQL repository If a directive is accidentally misspelled, it will have no effect.

Recommendation ¶ Correct the misspelling. Example ¶ The following code snippet shows a function that contains a "usestrict" directive. Most likely, the programmer intended this to be a "use strict" directive, but due to the typo, the function will not execute in strict mode. function f () { "usestrict" ; ... } Correct the misspelling by replacing "usestrict" with "use strict" . References ¶ Mozilla Developer Network: “use strict” asm.js: “use asm” © GitHub, Inc.

Terms Privacy