@vinicunca/eslint-config 2.7.1 → 2.7.3

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.
package/dist/index.js CHANGED
@@ -13,8 +13,6 @@ function e(o) {
13
13
  // src/base.ts
14
14
  import { FlatConfigComposer } from "eslint-flat-config-utils";
15
15
  import { isPackageExists } from "local-pkg";
16
- import fs from "node:fs";
17
- import process2 from "node:process";
18
16
 
19
17
  // src/flags.ts
20
18
  var ERROR = "error";
@@ -124,6 +122,7 @@ var GLOB_EXCLUDE = [
124
122
  ];
125
123
 
126
124
  // src/utils.ts
125
+ import process from "node:process";
127
126
  async function combineConfigs(...configs2) {
128
127
  const resolved = await Promise.all(configs2);
129
128
  return resolved.flat();
@@ -183,6 +182,9 @@ var parserPlain = {
183
182
  }
184
183
  })
185
184
  };
185
+ function isInEditorEnv() {
186
+ return !!((process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM) && !process.env.CI);
187
+ }
186
188
 
187
189
  // src/configs/stylistic.ts
188
190
  var STR_PARENS_NEW_LINE = "parens-new-line";
@@ -999,23 +1001,11 @@ async function perfectionist() {
999
1001
  "perfectionist/sort-imports": [
1000
1002
  ERROR,
1001
1003
  {
1002
- "groups": [
1003
- "type",
1004
- ["builtin", "external"],
1005
- "internal-type",
1006
- "internal",
1007
- ["parent-type", "sibling-type", "index-type"],
1008
- ["parent", "sibling", "index"],
1009
- "object",
1010
- "unknown"
1011
- ],
1012
- "internal-pattern": [
1004
+ internalPattern: [
1013
1005
  "~/**",
1014
1006
  "~~/**"
1015
1007
  ],
1016
- "newlines-between": "always",
1017
- "order": "asc",
1018
- "type": "natural"
1008
+ type: "natural"
1019
1009
  }
1020
1010
  ],
1021
1011
  "perfectionist/sort-vue-attributes": [OFF]
@@ -1422,7 +1412,7 @@ async function test(options = {}) {
1422
1412
  }
1423
1413
 
1424
1414
  // src/configs/typescript.ts
1425
- import process from "node:process";
1415
+ import process2 from "node:process";
1426
1416
  async function typescript(options = {}) {
1427
1417
  const {
1428
1418
  componentExts = [],
@@ -1484,7 +1474,7 @@ async function typescript(options = {}) {
1484
1474
  allowDefaultProject: ["./*.js"],
1485
1475
  defaultProject: tsconfigPath
1486
1476
  },
1487
- tsconfigRootDir: process.cwd()
1477
+ tsconfigRootDir: process2.cwd()
1488
1478
  } : {},
1489
1479
  ...parserOptions
1490
1480
  }
@@ -1904,7 +1894,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
1904
1894
  autoRenamePlugins = true,
1905
1895
  componentExts = [],
1906
1896
  gitignore: enableGitignore = true,
1907
- isInEditor = !!((process2.env.VSCODE_PID || process2.env.VSCODE_CWD || process2.env.JETBRAINS_IDE || process2.env.VIM || process2.env.NVIM) && !process2.env.CI),
1897
+ isInEditor = isInEditorEnv(),
1908
1898
  jsx: enableJsx = true,
1909
1899
  react: enableReact = false,
1910
1900
  regexp: enableRegexp = true,
@@ -1929,9 +1919,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
1929
1919
  if (typeof enableGitignore !== "boolean") {
1930
1920
  configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2(enableGitignore)]));
1931
1921
  } else {
1932
- if (fs.existsSync(".gitignore")) {
1933
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2()]));
1934
- }
1922
+ configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2()]));
1935
1923
  }
1936
1924
  }
1937
1925
  const typescriptOptions = resolveSubOptions(options, "typescript");
@@ -2094,6 +2082,7 @@ export {
2094
2082
  ignores,
2095
2083
  imports,
2096
2084
  interopDefault,
2085
+ isInEditorEnv,
2097
2086
  javascript,
2098
2087
  jsdoc,
2099
2088
  jsonc,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "2.7.1",
4
+ "version": "2.7.3",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -58,29 +58,29 @@
58
58
  "eslint": ">=8.57.0"
59
59
  },
60
60
  "dependencies": {
61
- "@eslint-react/eslint-plugin": "^1.5.26",
61
+ "@eslint-react/eslint-plugin": "^1.6.0",
62
62
  "@stylistic/eslint-plugin": "^2.6.0-beta.0",
63
63
  "@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
64
64
  "@typescript-eslint/parser": "8.0.0-alpha.40",
65
- "@unocss/eslint-plugin": "^0.61.3",
66
- "eslint-config-flat-gitignore": "^0.1.7",
67
- "eslint-flat-config-utils": "^0.2.5",
65
+ "@unocss/eslint-plugin": "^0.61.6",
66
+ "eslint-config-flat-gitignore": "^0.1.8",
67
+ "eslint-flat-config-utils": "^0.3.0",
68
68
  "eslint-merge-processors": "^0.1.0",
69
69
  "eslint-plugin-antfu": "^2.3.4",
70
70
  "eslint-plugin-eslint-comments": "^3.2.0",
71
71
  "eslint-plugin-format": "^0.1.2",
72
- "eslint-plugin-import-x": "^3.0.1",
73
- "eslint-plugin-jsdoc": "^48.7.0",
72
+ "eslint-plugin-import-x": "^3.1.0",
73
+ "eslint-plugin-jsdoc": "^48.8.3",
74
74
  "eslint-plugin-jsonc": "^2.16.0",
75
75
  "eslint-plugin-markdown": "^5.1.0",
76
- "eslint-plugin-n": "^17.9.0",
76
+ "eslint-plugin-n": "^17.10.1",
77
77
  "eslint-plugin-no-only-tests": "^3.1.0",
78
- "eslint-plugin-perfectionist": "^2.11.0",
78
+ "eslint-plugin-perfectionist": "^3.0.0",
79
79
  "eslint-plugin-react-hooks": "^4.6.2",
80
80
  "eslint-plugin-regexp": "^2.6.0",
81
- "eslint-plugin-sonarjs": "^1.0.3",
82
- "eslint-plugin-unicorn": "^54.0.0",
83
- "eslint-plugin-unused-imports": "^4.0.0",
81
+ "eslint-plugin-sonarjs": "^1.0.4",
82
+ "eslint-plugin-unicorn": "^55.0.0",
83
+ "eslint-plugin-unused-imports": "^4.0.1",
84
84
  "eslint-plugin-vitest": "^0.5.4",
85
85
  "eslint-plugin-vue": "^9.27.0",
86
86
  "eslint-plugin-yml": "^1.14.0",
@@ -92,15 +92,15 @@
92
92
  "yaml-eslint-parser": "^1.2.3"
93
93
  },
94
94
  "devDependencies": {
95
- "@types/eslint": "^8.56.10",
95
+ "@types/eslint": "^9.6.0",
96
96
  "@types/fs-extra": "^11.0.4",
97
- "eslint-typegen": "^0.2.4",
97
+ "eslint-typegen": "^0.3.0",
98
98
  "execa": "^9.3.0",
99
99
  "fast-glob": "^3.3.2",
100
100
  "fs-extra": "^11.2.0",
101
101
  "react": "^18.3.1",
102
- "tsup": "^8.1.0",
103
- "vue": "^3.4.31"
102
+ "tsup": "^8.2.3",
103
+ "vue": "^3.4.34"
104
104
  },
105
105
  "scripts": {
106
106
  "lint": "eslint -v",