aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 01:33:28 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 02:49:55 +0200
commit644df12ff5ab037911cb0db4593d5b8a1b1d1d2f (patch)
treeb2a3f8061d05d2fdde8007c5f7d44cebb9fcd5ac
parentMove JS documentation into the JS-code. (diff)
downloadcalp-644df12ff5ab037911cb0db4593d5b8a1b1d1d2f.tar.gz
calp-644df12ff5ab037911cb0db4593d5b8a1b1d1d2f.tar.xz
Normalize tsconfig formatting.
-rw-r--r--static/.gitignore1
-rwxr-xr-xstatic/prettify-tsconfig.js15
-rw-r--r--static/tsconfig.json85
3 files changed, 56 insertions, 45 deletions
diff --git a/static/.gitignore b/static/.gitignore
index cbdca98d..712e640c 100644
--- a/static/.gitignore
+++ b/static/.gitignore
@@ -6,3 +6,4 @@ deps.svg
!arbitary_kv.js
!input_list.js
docs/
+!prettify-tsconfig.js
diff --git a/static/prettify-tsconfig.js b/static/prettify-tsconfig.js
new file mode 100755
index 00000000..a2bef6f0
--- /dev/null
+++ b/static/prettify-tsconfig.js
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+
+/*
+ * Script to normalize tsconfig.json.
+ */
+
+const { parse, stringify, assign } = require('comment-json')
+const fs = require('fs')
+
+const filename = 'tsconfig.json'
+
+const obj = parse(fs.readFileSync(filename).toString())
+const output = stringify(obj, null, 4)
+
+fs.writeFileSync(filename, output)
diff --git a/static/tsconfig.json b/static/tsconfig.json
index c421a586..02d475f3 100644
--- a/static/tsconfig.json
+++ b/static/tsconfig.json
@@ -1,46 +1,41 @@
{
- "compilerOptions": {
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
-
- /* Projects */
-
- /* Language and Environment */
- "target": "es2017", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
-
- /* Modules */
- "module": "CommonJS", /* Specify what module code is generated. */
-
- /* JavaScript Support */
- "allowJs": false, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
-
- /* Emit */
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
- "sourceMap": true, /* Create source map files for emitted JavaScript files. */
- "newLine": "lf", /* Set the newline character for emitting files. */
- "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
-
- /* Interop Constraints */
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
-
- /* Type Checking */
- "strict": true, /* Enable all strict type-checking options. */
-
- /* Completeness */
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
- },
- "include": ["**/*"],
- "exclude": ["node_modules", "**/*.spec.ts"],
- "typedocOptions": {
- "entryPointStrategy": "expand",
- "entryPoints": ["./ts"],
- "exclude": ["node_modules"],
- "plugin": [
- "@mxssfd/typedoc-theme"
- ],
- "theme": "my-theme",
- "out": "docs"
- }
-}
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
+ /* Projects */
+ /* Language and Environment */
+ "target": "es2017", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. *//* Modules */
+ "module": "CommonJS", /* Specify what module code is generated. *//* JavaScript Support */
+ "allowJs": false, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. *//* Emit */
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
+ "sourceMap": true, /* Create source map files for emitted JavaScript files. */
+ "newLine": "lf", /* Set the newline character for emitting files. */
+ "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. *//* Interop Constraints */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */
+ "strict": true, /* Enable all strict type-checking options. *//* Completeness */
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
+ },
+ "include": [
+ "**/*"
+ ],
+ "exclude": [
+ "node_modules",
+ "**/*.spec.ts"
+ ],
+ "typedocOptions": {
+ "entryPointStrategy": "expand",
+ "entryPoints": [
+ "./ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ],
+ "plugin": [
+ "@mxssfd/typedoc-theme"
+ ],
+ "theme": "my-theme",
+ "out": "docs"
+ }
+} \ No newline at end of file