From 772be85e67947507d4c415ad688049cbac62c163 Mon Sep 17 00:00:00 2001 From: aidenlx Date: Sat, 22 Jan 2022 17:48:13 +0800 Subject: [PATCH] style: fix indent in non-ts files now all files use same indent character (tab) --- .eslintrc | 42 ++++++++++++++++++++---------------------- styles.css | 2 +- tsconfig.json | 35 ++++++++++++++--------------------- version-bump.mjs | 6 +++--- versions.json | 4 ++-- 5 files changed, 40 insertions(+), 49 deletions(-) diff --git a/.eslintrc b/.eslintrc index 0807290..7fc8ba5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,23 +1,21 @@ { - "root": true, - "parser": "@typescript-eslint/parser", - "env": { "node": true }, - "plugins": [ - "@typescript-eslint" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "parserOptions": { - "sourceType": "module" - }, - "rules": { - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], - "@typescript-eslint/ban-ts-comment": "off", - "no-prototype-builtins": "off", - "@typescript-eslint/no-empty-function": "off" - } - } \ No newline at end of file + "root": true, + "parser": "@typescript-eslint/parser", + "env": { "node": true }, + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + "parserOptions": { + "sourceType": "module" + }, + "rules": { + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], + "@typescript-eslint/ban-ts-comment": "off", + "no-prototype-builtins": "off", + "@typescript-eslint/no-empty-function": "off" + } +} diff --git a/styles.css b/styles.css index cfd0fd7..e026c13 100644 --- a/styles.css +++ b/styles.css @@ -1,4 +1,4 @@ /* Sets all the text color to red! */ body { - color: red; + color: red; } diff --git a/tsconfig.json b/tsconfig.json index b50f455..c796542 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,23 +1,16 @@ { - "compilerOptions": { - "baseUrl": ".", - "inlineSourceMap": true, - "inlineSources": true, - "module": "ESNext", - "target": "ES6", - "allowJs": true, - "noImplicitAny": true, - "moduleResolution": "node", - "importHelpers": true, - "isolatedModules": true, - "lib": [ - "DOM", - "ES5", - "ES6", - "ES7" - ] - }, - "include": [ - "**/*.ts" - ] + "compilerOptions": { + "baseUrl": ".", + "inlineSourceMap": true, + "inlineSources": true, + "module": "ESNext", + "target": "ES6", + "allowJs": true, + "noImplicitAny": true, + "moduleResolution": "node", + "importHelpers": true, + "isolatedModules": true, + "lib": ["DOM", "ES5", "ES6", "ES7"] + }, + "include": ["**/*.ts"] } diff --git a/version-bump.mjs b/version-bump.mjs index 14f8134..be11fe4 100644 --- a/version-bump.mjs +++ b/version-bump.mjs @@ -13,13 +13,13 @@ const targetVersion = process.env.npm_package_version; let menifest = JSON.parse((await readFile("manifest.json")).toString()); const { minAppVersion } = menifest; menifest.version = targetVersion; - await writeFile("manifest.json", JSON.stringify(menifest, null, 2)); + await writeFile("manifest.json", JSON.stringify(menifest, null, "\t")); // update versions.json with target version and minAppVersion from manifest.json let versions = JSON.parse((await readFile("versions.json")).toString()); versions[targetVersion] = minAppVersion; - await writeFile("versions.json", JSON.stringify(versions, null, 2)); + await writeFile("versions.json", JSON.stringify(versions, null, "\t")); - // save changes in git + // save changes in git await exec("git add manifest.json versions.json"); })().catch(() => process.exit(1)); diff --git a/versions.json b/versions.json index e303bca..9f1da4b 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,4 @@ { - "1.0.0": "0.9.7", - "1.0.1": "0.9.12" + "1.0.0": "0.9.7", + "1.0.1": "0.9.12" }