eslint-plugin-grouped-import 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,7 +226,8 @@ const getImportsByGroup = (options, allOptionsPaths, importNodes) => {
226
226
  return lodash_1.default.reduce(options, (acc, option, key) => {
227
227
  const groupPaths = lodash_1.default.map(option, o => o.path);
228
228
  const filteredImports = lodash_1.default.filter(importNodes, (node) => {
229
- return lodash_1.default.some(groupPaths, (groupPath) => {
229
+ const isCurrentNodeInGroupAndPath = (lodash_1.default.includes(allOptionsPaths, node.source.value) && !lodash_1.default.includes(groupPaths, node.source.value));
230
+ return !isCurrentNodeInGroupAndPath && lodash_1.default.some(groupPaths, (groupPath) => {
230
231
  // check if there's a more specific path in option values
231
232
  const similarOptionValue = lodash_1.default.find(allOptionsPaths, optionValue => lodash_1.default.includes(optionValue, groupPath) && optionValue !== groupPath);
232
233
  const importValue = node.source.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-grouped-import",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Group imports based on the import path",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -16,21 +16,26 @@
16
16
  ],
17
17
  "author": "kairome",
18
18
  "license": "MIT",
19
- "keywords": ["eslint plugin", "eslint rule", "group imports", "grouped imports"],
19
+ "keywords": [
20
+ "eslint plugin",
21
+ "eslint rule",
22
+ "group imports",
23
+ "grouped imports"
24
+ ],
20
25
  "repository": "github:kairome/eslint-plugin-grouped-import",
21
26
  "devDependencies": {
22
27
  "@types/eslint": "^4.16.6",
23
28
  "@types/lodash": "^4.14.155",
24
29
  "@types/node": "^11.10.4",
25
30
  "@typescript-eslint/parser": "^1.4.2",
26
- "eslint": "^5.15.0",
31
+ "eslint": "^7.32.0",
27
32
  "jest": "^23.6.0",
28
33
  "lodash": "^4.17.15",
29
34
  "ts-jest": "^23.10.4",
30
35
  "typescript": "~3.4.0"
31
36
  },
32
37
  "peerDependencies": {
33
- "eslint": "^4.0.0 || ^5.0.0"
38
+ "eslint": "^5.0.0 || ^7.0.0"
34
39
  },
35
40
  "jest": {
36
41
  "transform": {