Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't know how to add other rules to .eslintrc.js #133

Open
Arka-cell opened this issue Aug 27, 2021 · 0 comments
Open

Don't know how to add other rules to .eslintrc.js #133

Arka-cell opened this issue Aug 27, 2021 · 0 comments

Comments

@Arka-cell
Copy link

I read the documentation and I have created my file .eslintrc.js and added the following config:

module.exports = {
    env: {
      node: true,
      es6: true
    },
    plugins: ["gridsome"],
    rules: {
      "gridsome/format-query-block": "error",
      "gridsome/require-g-image-src": "error",
      "gridsome/require-g-link-to": "error"
    },
    parser: "vue-eslint-parser"
  }

But I want to combine it with the following config:

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: ["plugin:vue/recommended", "eslint:recommended", "@vue/prettier"],
  parserOptions: {
    parser: "@babel/eslint-parser",
  },
  rules: {
    "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
  },
  overrides: [
    {
      files: [
        "**/__tests__/*.{j,t}s?(x)",
        "**/tests/unit/**/*.spec.{j,t}s?(x)",
      ],
      env: {
        jest: true,
      },
    },
  ],
};

First of all, can I combine both? And, if so, then what should I read, because the documentation was really small for the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant