Type object
File match bsconfig.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/bucklescript/latest.json
Source https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json

Validate with Lintel

npx @lintel/lintel check
Type: object

All paths are required to be in Unix format (foo/bar), the build system normalizes them for other platforms internally

Properties

name string required

Package name

sources sourceItem[] | sourceItem required

Example: "src" or ["src", "test"] or [{"dir": "src", "subdirs": [...]}]

version string

The semantic version of the ReScript library

namespace boolean | string
ignored-dirs string[]

a list of directories that the build system will not look into

dependencies bs-dependency[]
dev-dependencies bs-dependency[]
generators rule-generator[]

(WIP) Pre defined rules

cut-generators boolean

Ignore generators, cut the dependency on generator tools

jsx object
3 nested properties
version number

Whether to apply the specific version of JSX PPX transformation

Values: 4
module string

JSX module. Either "react" for React, or (since v11.1) any valid module name to apply a generic JSX transform.

preserve boolean

Whether to preserve the JSX in the output. Requires version to be set.

uncurried boolean

Configuration for the uncurried mode.

gentypeconfig object

path to gentype, path resolution is similar to ReScript

1 nested properties
path string
compiler-flags string[]
warnings object

warning numbers and whether to turn it into error or not

2 nested properties
number string

Default: "+a-4-9-20-41-50-102". Go here for the meanings of the warning flags

error boolean | string
pp-flags string
js-post-build object
1 nested properties
cmd string

Shell command to run after each JS file is compiled. The absolute path to the output JS file is appended as an argument. The path respects the in-source setting. The command runs in the directory containing the rescript.json where it is defined.

package-specs package-spec[] | package-spec
bs-external-includes string[]

(Not needed usually) external include directories, which will be applied -I to all compilation units

suffix string

Suffix of generated js files. Default: .js. May contain letters, digits, "-", "_" and "." and must end with .js, .mjs or .cjs.

reanalyze object
4 nested properties
analysis enum[]

The types of analysis to activate. dce means dead code analysis, exception means exception analysis, and termination is to check for infinite loops.

suppress string[]

Paths for any folders you'd like to exclude from analysis. Useful for bindings and similar. Example: ["src/bindings"].

unsuppress string[]

Any specific paths inside suppressed folders that you want to unsuppress. Example: ["src/bindings/SomeBinding.res"].

transitive boolean

specify whether transitively dead items should be reported (default: false)

editor object
1 nested properties
autocomplete object

A mapping to extend the autocompletion for a given type with an array of modules. E.g. { "int": ["IntUtils", "IntExt"] } will extend the autocompletion of the int type with the values from IntUtils and IntExt modules.

experimental-features object

Enable experimental compiler features.

1 nested properties
LetUnwrap boolean

Enable let? syntax.

Definitions

module-format enum

Output module format. Default: esmodule.

suffix-spec string

Suffix of generated js files. Default: .js. May contain letters, digits, "-", "_" and "." and must end with .js, .mjs or .cjs.

module-format-object object
module enum required

Output module format. Default: esmodule.

Values: "esmodule" "commonjs"
in-source boolean

Default: false.

suffix string

Suffix of generated js files. Default: .js. May contain letters, digits, "-", "_" and "." and must end with .js, .mjs or .cjs.

package-spec module-format | module-format-object
namespace-spec boolean | string
package-specs package-spec[] | package-spec
reanalyze object
analysis enum[]

The types of analysis to activate. dce means dead code analysis, exception means exception analysis, and termination is to check for infinite loops.

suppress string[]

Paths for any folders you'd like to exclude from analysis. Useful for bindings and similar. Example: ["src/bindings"].

unsuppress string[]

Any specific paths inside suppressed folders that you want to unsuppress. Example: ["src/bindings/SomeBinding.res"].

transitive boolean

specify whether transitively dead items should be reported (default: false)

ppx-specs string | string[][]
pp-specs string
bs-dependency string
dependencies bs-dependency[]
js-post-build object
cmd string

Shell command to run after each JS file is compiled. The absolute path to the output JS file is appended as an argument. The path respects the in-source setting. The command runs in the directory containing the rescript.json where it is defined.

rule-generator object

The shell command is running in dev time, and you generated could should be checked in, the depedency is tracked properly during dev time,example: { "name" : "ocamllex", "command" : "ocamllex.opt $in -o $out"}

name string
command string
build-generator object

Note that we will add the directory path accordingly

name string
edge string[]
sourceItem object | string
sources sourceItem[] | sourceItem

Example: "src" or ["src", "test"] or [{"dir": "src", "subdirs": [...]}]

gentype-specs object

path to gentype, path resolution is similar to ReScript

path string
jsx-specs object
version number

Whether to apply the specific version of JSX PPX transformation

Values: 4
module string

JSX module. Either "react" for React, or (since v11.1) any valid module name to apply a generic JSX transform.

preserve boolean

Whether to preserve the JSX in the output. Requires version to be set.

compiler-flags string[]
editor object
autocomplete object

A mapping to extend the autocompletion for a given type with an array of modules. E.g. { "int": ["IntUtils", "IntExt"] } will extend the autocompletion of the int type with the values from IntUtils and IntExt modules.