From ddd4dea2f33b06bf9dcdd56c818b746224f88786 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Sun, 11 Sep 2022 09:59:37 +0300 Subject: [PATCH] Enable formatting for the rest of repository Follow up the previous commit. --- .eslintrc.yml | 4 +- .github/dependabot.yml | 6 +- .github/workflows/deploy-master-to-prod.yml | 1 - package-lock.json | 109 ++++++++++++++++++++ package.json | 5 +- tsconfig.json | 18 +--- wrangler.toml | 1 - 7 files changed, 121 insertions(+), 23 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 8cbbd9b..caa16d7 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,8 +1,8 @@ env: es2020: true worker: true -extends: ["plugin:@typescript-eslint/recommended"] -parser: "@typescript-eslint/parser" +extends: ['plugin:@typescript-eslint/recommended'] +parser: '@typescript-eslint/parser' parserOptions: ecmaVersion: 2020 ecmaFeatures: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5fea649..dc34fb5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: 'npm' # See documentation for possible values + directory: '/' # Location of package manifests schedule: - interval: "weekly" + interval: 'weekly' diff --git a/.github/workflows/deploy-master-to-prod.yml b/.github/workflows/deploy-master-to-prod.yml index 71ea16d..a6d9422 100644 --- a/.github/workflows/deploy-master-to-prod.yml +++ b/.github/workflows/deploy-master-to-prod.yml @@ -16,5 +16,4 @@ jobs: environment: prod env: CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - # TODO: Add organicmaps deploy. diff --git a/package-lock.json b/package-lock.json index ca4d6d2..7b18d9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "esbuild": "^0.15.7", "eslint": "^8.9.0", "prettier": "^2.5.1", + "prettier-plugin-toml": "^0.3.1", "typescript": "^4.5.5" } }, @@ -384,6 +385,25 @@ "node": ">= 8" } }, + "node_modules/@toml-tools/lexer": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@toml-tools/lexer/-/lexer-0.3.1.tgz", + "integrity": "sha512-CCKHQb5OWpgFu47MQ2rcql4AnE9GaehNk/c1oJOyOBovED6XmdzQPXsvPSu+NJ9lToqJNoX+nLXQsB8WyQGdzQ==", + "dev": true, + "dependencies": { + "chevrotain": "4.1.1" + } + }, + "node_modules/@toml-tools/parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@toml-tools/parser/-/parser-0.3.1.tgz", + "integrity": "sha512-vadwVx5TkgByt19dbp/rfIUKPkDdn5werANYvziiGK9wHlqPA0BWnvOloQw/dPDxF31+Ag0+zarXJpPDdRsPPg==", + "dev": true, + "dependencies": { + "@toml-tools/lexer": "^0.3.1", + "chevrotain": "4.1.1" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -704,6 +724,15 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chevrotain": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.1.1.tgz", + "integrity": "sha512-NQky1HQyiAzxsxpq4Ppt47SYO2U3JLtmfs85QPf3kYSzGBjjp5AA8kqjH8hCjGFRpaQ781QOk1ragQIOkBgUTA==", + "dev": true, + "dependencies": { + "regexp-to-ast": "0.3.5" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1911,6 +1940,28 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-toml": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-toml/-/prettier-plugin-toml-0.3.1.tgz", + "integrity": "sha512-j47DEO/dN/acU1nSL/B7q4A4Z2SYJhpWPCLPkcmfAXIQC6A5GD6Ao/bi9HRHZ8ueIDOauqjuAQbnvRxLXMjazA==", + "dev": true, + "dependencies": { + "@toml-tools/parser": "^0.3.1", + "prettier": "^1.16.0" + } + }, + "node_modules/prettier-plugin-toml/node_modules/prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1940,6 +1991,12 @@ } ] }, + "node_modules/regexp-to-ast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", + "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", + "dev": true + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -2495,6 +2552,25 @@ "fastq": "^1.6.0" } }, + "@toml-tools/lexer": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@toml-tools/lexer/-/lexer-0.3.1.tgz", + "integrity": "sha512-CCKHQb5OWpgFu47MQ2rcql4AnE9GaehNk/c1oJOyOBovED6XmdzQPXsvPSu+NJ9lToqJNoX+nLXQsB8WyQGdzQ==", + "dev": true, + "requires": { + "chevrotain": "4.1.1" + } + }, + "@toml-tools/parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@toml-tools/parser/-/parser-0.3.1.tgz", + "integrity": "sha512-vadwVx5TkgByt19dbp/rfIUKPkDdn5werANYvziiGK9wHlqPA0BWnvOloQw/dPDxF31+Ag0+zarXJpPDdRsPPg==", + "dev": true, + "requires": { + "@toml-tools/lexer": "^0.3.1", + "chevrotain": "4.1.1" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -2690,6 +2766,15 @@ "supports-color": "^7.1.0" } }, + "chevrotain": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.1.1.tgz", + "integrity": "sha512-NQky1HQyiAzxsxpq4Ppt47SYO2U3JLtmfs85QPf3kYSzGBjjp5AA8kqjH8hCjGFRpaQ781QOk1ragQIOkBgUTA==", + "dev": true, + "requires": { + "regexp-to-ast": "0.3.5" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3499,6 +3584,24 @@ "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, + "prettier-plugin-toml": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-toml/-/prettier-plugin-toml-0.3.1.tgz", + "integrity": "sha512-j47DEO/dN/acU1nSL/B7q4A4Z2SYJhpWPCLPkcmfAXIQC6A5GD6Ao/bi9HRHZ8ueIDOauqjuAQbnvRxLXMjazA==", + "dev": true, + "requires": { + "@toml-tools/parser": "^0.3.1", + "prettier": "^1.16.0" + }, + "dependencies": { + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true + } + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -3511,6 +3614,12 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "regexp-to-ast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", + "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", + "dev": true + }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", diff --git a/package.json b/package.json index ff40085..ad179a3 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "test": "eslint src/**/*.ts && tsc --noEmit", "lint": "eslint --fix --ext .tsx,.ts src/", "lint:ci": "eslint --ext .tsx,.ts src/ --max-warnings 0", - "format": "prettier --write 'src/**/*.{ts,tsx}'", - "format:ci": "prettier --check 'src/**/*.{ts,tsx}'" + "format": "prettier --write '{src,test}/**/*.{ts,tsx}' '*.json' '*.yml' '*.toml' '.github/**/*.yml'", + "format:ci": "prettier --check '{src,test}/**/*.{ts,tsx}' '*.json' '*.yml' '*.toml' '.github/**/*.yml'" }, "author": "Alexander Borsuk ", "license": "MIT", @@ -22,6 +22,7 @@ "esbuild": "^0.15.7", "eslint": "^8.9.0", "prettier": "^2.5.1", + "prettier-plugin-toml": "^0.3.1", "typescript": "^4.5.5" } } diff --git a/tsconfig.json b/tsconfig.json index d4114b3..76c3ef0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,24 +5,14 @@ "module": "ES6", "moduleResolution": "node", "target": "ESNext", - "lib": [ - "ESNext", - "webworker" - ], + "lib": ["ESNext", "webworker"], "alwaysStrict": true, "strict": true, "preserveConstEnums": true, "sourceMap": true, "esModuleInterop": true, - "types": [ - "@cloudflare/workers-types" - ] + "types": ["@cloudflare/workers-types"] }, - "include": [ - "src/", - ], - "exclude": [ - "node_modules/", - "dist/", - ] + "include": ["src/"], + "exclude": ["node_modules/", "dist/"] } diff --git a/wrangler.toml b/wrangler.toml index 61d6df3..950f007 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -14,7 +14,6 @@ command = 'npm i --prefer-offline --no-audit && npm run build' [vars] DEBUG = true - [env.prod] name = 'meta' workers_dev = false