From bfc84678a12005c419cdc112589185c1651dde1e Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Wed, 12 Jan 2022 18:22:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Update=20Prettier=20and=20ESLint?= =?UTF-8?q?=20+=20format=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.cjs | 22 +++++----------------- .eslintrc.shared.cjs | 21 +++++++++++++++++++++ .prettierignore | 1 + app/.eslintrc.cjs | 21 ++++++++------------- app/src/routes/profile.svelte | 2 +- 5 files changed, 36 insertions(+), 31 deletions(-) create mode 100644 .eslintrc.shared.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5fc0ca5..75df294 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,22 +1,10 @@ module.exports = { root: true, parser: "@typescript-eslint/parser", - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], - plugins: ["@typescript-eslint"], + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "./.eslintrc.shared.cjs", + ], ignorePatterns: ["*.cjs", "app/**/*"], - parserOptions: { - sourceType: "module", - ecmaVersion: 2019, - }, - rules: { - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": ["off", { argsIgnorePattern: "^_" }], - "@typescript-eslint/no-non-null-assertion": "off", - }, - env: { - browser: true, - es2017: true, - node: true, - }, }; diff --git a/.eslintrc.shared.cjs b/.eslintrc.shared.cjs new file mode 100644 index 0000000..3973896 --- /dev/null +++ b/.eslintrc.shared.cjs @@ -0,0 +1,21 @@ +module.exports = { + root: true, + parser: "@typescript-eslint/parser", + extends: ["prettier"], + plugins: ["@typescript-eslint"], + parserOptions: { + sourceType: "module", + ecmaVersion: 2019, + }, + env: { + browser: true, + es2017: true, + node: true, + }, + rules: { + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": ["off", { argsIgnorePattern: "^_" }], + "@typescript-eslint/no-non-null-assertion": "off", + }, +}; diff --git a/.prettierignore b/.prettierignore index 208895c..495778e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ dist/** node_modules/** README.md +app/**/* diff --git a/app/.eslintrc.cjs b/app/.eslintrc.cjs index be59143..7a03d02 100644 --- a/app/.eslintrc.cjs +++ b/app/.eslintrc.cjs @@ -1,20 +1,15 @@ module.exports = { root: true, parser: "@typescript-eslint/parser", - extends: ["../.eslintrc.cjs"], - plugins: ["svelte3", "@typescript-eslint"], - ignorePatterns: ["*.cjs"], - overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], + extends: ["../.eslintrc.shared.cjs"], + plugins: ["svelte3"], + overrides: [ + { + files: ["*.svelte"], + processor: "svelte3/svelte3", + }, + ], settings: { "svelte3/typescript": () => require("typescript"), }, - parserOptions: { - sourceType: "module", - ecmaVersion: 2019, - }, - env: { - browser: true, - es2017: true, - node: true, - }, }; diff --git a/app/src/routes/profile.svelte b/app/src/routes/profile.svelte index 44fa861..b7bc3fa 100644 --- a/app/src/routes/profile.svelte +++ b/app/src/routes/profile.svelte @@ -241,7 +241,7 @@ {/if} - +

Session