From 8e71ee1b382917b0f013a1305834c1842fd2c1b3 Mon Sep 17 00:00:00 2001 From: Aritra Chatterjee Date: Fri, 8 Mar 2024 10:53:41 +0530 Subject: [PATCH] format `.cjs` files --- packages/webapp/.eslintrc.cjs | 107 ++++++++++---------- packages/webapp/postcss.config.cjs | 10 +- packages/webapp/tailwind.config.cjs | 152 ++++++++++++++-------------- 3 files changed, 132 insertions(+), 137 deletions(-) diff --git a/packages/webapp/.eslintrc.cjs b/packages/webapp/.eslintrc.cjs index ed6febc2..f64d14b9 100644 --- a/packages/webapp/.eslintrc.cjs +++ b/packages/webapp/.eslintrc.cjs @@ -1,61 +1,58 @@ /** @type {import("eslint").Linter.Config} */ const config = { - extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended", "prettier"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: "./tsconfig.json", - "sourceType": "module", - "ecmaVersion": "latest", - }, - plugins: ["@typescript-eslint", "simple-import-sort"], - root: true, - ignorePatterns: ["node_modules", "src/hooks/useScrollBox.ts"], - rules: { - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "react/no-unescaped-entities": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-ts-comment": "off", + extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended", "prettier"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: "./tsconfig.json", + sourceType: "module", + ecmaVersion: "latest", + }, + plugins: ["@typescript-eslint", "simple-import-sort"], + root: true, + ignorePatterns: ["node_modules", "src/hooks/useScrollBox.ts"], + rules: { + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/restrict-template-expressions": "off", + "react/no-unescaped-entities": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/ban-ts-comment": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "warn", - { - // ignore unused args that start with underscore - argsIgnorePattern: "^_", - varsIgnorePattern: "^_", - caughtErrorsIgnorePattern: "^_", - }, - ], - "import/first": "error", - "import/newline-after-import": "error", - "import/no-duplicates": "error", - "simple-import-sort/imports": [ - "error", - { - "groups": [ - // Packages. `react` related packages come first. - [ - "^react", - "^next", - ], - // External packages. - ["^@?\\w"], - // Custom group for src/ prefixed imports - ["^src/"], - // Parent imports. Put `..` last. - ["^\\.\\.(?!/?$)", "^\\.\\./?$"], - // Other relative imports. Put same-folder imports and `.` last. - ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], - // Style imports. - ["^.+\\.s?css$"], - // Side effect imports. - ["^\\u0000"] - ] - } - ] - }, + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + // ignore unused args that start with underscore + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", + }, + ], + "import/first": "error", + "import/newline-after-import": "error", + "import/no-duplicates": "error", + "simple-import-sort/imports": [ + "error", + { + groups: [ + // Packages. `react` related packages come first. + ["^react", "^next"], + // External packages. + ["^@?\\w"], + // Custom group for src/ prefixed imports + ["^src/"], + // Parent imports. Put `..` last. + ["^\\.\\.(?!/?$)", "^\\.\\./?$"], + // Other relative imports. Put same-folder imports and `.` last. + ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], + // Style imports. + ["^.+\\.s?css$"], + // Side effect imports. + ["^\\u0000"], + ], + }, + ], + }, } module.exports = config diff --git a/packages/webapp/postcss.config.cjs b/packages/webapp/postcss.config.cjs index 5080cb5e..a27c49b1 100644 --- a/packages/webapp/postcss.config.cjs +++ b/packages/webapp/postcss.config.cjs @@ -1,8 +1,8 @@ const config = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, } -module.exports = config \ No newline at end of file +module.exports = config diff --git a/packages/webapp/tailwind.config.cjs b/packages/webapp/tailwind.config.cjs index ca9541d0..41054e98 100644 --- a/packages/webapp/tailwind.config.cjs +++ b/packages/webapp/tailwind.config.cjs @@ -1,83 +1,81 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - // darkMode: ["class"], - content: [ - "./src/**/*.{ts,tsx}", - ], - prefix: "", - theme: { - container: { - center: true, - padding: "2rem", - screens: { - "2xl": "1400px", - }, - }, - extend: { - fontFamily: { - fable: ['fable', 'sans-serif'], - }, - colors: { - border: "hsl(var(--border))", - input: "hsl(var(--input))", - ring: "hsl(var(--ring))", - background: "hsl(var(--background))", - foreground: "hsl(var(--foreground))", - primary: { - DEFAULT: "hsl(var(--primary))", - foreground: "hsl(var(--primary-foreground))", - }, - secondary: { - DEFAULT: "hsl(var(--secondary))", - foreground: "hsl(var(--secondary-foreground))", - }, - destructive: { - DEFAULT: "hsl(var(--destructive))", - foreground: "hsl(var(--destructive-foreground))", - }, - muted: { - DEFAULT: "hsl(var(--muted))", - foreground: "hsl(var(--muted-foreground))", - }, - accent: { - DEFAULT: "hsl(var(--accent))", - foreground: "hsl(var(--accent-foreground))", - }, - popover: { - DEFAULT: "hsl(var(--popover))", - foreground: "hsl(var(--popover-foreground))", - }, - card: { - DEFAULT: "hsl(var(--card))", - foreground: "hsl(var(--card-foreground))", - }, - }, - borderRadius: { - lg: "var(--radius)", - md: "calc(var(--radius) - 2px)", - sm: "calc(var(--radius) - 4px)", - }, - keyframes: { - "accordion-down": { - from: { height: "0" }, - to: { height: "var(--radix-accordion-content-height)" }, + // darkMode: ["class"], + content: ["./src/**/*.{ts,tsx}"], + prefix: "", + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, }, - "accordion-up": { - from: { height: "var(--radix-accordion-content-height)" }, - to: { height: "0" }, + extend: { + fontFamily: { + fable: ["fable", "sans-serif"], + }, + colors: { + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(--secondary-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + keyframes: { + "accordion-down": { + from: { height: "0" }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: "0" }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + // Custom box shadow that adds a 'highlight' effect + // For example, add 'shadow-highlight shadow-orange-300' to className + // See: https://tailwindcss.com/docs/box-shadow#customizing-your-theme + boxShadow: { + highlight: "0 0 20px", + }, }, - }, - animation: { - "accordion-down": "accordion-down 0.2s ease-out", - "accordion-up": "accordion-up 0.2s ease-out", - }, - // Custom box shadow that adds a 'highlight' effect - // For example, add 'shadow-highlight shadow-orange-300' to className - // See: https://tailwindcss.com/docs/box-shadow#customizing-your-theme - boxShadow: { - 'highlight': '0 0 20px', - }, }, - }, - plugins: [require("tailwindcss-animate")], + plugins: [require("tailwindcss-animate")], }