From e0602e5fbe61239d4287affbd36b71147672e279 Mon Sep 17 00:00:00 2001 From: Fractal-Tess Date: Wed, 24 Jan 2024 03:56:40 +0200 Subject: [PATCH] update --- .eslintrc.cjs | 44 +++++++++++++----------- .prettierignore | 91 ++++++------------------------------------------- .prettierrc | 12 +++++++ .prettierrc.cjs | 16 --------- 4 files changed, 47 insertions(+), 116 deletions(-) create mode 100644 .prettierrc delete mode 100644 .prettierrc.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7519324..18925d3 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,13 +1,34 @@ +/** @type { import("eslint").Linter.FlatConfig } */ module.exports = { root: true, - parser: '@typescript-eslint/parser', extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', - 'plugin:json/recommended', + 'plugin:svelte/recommended', 'prettier' ], - rules: { + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020, + extraFileExtensions: ['.svelte'] + }, + env: { + browser: true, + es2017: true, + node: true + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + ], + rules: { 'no-unused-vars': 'off', // or "@typescript-eslint/no-unused-vars": "off", 'unused-imports/no-unused-imports': 'error', 'unused-imports/no-unused-vars': [ @@ -27,19 +48,4 @@ module.exports = { } ] }, - plugins: ['svelte3', '@typescript-eslint', 'unused-imports'], - ignorePatterns: ['*.cjs'], - overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], - settings: { - 'svelte3/typescript': () => require('typescript') - }, - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020 - }, - env: { - browser: true, - es2017: true, - node: true - } -}; +} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 874522c..20dcb3c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,84 +1,13 @@ -# v 0.2 -# Minified files -*.min.* -*.min.* - -# Husky -.husky/* - -# Git -.gitignore - -# Eslint -.eslintignore - -# Prettier -.prettierignore - -# Markdown files -*.md - -# Pnpm -pnpm-lock.yaml - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -## Build files - -# Common +.DS_Store +node_modules build -release -dist - -# Rust -target - -# Svelte-Kit .svelte-kit +package +.env +.env.* +!.env.example -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Docusaurus cache and generated files -.docusaurus - - -# Nodejs packages -node_modules/ - -# Package Managers - -.npm -# Yarn -.yarn-integrity - -# Output of 'npm pack' -*.tgz - -# Serverless directories -.serverless/ - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* \ No newline at end of file +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..82459b0 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "useTabs": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 80, + "arrowParens": "avoid", + "endOfLine": "lf", + "semi": false, + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index 3bb56fe..0000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - singleQuote: true, - trailingComma: 'none', - printWidth: 80, - svelteStrictMode: false, - svelteAllowShorthand: true, - bracketSameLine: true, - arrowParens: 'avoid', - tabWidth: 2, - useTabs: false, - semi: true, - plugins: ['prettier-plugin-svelte', 'prettier-plugin-tailwindcss'], - overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }], - pluginSearchDirs: ['./'], - endOfLine: 'lf' -};