diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 8927e2c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# https://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = false \ No newline at end of file diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9a477d8 --- /dev/null +++ b/.env.example @@ -0,0 +1,17 @@ +# Since the ".env" file is gitignored, you can use the ".env.example" file to +# build a new ".env" file when you clone the repo. Keep this file up-to-date +# when you add new variables to `.env`. + +# This file will be committed to version control, so make sure not to have any +# secrets in it. If you are cloning this repo, create a copy of this file named +# ".env" and populate it with your secrets. + +# When adding additional environment variables, the schema in "/src/env.js" +# should be updated accordingly. + +# Drizzle +DATABASE_URL="postgresql://postgres:password@localhost:5432/dragons-site" + +# Example: +# SERVERVAR="foo" +# NEXT_PUBLIC_CLIENTVAR="bar" diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index a7af2a5..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -dist -node_modules -.github -types.generated.d.ts \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..90f288d --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,59 @@ +/** @type {import("eslint").Linter.Config} */ +const config = { + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": true + }, + "plugins": [ + "@typescript-eslint", + "drizzle" + ], + "extends": [ + "next/core-web-vitals", + "plugin:@typescript-eslint/recommended-type-checked", + "plugin:@typescript-eslint/stylistic-type-checked" + ], + "rules": { + "@typescript-eslint/array-type": "off", + "@typescript-eslint/consistent-type-definitions": "off", + "@typescript-eslint/consistent-type-imports": [ + "warn", + { + "prefer": "type-imports", + "fixStyle": "inline-type-imports" + } + ], + "@typescript-eslint/no-unused-vars": [ + "warn", + { + "argsIgnorePattern": "^_" + } + ], + "@typescript-eslint/require-await": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": { + "attributes": false + } + } + ], + "drizzle/enforce-delete-with-where": [ + "error", + { + "drizzleObjectName": [ + "db" + ] + } + ], + "drizzle/enforce-update-with-where": [ + "error", + { + "drizzleObjectName": [ + "db" + ] + } + ] + } +} +module.exports = config; \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 296d99a..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,53 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -module.exports = { - env: { - node: true, - es2022: true, - browser: true, - }, - extends: ['eslint:recommended', 'plugin:astro/recommended'], - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, - ecmaVersion: 'latest', - sourceType: 'module', - }, - rules: {}, - overrides: [ - { - files: ['*.js'], - rules: { - 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], - }, - }, - { - files: ['*.astro'], - parser: 'astro-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser', - extraFileExtensions: ['.astro'], - }, - rules: { - 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], - }, - }, - { - files: ['*.ts'], - parser: '@typescript-eslint/parser', - extends: ['plugin:@typescript-eslint/recommended'], - rules: { - '@typescript-eslint/no-unused-vars': [ - 'error', - { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }, - ], - '@typescript-eslint/no-non-null-assertion': 'off', - }, - }, - { - // Define the configuration for ` - -
- - - -