Skip to content

Commit

Permalink
Use shared config
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKowalczyk committed Mar 13, 2023
1 parent ef832a2 commit 095af40
Show file tree
Hide file tree
Showing 15 changed files with 612 additions and 50 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
module.exports = {
extends: ["@igorkowalczyk/eslint-config", "plugin:astro/recommended"],
env: {
node: true,
es2022: true,
browser: true,
},
extends: ["eslint:recommended", "plugin:astro/recommended", "prettier"],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
camelcase: "warn",
},
overrides: [
{
files: ["*.astro"],
Expand Down
16 changes: 0 additions & 16 deletions .prettierrc

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
...require("@igorkowalczyk/prettier-config"),
plugins: [require("prettier-plugin-astro"), require("prettier-plugin-tailwindcss")],
};
4 changes: 2 additions & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// https://astro.build/config
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import compress from "astro-compress";
import vercel from "@astrojs/vercel/serverless";
import { defineConfig } from "astro/config";
import compress from "astro-compress";

// https://astro.build/config
export default defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion database/Views.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { connection } from "./Connect.js";
import type { Model } from "mongoose";
import { connection } from "./Connect.js";
import { IUserDocument } from "./Schema";

const collection: Model<IUserDocument> = (await connection).models.views;
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"astro": "astro",
"format": "prettier --write . --ignore-unknown --plugin-search-dir=.",
"format:check": "prettier --check .",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.astro"
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.astro",
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx,.astro --fix"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -47,12 +48,13 @@
"tailwindcss-text-fill": "0.2.0"
},
"devDependencies": {
"@igorkowalczyk/eslint-config": "1.0.3",
"@igorkowalczyk/prettier-config": "1.0.3",
"@tailwindcss/forms": "0.5.3",
"@typescript-eslint/eslint-plugin": "5.54.1",
"@typescript-eslint/parser": "5.54.1",
"autoprefixer": "10.4.14",
"eslint": "8.36.0",
"eslint-config-prettier": "8.7.0",
"eslint-plugin-astro": "0.24.0",
"postcss": "8.4.21",
"prettier": "2.8.4",
Expand Down
Loading

0 comments on commit 095af40

Please sign in to comment.