;
25 | }
26 | ```
27 |
28 | Introduced in quick-lint-js version 2.0.0.
29 |
--------------------------------------------------------------------------------
/docs/errors/E0186.md:
--------------------------------------------------------------------------------
1 | # E0186: missing '...' in JSX attribute spread
2 |
3 | In a JSX tag, you can use an object as a source of attributes. It is a syntax
4 | error to omit the `...` before the object:
5 |
6 | ```javascript-jsx
7 | function Link({text, ...props}) {
8 | return {text};
9 | }
10 | ```
11 |
12 | To fix this error, write `...` after `{` in the spread attribute:
13 |
14 | ```javascript-jsx
15 | function Link({text, ...props}) {
16 | return {text};
17 | }
18 | ```
19 |
20 | Introduced in quick-lint-js version 2.0.0.
21 |
--------------------------------------------------------------------------------
/docs/errors/E0195.md:
--------------------------------------------------------------------------------
1 | # E0195: missing parentheses around operand of `typeof`; `typeof` operator cannot be used before `**` without parentheses
2 |
3 | ```config-for-examples
4 | {
5 | "globals": {
6 | "assert": true
7 | }
8 | }
9 | ```
10 |
11 | JavaScript does not allow unary operators left of a `**` expression. It is a
12 | syntax error to write `delete`, `typeof`, or `void` before a `**` expression:
13 |
14 | ```javascript
15 | assert(typeof 10 ** 7 === "number");
16 | ```
17 |
18 | To fix this error, write parentheses around the `**` expression:
19 |
20 | ```javascript
21 | assert(typeof (10 ** 7) === "number");
22 | ```
23 |
24 | Introduced in quick-lint-js version 2.0.0.
25 |
--------------------------------------------------------------------------------
/docs/errors/E0197.md:
--------------------------------------------------------------------------------
1 | # E0197: '“' is not allowed for strings; use " instead
2 |
3 | JavaScript string literals start with either `"` or `'` (straight quotes). It is
4 | a syntax error to use smart quotes instead of straight quotes to write a string
5 | literal:
6 |
7 | ```javascript
8 | let name = “Alice”;
9 | console.log(‘hello, ’ + name);
10 | ```
11 |
12 | To fix this error, replace `‘` and `’` with `'`, and replace `“` and `”` with
13 | `"`:
14 |
15 | ```javascript
16 | let name = "Alice";
17 | console.log('hello, ' + name);
18 | ```
19 |
20 | Introduced in quick-lint-js version 2.0.0.
21 |
--------------------------------------------------------------------------------
/docs/errors/E0199.md:
--------------------------------------------------------------------------------
1 | # E0199: unclosed class; expected '}' by end of file
2 |
3 | Every `{` introducing a class block must have a matching `}` ending a class
4 | block. It is a syntax error to omit the `}`:
5 |
6 | ```javascript
7 | class Banana {
8 | peel() {
9 | throw new Error("Bananas can't peel themselves!");
10 | }
11 | ```
12 |
13 | To fix this error, write a matching `}`:
14 |
15 | ```javascript
16 | class Banana {
17 | peel() {
18 | throw new Error("Bananas can't peel themselves!");
19 | }
20 | }
21 | ```
22 |
23 | Introduced in quick-lint-js version 2.3.0.
24 |
--------------------------------------------------------------------------------
/docs/errors/E0202.md:
--------------------------------------------------------------------------------
1 | # E0202: missing '=' after variable
2 |
3 | The following code has a missing equal '=' after variable name.
4 |
5 | ```javascript
6 | let x new Array();
7 | ```
8 |
9 | To fix this error, add '=' after variable `x`.
10 |
11 | ```javascript
12 | let x = new Array();
13 | ```
14 |
15 | Introduced in quick-lint-js version 0.3.0.
16 |
--------------------------------------------------------------------------------
/docs/errors/E0203.md:
--------------------------------------------------------------------------------
1 | # E0203: depth limit exceeded
2 |
3 |
4 |
5 | JavaScript code can contain nested functions, arrays, objects, classes, etc.
6 | quick-lint-js only supports nesting up to a limit. Most code shouldn't hit this
7 | limit. If you do hit this limit, refactor your code to reduce nesting.
8 |
9 | Introduced in quick-lint-js version 0.3.0.
10 |
--------------------------------------------------------------------------------
/docs/errors/E0204.md:
--------------------------------------------------------------------------------
1 | # E0204: error generator function star belongs after keyword function
2 |
3 | The following code has misplaced '*'.
4 |
5 | ```javascript
6 | let x = *function(y) { yield y; };
7 | ```
8 |
9 | To fix this error, move the '*' after the keyword function.
10 |
11 | ```javascript
12 | let x = function*(y) { yield y; };
13 | ```
14 |
15 | Introduced in quick-lint-js version 0.3.0.
16 |
--------------------------------------------------------------------------------
/docs/errors/E0205.md:
--------------------------------------------------------------------------------
1 | # E0205: error missing initializer in const declaration
2 |
3 | The following code is missing initialization for const
4 | variable declaration.
5 |
6 | ```javascript
7 | const x;
8 | ```
9 |
10 | To fix this error, initialize the variable x with some
11 | value.
12 |
13 | ```javascript
14 | const x = 10;
15 | ```
16 |
17 | Another way to fix this error, change const to let.
18 |
19 | ```javascript
20 | let x;
21 | ```
22 |
23 | Introduced in quick-lint-js version 0.3.0.
24 |
--------------------------------------------------------------------------------
/docs/errors/E0206.md:
--------------------------------------------------------------------------------
1 | # E0206: label named 'await' not allowed in async function
2 |
3 | The following code is using label named 'await' in an async
4 | function.
5 |
6 | ```javascript
7 | async function f() {
8 | await:
9 | }
10 | ```
11 |
12 | To fix this error, rename label await to something else.
13 |
14 | ```javascript
15 | async function f() {
16 | label:
17 | }
18 | ```
19 |
20 | Another way to fix this error, make 'f' a normal function
21 | rather than an async function.
22 |
23 | ```javascript
24 | function f() {
25 | await:
26 | }
27 | ```
28 |
29 | Introduced in quick-lint-js version 0.3.0.
30 |
--------------------------------------------------------------------------------
/docs/errors/E0211.md:
--------------------------------------------------------------------------------
1 | # E0211: missing parentheses around self-invoked function
2 |
3 | Invoking an arrow function immediately without parentheses is a syntax error.
4 | For example:
5 |
6 | ```
7 | () => {
8 | console.log('hi');
9 | }()
10 | ```
11 |
12 | To fix this error, add parentheses around the entire function definition, before
13 | the invocation:
14 |
15 | ```
16 | (() => {
17 | console.log('hi');
18 | })()
19 | ```
20 |
21 | Introduced in quick-lint-js version 2.4.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0215.md:
--------------------------------------------------------------------------------
1 | # E0215: unclosed interface; expected '}' by end of file
2 |
3 | Every `{` introducing an interface block must have a matching `}` ending an
4 | interface block. It is a syntax error to omit the `}`:
5 |
6 | ```typescript
7 | export interface API {
8 | fetch(uri, params);
9 | ```
10 |
11 | To fix this error, write a matching `}`:
12 |
13 | ```typescript
14 | export interface API {
15 | fetch(uri, params);
16 | }
17 | ```
18 |
19 | Introduced in quick-lint-js version 2.6.0.
20 |
--------------------------------------------------------------------------------
/docs/errors/E0225.md:
--------------------------------------------------------------------------------
1 | # E0225: index signatures require a value type
2 |
3 | A TypeScript index signature has a key type and a value type. It is a syntax
4 | error to omit the value type:
5 |
6 | ```typescript
7 | interface StringArray {
8 | readonly [index: number];
9 | }
10 |
11 | interface StringDictionary {
12 | [k: string];
13 | }
14 | ```
15 |
16 | To fix this error, write `:` then the type of the value:
17 |
18 | ```typescript
19 | interface StringArray {
20 | readonly [index: number]: string;
21 | }
22 |
23 | interface StringDictionary {
24 | [k: string]: any;
25 | }
26 | ```
27 |
28 | Introduced in quick-lint-js version 2.6.0.
29 |
--------------------------------------------------------------------------------
/docs/errors/E0226.md:
--------------------------------------------------------------------------------
1 | # E0226: missing semicolon after index signature
2 |
3 | TypeScript index signatures in interfaces must end with either a semicolon
4 | (`;`) or a newline. It is a syntax error to omit the semicolon and write
5 | something on the same line after the index signature:
6 |
7 | ```typescript
8 | interface APIData {
9 | [key: string]: number | string void;
10 | }
11 | ```
12 |
13 | To fix this error, write a correct type for the index signature:
14 |
15 | ```typescript
16 | interface APIData {
17 | [key: string]: number | string | void;
18 | }
19 | ```
20 |
21 | Introduced in quick-lint-js version 2.6.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0227.md:
--------------------------------------------------------------------------------
1 | # E0227: index signature must be a field, not a method
2 |
3 | A TypeScript index signature describes a property. TypeScript only supports the
4 | field syntax for index signatures. It is a syntax error to write an index
5 | signature using method syntax:
6 |
7 | ```typescript
8 | interface EventTable {
9 | [eventName: string](event: Event): void;
10 | }
11 | ```
12 |
13 | To fix this error, write the value type using function type syntax instead:
14 |
15 | ```typescript
16 | interface EventTable {
17 | [eventName: string]: (event: Event) => void;
18 | }
19 | ```
20 |
21 | Introduced in quick-lint-js version 2.6.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0228.md:
--------------------------------------------------------------------------------
1 | # E0228: TypeScript optional properties are not allowed in JavaScript code
2 |
3 | `?` on class properties is a TypeScript feature. It is a syntax error to write
4 | `?` on a property in JavaScript code:
5 |
6 | ```javascript
7 | class Entity {
8 | parent? = null;
9 | }
10 | ```
11 |
12 | To fix this error, erase the `?`:
13 |
14 | ```javascript
15 | class Entity {
16 | parent = null;
17 | }
18 | ```
19 |
20 | Alternatively, rename your file to have a `.ts` or `.tsx` suffix
21 |
22 | Introduced in quick-lint-js version 2.6.0.
23 |
--------------------------------------------------------------------------------
/docs/errors/E0232.md:
--------------------------------------------------------------------------------
1 | # E0232: 'readonly static' is not allowed; write 'static readonly' instead
2 |
3 | The order of property specifiers like `readonly` and `static` matters. The
4 | correct order is:
5 |
6 | 1. `static`
7 | 2. `readonly` (TypeScript only)
8 |
9 | It is a syntax error to write specifiers in the wrong order:
10 |
11 | ```typescript
12 | class Logger {
13 | readonly static instance = new Logger();
14 | }
15 | ```
16 |
17 | To fix this error, rearrange the specifiers:
18 |
19 | ```typescript
20 | class Logger {
21 | static readonly instance = new Logger();
22 | }
23 | ```
24 |
25 | Introduced in quick-lint-js version 2.6.0.
26 |
--------------------------------------------------------------------------------
/docs/errors/E0233.md:
--------------------------------------------------------------------------------
1 | # E0233: TypeScript generics are not allowed in JavaScript code
2 |
3 | It is a syntax error to write TypeScript generic parameters or arguments in
4 | JavaScript code:
5 |
6 | ```javascript
7 | class HashSet {
8 | // ...
9 | }
10 | ```
11 |
12 | To fix this error, rename your file to have a `.ts` or `.tsx` suffix.
13 |
14 | Alternatively, use JSDoc to write the generic parameters:
15 |
16 | ```javascript
17 | /**
18 | * @template Value
19 | */
20 | class HashSet {
21 | // ...
22 | }
23 | ```
24 |
25 | Introduced in quick-lint-js version 2.6.0.
26 |
--------------------------------------------------------------------------------
/docs/errors/E0235.md:
--------------------------------------------------------------------------------
1 | # E0235: missing quotes around module name
2 |
3 | Module names are strings. It is a syntax error to import a module without
4 | enclosing the module name in quotation marks:
5 |
6 | ```javascript
7 | import React from react;
8 | import { readFile } from fs;
9 | ```
10 |
11 | To fix this error, add quotation marks around the module's name:
12 |
13 | ```javascript
14 | import React from "react";
15 | import { readFile } from 'fs';
16 | ```
17 |
18 | Introduced in quick-lint-js version 2.6.0.
19 |
--------------------------------------------------------------------------------
/docs/errors/E0238.md:
--------------------------------------------------------------------------------
1 | # E0238: assignment-asserted fields are not supported in interfaces
2 |
3 | In TypeScript, `!` after a field name indicates a *definite assignment
4 | assertion*. These assertions only make sense for classes, not for interfaces. It
5 | is a syntax error to write a definite assignment assertion on an interface
6 | field:
7 |
8 | ```typescript
9 | interface Point2D {
10 | x!: number;
11 | y!: number;
12 | }
13 | ```
14 |
15 | To fix this error, remove the `!`:
16 |
17 | ```typescript
18 | interface Point2D {
19 | x: number;
20 | y: number;
21 | }
22 | ```
23 |
24 | Introduced in quick-lint-js version 2.6.0.
25 |
--------------------------------------------------------------------------------
/docs/errors/E0248.md:
--------------------------------------------------------------------------------
1 | # E0248: extra ',' is not allowed between enum members
2 |
3 | In a TypeScript enum, members are separated with commas. It is a syntax error to
4 | write more than one comma between enum members:
5 |
6 | ```typescript
7 | enum LogLevel {
8 | DEBUG,,
9 | ,
10 | WARNING,
11 | ERROR,
12 | }
13 | ```
14 |
15 | To fix this error, remove the extra commas:
16 |
17 | ```typescript
18 | enum LogLevel {
19 | DEBUG,
20 | WARNING,
21 | ERROR,
22 | }
23 | ```
24 |
25 | Introduced in quick-lint-js version 2.7.0.
26 |
--------------------------------------------------------------------------------
/docs/errors/E0253.md:
--------------------------------------------------------------------------------
1 | # E0253: use ':' instead of '=' in object literals
2 |
3 | JavaScript object literals are key-value pairs. In an expression, it is a syntax
4 | error to write `=` instead of `:` between the key and the value in an object
5 | literal:
6 |
7 | ```javascript
8 | import fs from 'node:fs/promises';
9 | await fs.mkdir("build/temp", { recursive = true });
10 | ```
11 |
12 | To fix this error, replace `=` with `:`:
13 |
14 | ```javascript
15 | import fs from 'node:fs/promises';
16 | await fs.mkdir("build/temp", { recursive: true });
17 | ```
18 |
19 | Introduced in quick-lint-js version 2.7.0.
20 |
--------------------------------------------------------------------------------
/docs/errors/E0257.md:
--------------------------------------------------------------------------------
1 | # E0257: missing ',', ';', or newline between object type entries
2 |
3 | In TypeScript, properties in object types are separated by commas, semicolons,
4 | or newlines. It is a syntax error to write two properties without one of those
5 | separators in between:
6 |
7 | ```typescript
8 | type Status = { ok: boolean error?: string };
9 | ```
10 |
11 | To fix this error, add a separator between the two properties:
12 |
13 | ```typescript
14 | type Status = { ok: boolean, error?: string };
15 | ```
16 |
17 | Introduced in quick-lint-js version 2.7.0.
18 |
--------------------------------------------------------------------------------
/docs/errors/E0258.md:
--------------------------------------------------------------------------------
1 | # E0258: missing type between '|' and '|' (or '&' and '&')
2 |
3 | An extra `|` or `&` is allowed at the beginning of a TypeScript type. However,
4 | it is a syntax error to write an extra `|` or `&` in the middle of a TypeScript
5 | type:
6 |
7 | ```typescript
8 | type Primitive =
9 | | string
10 | | number
11 | | bigint
12 | | boolean
13 | | null |
14 | | undefined
15 | ```
16 |
17 | To fix this error, remove the extra `|` or `&`:
18 |
19 | ```typescript
20 | type Primitive =
21 | | string
22 | | number
23 | | bigint
24 | | boolean
25 | | null
26 | | undefined
27 | ```
28 |
29 | Introduced in quick-lint-js version 2.7.0.
30 |
--------------------------------------------------------------------------------
/docs/errors/E0259.md:
--------------------------------------------------------------------------------
1 | # E0259: '.' is not allowed after generic arguments
2 |
3 | In TypeScript types, you can look up a property of a generic type using
4 | `Type["name"]` syntax. It is a syntax error to instead use `.` to look up a
5 | property of a generic type:
6 |
7 | ```typescript
8 | class Thing {
9 | static thong: number;
10 | }
11 | type ThingThong
12 | = typeof Thing.thong;
13 | ```
14 |
15 | To fix this error, write `["name"]` instead of `.name`:
16 |
17 | ```typescript
18 | class Thing {
19 | static thong: number;
20 | }
21 | type ThingThong
22 | = typeof Thing["thong"];
23 | ```
24 |
25 | Introduced in quick-lint-js version 2.7.0.
26 |
--------------------------------------------------------------------------------
/docs/errors/E0262.md:
--------------------------------------------------------------------------------
1 | # E0262: leading commas are not allowed in generic parameter lists
2 |
3 | In a TypeScript generic class, function, or type alias, the generic parameter
4 | list is a comma-separated list of variables surrounded by `<` and `>`. It is a
5 | syntax error for the parameter list to start with an extra comma:
6 |
7 | ```typescript
8 | class MagicMap<
9 | , Key
10 | , Value
11 | > {
12 | // ...
13 | }
14 | ```
15 |
16 | To fix this error, remove the leading `,`:
17 |
18 | ```typescript
19 | class MagicMap
20 | < Key
21 | , Value
22 | > {
23 | // ...
24 | }
25 | ```
26 |
27 | Introduced in quick-lint-js version 2.8.0.
28 |
--------------------------------------------------------------------------------
/docs/errors/E0268.md:
--------------------------------------------------------------------------------
1 | # E0268: TypeScript type imports cannot import both default and named exports
2 |
3 | In TypeScript, `import type` can be used to import types from another module. It
4 | is a syntax error to use `import type` to import both a default export (outside
5 | `{` and `}`) and some named exports (inside `{` and `}`):
6 |
7 | ```typescript
8 | import type Styles, {StyleMap} from "./Styles";
9 | ```
10 |
11 | To fix this error, split the import into two:
12 |
13 | ```typescript
14 | import type Styles from "./Styles";
15 | import type {StyleMap} from "./Styles";
16 | ```
17 |
18 | Introduced in quick-lint-js version 2.8.0.
19 |
--------------------------------------------------------------------------------
/docs/errors/E0270.md:
--------------------------------------------------------------------------------
1 | # E0270: TypeScript type imports are not allowed in JavaScript
2 |
3 | TypeScript supports importing types using `import type`. It is a syntax error to
4 | write `import type` in JavaScript code:
5 |
6 | ```javascript
7 | import React, {type FC} from "react";
8 | ```
9 |
10 | To fix this error, delete the imported type:
11 |
12 | ```javascript
13 | import React from "react";
14 | ```
15 |
16 | Introduced in quick-lint-js version 2.8.0.
17 |
--------------------------------------------------------------------------------
/docs/errors/E0271.md:
--------------------------------------------------------------------------------
1 | # E0271: TypeScript type imports are not allowed in JavaScript
2 |
3 |
4 |
5 | This error has been renamed to E0270.
6 |
7 | Introduced in quick-lint-js version 2.8.0.
8 |
--------------------------------------------------------------------------------
/docs/errors/E0273.md:
--------------------------------------------------------------------------------
1 | # E0273: TypeScript namespaces are not allowed in JavaScript
2 |
3 | TypeScript supports namespaces to describe objects. JavaScript does not support
4 | this syntax. It is a syntax error to use TypeScript's `namespace` keyword to
5 | create a namespace in JavaScript:
6 |
7 | ```javascript
8 | namespace goog {
9 | export class Chart {
10 | // ...
11 | }
12 | }
13 | ```
14 |
15 | To fix this error, create a variable with an object instead:
16 |
17 | ```javascript
18 | const goog = {};
19 |
20 | goog.Chart = class Chart {
21 | // ...
22 | };
23 | ```
24 |
25 | Introduced in quick-lint-js version 2.8.0.
26 |
--------------------------------------------------------------------------------
/docs/errors/E0274.md:
--------------------------------------------------------------------------------
1 | # E0274: TypeScript import aliases are not allowed in JavaScript
2 |
3 | TypeScript supports import alias using `import`. It is
4 | a syntax error to write such an alias in JavaScript code:
5 |
6 | ```javascript
7 | import m = require('mod');
8 | ```
9 |
10 | To fix this error, use `const` instead of `import`:
11 |
12 | ```javascript
13 | const m = require('mod');
14 | ```
15 |
16 | Introduced in quick-lint-js version 2.8.0.
17 |
--------------------------------------------------------------------------------
/docs/errors/E0275.md:
--------------------------------------------------------------------------------
1 | # E0275: newline is not allowed after 'interface'
2 |
3 | In TypeScript, the `interface` keyword must be followed by the interface's name.
4 | It is a syntax error to write a newline between `interface` and the following
5 | name:
6 |
7 | ```typescript
8 | interface
9 | HashMap {
10 | get(k: Key): Value;
11 | }
12 | ```
13 |
14 | To fix this error, put the interface's name on the same line as the `interface`
15 | keyword:
16 |
17 | ```typescript
18 | interface HashMap
19 | {
20 | get(k: Key): Value;
21 | }
22 | ```
23 |
24 | Introduced in quick-lint-js version 2.8.0.
25 |
--------------------------------------------------------------------------------
/docs/errors/E0276.md:
--------------------------------------------------------------------------------
1 | # E0276: newline is not allowed after 'namespace'
2 |
3 | In TypeScript, the `namespace` keyword must be followed by the namespace's name.
4 | It is a syntax error to write a newline between `namespace` and the following
5 | name:
6 |
7 | ```typescript
8 | namespace
9 | reallyLongNamespaceName {
10 | export class Error {}
11 | }
12 | ```
13 |
14 | To fix this error, put the namespace's name on the same line as the `namespace`
15 | keyword:
16 |
17 | ```typescript
18 | namespace reallyLongNamespaceName {
19 | export class Error {}
20 | }
21 | ```
22 |
23 | Introduced in quick-lint-js version 2.8.0.
24 |
--------------------------------------------------------------------------------
/docs/errors/E0277.md:
--------------------------------------------------------------------------------
1 | # E0277: newline is not allowed after 'type'
2 |
3 | In TypeScript, the `type` keyword must be followed by the type's name.
4 | It is a syntax error to write a newline between `type` and the following
5 | name:
6 |
7 | ```typescript
8 | export type
9 | ReallyLongTypeAliasName
10 | = number;
11 | ```
12 |
13 | To fix this error, put the type alias' name on the same line as the `type`
14 | keyword:
15 |
16 | ```typescript
17 | type ReallyLongTypeAliasName
18 | = number;
19 | ```
20 |
21 | Introduced in quick-lint-js version 2.8.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0279.md:
--------------------------------------------------------------------------------
1 | # E0279: TypeScript type exports are not allowed in JavaScript
2 |
3 |
4 |
5 | This error has been renamed to E0279.
6 |
7 | Introduced in quick-lint-js version 2.8.0.
8 |
--------------------------------------------------------------------------------
/docs/errors/E0282.md:
--------------------------------------------------------------------------------
1 | # E0282: use ':' instead of 'as' to type a function parameter
2 |
3 | The `as` operator is not allowed in function parameters. It is a syntax error to
4 | use `as` to annotate a parameter with a type:
5 |
6 | ```typescript
7 | function reversed(array as T[]): T[] {
8 | return [...array].reverse();
9 | }
10 | ```
11 |
12 | To fix this error, write `:` instead of `as`:
13 |
14 | ```typescript
15 | function reversed(array: T[]): T[] {
16 | return [...array].reverse();
17 | }
18 | ```
19 |
20 | Introduced in quick-lint-js version 2.8.0.
21 |
--------------------------------------------------------------------------------
/docs/errors/E0284.md:
--------------------------------------------------------------------------------
1 | # E0284: missing TypeScript type
2 |
3 | In TypeScript, you can annotate the type of a variable by writing `:` after its
4 | name in its declaration. It is a syntax error to omit the type after `:`:
5 |
6 | ```typescript
7 | function api(endpoint: ): Promise {
8 | // ...
9 | }
10 | ```
11 |
12 | To fix this error, write a type after the `:`:
13 |
14 | ```typescript
15 | function api(endpoint: string): Promise {
16 | // ...
17 | }
18 | ```
19 |
20 | Alternatively, remove the `:`:
21 |
22 | ```typescript
23 | function api(endpoint): Promise {
24 | // ...
25 | }
26 | ```
27 |
28 | Introduced in quick-lint-js version 2.9.0.
29 |
--------------------------------------------------------------------------------
/docs/errors/E0286.md:
--------------------------------------------------------------------------------
1 | # E0286: lower case letters compared with toUpperCase
2 |
3 | Comparing the result of a function named `toUpperCase` to a string literal with
4 | one or more lower case letters will always yield the same result.
5 |
6 | ```javascript
7 | let x = "BaNaNa";
8 |
9 | // always returns 'false'
10 | if (x.toUpperCase() === "banana") {
11 | }
12 |
13 | // always returns 'true'
14 | if (x.toUpperCase() !== "banana") {
15 | }
16 | ```
17 |
18 | Introduced in quick-lint-js version 2.9.0.
19 |
--------------------------------------------------------------------------------
/docs/errors/E0287.md:
--------------------------------------------------------------------------------
1 | # E0287: upper case letters compared with toLowerCase
2 |
3 | Comparing the result of a function named `toLowerCase` to a string literal with
4 | one or more upper case letters will always yield the same result.
5 |
6 | ```javascript
7 | let x = "BaNaNa";
8 |
9 | // always returns 'false'
10 | if (x.toLowerCase() === "BANANA") {
11 | }
12 |
13 | // always returns 'true'
14 | if (x.toLowerCase() !== "BANANA") {
15 | }
16 | ```
17 |
18 | Introduced in quick-lint-js version 2.9.0.
19 |
--------------------------------------------------------------------------------
/docs/errors/E0292.md:
--------------------------------------------------------------------------------
1 | # E0292: missing semicolon after interface method
2 |
3 | TypeScript methods in interfaces must end with either a semicolon (`;`) or a
4 | newline. It is a syntax error to omit the semicolon and write something on the
5 | same line after the method:
6 |
7 | ```typescript
8 | interface Container {
9 | getItem(key: string): number | string void;
10 | }
11 | ```
12 |
13 | To fix this error, write a correct type for the method:
14 |
15 | ```typescript
16 | interface Container {
17 | getItem(key: string): number | string | void;
18 | }
19 | ```
20 |
21 | Introduced in quick-lint-js version 2.10.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0300.md:
--------------------------------------------------------------------------------
1 | # E0300: newline is not allowed after 'abstract'
2 |
3 | In TypeScript, the `abstract` keyword can be used to mark a class as abstract.
4 | It is an error to put a line break between the `abstract` keyword and the
5 | `class` keyword:
6 |
7 | ```typescript
8 | export abstract
9 | class Logger {
10 | abstract log(message: string);
11 | }
12 | ```
13 |
14 | To fix this error, put `abstract` and `class` on the same line:
15 |
16 | ```typescript
17 | export abstract class Logger {
18 | abstract log(message: string);
19 | }
20 | ```
21 |
22 | Introduced in quick-lint-js version 2.10.0.
23 |
--------------------------------------------------------------------------------
/docs/errors/E0310.md:
--------------------------------------------------------------------------------
1 | # E0310: optional parameter cannot have both '?' and initializer; remove '?'
2 |
3 | In TypeScript, parameters can be explicitly marked as optional with `?`. It is a
4 | syntax error to write a default initializer for a parameter marked optional with
5 | `?`:
6 |
7 | ```typescript
8 | async function download(uri, options? = {}) {
9 | /* ... */
10 | }
11 | ```
12 |
13 | Parameters with default initializers are always optional. To fix this syntax
14 | error, remove the redundant `?`:
15 |
16 | ```typescript
17 | async function download(uri, options = {}) {
18 | /* ... */
19 | }
20 | ```
21 |
22 | Introduced in quick-lint-js version 2.10.0.
23 |
--------------------------------------------------------------------------------
/docs/errors/E0311.md:
--------------------------------------------------------------------------------
1 | # E0311: missing parentheses around parameter; TypeScript optional parameter requires parentheses
2 |
3 | In TypeScript, parameters can be explicitly marked as optional with `?`. It is a
4 | syntax error to write an arrow function with an optional parameter without
5 | parentheses around the parameter list:
6 |
7 | ```typescript
8 | const error = message? => {
9 | throw new Error(message);
10 | };
11 | ```
12 |
13 | To fix this error, write parentheses around the parameter list:
14 |
15 | ```typescript
16 | const error = (message?) => {
17 | throw new Error(message);
18 | };
19 | ```
20 |
21 | Introduced in quick-lint-js version 2.10.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0323.md:
--------------------------------------------------------------------------------
1 | # E0323: optional tuple elements cannot come after spread elements
2 |
3 | TypeScript tuple types can contain spread elements and optional elements.
4 | However, it is a syntax error to use both a spread element and an optional
5 | element in a single tuple type:
6 |
7 | ```typescript
8 | function foo(): [...number[], string?] {
9 | /* ... */
10 | }
11 | ```
12 |
13 | To fix this error, use a union type instead of an optional element:
14 |
15 | ```typescript
16 | function foo(): [...number[]]
17 | | [...number[], string] {
18 | /* ... */
19 | }
20 | ```
21 |
22 | Introduced in quick-lint-js version 2.10.0.
23 |
--------------------------------------------------------------------------------
/docs/errors/E0324.md:
--------------------------------------------------------------------------------
1 | # E0324: spread tuple elements cannot be optional
2 |
3 | ```config-for-examples
4 | {
5 | "globals": {
6 | "Options": true
7 | }
8 | }
9 | ```
10 |
11 | TypeScript tuple types can contain spread elements. By definition, a spread
12 | element is optional. It is a syntax error to write `?` to mark a spread element
13 | as optional:
14 |
15 | ```typescript
16 | function foo(...args: [...string[]?, Options]) {
17 | /* ... */
18 | }
19 | ```
20 |
21 | To fix this error, remove the `?`:
22 |
23 | ```typescript
24 | function foo(...args: [...string[], Options]) {
25 | /* ... */
26 | }
27 | ```
28 |
29 | Introduced in quick-lint-js version 2.10.0.
30 |
--------------------------------------------------------------------------------
/docs/errors/E0325.md:
--------------------------------------------------------------------------------
1 | # E0325: cannot delete variables in TypeScript
2 |
3 | In JavaScript, it is possible to use `delete` on a variable. In TypeScript,
4 | deleting a variable is an error:
5 |
6 | ```typescript
7 | let x = 3;
8 | delete x;
9 | console.log(x);
10 | ```
11 |
12 | To fix this error, remove the `delete` statement:
13 |
14 | ```typescript
15 | let x = 3;
16 | console.log(x);
17 | ```
18 |
19 | See also: E0086
20 |
21 | Introduced in quick-lint-js version 2.10.0.
22 |
--------------------------------------------------------------------------------
/docs/errors/E0326.md:
--------------------------------------------------------------------------------
1 | # E0326: 'async export' is not allowed; write 'export async' instead
2 |
3 | Functions can be marked using the `async` keyword like `async function f() {`.
4 | It is a syntax error to write the `async` keyword after the `function` keyword:
5 |
6 | ```javascript
7 | async export function f() {
8 | return 0;
9 | }
10 | ```
11 |
12 | To fix this error, replace `async export` with `export async`:
13 |
14 | ```javascript
15 | export async function f() {
16 | return 0;
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/docs/errors/E0327.md:
--------------------------------------------------------------------------------
1 | # E0327: 'function async' is not allowed; write 'async function' instead
2 |
3 | Functions can be marked with the `async` keyword. It is a syntax error to write
4 | the `async keyword after the `function` keyword:
5 |
6 | ```javascript
7 | function async f() {
8 | return 0;
9 | }
10 | ```
11 |
12 | To fix this error, replace `function async` with `async function`:
13 |
14 | ```javascript
15 | async function f() {
16 | return 0;
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/docs/errors/E0349.md:
--------------------------------------------------------------------------------
1 | # E0349: function parameter cannot be parenthesized
2 |
3 | Using parenthesis around the function parameter is invalid.
4 |
5 | ```typescript
6 | let g = ((x)) => { };
7 | let f = function ((x)) { };
8 | ```
9 |
10 | To fix this error, remove the parenthesis.
11 |
12 | ```typescript
13 | let g = (x) => { };
14 | let f = function (x) { };
15 | ```
16 |
--------------------------------------------------------------------------------
/docs/errors/E0369.md:
--------------------------------------------------------------------------------
1 | # E0369: nullish coalescing operator does nothing when left operand is never null
2 |
3 | When left operand is never null (such as comparisons and string literals), the expression will always resolve to the left operand value
4 |
5 | ```typescript
6 | let g = "hello" ?? "world";
7 | let f = 4 == 5 ?? true;
8 | ```
9 |
10 | To fix this warning, remove the nullish coalescing operaror (??) and the right operand.
11 |
12 | ```typescript
13 | let g = "hello";
14 | let f = 4 == 5;
15 | ```
16 |
--------------------------------------------------------------------------------
/docs/errors/E0374.md:
--------------------------------------------------------------------------------
1 | # E0374: unexpected whitespace between '!' and '=='
2 |
3 | `x! == y` is a typo for a strict inequality, as in `x !== y`:
4 |
5 | ```javascript
6 | let x = 17;
7 | let y = 38;
8 | if (x! == y) {
9 | alert('Not equal!');
10 | }
11 | ```
12 |
13 | To fix the warning, replace `! ==` with ` !==`:
14 |
15 | ```javascript
16 | let x = 17;
17 | let y = 38;
18 | if (x !== y) {
19 | alert("Not equal!");
20 | }
21 | ```
22 |
23 | See also: E0373
24 |
--------------------------------------------------------------------------------
/docs/errors/E0376.md:
--------------------------------------------------------------------------------
1 | # E0376: JSX prop is missing an expression
2 |
3 | Every attribute in JSX with a prop requires an expression:
4 |
5 | ```javascript-jsx
6 | function Header({columns}) {
7 | return (<>
8 |
Name
9 | >);
10 | }
11 | ```
12 |
13 | To fix the mistake, add a valid expression to the prop:
14 |
15 | ```javascript-jsx
16 | function Header({columns}) {
17 | return (<>
18 |
Name
19 | >);
20 | }
21 | ```
--------------------------------------------------------------------------------
/docs/errors/E0379.md:
--------------------------------------------------------------------------------
1 | # E0379: optional parameter cannot be followed by a required parameter
2 |
3 | Optional parameters need to be placed after the required ones.
4 |
5 | ```typescript
6 | function f(param1?: number, param2: number) {
7 | if (param1) {
8 | return param1
9 | }
10 | return param2;
11 | }
12 | ```
13 |
14 | To fix this warning, we need to place the required parameter(s) first, followed by the optional parameters
15 |
16 | ```typescript
17 | function f(param2: number, param1?: number) {
18 | if (param1) {
19 | return param1
20 | }
21 | return param2;
22 | }
23 | ```
24 |
--------------------------------------------------------------------------------
/docs/errors/E0381.md:
--------------------------------------------------------------------------------
1 | # E0381: Typescript does not allow keywords to contain escape sequence
2 |
3 | The following code is legal in JavaScript but is illegal in TypeScript
4 |
5 | ```typescript
6 | class C {
7 | \u{63}onstructor() {} // equivalent to: constructor() {}
8 | }
9 | ```
10 |
11 | To fix this error, remove the escape sequence in the keyword.
12 |
13 |
14 | ```typescript
15 | class C {
16 | constructor() {} // equivalent to: constructor() {}
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/docs/errors/E0383.md:
--------------------------------------------------------------------------------
1 | # E0383: variable assignment to self is no-op
2 |
3 | ```config-for-examples
4 | {
5 | "globals": {
6 | "previous": true,
7 | "switchToPage": true
8 | }
9 | }
10 | ```
11 |
12 | The following contains a no-op (`next = next;`):
13 |
14 | ```javascript
15 | let next = 0;
16 | if (previous !== null) {
17 | next = next;
18 | }
19 | switchToPage(next);
20 | ```
21 |
22 | To fix this, change the assignment so it's not assigning a variable to itself:
23 |
24 | ```javascript
25 | let next = 0;
26 | if (previous !== null) {
27 | next = previous;
28 | }
29 | switchToPage(next);
30 | ```
31 |
--------------------------------------------------------------------------------
/docs/errors/E0452.md:
--------------------------------------------------------------------------------
1 | # E0452: empty parenthesis after control statement
2 |
3 | Leaving parenthesis empty after control statements (`if`, `while`, `switch`,
4 | `with`) is a syntax error.
5 |
6 | ```javascript
7 | while () {
8 | console.log("Oops!..")
9 | }
10 | ```
11 |
12 | If the intention here was to create an infinite loop, the implementation would
13 | be this:
14 |
15 | ```javascript
16 | while (true) {
17 | console.log("Now, that's an infinite loop");
18 | }
19 | ```
20 |
--------------------------------------------------------------------------------
/docs/errors/E0707.md:
--------------------------------------------------------------------------------
1 | # E0707: classes cannot be named 'await' in async function
2 |
3 |
4 |
5 | This error has been renamed to E0069.
6 |
7 | Introduced in quick-lint-js version 2.5.0.
8 |
--------------------------------------------------------------------------------
/docs/errors/E0708.md:
--------------------------------------------------------------------------------
1 | # E0708: unexpected '...'; expected expression
2 |
3 | The spread ('...') operator must precede an expression:
4 |
5 | ```javascript
6 | const arr1 = [1, 2, 3];
7 | const arr2 = [4, 5, 6];
8 |
9 | const arr3 = [...arr1, ...];
10 | ```
11 |
12 | To fix this error, insert a valid expression after the operator:
13 |
14 | ```javascript
15 | const arr1 = [1, 2, 3];
16 | const arr2 = [4, 5, 6];
17 |
18 | const arr3 = [...arr1, ...arr2];
19 |
20 | ```
--------------------------------------------------------------------------------
/docs/errors/E0709.md:
--------------------------------------------------------------------------------
1 | # E0709: expected variable name after '...'
2 |
3 | The spread operator ('...') must precede a variable name.
4 |
5 | ```javascript
6 | const numbers = () => { return [1, 2, 3, 4] };
7 | const [numberOne, numberTwo, ...] = numbers();
8 | ```
9 |
10 | To fix this mistake, place the identifier after '...':
11 |
12 | ```javascript
13 | const numbers = () => { return [1, 2, 3, 4] };
14 | const [numberOne, numberTwo, ...rest] = numbers();
15 | ```
16 |
--------------------------------------------------------------------------------
/docs/errors/E0710.md:
--------------------------------------------------------------------------------
1 | # E0710: '^' is the XOR operator; to exponentiate, use '**' instead
2 |
3 | The Exclusive OR operator ^ can sometimes be mistaken for the
4 | exponentiation operator **.
5 |
6 | ```javascript
7 | let x = 2 ^ 8
8 | ```
9 |
10 | If the intention was to exponentiate, the operator ^ should be replaced
11 | with **
12 |
13 | ```javascript
14 | let x = 2 ** 8
15 | ```
16 |
17 | Alternatively, if the intention was to use the ^ operator for XOR operation,
18 | The resulting literal could be used directly (2 ^ 8 = 10)
19 |
20 | ```javascript
21 | let x = 10
22 | ```
23 |
--------------------------------------------------------------------------------
/docs/errors/E0712.md:
--------------------------------------------------------------------------------
1 | # E0712: missing ',' between array elements
2 |
3 | This error occurs when there is a missing comma (',') between elements in an array
4 | declaration or initialization. In JavaScript, commas are used to separate individual
5 | elements within an array, and the absence of a comma will lead to a syntax error.
6 |
7 | ```javascript
8 | let myArray = [1 2 3];
9 | ```
10 |
11 | To fix this error, you need to add a comma between each element within the array declaration or initialization
12 |
13 | ```javascript
14 | let myArray = [1, 2, 3];
15 | ```
16 |
--------------------------------------------------------------------------------
/docs/errors/E0717.md:
--------------------------------------------------------------------------------
1 | # E0717: namespace alias cannot use 'import type'
2 |
3 |
4 | The error message "namespace alias cannot use 'import type'" occurs when
5 | trying to use the 'import type' syntax with an alias.
6 |
7 |
8 | ```typescript
9 | import type A = ns;
10 | ```
11 |
12 |
13 | To fix this error, you need to use the regular 'import' syntax instead
14 | of 'import type' when using an alias.
15 |
16 |
17 | ```typescript
18 | import A = ns;
19 | ```
20 |
--------------------------------------------------------------------------------
/docs/errors/E0718.md:
--------------------------------------------------------------------------------
1 | # E0718: using a '.' after a '?.' might fail, since '?.' might return 'undefined'
2 |
3 | This diagnostic has been removed in quick-lint-js version 3.2.0.
4 |
5 |
6 |
--------------------------------------------------------------------------------
/docs/errors/E0719.md:
--------------------------------------------------------------------------------
1 | # E0719: TypeScript namespace aliases are not allowed in JavaScript
2 |
3 | ```config-for-examples
4 | {
5 | "globals": {
6 | "goog": true
7 | }
8 | }
9 | ```
10 |
11 | TypeScript supports aliasing namespaces and namespace members using `import`. It
12 | is a syntax error to write such an alias in JavaScript code:
13 |
14 | ```javascript
15 | import Chart = goog.Chart;
16 | ```
17 |
18 | To fix this error, use `const` instead of `import`:
19 |
20 | ```javascript
21 | const Chart = goog.Chart;
22 | ```
23 | ```javascript
24 | const { Chart } = goog;
25 | ```
26 |
--------------------------------------------------------------------------------
/docs/man/.gitignore:
--------------------------------------------------------------------------------
1 | # Installation directory for Asciidoctor. Created by ../generate-man-pages.
2 | /gems/
3 |
--------------------------------------------------------------------------------
/fuzz/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains programs which find bugs in quick-lint-js components
2 | using fuzz testing. Fuzz testing feeds randomized inputs to functions and
3 | detects crashes and other problems.
4 |
5 | For documentation on building and running these programs, see docs/FUZZING.md.
6 |
--------------------------------------------------------------------------------
/infrastructure/README.md:
--------------------------------------------------------------------------------
1 | # quick-lint-js infrastructure
2 |
3 | This directory contains scripts and other stuff for hosting the quick-lint-js
4 | website and related stuff.
5 |
6 | ## Files and folders
7 |
8 | * `quick-lint-js-web-2`: Configuration and Ansible scripts for the HTTP server.
9 |
--------------------------------------------------------------------------------
/infrastructure/quick-lint-js-web-2/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in README.md:
2 | /inventory-dev.yml
3 | /vault.password
4 | /vault.yml
5 |
--------------------------------------------------------------------------------
/infrastructure/quick-lint-js-web-2/dev-certificates/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated by instructions in ../README.md:
2 | */fullchain.pem
3 | */privkey.pem
4 | /mkcert
5 |
--------------------------------------------------------------------------------
/infrastructure/quick-lint-js-web-2/roles/analytics/temp/.gitignore:
--------------------------------------------------------------------------------
1 | # This directory is a staging area for 'yarn run package' in
2 | # ../../website/analytics. See ../tasks/main.yml.
3 | /quick-lint-js-website-analytics.tar.gz
4 |
--------------------------------------------------------------------------------
/infrastructure/quick-lint-js-web-2/roles/apache/files/mods-available/fcgid.conf:
--------------------------------------------------------------------------------
1 |
2 | FcgidConnectTimeout 20
3 | FcgidMaxRequestLen 268435456
4 | FcgidMaxProcessesPerClass 10
5 | FcgidIOTimeout 300
6 | AddType application/x-httpd-php .php
7 | AddHandler application/x-httpd-php .php
8 | Alias /php8.1-fcgi /usr/lib/cgi-bin/php8.1-fcgi
9 |
10 | AddHandler fcgid-script .fcgi
11 |
12 |
13 |
--------------------------------------------------------------------------------
/infrastructure/quick-lint-js-web-2/roles/apache/files/ports.conf:
--------------------------------------------------------------------------------
1 | # If you just change the port or add more ports here, you will likely also
2 | # have to change the VirtualHost statement in
3 | # /etc/apache2/sites-enabled/000-default.conf
4 |
5 | Listen 80
6 |
7 |
8 | Listen 443
9 |
10 |
11 |
12 | Listen 443
13 |
14 |
15 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
16 |
--------------------------------------------------------------------------------
/infrastructure/quick-lint-js-web-2/roles/nodejs/files/nodesource.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/infrastructure/quick-lint-js-web-2/roles/nodejs/files/nodesource.gpg
--------------------------------------------------------------------------------
/plugin/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains plugins for using quick-lint-js in various code editors.
2 |
--------------------------------------------------------------------------------
/plugin/emacs/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by create-archive.
2 | .melpa-cache/
3 |
--------------------------------------------------------------------------------
/plugin/vim/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by create-archive.
2 | /quick-lint-js-vim.zip
3 |
--------------------------------------------------------------------------------
/plugin/vscode-lsp/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in README.md.
2 | /node_modules/
3 | /quick-lint-js-lsp-*.vsix
4 |
--------------------------------------------------------------------------------
/plugin/vscode-lsp/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "Launch VS Code with Extension",
6 | "type": "extensionHost",
7 | "request": "launch",
8 | "runtimeExecutable": "${execPath}",
9 | "args": ["--extensionDevelopmentPath=${workspaceRoot}"]
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/plugin/vscode-lsp/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ../../docs/CHANGELOG.md
--------------------------------------------------------------------------------
/plugin/vscode-lsp/README.md:
--------------------------------------------------------------------------------
1 | # quick-lint-js Visual Studio Code plugin
2 |
3 | This directory contains a plugin for the [Visual Studio Code
4 | editor][VisualStudioCode].
5 |
6 | ## Building
7 |
8 | To build the extension, run the following commands:
9 |
10 | $ yarn
11 | $ ./node_modules/.bin/vsce package
12 |
13 | This will create a file called `quick-lint-js-lsp-3.2.0.vsix`.
14 |
15 | [VisualStudioCode]: https://code.visualstudio.com/
16 |
--------------------------------------------------------------------------------
/plugin/vscode/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in BUILDING.md.
2 | /.vscode-test/
3 | /dist/
4 | /node_modules/
5 | /quick-lint-js-*.vsix
6 |
--------------------------------------------------------------------------------
/plugin/vscode/.vscodeignore:
--------------------------------------------------------------------------------
1 | **/*
2 |
3 | !CHANGELOG.md
4 | !LICENSE
5 | !LICENSE-icon.txt
6 | !PERFORMANCE-TRACING.md
7 | !README.md
8 | !dist/*
9 | !extension.js
10 | !icon.png
11 | !package.json
12 | !performance-writer.js
13 |
--------------------------------------------------------------------------------
/plugin/vscode/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ../../docs/CHANGELOG.md
--------------------------------------------------------------------------------
/plugin/vscode/LICENSE-icon.txt:
--------------------------------------------------------------------------------
1 | ../../dist/artwork/LICENSE.txt
--------------------------------------------------------------------------------
/plugin/vscode/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/plugin/vscode/demo.png
--------------------------------------------------------------------------------
/plugin/vscode/demo.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/plugin/vscode/demo.webp
--------------------------------------------------------------------------------
/plugin/vscode/icon.png:
--------------------------------------------------------------------------------
1 | ../../dist/artwork/dusty-right-256x256.png
--------------------------------------------------------------------------------
/plugin/vscode/quick-lint-js.config:
--------------------------------------------------------------------------------
1 | {
2 | "global-groups": [
3 | "ecmascript",
4 | "node.js"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/plugin/vscode/test/empty_test_workspace/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "javascript.validate.enable": false,
3 | "typescript.validate.enable": false
4 | }
5 |
--------------------------------------------------------------------------------
/po/README.md:
--------------------------------------------------------------------------------
1 | This directory contains translations for quick-lint-js. The .po and .pot files
2 | are used by [GNU gettext][gettext]'s tooling.
3 |
4 | See [docs/TRANSLATING.md](../docs/TRANSLATING.md) for instructions on updating
5 | and compiling files in this directory.
6 |
7 | [gettext]: https://www.gnu.org/software/gettext/
8 |
--------------------------------------------------------------------------------
/proofs/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by the TLA+ Toolbox:
2 | /*.toolbox/Model/
3 | /*.toolbox/Model_SnapShot_*/
4 | /*.toolbox/*_Model_SnapShot_*.launch
5 |
--------------------------------------------------------------------------------
/proofs/README.md:
--------------------------------------------------------------------------------
1 | # proofs
2 |
3 | This directory contains TLA+ proofs for some algorithms in quick-lint-js's C++
4 | code.
5 |
6 | * [WindowsPipeReadThread.tla][]: Proof of an algorithm used in
7 | `Event_Loop_Windows`.
8 |
--------------------------------------------------------------------------------
/proofs/WindowsPipeReadThread.toolbox/.settings/org.lamport.tla.toolbox.prefs:
--------------------------------------------------------------------------------
1 | ProjectRootFile=PARENT-1-PROJECT_LOC/WindowsPipeReadThread.tla
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/src/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains the majority of quick-lint-js' production code.
2 |
--------------------------------------------------------------------------------
/src/quick-lint-js/cli/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for the Command Line Interface (CLI), i.e. the main
2 | quick-lint-js executable.
3 |
--------------------------------------------------------------------------------
/src/quick-lint-js/cli/quick-lint-js.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "../../../dist/artwork/dusty-app.ico"
2 |
--------------------------------------------------------------------------------
/src/quick-lint-js/configuration/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code managing quick-lint-js.config files.
2 |
3 | See documentation for quick-lint-js.config in docs/config.adoc.
4 |
--------------------------------------------------------------------------------
/src/quick-lint-js/container/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for generally-reusable containers (either standard
2 | or custom), algorithms on containers, and memory allocators.
3 |
--------------------------------------------------------------------------------
/src/quick-lint-js/debug/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 |
--------------------------------------------------------------------------------
/src/quick-lint-js/debug/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "fmt": "prettier --write \"**/*.html\" \"**/*.mjs\"",
4 | "test": "node --test"
5 | },
6 | "engines": {
7 | "node": ">=18.0.0"
8 | },
9 | "devDependencies": {
10 | "prettier": "2.8.4"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/quick-lint-js/debug/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | prettier@2.8.4:
6 | version "2.8.4"
7 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3"
8 | integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==
9 |
--------------------------------------------------------------------------------
/src/quick-lint-js/diag/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for quick-lint-js' diagnostic reporting
2 | infrastructure, including the list of diagnostics in diagnostic-types.h.
3 |
4 |
--------------------------------------------------------------------------------
/src/quick-lint-js/fe/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains most code which is part of the "front end" of a textbook
2 | compiler: lexer, parser, the semantic analyzer, and ASTs.
3 |
4 | Diagnostics are in the separate ../diag/ directory.
5 |
--------------------------------------------------------------------------------
/src/quick-lint-js/i18n/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for internationalizing quick-lint-js so it supports
2 | different human languages.
3 |
4 | Translation files are stored in the po/ directory. See docs/TRANSLATION.md for
5 | more information.
6 |
--------------------------------------------------------------------------------
/src/quick-lint-js/io/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for dealing with filesystems and inter-process
2 | communication.
3 |
--------------------------------------------------------------------------------
/src/quick-lint-js/logging/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for debug logging and performance tracing.
2 |
--------------------------------------------------------------------------------
/src/quick-lint-js/lsp/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for the Language Server Protocol server.
2 |
3 | LSP specification: https://microsoft.github.io/language-server-protocol/specifications/specification-current/
4 |
--------------------------------------------------------------------------------
/src/quick-lint-js/port/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code to port quick-lint-js to older compilers, different
2 | compilers, buggy compilers, and different platforms.
3 |
--------------------------------------------------------------------------------
/src/quick-lint-js/reflection/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains code for implementing C++ reflection and code
2 | generation.
3 |
--------------------------------------------------------------------------------
/src/quick-lint-js/util/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains unrelated utility code. There is no theme relating
2 | modules in this directory.
3 |
--------------------------------------------------------------------------------
/test/README.md:
--------------------------------------------------------------------------------
1 | This directory contains quick-lint-js' automated test suite. See the
2 | [building-from-source guide][build-from-source] for instructions on building and
3 | running these tests.
4 |
5 | [build-from-source]: https://quick-lint-js.com/contribute/build-from-source/
6 |
--------------------------------------------------------------------------------
/tools/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by test-all-js-engines.
2 | /.js-engines/
3 |
--------------------------------------------------------------------------------
/tools/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains tools used by developers for various maintenance tasks.
2 |
--------------------------------------------------------------------------------
/tools/browser-globals/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in README.md.
2 | /node_modules/
3 | /web-specs/
4 |
--------------------------------------------------------------------------------
/tools/browser-globals/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "fmt": "prettier --write '*.js' '*.json'"
4 | },
5 | "dependencies": {
6 | "parse5": "^7.1.2",
7 | "webidl2": "^24.2.2"
8 | },
9 | "devDependencies": {
10 | "prettier": "^2.8.4"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tools/build-sizes/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in index.html.
2 | /data.json
3 |
--------------------------------------------------------------------------------
/tools/build-sizes/quick-lint-js.config:
--------------------------------------------------------------------------------
1 | {
2 | "global-groups": [
3 | "browser",
4 | "ecmascript"
5 | ],
6 | "globals": {
7 | "Chart": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tools/ci-analytics/.gitignore:
--------------------------------------------------------------------------------
1 | # User-generated secret token used by github_api.go.
2 | /token
3 |
4 | # Output of load_github_actions.go.
5 | /analytics.sqlite3
6 |
--------------------------------------------------------------------------------
/tools/ci-analytics/go.mod:
--------------------------------------------------------------------------------
1 | module quick-lint-js.com/ci-analytics
2 |
3 | go 1.17
4 |
5 | require github.com/mattn/go-sqlite3 v1.14.14
6 |
--------------------------------------------------------------------------------
/tools/ci-analytics/go.sum:
--------------------------------------------------------------------------------
1 | github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw=
2 | github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
3 |
--------------------------------------------------------------------------------
/tools/generate-lex-unicode/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by `yarn`.
2 | /node_modules/
3 |
--------------------------------------------------------------------------------
/tools/generate-lex-unicode/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "fmt": "prettier --write '*.js' '*.json'"
4 | },
5 | "dependencies": {
6 | "@unicode/unicode-15.0.0": "*",
7 | "@unicode/unicode-15.1.0": "*"
8 | },
9 | "devDependencies": {
10 | "prettier": "^2.8.4"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tools/templates/README.md:
--------------------------------------------------------------------------------
1 | # Templates
2 |
3 | This directory contains code templates useful for quick-lint-js contributors.
4 |
5 | * new.cpp: Contents of a new C++ source file.
6 | * new.h: Contents of a new C++ header file.
7 | * test-new.cpp: Contents of a new C++ test file.
8 |
9 | ## Vim
10 |
11 | To use the templates in Vim, add the following Vimscript code to your
12 | project-local Vim settings (e.g. in `.vimrc``):
13 |
14 | :source tools/templates/quick-lint-js-templates.vim
15 |
16 | ## Visual Studio Code
17 |
18 | Visual Studio Code has its own code template mechanism. See
19 | ../.vscode/README.md for details.
20 |
--------------------------------------------------------------------------------
/vendor/benchmark/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | BasedOnStyle: Google
4 | PointerAlignment: Left
5 | ...
6 |
--------------------------------------------------------------------------------
/vendor/benchmark/.clang-tidy:
--------------------------------------------------------------------------------
1 | ---
2 | Checks: 'clang-analyzer-*,readability-redundant-*,performance-*'
3 | WarningsAsErrors: 'clang-analyzer-*,readability-redundant-*,performance-*'
4 | HeaderFilterRegex: '.*'
5 | AnalyzeTemporaryDtors: false
6 | FormatStyle: none
7 | User: user
8 |
--------------------------------------------------------------------------------
/vendor/benchmark/.github/workflows/clang-format-lint.yml:
--------------------------------------------------------------------------------
1 | name: clang-format-lint
2 | on:
3 | push: {}
4 | pull_request: {}
5 |
6 | jobs:
7 | build:
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v2
12 | - uses: DoozyX/clang-format-lint-action@v0.13
13 | with:
14 | source: './include/benchmark ./src ./test'
15 | extensions: 'h,cc'
16 | clangFormatVersion: 12
17 | style: Google
18 |
--------------------------------------------------------------------------------
/vendor/benchmark/.github/workflows/pylint.yml:
--------------------------------------------------------------------------------
1 | name: pylint
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | pylint:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | - name: Set up Python 3.8
17 | uses: actions/setup-python@v1
18 | with:
19 | python-version: 3.8
20 | - name: Install dependencies
21 | run: |
22 | python -m pip install --upgrade pip
23 | pip install pylint pylint-exit conan
24 | - name: Run pylint
25 | run: |
26 | pylint `find . -name '*.py'|xargs` || pylint-exit $?
27 |
--------------------------------------------------------------------------------
/vendor/benchmark/.github/workflows/test_bindings.yml:
--------------------------------------------------------------------------------
1 | name: test-bindings
2 |
3 | on:
4 | push:
5 | branches: [main]
6 | pull_request:
7 | branches: [main]
8 |
9 | jobs:
10 | python_bindings:
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v2
15 | - name: Set up Python
16 | uses: actions/setup-python@v1
17 | with:
18 | python-version: 3.8
19 | - name: Install benchmark
20 | run:
21 | python setup.py install
22 | - name: Run example bindings
23 | run:
24 | python bindings/python/google_benchmark/example.py
25 |
--------------------------------------------------------------------------------
/vendor/benchmark/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-midnight
2 | markdown: GFM
3 |
--------------------------------------------------------------------------------
/vendor/benchmark/bindings/python/BUILD:
--------------------------------------------------------------------------------
1 | exports_files(glob(["*.BUILD"]))
2 | exports_files(["build_defs.bzl"])
3 |
4 |
--------------------------------------------------------------------------------
/vendor/benchmark/bindings/python/pybind11.BUILD:
--------------------------------------------------------------------------------
1 | cc_library(
2 | name = "pybind11",
3 | hdrs = glob(
4 | include = [
5 | "include/pybind11/*.h",
6 | "include/pybind11/detail/*.h",
7 | ],
8 | exclude = [
9 | "include/pybind11/common.h",
10 | "include/pybind11/eigen.h",
11 | ],
12 | ),
13 | copts = [
14 | "-fexceptions",
15 | "-Wno-undefined-inline",
16 | "-Wno-pragma-once-outside-header",
17 | ],
18 | includes = ["include"],
19 | visibility = ["//visibility:public"],
20 | )
21 |
--------------------------------------------------------------------------------
/vendor/benchmark/bindings/python/python_headers.BUILD:
--------------------------------------------------------------------------------
1 | cc_library(
2 | name = "python_headers",
3 | hdrs = glob(["**/*.h"]),
4 | includes = ["."],
5 | visibility = ["//visibility:public"],
6 | )
7 |
--------------------------------------------------------------------------------
/vendor/benchmark/bindings/python/requirements.txt:
--------------------------------------------------------------------------------
1 | absl-py>=0.7.1
2 |
3 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/Config.cmake.in:
--------------------------------------------------------------------------------
1 | @PACKAGE_INIT@
2 |
3 | include (CMakeFindDependencyMacro)
4 |
5 | find_dependency (Threads)
6 |
7 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
8 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/Modules/FindLLVMAr.cmake:
--------------------------------------------------------------------------------
1 | include(FeatureSummary)
2 |
3 | find_program(LLVMAR_EXECUTABLE
4 | NAMES llvm-ar
5 | DOC "The llvm-ar executable"
6 | )
7 |
8 | include(FindPackageHandleStandardArgs)
9 | find_package_handle_standard_args(LLVMAr
10 | DEFAULT_MSG
11 | LLVMAR_EXECUTABLE)
12 |
13 | SET_PACKAGE_PROPERTIES(LLVMAr PROPERTIES
14 | URL https://llvm.org/docs/CommandGuide/llvm-ar.html
15 | DESCRIPTION "create, modify, and extract from archives"
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/Modules/FindLLVMNm.cmake:
--------------------------------------------------------------------------------
1 | include(FeatureSummary)
2 |
3 | find_program(LLVMNM_EXECUTABLE
4 | NAMES llvm-nm
5 | DOC "The llvm-nm executable"
6 | )
7 |
8 | include(FindPackageHandleStandardArgs)
9 | find_package_handle_standard_args(LLVMNm
10 | DEFAULT_MSG
11 | LLVMNM_EXECUTABLE)
12 |
13 | SET_PACKAGE_PROPERTIES(LLVMNm PROPERTIES
14 | URL https://llvm.org/docs/CommandGuide/llvm-nm.html
15 | DESCRIPTION "list LLVM bitcode and object file’s symbol table"
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/Modules/FindLLVMRanLib.cmake:
--------------------------------------------------------------------------------
1 | include(FeatureSummary)
2 |
3 | find_program(LLVMRANLIB_EXECUTABLE
4 | NAMES llvm-ranlib
5 | DOC "The llvm-ranlib executable"
6 | )
7 |
8 | include(FindPackageHandleStandardArgs)
9 | find_package_handle_standard_args(LLVMRanLib
10 | DEFAULT_MSG
11 | LLVMRANLIB_EXECUTABLE)
12 |
13 | SET_PACKAGE_PROPERTIES(LLVMRanLib PROPERTIES
14 | DESCRIPTION "generate index for LLVM archive"
15 | )
16 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/benchmark.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | exec_prefix=${prefix}
3 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
4 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
5 |
6 | Name: @PROJECT_NAME@
7 | Description: Google microbenchmark framework
8 | Version: @VERSION@
9 |
10 | Libs: -L${libdir} -lbenchmark
11 | Libs.private: -lpthread
12 | Cflags: -I${includedir}
13 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/gnu_posix_regex.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | int main() {
4 | std::string str = "test0159";
5 | regex_t re;
6 | int ec = regcomp(&re, "^[a-z]+[0-9]+$", REG_EXTENDED | REG_NOSUB);
7 | if (ec != 0) {
8 | return ec;
9 | }
10 | return regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/llvm-toolchain.cmake:
--------------------------------------------------------------------------------
1 | find_package(LLVMAr REQUIRED)
2 | set(CMAKE_AR "${LLVMAR_EXECUTABLE}" CACHE FILEPATH "" FORCE)
3 |
4 | find_package(LLVMNm REQUIRED)
5 | set(CMAKE_NM "${LLVMNM_EXECUTABLE}" CACHE FILEPATH "" FORCE)
6 |
7 | find_package(LLVMRanLib REQUIRED)
8 | set(CMAKE_RANLIB "${LLVMRANLIB_EXECUTABLE}" CACHE FILEPATH "" FORCE)
9 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/posix_regex.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | int main() {
4 | std::string str = "test0159";
5 | regex_t re;
6 | int ec = regcomp(&re, "^[a-z]+[0-9]+$", REG_EXTENDED | REG_NOSUB);
7 | if (ec != 0) {
8 | return ec;
9 | }
10 | int ret = regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
11 | regfree(&re);
12 | return ret;
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/split_list.cmake:
--------------------------------------------------------------------------------
1 | macro(split_list listname)
2 | string(REPLACE ";" " " ${listname} "${${listname}}")
3 | endmacro()
4 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/std_regex.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | int main() {
4 | const std::string str = "test0159";
5 | std::regex re;
6 | re = std::regex("^[a-z]+[0-9]+$",
7 | std::regex_constants::extended | std::regex_constants::nosubs);
8 | return std::regex_search(str, re) ? 0 : -1;
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/steady_clock.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main() {
4 | typedef std::chrono::steady_clock Clock;
5 | Clock::time_point tp = Clock::now();
6 | ((void)tp);
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/benchmark/cmake/thread_safety_attributes.cpp:
--------------------------------------------------------------------------------
1 | #define HAVE_THREAD_SAFETY_ATTRIBUTES
2 | #include "../src/mutex.h"
3 |
4 | int main() {}
5 |
--------------------------------------------------------------------------------
/vendor/benchmark/docs/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-minimal
--------------------------------------------------------------------------------
/vendor/benchmark/docs/index.md:
--------------------------------------------------------------------------------
1 | # Benchmark
2 |
3 | * [Assembly Tests](AssemblyTests.md)
4 | * [Dependencies](dependencies.md)
5 | * [Perf Counters](perf_counters.md)
6 | * [Platform Specific Build Instructions](platform_specific_build_instructions.md)
7 | * [Random Interleaving](random_interleaving.md)
8 | * [Releasing](releasing.md)
9 | * [Tools](tools.md)
10 | * [User Guide](user_guide.md)
--------------------------------------------------------------------------------
/vendor/benchmark/requirements.txt:
--------------------------------------------------------------------------------
1 | numpy == 1.19.4
2 | scipy == 1.5.4
3 | pandas == 1.1.5
4 |
--------------------------------------------------------------------------------
/vendor/benchmark/src/sleep.h:
--------------------------------------------------------------------------------
1 | #ifndef BENCHMARK_SLEEP_H_
2 | #define BENCHMARK_SLEEP_H_
3 |
4 | namespace benchmark {
5 | const int kNumMillisPerSecond = 1000;
6 | const int kNumMicrosPerMilli = 1000;
7 | const int kNumMicrosPerSecond = kNumMillisPerSecond * 1000;
8 | const int kNumNanosPerMicro = 1000;
9 | const int kNumNanosPerSecond = kNumNanosPerMicro * kNumMicrosPerSecond;
10 |
11 | void SleepForMilliseconds(int milliseconds);
12 | void SleepForSeconds(double seconds);
13 | } // end namespace benchmark
14 |
15 | #endif // BENCHMARK_SLEEP_H_
16 |
--------------------------------------------------------------------------------
/vendor/benchmark/test/link_main_test.cc:
--------------------------------------------------------------------------------
1 | #include "benchmark/benchmark.h"
2 |
3 | void BM_empty(benchmark::State& state) {
4 | for (auto _ : state) {
5 | benchmark::DoNotOptimize(state.iterations());
6 | }
7 | }
8 | BENCHMARK(BM_empty);
9 |
--------------------------------------------------------------------------------
/vendor/benchmark/test/templated_fixture_test.cc:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include
4 |
5 | #include "benchmark/benchmark.h"
6 |
7 | template
8 | class MyFixture : public ::benchmark::Fixture {
9 | public:
10 | MyFixture() : data(0) {}
11 |
12 | T data;
13 | };
14 |
15 | BENCHMARK_TEMPLATE_F(MyFixture, Foo, int)(benchmark::State& st) {
16 | for (auto _ : st) {
17 | data += 1;
18 | }
19 | }
20 |
21 | BENCHMARK_TEMPLATE_DEFINE_F(MyFixture, Bar, double)(benchmark::State& st) {
22 | for (auto _ : st) {
23 | data += 1.0;
24 | }
25 | }
26 | BENCHMARK_REGISTER_F(MyFixture, Bar);
27 |
28 | BENCHMARK_MAIN();
29 |
--------------------------------------------------------------------------------
/vendor/benchmark/tools/BUILD.bazel:
--------------------------------------------------------------------------------
1 | load("@py_deps//:requirements.bzl", "requirement")
2 |
3 | py_library(
4 | name = "gbench",
5 | srcs = glob(["gbench/*.py"]),
6 | deps = [
7 | requirement("numpy"),
8 | requirement("scipy"),
9 | ],
10 | )
11 |
12 | py_binary(
13 | name = "compare",
14 | srcs = ["compare.py"],
15 | python_version = "PY2",
16 | deps = [
17 | ":gbench",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/vendor/benchmark/tools/gbench/Inputs/test4_run0.json:
--------------------------------------------------------------------------------
1 | {
2 | "context": {
3 | "date": "2016-08-02 17:44:46",
4 | "num_cpus": 4,
5 | "mhz_per_cpu": 4228,
6 | "cpu_scaling_enabled": false,
7 | "library_build_type": "release"
8 | },
9 | "benchmarks": [
10 | {
11 | "name": "whocares",
12 | "run_type": "aggregate",
13 | "aggregate_name": "zz",
14 | "aggregate_unit": "percentage",
15 | "iterations": 1000,
16 | "real_time": 0.01,
17 | "cpu_time": 0.10,
18 | "time_unit": "ns"
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/benchmark/tools/gbench/Inputs/test4_run1.json:
--------------------------------------------------------------------------------
1 | {
2 | "context": {
3 | "date": "2016-08-02 17:44:46",
4 | "num_cpus": 4,
5 | "mhz_per_cpu": 4228,
6 | "cpu_scaling_enabled": false,
7 | "library_build_type": "release"
8 | },
9 | "benchmarks": [
10 | {
11 | "name": "whocares",
12 | "run_type": "aggregate",
13 | "aggregate_name": "zz",
14 | "aggregate_unit": "percentage",
15 | "iterations": 1000,
16 | "real_time": 0.005,
17 | "cpu_time": 0.15,
18 | "time_unit": "ns"
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/benchmark/tools/gbench/__init__.py:
--------------------------------------------------------------------------------
1 | """Google Benchmark tooling"""
2 |
3 | __author__ = 'Eric Fiselier'
4 | __email__ = 'eric@efcs.ca'
5 | __versioninfo__ = (0, 5, 0)
6 | __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev'
7 |
8 | __all__ = []
9 |
--------------------------------------------------------------------------------
/vendor/benchmark/tools/requirements.txt:
--------------------------------------------------------------------------------
1 | scipy>=1.5.0
--------------------------------------------------------------------------------
/vendor/googletest/.clang-format:
--------------------------------------------------------------------------------
1 | # Run manually to reformat a file:
2 | # clang-format -i --style=file
3 | Language: Cpp
4 | BasedOnStyle: Google
5 |
--------------------------------------------------------------------------------
/vendor/googletest/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 |
--------------------------------------------------------------------------------
/vendor/googletest/docs/_config.yml:
--------------------------------------------------------------------------------
1 | title: GoogleTest
2 |
--------------------------------------------------------------------------------
/vendor/googletest/docs/assets/css/style.scss:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | @import "jekyll-theme-primer";
5 | @import "main";
6 |
--------------------------------------------------------------------------------
/vendor/googletest/docs/community_created_documentation.md:
--------------------------------------------------------------------------------
1 | # Community-Created Documentation
2 |
3 | The following is a list, in no particular order, of links to documentation
4 | created by the Googletest community.
5 |
6 | * [Googlemock Insights](https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/googletest/insights.md),
7 | by [ElectricRCAircraftGuy](https://github.com/ElectricRCAircraftGuy)
8 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/cmake/gmock.pc.in:
--------------------------------------------------------------------------------
1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3 |
4 | Name: gmock
5 | Description: GoogleMock (without main() function)
6 | Version: @PROJECT_VERSION@
7 | URL: https://github.com/google/googletest
8 | Requires: gtest = @PROJECT_VERSION@
9 | Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@
10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@
11 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/cmake/gmock_main.pc.in:
--------------------------------------------------------------------------------
1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3 |
4 | Name: gmock_main
5 | Description: GoogleMock (with main() function)
6 | Version: @PROJECT_VERSION@
7 | URL: https://github.com/google/googletest
8 | Requires: gmock = @PROJECT_VERSION@
9 | Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@
10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@
11 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/docs/README.md:
--------------------------------------------------------------------------------
1 | # Content Moved
2 |
3 | We are working on updates to the GoogleTest documentation, which has moved to
4 | the top-level [docs](../../docs) directory.
5 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/include/gmock/internal/custom/README.md:
--------------------------------------------------------------------------------
1 | # Customization Points
2 |
3 | The custom directory is an injection point for custom user configurations.
4 |
5 | ## Header `gmock-port.h`
6 |
7 | The following macros can be defined:
8 |
9 | ### Flag related macros:
10 |
11 | * `GMOCK_DECLARE_bool_(name)`
12 | * `GMOCK_DECLARE_int32_(name)`
13 | * `GMOCK_DECLARE_string_(name)`
14 | * `GMOCK_DEFINE_bool_(name, default_val, doc)`
15 | * `GMOCK_DEFINE_int32_(name, default_val, doc)`
16 | * `GMOCK_DEFINE_string_(name, default_val, doc)`
17 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h:
--------------------------------------------------------------------------------
1 | // GOOGLETEST_CM0002 DO NOT DELETE
2 |
3 | #ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
4 | #define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
5 |
6 | #endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
7 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/scripts/README.md:
--------------------------------------------------------------------------------
1 | # Please Note:
2 |
3 | Files in this directory are no longer supported by the maintainers. They
4 | represent mostly historical artifacts and supported by the community only. There
5 | is no guarantee whatsoever that these scripts still work.
6 |
--------------------------------------------------------------------------------
/vendor/googletest/googlemock/scripts/generator/cpp/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/vendor/googletest/googlemock/scripts/generator/cpp/__init__.py
--------------------------------------------------------------------------------
/vendor/googletest/googletest/cmake/Config.cmake.in:
--------------------------------------------------------------------------------
1 | @PACKAGE_INIT@
2 | include(CMakeFindDependencyMacro)
3 | if (@GTEST_HAS_PTHREAD@)
4 | set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@)
5 | find_dependency(Threads)
6 | endif()
7 |
8 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
9 | check_required_components("@project_name@")
10 |
--------------------------------------------------------------------------------
/vendor/googletest/googletest/cmake/gtest.pc.in:
--------------------------------------------------------------------------------
1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3 |
4 | Name: gtest
5 | Description: GoogleTest (without main() function)
6 | Version: @PROJECT_VERSION@
7 | URL: https://github.com/google/googletest
8 | Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@
9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@
10 |
--------------------------------------------------------------------------------
/vendor/googletest/googletest/cmake/gtest_main.pc.in:
--------------------------------------------------------------------------------
1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3 |
4 | Name: gtest_main
5 | Description: GoogleTest (with main() function)
6 | Version: @PROJECT_VERSION@
7 | URL: https://github.com/google/googletest
8 | Requires: gtest = @PROJECT_VERSION@
9 | Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@
10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@
11 |
--------------------------------------------------------------------------------
/vendor/googletest/googletest/cmake/libgtest.la.in:
--------------------------------------------------------------------------------
1 | # libgtest.la - a libtool library file
2 | # Generated by libtool (GNU libtool) 2.4.6
3 |
4 | # Please DO NOT delete this file!
5 | # It is necessary for linking the library.
6 |
7 | # Names of this library.
8 | library_names='libgtest.so'
9 |
10 | # Is this an already installed library?
11 | installed=yes
12 |
13 | # Should we warn about portability when linking against -modules?
14 | shouldnotlink=no
15 |
16 | # Files to dlopen/dlpreopen
17 | dlopen=''
18 | dlpreopen=''
19 |
20 | # Directory that this library needs to be installed in:
21 | libdir='@CMAKE_INSTALL_FULL_LIBDIR@'
22 |
--------------------------------------------------------------------------------
/vendor/googletest/googletest/docs/README.md:
--------------------------------------------------------------------------------
1 | # Content Moved
2 |
3 | We are working on updates to the GoogleTest documentation, which has moved to
4 | the top-level [docs](../../docs) directory.
5 |
--------------------------------------------------------------------------------
/vendor/googletest/googletest/scripts/README.md:
--------------------------------------------------------------------------------
1 | # Please Note:
2 |
3 | Files in this directory are no longer supported by the maintainers. They
4 | represent mosty historical artifacts and supported by the community only. There
5 | is no guarantee whatsoever that these scripts still work.
6 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_azurertos.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_AZURERTOS
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #include
12 | #include
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | #define PATH_MAX FX_MAXIMUM_PATH
20 | #define MG_DIRSEP '\\'
21 |
22 | #define socklen_t int
23 | #define closesocket(x) soc_close(x)
24 |
25 | #undef FOPEN_MAX
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_esp32.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_ESP32
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 |
20 | #include
21 |
22 | #define MG_PATH_MAX 128
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_esp8266.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_ESP8266
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | #include
23 |
24 | #define MG_PATH_MAX 128
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_newlib.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_NEWLIB
4 | #define _POSIX_TIMERS
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | #define MG_PATH_MAX 100
20 | #define MG_ENABLE_SOCKET 0
21 | #define MG_ENABLE_DIRLIST 0
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_rp2040.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_RP2040
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | #include
14 | int mkdir(const char *, mode_t);
15 | #endif
16 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_rtx.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_RTX
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 |
16 | #if !defined MG_ENABLE_RL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP)
17 | #define MG_ENABLE_RL 1
18 | #endif
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/arch_tirtos.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ARCH == MG_ARCH_TIRTOS
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include
15 | #include
16 |
17 | #include
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/base64.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | int mg_base64_update(unsigned char p, char *to, int len);
3 | int mg_base64_final(char *to, int len);
4 | int mg_base64_encode(const unsigned char *p, int n, char *to);
5 | int mg_base64_decode(const char *src, int n, char *dst);
6 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/iobuf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "arch.h"
4 |
5 | struct mg_iobuf {
6 | unsigned char *buf; // Pointer to stored data
7 | size_t size; // Total size available
8 | size_t len; // Current number of bytes
9 | size_t align; // Alignment during allocation
10 | };
11 |
12 | int mg_iobuf_init(struct mg_iobuf *, size_t, size_t);
13 | int mg_iobuf_resize(struct mg_iobuf *, size_t);
14 | void mg_iobuf_free(struct mg_iobuf *);
15 | size_t mg_iobuf_add(struct mg_iobuf *, size_t, const void *, size_t);
16 | size_t mg_iobuf_del(struct mg_iobuf *, size_t ofs, size_t len);
17 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/md5.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "arch.h"
4 |
5 | typedef struct {
6 | uint32_t buf[4];
7 | uint32_t bits[2];
8 | unsigned char in[64];
9 | } mg_md5_ctx;
10 |
11 | void mg_md5_init(mg_md5_ctx *c);
12 | void mg_md5_update(mg_md5_ctx *c, const unsigned char *data, size_t len);
13 | void mg_md5_final(mg_md5_ctx *c, unsigned char[16]);
14 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/net_lwip.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if defined(MG_ENABLE_LWIP) && MG_ENABLE_LWIP
4 | #if defined(__GNUC__)
5 | #include
6 | #include
7 | #else
8 | struct timeval {
9 | time_t tv_sec;
10 | long tv_usec;
11 | };
12 | #endif
13 |
14 | #include
15 |
16 | #if LWIP_SOCKET != 1
17 | // Sockets support disabled in LWIP by default
18 | #error Set LWIP_SOCKET variable to 1 (in lwipopts.h)
19 | #endif
20 | #endif
21 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/sha1.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "arch.h"
4 |
5 | typedef struct {
6 | uint32_t state[5];
7 | uint32_t count[2];
8 | unsigned char buffer[64];
9 | } mg_sha1_ctx;
10 |
11 | void mg_sha1_init(mg_sha1_ctx *);
12 | void mg_sha1_update(mg_sha1_ctx *, const unsigned char *data, size_t len);
13 | void mg_sha1_final(unsigned char digest[20], mg_sha1_ctx *);
14 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/sntp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "net.h"
4 |
5 | struct mg_connection *mg_sntp_connect(struct mg_mgr *mgr, const char *url,
6 | mg_event_handler_t fn, void *fn_data);
7 | void mg_sntp_request(struct mg_connection *c);
8 | int64_t mg_sntp_parse(const unsigned char *buf, size_t len);
9 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/ssi.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "http.h"
3 | void mg_http_serve_ssi(struct mg_connection *c, const char *root,
4 | const char *fullpath);
5 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/tls_mbed.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "config.h"
4 | #include "log.h"
5 | #include "url.h"
6 | #include "util.h"
7 |
8 | #if MG_ENABLE_MBEDTLS
9 | #include
10 | #include
11 | #include
12 |
13 | struct mg_tls {
14 | char *cafile; // CA certificate path
15 | mbedtls_x509_crt ca; // Parsed CA certificate
16 | mbedtls_x509_crt cert; // Parsed certificate
17 | mbedtls_ssl_context ssl; // SSL/TLS context
18 | mbedtls_ssl_config conf; // SSL-TLS config
19 | mbedtls_pk_context pk; // Private key context
20 | };
21 | #endif
22 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/tls_openssl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if MG_ENABLE_OPENSSL
4 |
5 | #include
6 | #include
7 |
8 | struct mg_tls {
9 | SSL_CTX *ctx;
10 | SSL *ssl;
11 | };
12 | #endif
13 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/url.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "str.h"
3 |
4 | unsigned short mg_url_port(const char *url);
5 | int mg_url_is_ssl(const char *url);
6 | struct mg_str mg_url_host(const char *url);
7 | struct mg_str mg_url_user(const char *url);
8 | struct mg_str mg_url_pass(const char *url);
9 | const char *mg_url_uri(const char *url);
10 |
--------------------------------------------------------------------------------
/vendor/mongoose/src/version.h:
--------------------------------------------------------------------------------
1 | #define MG_VERSION "7.9"
2 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | trim_trailing_whitespace = true
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 2
9 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /build
3 | /benchmark/build
4 | /benchmark/src
5 | /test/addon_build/addons
6 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | The Node.js Code of Conduct, which applies to this project, can be found at
4 | https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md.
5 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/except.gypi:
--------------------------------------------------------------------------------
1 | {
2 | 'defines': [ 'NAPI_CPP_EXCEPTIONS' ],
3 | 'cflags!': [ '-fno-exceptions' ],
4 | 'cflags_cc!': [ '-fno-exceptions' ],
5 | 'msvs_settings': {
6 | 'VCCLCompilerTool': {
7 | 'ExceptionHandling': 1,
8 | 'EnablePREfast': 'true',
9 | },
10 | },
11 | 'xcode_settings': {
12 | 'CLANG_CXX_LIBRARY': 'libc++',
13 | 'MACOSX_DEPLOYMENT_TARGET': '10.7',
14 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
15 | },
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/index.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | const include_dir = path.relative('.', __dirname);
4 |
5 | module.exports = {
6 | include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
7 | include_dir,
8 | gyp: path.join(include_dir, 'node_api.gyp:nothing'),
9 | isNodeApiBuiltin: true,
10 | needsFlag: false
11 | };
12 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/node_api.gyp:
--------------------------------------------------------------------------------
1 | {
2 | 'targets': [
3 | {
4 | 'target_name': 'nothing',
5 | 'type': 'static_library',
6 | 'sources': [ 'nothing.c' ]
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/noexcept.gypi:
--------------------------------------------------------------------------------
1 | {
2 | 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
3 | 'cflags': [ '-fno-exceptions' ],
4 | 'cflags_cc': [ '-fno-exceptions' ],
5 | 'msvs_settings': {
6 | 'VCCLCompilerTool': {
7 | 'ExceptionHandling': 0,
8 | 'EnablePREfast': 'true',
9 | },
10 | },
11 | 'xcode_settings': {
12 | 'CLANG_CXX_LIBRARY': 'libc++',
13 | 'MACOSX_DEPLOYMENT_TARGET': '10.7',
14 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
15 | },
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/node-addon-api/nothing.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/vendor/node-addon-api/nothing.c
--------------------------------------------------------------------------------
/vendor/node-addon-api/package-support.json:
--------------------------------------------------------------------------------
1 | {
2 | "versions": [
3 | {
4 | "version": "*",
5 | "target": {
6 | "node": "active"
7 | },
8 | "response": {
9 | "type": "time-permitting",
10 | "paid": false,
11 | "contact": {
12 | "name": "node-addon-api team",
13 | "url": "https://github.com/nodejs/node-addon-api/issues"
14 | }
15 | },
16 | "backing": [ { "project": "https://github.com/nodejs" },
17 | { "foundation": "https://openjsf.org/" }
18 | ]
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/simdjson/.clang-format:
--------------------------------------------------------------------------------
1 | BasedOnStyle: LLVM
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/.dockerignore:
--------------------------------------------------------------------------------
1 | *
2 | !.git
3 | !Makefile
4 | !amalgamate.py
5 | !benchmark
6 | !dependencies
7 | !include
8 | !jsonchecker
9 | !jsonexamples
10 | !scripts
11 | !singleheader
12 | !src
13 | !style
14 | !tests
15 | !tools
16 |
--------------------------------------------------------------------------------
/vendor/simdjson/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | Our tests check whether you have introduced trailing white space. If such a test fails, please check the "artifacts button" above, which if you click it gives a link to a downloadable file to help you identify the issue. You can also run scripts/remove_trailing_whitespace.sh locally if you have a bash shell and the sed command available on your system.
4 |
5 | If you plan to contribute to simdjson, please read our
6 |
7 | CONTRIBUTING guide: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md and our
8 | HACKING guide: https://github.com/simdjson/simdjson/blob/master/HACKING.md
9 |
--------------------------------------------------------------------------------
/vendor/simdjson/.github/workflows/vs16-arm-ci.yml:
--------------------------------------------------------------------------------
1 | name: VS16-ARM-CI
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | ci:
7 | name: windows-vs16
8 | runs-on: windows-latest
9 | strategy:
10 | fail-fast: false
11 | matrix:
12 | include:
13 | - {arch: ARM}
14 | - {arch: ARM64}
15 | steps:
16 | - name: checkout
17 | uses: actions/checkout@v2
18 | - name: Use cmake
19 | run: |
20 | cmake -A ${{ matrix.arch }} -DCMAKE_CROSSCOMPILING=1 -DSIMDJSON_DEVELOPER_MODE=ON -D SIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_EXCEPTIONS=OFF -B build &&
21 | cmake --build build --verbose
--------------------------------------------------------------------------------
/vendor/simdjson/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4 |
5 | // List of extensions which should be recommended for users of this workspace.
6 | "recommendations": [
7 | // Syntax
8 | "ms-vscode.cpptools",
9 | "ms-vscode.cmake-tools",
10 | "ms-python.python",
11 | "twxs.cmake"
12 | ],
13 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
14 | "unwantedRecommendations": [
15 |
16 | ]
17 | }
--------------------------------------------------------------------------------
/vendor/simdjson/AUTHORS:
--------------------------------------------------------------------------------
1 | # List of authors for copyright purposes, in no particular order
2 | Daniel Lemire
3 | Geoff Langdale
4 | John Keiser
5 |
--------------------------------------------------------------------------------
/vendor/simdjson/cmake/add_compile_only_test.cmake:
--------------------------------------------------------------------------------
1 | function(add_compile_only_test TEST_NAME)
2 | add_test(
3 | NAME ${TEST_NAME}
4 | COMMAND ${CMAKE_COMMAND} --build . --target ${TEST_NAME} --config $
5 | WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
6 | )
7 | set_target_properties(${TEST_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE)
8 | endfunction()
--------------------------------------------------------------------------------
/vendor/simdjson/cmake/simdjson-config.cmake.in:
--------------------------------------------------------------------------------
1 | include(CMakeFindDependencyMacro)
2 | if("@SIMDJSON_ENABLE_THREADS@")
3 | find_dependency(Threads)
4 | endif()
5 |
6 | include("${CMAKE_CURRENT_LIST_DIR}/simdjsonTargets.cmake")
7 |
--------------------------------------------------------------------------------
/vendor/simdjson/examples/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(quickstart)
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/examples/quickstart/quickstart.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "simdjson.h"
3 |
4 | int main(void) {
5 | simdjson::dom::parser parser;
6 | simdjson::dom::element tweets = parser.load("twitter.json");
7 | std::cout << tweets["search_metadata"]["count"] << " results." << std::endl;
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/simdjson/examples/quickstart/quickstart2.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "simdjson.h"
3 |
4 | int main(void) {
5 | simdjson::dom::parser parser;
6 | simdjson::dom::element tweets = parser.load("twitter.json");
7 | std::cout << "ID: " << tweets["statuses"].at(0)["id"] << std::endl;
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/simdjson/examples/quickstart/quickstart2_noexceptions.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "simdjson.h"
3 |
4 | int main(void) {
5 | simdjson::dom::parser parser;
6 | simdjson::dom::element tweets;
7 | auto error = parser.load("twitter.json").get(tweets);
8 | if(error) { std::cerr << error << std::endl; return EXIT_FAILURE; }
9 | uint64_t identifier;
10 | error = tweets["statuses"].at(0)["id"].get(identifier);
11 | if(error) { std::cerr << error << std::endl; return EXIT_FAILURE; }
12 | std::cout << identifier << std::endl;
13 | return EXIT_SUCCESS;
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/simdjson/examples/quickstart/quickstart_noexceptions.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "simdjson.h"
3 |
4 | int main(void) {
5 | simdjson::dom::parser parser;
6 | simdjson::dom::element tweets;
7 | auto error = parser.load("twitter.json").get(tweets);
8 | if (error) { std::cerr << error << std::endl; return EXIT_FAILURE; }
9 | simdjson::dom::element res;
10 |
11 | if ((error = tweets["search_metadata"]["count"].get(res))) {
12 | std::cerr << "could not access keys" << std::endl;
13 | return EXIT_FAILURE;
14 | }
15 | std::cout << res << " results." << std::endl;
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/vendor/simdjson/examples/quickstart/quickstart_ondemand.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "simdjson.h"
3 | using namespace simdjson;
4 | int main(void) {
5 | ondemand::parser parser;
6 | padded_string json = padded_string::load("twitter.json");
7 | ondemand::document tweets = parser.iterate(json);
8 | std::cout << uint64_t(tweets["search_metadata"]["count"]) << " results." << std::endl;
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/simdjson/extra/dumpbits.h:
--------------------------------------------------------------------------------
1 | #ifndef DUMPBITS_H
2 | #define DUMPBITS_H
3 | #include
4 |
5 | // dump bits low to high
6 | inline void dumpbits_always(uint64_t v, const std::string &msg) {
7 | for (uint32_t i = 0; i < 64; i++) {
8 | std::cout << (((v >> static_cast(i)) & 0x1ULL) ? "1" : "_");
9 | }
10 | std::cout << " " << msg.c_str() << "\n";
11 | }
12 |
13 | inline void dumpbits32_always(uint32_t v, const std::string &msg) {
14 | for (uint32_t i = 0; i < 32; i++) {
15 | std::cout << (((v >> i) & 0x1ULL) ? "1" : "_");
16 | }
17 | std::cout << " " << msg.c_str() << "\n";
18 | }
19 | #endif
20 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/arm64/begin.h:
--------------------------------------------------------------------------------
1 | #define SIMDJSON_IMPLEMENTATION arm64
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/arm64/end.h:
--------------------------------------------------------------------------------
1 | #undef SIMDJSON_IMPLEMENTATION
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/arm64/intrinsics.h:
--------------------------------------------------------------------------------
1 | #ifndef SIMDJSON_ARM64_INTRINSICS_H
2 | #define SIMDJSON_ARM64_INTRINSICS_H
3 |
4 | // This should be the correct header whether
5 | // you use visual studio or other compilers.
6 | #include
7 |
8 | #endif // SIMDJSON_ARM64_INTRINSICS_H
9 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/dom/parsedjson.h:
--------------------------------------------------------------------------------
1 | // TODO Remove this -- deprecated API and files
2 |
3 | #ifndef SIMDJSON_DOM_PARSEDJSON_H
4 | #define SIMDJSON_DOM_PARSEDJSON_H
5 |
6 | #include "simdjson/dom/document.h"
7 |
8 | namespace simdjson {
9 |
10 | /**
11 | * @deprecated Use `dom::parser` instead.
12 | */
13 | using ParsedJson [[deprecated("Use dom::parser instead")]] = dom::parser;
14 |
15 | } // namespace simdjson
16 |
17 | #endif // SIMDJSON_DOM_PARSEDJSON_H
18 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/fallback/begin.h:
--------------------------------------------------------------------------------
1 | #define SIMDJSON_IMPLEMENTATION fallback
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/fallback/end.h:
--------------------------------------------------------------------------------
1 | #undef SIMDJSON_IMPLEMENTATION
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/generic/ondemand/token_position.h:
--------------------------------------------------------------------------------
1 | namespace simdjson {
2 | namespace SIMDJSON_IMPLEMENTATION {
3 | namespace ondemand {
4 |
5 | /** @private Position in the JSON buffer indexes */
6 | using token_position = const uint32_t *;
7 |
8 | } // namespace ondemand
9 | } // namespace SIMDJSON_IMPLEMENTATION
10 | } // namespace simdjson
11 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/haswell/begin.h:
--------------------------------------------------------------------------------
1 | #define SIMDJSON_IMPLEMENTATION haswell
2 | SIMDJSON_TARGET_HASWELL
3 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/haswell/end.h:
--------------------------------------------------------------------------------
1 | SIMDJSON_UNTARGET_HASWELL
2 | #undef SIMDJSON_IMPLEMENTATION
3 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/jsonioutil.h:
--------------------------------------------------------------------------------
1 | #ifndef SIMDJSON_JSONIOUTIL_H
2 | #define SIMDJSON_JSONIOUTIL_H
3 |
4 | #include "simdjson/common_defs.h"
5 | #include "simdjson/padded_string.h"
6 |
7 | namespace simdjson {
8 |
9 | #if SIMDJSON_EXCEPTIONS
10 | #ifndef SIMDJSON_DISABLE_DEPRECATED_API
11 | [[deprecated("Use padded_string::load() instead")]]
12 | inline padded_string get_corpus(const char *path) {
13 | return padded_string::load(path);
14 | }
15 | #endif // SIMDJSON_DISABLE_DEPRECATED_API
16 | #endif // SIMDJSON_EXCEPTIONS
17 |
18 | } // namespace simdjson
19 |
20 | #endif // SIMDJSON_JSONIOUTIL_H
21 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/ppc64/begin.h:
--------------------------------------------------------------------------------
1 | #define SIMDJSON_IMPLEMENTATION ppc64
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/ppc64/end.h:
--------------------------------------------------------------------------------
1 | #undef SIMDJSON_IMPLEMENTATION
2 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/ppc64/intrinsics.h:
--------------------------------------------------------------------------------
1 | #ifndef SIMDJSON_PPC64_INTRINSICS_H
2 | #define SIMDJSON_PPC64_INTRINSICS_H
3 |
4 | #include "simdjson/base.h"
5 |
6 | // This should be the correct header whether
7 | // you use visual studio or other compilers.
8 | #include
9 |
10 | // These are defined by altivec.h in GCC toolchain, it is safe to undef them.
11 | #ifdef bool
12 | #undef bool
13 | #endif
14 |
15 | #ifdef vector
16 | #undef vector
17 | #endif
18 |
19 | #endif // SIMDJSON_PPC64_INTRINSICS_H
20 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/simdjson.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file
3 | * @deprecated We'll be removing this file so it isn't confused with the top level simdjson.h
4 | */
5 | #ifndef SIMDJSON_SIMDJSON_H
6 | #define SIMDJSON_SIMDJSON_H
7 |
8 | #include "simdjson/compiler_check.h"
9 | #include "simdjson/error.h"
10 |
11 | #endif // SIMDJSON_SIMDJSON_H
12 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/westmere/begin.h:
--------------------------------------------------------------------------------
1 | #define SIMDJSON_IMPLEMENTATION westmere
2 | SIMDJSON_TARGET_WESTMERE
3 |
--------------------------------------------------------------------------------
/vendor/simdjson/include/simdjson/westmere/end.h:
--------------------------------------------------------------------------------
1 | SIMDJSON_UNTARGET_WESTMERE
2 | #undef SIMDJSON_IMPLEMENTATION
3 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/dumpsimplestats.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
3 | cd $SCRIPTPATH/..
4 | make jsonstats
5 | echo
6 | for i in $SCRIPTPATH/../jsonexamples/*.json; do
7 | [ -f "$i" ] || break
8 | echo $i
9 | $SCRIPTPATH/../jsonstats $i
10 | echo
11 | done
12 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/javascript/README.md:
--------------------------------------------------------------------------------
1 | - npm install
2 | - nodejs generatelargejson.js (or node generatelargejson.js)
3 |
4 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/javascript/generatelargejson.js:
--------------------------------------------------------------------------------
1 |
2 | var fs = require('fs');
3 |
4 | var faker = require('faker');
5 |
6 |
7 | // generate bigDataSet as example
8 | var bigSet = [];
9 | var mmax = 500000
10 | console.log("this may take some time...")
11 | for(var i = 10; i < mmax; i++){
12 | if(i % 1024 == 0) process.stdout.write("\r"+i+" entries ("+Math.round(i * 100.0 /mmax)+" percent)");
13 | bigSet.push(faker.helpers.userCard());
14 | };
15 | console.log()
16 |
17 | fs.writeFile(__dirname + '/large.json', JSON.stringify(bigSet), function() {
18 | console.log("large.json generated successfully!");
19 | })
20 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/javascript/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "generatelargejson",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "faker": {
8 | "version": "4.1.0",
9 | "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz",
10 | "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8="
11 | },
12 | "fs": {
13 | "version": "0.0.1-security",
14 | "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
15 | "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/javascript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "generatelargejson",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "generatelargejson.js",
6 | "dependencies": {
7 | "faker": "^4.1.0",
8 | "fs": "0.0.1-security"
9 | },
10 | "devDependencies": {},
11 | "scripts": {
12 | "test": "echo \"Error: no test specified\" && exit 1"
13 | },
14 | "author": "",
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/minifier.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
3 | cd $SCRIPTPATH/..
4 | make minifiercompetition
5 | echo
6 | for i in $SCRIPTPATH/../jsonexamples/*.json; do
7 | [ -f "$i" ] || break
8 | echo $i
9 | $SCRIPTPATH/../minifiercompetition $i
10 | echo
11 | done
12 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/parser.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
3 | cd $SCRIPTPATH/..
4 | make parsingcompetition
5 | echo
6 | for i in $SCRIPTPATH/../jsonexamples/*.json; do
7 | [ -f "$i" ] || break
8 | echo $i
9 | $SCRIPTPATH/../parsingcompetition $i
10 | echo
11 | done
12 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/remove_trailing_whitespace.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # removes trailing whitespace from source files and other
4 |
5 | set -eu
6 |
7 | # go to the git root dir
8 | cd "$(git rev-parse --show-toplevel)"
9 |
10 | #make a list of all files (null separated, to handle whitespace)
11 | git ls-tree -r HEAD --name-only -z >all_files.null.txt
12 |
13 | for suffix in cpp cmake h hpp js md py rb sh ; do
14 | echo "removing trailing whitespace from files with suffix $suffix"
15 | cat all_files.null.txt | grep -z '\.'$suffix'$' |xargs -n1 --null sed -i 's/[ \t]*$//'
16 | done
17 | rm all_files.null.txt
18 | echo "done!"
19 |
20 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/selectparser.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
3 | cd $SCRIPTPATH/..
4 | make parsingcompetition
5 | echo
6 | for i in "$SCRIPTPATH/../jsonexamples/twitter.json" "$SCRIPTPATH/../jsonexamples/update-center.json" "$SCRIPTPATH/../jsonexamples/github_events.json" "$SCRIPTPATH/../jsonexamples/gsoc-2018.json" ; do
7 | [ -f "$i" ] || break
8 | echo $i
9 | $SCRIPTPATH/../parsingcompetition $i
10 | echo
11 | done
12 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/setupfortesting/disablehyperthreading.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Be careful to not skip the space at the beginning nor the end
4 | CPUS_TO_SKIP=" $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | sed 's/[^0-9].*//' | sort | uniq | tr "\r\n" " ") "
5 |
6 |
7 | for CPU_PATH in /sys/devices/system/cpu/cpu[0-9]*; do
8 | CPU="$(echo $CPU_PATH | tr -cd "0-9")"
9 | echo "$CPUS_TO_SKIP" | grep " $CPU " > /dev/null
10 | if [ $? -ne 0 ]; then
11 | echo 0 > $CPU_PATH/online
12 | fi
13 | done
14 |
15 | egrep 'siblings|cpu cores' /proc/cpuinfo | head -2
16 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/setupfortesting/setupfortesting.sh:
--------------------------------------------------------------------------------
1 | cd "${0%/*}"
2 | export CXX=g++-7
3 | export CC=gcc-7
4 | #./powerpolicy.sh performance
5 | ./disablehyperthreading.sh
6 | ./turboboost.sh on
7 |
--------------------------------------------------------------------------------
/vendor/simdjson/scripts/transitions/Makefile:
--------------------------------------------------------------------------------
1 | all:../../include/transitions.h
2 |
3 | ../../include/transitions.h: generatetransitions
4 | ./generatetransitions > ../../include/jsonparser/transitions.h
5 |
6 | generatetransitions: generatetransitions.cpp
7 | $(CXX) -o generatetransitions generatetransitions.cpp -I../../include
8 |
9 | clean:
10 | rm -f generatetransitions
11 |
--------------------------------------------------------------------------------
/vendor/simdjson/tools/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(TARGET cxxopts) # we only build the tools if cxxopts is available
2 | message(STATUS "We have cxxopts as a dependency and we are building the tools (e.g., json2json).")
3 | foreach(tool IN ITEMS json2json jsonstats jsonpointer minify)
4 | add_executable("${tool}" "${tool}.cpp")
5 | simdjson_apply_props("${tool}")
6 | target_link_libraries(
7 | "${tool}" PRIVATE
8 | simdjson simdjson-internal-flags simdjson-windows-headers cxxopts
9 | )
10 | endforeach()
11 | else()
12 | message(STATUS "We are missing cxxopts as a dependency so the tools (e.g., json2json) are omitted.")
13 | endif()
14 |
--------------------------------------------------------------------------------
/vendor/simdjson/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(simdjson-windows-headers INTERFACE)
2 | if(MSVC OR MINGW)
3 | target_include_directories(simdjson-windows-headers INTERFACE .)
4 | # getopt.h triggers bogus CRT_SECURE warnings. If you include them, you need this.
5 | target_compile_definitions(simdjson-windows-headers INTERFACE _CRT_SECURE_NO_WARNINGS)
6 | endif()
7 |
--------------------------------------------------------------------------------
/vendor/simdjson/windows/dirent_portable.h:
--------------------------------------------------------------------------------
1 | #ifndef SIMDJSON_DIRENT_PORTABLE_INC_
2 | #define SIMDJSON_DIRENT_PORTABLE_INC_
3 |
4 | #if (!defined(_WIN32) && !defined(_WIN64) && !(__MINGW32__) && !(__MINGW64__))
5 | #include
6 | #else
7 | #include "toni_ronnko_dirent.h"
8 | #endif
9 |
10 | #endif // SIMDJSON_DIRENT_PORTABLE_INC_
11 |
--------------------------------------------------------------------------------
/vendor/simdjson/windows/unistd.h:
--------------------------------------------------------------------------------
1 | #ifndef __UNISTD_H__
2 | #include "getopt.h"
3 | #endif // __UNISTD_H__
--------------------------------------------------------------------------------
/version:
--------------------------------------------------------------------------------
1 | 3.2.0
2 | 2024-03-03
3 |
--------------------------------------------------------------------------------
/website/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in README.md.
2 | /node_modules/
3 | /www/
4 |
5 | # Created by instructions in wasm/README.md.
6 | /build-emscripten/
7 |
--------------------------------------------------------------------------------
/website/.prettierignore:
--------------------------------------------------------------------------------
1 | /backstop/backstop_data/
2 | /www/
3 |
--------------------------------------------------------------------------------
/website/analytics/.gitignore:
--------------------------------------------------------------------------------
1 | # Keep this file in sync with .npmignore.
2 |
3 | /node_modules/
4 |
5 | /config.json
6 |
7 | # Described by /config.example.json:
8 | /analytics.sqlite3
9 | /analytics.sqlite3-shm
10 | /analytics.sqlite3-wal
11 | /dist/
12 |
13 | # Created by 'npm pack':
14 | /quick-lint-js-website-analytics-0.0.0.tgz
15 |
--------------------------------------------------------------------------------
/website/analytics/.npmignore:
--------------------------------------------------------------------------------
1 | # Keep yarn.lock for when we push to production.
2 | !/yarn.lock
3 |
4 | # Keep everything below this comment in sync with .gitignore.
5 |
6 | /node_modules/
7 |
8 | /config.json
9 |
10 | # Described by /config.example.json:
11 | /analytics.sqlite3
12 | /analytics.sqlite3-shm
13 | /analytics.sqlite3-wal
14 | /dist/
15 |
16 | # Created by 'npm pack':
17 | /quick-lint-js-website-analytics-0.0.0.tgz
18 |
--------------------------------------------------------------------------------
/website/analytics/config.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "db.file": "analytics.sqlite3",
3 | "chart.directory": "dist",
4 |
5 | "apache2.log_files": "/var/log/apache2/access.log*",
6 |
7 | "matomo_analytics.db_host": "localhost",
8 | "matomo_analytics.db_socket": null,
9 | "matomo_analytics.db_user": "root",
10 | "matomo_analytics.db_password": "",
11 | "matomo_analytics.db_database": "matomo_analytics",
12 |
13 | "vscode.marketplace-personal-access-token": ""
14 | }
15 |
--------------------------------------------------------------------------------
/website/analytics/test/apache-escape.log:
--------------------------------------------------------------------------------
1 | quick-lint-js.com 192.184.192.138 - - [25/Aug/2023:04:31:13 +0000] "GET / HTTP/2.0" 200 36107 "'escape\\test\"" "escape\ttest"
2 |
--------------------------------------------------------------------------------
/website/analytics/test/example-apache.log.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/analytics/test/example-apache.log.gz
--------------------------------------------------------------------------------
/website/analytics/test/quick-lint-js.config:
--------------------------------------------------------------------------------
1 | {
2 | "global-groups": [
3 | "ecmascript",
4 | "node.js"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/website/backstop/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 |
3 | # Created by BackstopJS.
4 | /backstop_data/
5 |
--------------------------------------------------------------------------------
/website/backstop/README.md:
--------------------------------------------------------------------------------
1 | # Website screenshot testing with BackstopJS
2 |
3 | Want to see the impact of your CSS or HTML changes? Try this screenshotting
4 | tool.
5 |
6 | 1. Start dev server: `cd website/ && yarn start`
7 | 2. Take golden screenshots: `cd website/backstop/ && yarn test && yarn approve`
8 | 3. Make your CSS changes.
9 | 4. Take new screenshots and compare: `cd website/backstop/ && yarn test`
10 | 5. If things look good, then mark them as golden:
11 | `cd website/backstop/ && yarn approve`
12 |
--------------------------------------------------------------------------------
/website/backstop/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "test": "backstop test --config=backstop.config.cjs",
4 | "approve": "backstop approve --config=backstop.config.cjs"
5 | },
6 | "engines": {
7 | "node": ">=14.14.0"
8 | },
9 | "dependencies": {
10 | "backstopjs": "^6.2.2"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/website/null-package/README.md:
--------------------------------------------------------------------------------
1 | This directory is intentionally empty (except this file).
2 |
3 | In package.json, reference this file as "link:./null-package" to prevent Yarn
4 | from installing a package. (Yarn will install this null-package "package"
5 | instead.)
6 |
--------------------------------------------------------------------------------
/website/public/blog/bug-journey/hpwebcamable-repro.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/bug-journey/hpwebcamable-repro.mp4
--------------------------------------------------------------------------------
/website/public/blog/bug-journey/original-bug-hovered.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/bug-journey/original-bug-hovered.jpg
--------------------------------------------------------------------------------
/website/public/blog/bug-journey/original-bug.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/bug-journey/original-bug.jpg
--------------------------------------------------------------------------------
/website/public/blog/bug-journey/range-console-log.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/bug-journey/range-console-log.jpg
--------------------------------------------------------------------------------
/website/public/blog/cpp-vs-rust-build-times/cpp-vs-rust.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/cpp-vs-rust-build-times/cpp-vs-rust.jpg
--------------------------------------------------------------------------------
/website/public/blog/cpp-vs-rust-build-times/xkcd-303-compiling-cropped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/cpp-vs-rust-build-times/xkcd-303-compiling-cropped.png
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo-asdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo-asdf.png
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo-signs-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo-signs-off.png
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo-signs-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo-signs-on.png
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo-update-in-insert.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo-update-in-insert.webp
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo-virtual-text-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo-virtual-text-off.png
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo-virtual-text-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo-virtual-text-on.png
--------------------------------------------------------------------------------
/website/public/blog/show-js-errors-neovim-macos/neovim-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/show-js-errors-neovim-macos/neovim-demo.png
--------------------------------------------------------------------------------
/website/public/blog/version-2.0/vscode-jsx-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/version-2.0/vscode-jsx-demo.png
--------------------------------------------------------------------------------
/website/public/blog/version-3.0/installing-quick-lint-js.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/version-3.0/installing-quick-lint-js.webp
--------------------------------------------------------------------------------
/website/public/blog/version-3.0/quick-lint-js-vs-eslint-vs-typescript-performance.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/version-3.0/quick-lint-js-vs-eslint-vs-typescript-performance.webp
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-bad-error-placement-still.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-bad-error-placement-still.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-bad-error-placement.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-bad-error-placement.webp
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-config-missing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-config-missing.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-esmodule-errors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-esmodule-errors.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-jsx-old-config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-jsx-old-config.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-lag-still.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-lag-still.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-lag.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-lag.webp
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/eslint-without-node-config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/eslint-without-node-config.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/linters-showdown-1x.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/linters-showdown-1x.webp
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/linters-showdown-2x.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/linters-showdown-2x.webp
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/linters-showdown-splash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/linters-showdown-splash.jpg
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/oxlint-editor-bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/oxlint-editor-bug.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/quick-lint-js-benchmark-results.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/quick-lint-js-benchmark-results.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/quick-lint-js-no-lag-still.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/quick-lint-js-no-lag-still.png
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/quick-lint-js-no-lag.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/quick-lint-js-no-lag.webp
--------------------------------------------------------------------------------
/website/public/blog/why-another-javascript-linter/visual-studio-squigglies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/blog/why-another-javascript-linter/visual-studio-squigglies.png
--------------------------------------------------------------------------------
/website/public/codespaces.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/codespaces.png
--------------------------------------------------------------------------------
/website/public/demo/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by instructions in ../../wasm/README.md.
2 | /dist/
3 |
--------------------------------------------------------------------------------
/website/public/dusty-right-256x256.png:
--------------------------------------------------------------------------------
1 | ../../dist/artwork/dusty-right-256x256.png
--------------------------------------------------------------------------------
/website/public/dusty.svg:
--------------------------------------------------------------------------------
1 | ../../dist/artwork/dusty-right.svg
--------------------------------------------------------------------------------
/website/public/errors/README.md:
--------------------------------------------------------------------------------
1 | # quick-lint-js errors
2 |
3 | This directory contains documentation on quick-lint-js' warnings and errors in
4 | HTML form.
5 |
6 | The source documents can be found in [docs/errors/](../../../docs/errors/). This
7 | directory contains code to convert those source documents into HTML.
8 |
--------------------------------------------------------------------------------
/website/public/favicon-16x16.png:
--------------------------------------------------------------------------------
1 | ../../dist/artwork/dusty-favicon-16x16.png
--------------------------------------------------------------------------------
/website/public/favicon-32x32.png:
--------------------------------------------------------------------------------
1 | ../../dist/artwork/dusty-favicon-32x32.png
--------------------------------------------------------------------------------
/website/public/install/kate/quick-lint-js-in-kate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/install/kate/quick-lint-js-in-kate.png
--------------------------------------------------------------------------------
/website/public/install/sublime/lsp-config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quick-lint/quick-lint-js/f7519e7567b743fa06dd75580045fc2b06b10c7c/website/public/install/sublime/lsp-config.png
--------------------------------------------------------------------------------
/website/public/license/blue-folder.svg.html:
--------------------------------------------------------------------------------
1 |
3 | I hereby donate the new Kate the Cyber Woodpecker to Kate Editor project. The
4 | artworks are dual licensed under LGPL (or whatever the same as Kate Editor)
5 | and Creative Commons BY-SA. In this way you don’t need to ask me for
6 | permission before using/modifying the mascot.
7 |
3 | The copyright holder of this file allows anyone to use it for any purpose,
4 | provided that the copyright holder is properly attributed. Redistribution,
5 | derivative work, commercial use, and all other use is permitted.
6 |