question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pathGroups` caused "should NOT have additional properties" error

See original GitHub issue

In my react app codebase, I have an absolute path alias setup, so I have to use pathGroups in import/order to tell the ESLint that the alias is an internal import. However, it keeps throwing an error about the import/order config is invalid, and apparently the problem is caused by the pathGroup.

Here is my ESLint config

{
  "env": {
    "browser": true,
    "es6": true
  },
  "extends": [
    "react-app",
    "airbnb"
  ],
  "globals": {
    "Atomics": "readonly",
    "SharedArrayBuffer": "readonly"
  },
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": 2018,
    "sourceType": "module"
  },
  "plugins": [
    "react",
    "react-hooks"
  ],
  "rules": {
    "react/jsx-indent": "off",
    "react/jsx-filename-extension": "off",
    "react/forbid-prop-types": "off",
    "react/jsx-props-no-spreading": "off",
    "react/require-default-props": "off",
    "import/prefer-default-export": "off",
    "import/newline-after-import": [
      "warn",
      {
        "count": 2
      }
    ],
    "import/order": [
      "warn",
      {
        "groups": [
          "builtin",
          "external",
          "parent",
          "sibling",
          "index"
        ],
        "pathGroups": [
          {
            "pattern": "@/**",
            "group": "parent"
          }
        ],
        "newlines-between": "always"
      }
    ],
    "indent": "off",
    "no-nested-ternary": "off",
    "no-restricted-syntax": "off",
    "no-await-in-loop": "off",
    "object-curly-newline": "off",
    "object-curly-spacing": "off",
    "no-unused-expressions": "off",
    "radix": "off",
    "no-plusplus": "off",
    "max-len": "off",
    "func-names": "off",
    "arrow-parens": [
      "warn",
      "as-needed"
    ]
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
ljharbcommented, Jan 23, 2020

What version of eslint-plugin-import are you using? pathGroups was added in v2.20.

5reactions
liesislukascommented, May 19, 2020

using “eslint-plugin-import”: “^2.20.2” and it’s the only rule which fails, added only alphabetize property, doesn’t matter which option i add, i get that additional property error

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

`pathGroups` caused "should NOT have additional properties ...
In my react app codebase, I have an absolute path alias setup, ... pathGroups caused "should NOT have additional properties" error #1621.
Read more >
`pathGroups` caused "should NOT have additional properties ...
In my react app codebase, I have an absolute path alias setup, so I have to use pathGroups in import/order to tell the...
Read more >
Swagger Editor shows the "Schema error: should NOT have ...
openapi - Swagger Editor shows the "Schema error: should NOT have additional properties" error for a path parameter - Stack Overflow. Stack Overflow...
Read more >
Pathgroups, a dynamic data structure for genome ...
A pathgroup is a set of r≥3 paths, one or more from each partial breakpoint graph currently being constructed. For a given problem,...
Read more >
17 Managing Multipath I/O for Devices - SUSE Documentation
Collecting path devices with similar properties into path groups. Monitoring path devices actively for failure or reinstantiation. Monitoring of addition and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found