dashpresshq/dashpress

View on GitHub
.eslintrc.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports = {
  env: {
    browser: true,
    es2021: true,
    node: true,
    jest: true,
  },
  extends: ["next/core-web-vitals", "plugin:prettier/recommended"],
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
    ecmaVersion: "latest",
    sourceType: "module",
  },
  settings: {
    tailwindcss: {
      callees: ["classnames", "clsx", "ctl", "cva", "tv", "cn"],
    },
  },
  overrides: [
    {
      parser: "@typescript-eslint/parser",
      files: ["**/*.ts", "**/*.tsx"],
      plugins: [
        "tailwindcss",
        "react",
        "@typescript-eslint",
        "simple-import-sort",
      ],
      extends: [
        "plugin:react/recommended",
        "plugin:tailwindcss/recommended",
        "airbnb",
        "airbnb-typescript",
        "next/core-web-vitals",
        "plugin:prettier/recommended",
      ],
      parserOptions: {
        project: "./tsconfig.json",
      },
      rules: {
        "simple-import-sort/imports": "error",
        "simple-import-sort/exports": "error",
        "@typescript-eslint/no-duplicate-enum-values": "error",
        "@typescript-eslint/consistent-type-imports": "error",
        "@typescript-eslint/no-useless-constructor": "off",
        "@typescript-eslint/no-shadow": "error",
        "@typescript-eslint/no-throw-literal": "off",
        "@typescript-eslint/no-implied-eval": "off",
        "@typescript-eslint/naming-convention": "off",
        "@typescript-eslint/return-await": "off",
        "@typescript-eslint/no-unused-vars": ["error"],
        "import/no-anonymous-default-export": "off",
        "import/no-unresolved": "off",
        "import/extensions": "off",
        "no-underscore-dangle": "off",
        "no-useless-constructor": "off",
        "react/react-in-jsx-scope": "off",
        "import/prefer-default-export": "off",
        "no-return-await": "off",
        "global-require": "off",
        "class-methods-use-this": "off",
        "react/require-default-props": "off",
        "react/jsx-filename-extension": [2, { extensions: [".tsx"] }],
        "no-empty-function": "off",
        "no-unused-vars": "off",
        "react/no-danger": "off",
        "react/no-unstable-nested-components": "off",
        "import/no-extraneous-dependencies": "off",
        "import/no-cycle": "off",
        "consistent-return": "off",
        "default-case": "off",
        "react/jsx-props-no-spreading": "off",
        "no-restricted-syntax": "off",
        "no-await-in-loop": "off",
        "react-hooks/exhaustive-deps": "off",
      },
    },
    {
      files: ["**/*.spec.ts", "**/*.spec.tsx"],
      plugins: ["jest", "jest-formatting", "testing-library"],
      extends: [
        "plugin:testing-library/react",
        "plugin:jest/recommended",
        "plugin:jest-formatting/recommended",
      ],
      rules: {
        "jest/no-disabled-tests": "off",
      },
    },
  ],
};