From e5d2990e813602a2eb346edb27d842d0e75a6d07 Mon Sep 17 00:00:00 2001 From: sockmaster27 <61235930+sockmaster27@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:42:14 +0100 Subject: [PATCH 1/2] style: include JSON files in prettier's formatting --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 57578efa..ac3e4817 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ **/*.* !**/*.js !**/*.ts +!**/*.json node_modules/** client/node_modules/** From 84e32ec36f260c3e9ca40538714873f2245c7602 Mon Sep 17 00:00:00 2001 From: sockmaster27 <61235930+sockmaster27@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:42:44 +0100 Subject: [PATCH 2/2] style: run prettier on all JSON files --- .eslintrc.json | 42 +-- client/tsconfig.json | 20 +- language-configuration.json | 48 +-- server/tsconfig.json | 26 +- syntaxes/flix.tmLanguage.json | 614 +++++++++++++++++----------------- tsconfig.json | 30 +- 6 files changed, 386 insertions(+), 394 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4ffc4452..c6182d49 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,23 +1,23 @@ { - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "env": { - "node": true - }, - "rules": { - "eqeqeq": "error", - "no-constant-condition": "off", - "@typescript-eslint/no-unused-vars": 0, - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/explicit-module-boundary-types": 0, - "@typescript-eslint/no-non-null-assertion": 0, - "@typescript-eslint/no-var-requires": 0, - "@typescript-eslint/ban-ts-comment": 0 - } + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "env": { + "node": true + }, + "rules": { + "eqeqeq": "error", + "no-constant-condition": "off", + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/explicit-module-boundary-types": 0, + "@typescript-eslint/no-non-null-assertion": 0, + "@typescript-eslint/no-var-requires": 0, + "@typescript-eslint/ban-ts-comment": 0 + } } diff --git a/client/tsconfig.json b/client/tsconfig.json index c526fc9c..672e6c7d 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -1,12 +1,12 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es2019", - "lib": ["ES2019"], - "outDir": "out", - "rootDir": "src", - "sourceMap": true - }, - "include": ["src"], - "exclude": ["node_modules", ".vscode-test"] + "compilerOptions": { + "module": "commonjs", + "target": "es2019", + "lib": ["ES2019"], + "outDir": "out", + "rootDir": "src", + "sourceMap": true + }, + "include": ["src"], + "exclude": ["node_modules", ".vscode-test"] } diff --git a/language-configuration.json b/language-configuration.json index 7d9561f6..aa9bb6b5 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -1,26 +1,26 @@ { - "comments": { - "lineComment": "//", - "blockComment": ["/*", "*/"] - }, - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - "autoClosingPairs": [ - { "open": "{", "close": "}" }, - { "open": "[", "close": "]" }, - { "open": "(", "close": ")" }, - { "open": "\"", "close": "\"", "notIn": ["string"]}, - { "open": "'", "close": "'", "notIn": ["string", "comment"]}, - { "open": "/**", "close": " */", "notIn": ["string"]} - ], - "surroundingPairs": [ - ["(", ")"], - ["[", "]"], - ["{", "}"], - ["\"", "\""], - ["'", "'"] - ] + "comments": { + "lineComment": "//", + "blockComment": ["/*", "*/"] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "{", "close": "}" }, + { "open": "[", "close": "]" }, + { "open": "(", "close": ")" }, + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } + ], + "surroundingPairs": [ + ["(", ")"], + ["[", "]"], + ["{", "}"], + ["\"", "\""], + ["'", "'"] + ] } diff --git a/server/tsconfig.json b/server/tsconfig.json index 704d0803..55f5c137 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,15 +1,15 @@ { - "compilerOptions": { - "target": "es2019", - "lib": ["ES2019"], - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "strict": true, - "outDir": "out", - "rootDir": "src", - "allowJs": true - }, - "include": ["src"], - "exclude": ["node_modules", ".vscode-test"] + "compilerOptions": { + "target": "es2019", + "lib": ["ES2019"], + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "strict": true, + "outDir": "out", + "rootDir": "src", + "allowJs": true + }, + "include": ["src"], + "exclude": ["node_modules", ".vscode-test"] } diff --git a/syntaxes/flix.tmLanguage.json b/syntaxes/flix.tmLanguage.json index 3d3d4381..66c5a4aa 100644 --- a/syntaxes/flix.tmLanguage.json +++ b/syntaxes/flix.tmLanguage.json @@ -1,312 +1,312 @@ { - "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "copyright_notice": "Copyright 2020 Stephen Tetley, Magnus Madsen", - "license": "Apache License, Version 2.0", - "name": "flix", - "scopeName": "source.flix", - "patterns": [ - { - "include": "#all_patterns" + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "copyright_notice": "Copyright 2020 Stephen Tetley, Magnus Madsen", + "license": "Apache License, Version 2.0", + "name": "flix", + "scopeName": "source.flix", + "patterns": [ + { + "include": "#all_patterns" + } + ], + "repository": { + "all_patterns": { + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#keywords" + }, + { + "include": "#literal_char" + }, + { + "include": "#literal_string" + }, + { + "include": "#literal_dec" + }, + { + "include": "#literal_hex" + }, + { + "include": "#annotations" + }, + { + "include": "#types" + }, + { + "include": "#comments" + } + ] + }, + "constants": { + "patterns": [ + { + "name": "constant.language.unit.flix", + "match": "\\b\\(\\)\\b" + }, + { + "name": "constant.language.bool.flix", + "match": "\\b(true|false)\\b" + }, + { + "name": "constant.language.null.flix", + "match": "\\b(null)\\b" } - ], - "repository": { - "all_patterns": { - "patterns": [ - { - "include": "#constants" - }, - { - "include": "#keywords" - }, - { - "include": "#literal_char" - }, - { - "include": "#literal_string" - }, - { - "include": "#literal_dec" - }, - { - "include": "#literal_hex" - }, - { - "include": "#annotations" - }, - { - "include": "#types" - }, - { - "include": "#comments" - } - ] - }, - "constants": { - "patterns": [ - { - "name": "constant.language.unit.flix", - "match": "\\b\\(\\)\\b" - }, - { - "name": "constant.language.bool.flix", - "match": "\\b(true|false)\\b" - }, - { - "name": "constant.language.null.flix", - "match": "\\b(null)\\b" - } - ] - }, - "keywords": { - "patterns": [ - { - "name": "keyword.control.choose.flix", - "match": "\\b(choose)\\b" - }, - { - "name": "keyword.control.debug.flix", - "match": "\\b(debug)\\b" - }, - { - "name": "keyword.control.do.flix", - "match": "\\b(do)\\b" - }, - { - "name": "keyword.control.for.flix", - "match": "\\b(for)\\b" - }, - { - "name": "keyword.control.applicativefor.flix", - "match": "\\b(forA)\\b" - }, - { - "name": "keyword.control.monadicfor.flix", - "match": "\\b(forM)\\b" - }, - { - "name": "keyword.control.foreach.flix", - "match": "\\b(foreach)\\b" - }, - { - "name": "keyword.control.yield.flix", - "match": "\\b(yield)\\b" - }, - { - "name": "keyword.control.if.flix", - "match": "\\b(if|else)\\b" - }, - { - "name": "keyword.control.match.flix", - "match": "\\b(case|match|typematch)\\b" - }, - { - "name": "keyword.control.try.flix", - "match": "\\b(try|catch)\\b" - }, - { - "name": "keyword.control.resume.flix", - "match": "\\b(resume)\\b" - }, - { - "name": "keyword.control.spawn.flix", - "match": "\\b(spawn)\\b" - }, - { - "name": "keyword.control.par.flix", - "match": "\\b(par)\\b" - }, - { - "name": "keyword.control.ast.flix", - "match": "\\b(branch|jumpto)\\b" - }, - { - "name": "keyword.operator.bool.flix", - "match": "\\b(not|and|or)\\b" - }, - { - "name": "keyword.operator.fix.flix", - "match": "\\bfix\\b" - }, - { - "name": "keyword.declaration.flix", - "match": "\\b(eff|def|law|enum|case|type|alias|class|instance|with|without|opaque|mod)\\b" - }, - { - "name": "keyword.expression.cast.flix", - "match": "\\b(checked_cast|checked_ecast|unchecked_cast|masked_cast|as)\\b" - }, - { - "name": "keyword.expression.discard.flix", - "match": "\\b(discard)\\b" - }, - { - "name": "keyword.expression.fixpoint.flix", - "match": "\\b(from|into|inject|project|solve|query|where|select)\\b" - }, - { - "name": "keyword.expression.force.flix", - "match": "\\b(force)\\b" - }, - { - "name": "keyword.expression.hole.flix", - "match": "(\\?\\?\\?|\\?[a-zA-Z0-9]+)" - }, - { - "name": "keyword.expression.import.flix", - "match": "\\b(import)\\b" - }, - { - "name": "keyword.expression.let.flix", - "match": "\\b(let\\*|let)\\b" - }, - { - "name": "keyword.expression.lazy.flix", - "match": "\\b(lazy)\\b" - }, - { - "name": "keyword.expression.region.flix", - "match": "\\b(region)\\b" - }, - { - "name": "keyword.expression.references.flix", - "match": "\\b(ref|deref)\\b" - }, - { - "name": "keyword.use.flix", - "match": "\\b(use)\\b" - }, - { - "name": "keyword.symbols.flix", - "match": "(\\->|~>|<\\-|=>)" - }, - { - "name": "keyword.operator.semicolon.flix", - "match": ";" - }, - { - "name": "storage.type.modifier.flix", - "match": "\\b(lawful|pub|override|sealed|static)\\b" - } - ] - }, - "literal_char": { - "name": "string.quoted.single.flix", - "begin": "'", - "end": "'", - "patterns": [ - { - "name": "constant.character.escape", - "match": "\\\\((u[0-9a-fA-F]{4})|.)" - } - ] - }, - "literal_string": { - "name": "string.quoted.double.flix", - "begin": "\"", - "end": "\"", - "patterns": [ - { - "name": "constant.character.escape.flix", - "match": "\\\\((u[0-9a-fA-F]{4})|.)" - }, - { - "begin": "\\$\\{", - "beginCaptures": { - "0": { - "name": "punctuation.definition.template-expression.begin.flix" - } - }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.definition.template-expression.end.flix" - } - }, - "patterns": [ - { - "include": "#all_patterns" - } - ], - "contentName": "meta.embedded.line.flix" - } - ] - }, - "literal_dec": { - "patterns": [ - { - "name": "constant.numeric.decimal.flix", - "match": "\\b[0-9](_*[0-9])*\\.[0-9](_*[0-9])*(f32|f64)?\\b" - }, - { - "name": "constant.numeric.decimal.flix", - "match": "(?|~>|<\\-|=>)" + }, + { + "name": "keyword.operator.semicolon.flix", + "match": ";" + }, + { + "name": "storage.type.modifier.flix", + "match": "\\b(lawful|pub|override|sealed|static)\\b" + } + ] + }, + "literal_char": { + "name": "string.quoted.single.flix", + "begin": "'", + "end": "'", + "patterns": [ + { + "name": "constant.character.escape", + "match": "\\\\((u[0-9a-fA-F]{4})|.)" + } + ] + }, + "literal_string": { + "name": "string.quoted.double.flix", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.flix", + "match": "\\\\((u[0-9a-fA-F]{4})|.)" + }, + { + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.flix" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.flix" + } + }, + "patterns": [ + { + "include": "#all_patterns" + } + ], + "contentName": "meta.embedded.line.flix" + } + ] + }, + "literal_dec": { + "patterns": [ + { + "name": "constant.numeric.decimal.flix", + "match": "\\b[0-9](_*[0-9])*\\.[0-9](_*[0-9])*(f32|f64)?\\b" + }, + { + "name": "constant.numeric.decimal.flix", + "match": "(?