@ghettoddos/eslint-config 4.1.0 → 4.1.1
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.d.mts +1 -1
- package/dist/index.mjs +6 -4
- package/package.json +9 -9
package/dist/index.d.mts
CHANGED
|
@@ -18840,7 +18840,7 @@ interface OptionsE18e extends OptionsOverrides {
|
|
|
18840
18840
|
* Include module replacements rules
|
|
18841
18841
|
*
|
|
18842
18842
|
* @see https://github.com/e18e/eslint-plugin#module-replacements
|
|
18843
|
-
* @default
|
|
18843
|
+
* @default type === 'lib' && isInEditor
|
|
18844
18844
|
*/
|
|
18845
18845
|
moduleReplacements?: boolean;
|
|
18846
18846
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -243,7 +243,7 @@ async function ensurePackages(packages) {
|
|
|
243
243
|
function isInEditorEnv() {
|
|
244
244
|
if (process.env.CI) return false;
|
|
245
245
|
if (isInGitHooksOrLintStaged()) return false;
|
|
246
|
-
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM || process.env.ZED_ENVIRONMENT);
|
|
246
|
+
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM || process.env.ZED_ENVIRONMENT && !process.env.ZED_TERM);
|
|
247
247
|
}
|
|
248
248
|
function isInGitHooksOrLintStaged() {
|
|
249
249
|
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
|
|
@@ -886,6 +886,7 @@ async function markdown(options = {}) {
|
|
|
886
886
|
name: "markdown/disables/code",
|
|
887
887
|
rules: {
|
|
888
888
|
"antfu/no-top-level-await": "off",
|
|
889
|
+
"e18e/prefer-static-regex": "off",
|
|
889
890
|
"no-alert": "off",
|
|
890
891
|
"no-console": "off",
|
|
891
892
|
"no-labels": "off",
|
|
@@ -1712,6 +1713,7 @@ async function test(options = {}) {
|
|
|
1712
1713
|
"test/prefer-hooks-in-order": "error",
|
|
1713
1714
|
"test/prefer-lowercase-title": "error",
|
|
1714
1715
|
"antfu/no-top-level-await": "off",
|
|
1716
|
+
"e18e/prefer-static-regex": "off",
|
|
1715
1717
|
"no-unused-expressions": "off",
|
|
1716
1718
|
"node/prefer-global/process": "off",
|
|
1717
1719
|
"ts/explicit-function-return-type": "off",
|
|
@@ -2203,7 +2205,7 @@ async function yaml(options = {}) {
|
|
|
2203
2205
|
//#endregion
|
|
2204
2206
|
//#region src/configs/e18e.ts
|
|
2205
2207
|
async function e18e(options = {}) {
|
|
2206
|
-
const { isInEditor = false, modernization = true, moduleReplacements = isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
2208
|
+
const { isInEditor = false, modernization = true, type = "app", moduleReplacements = type === "lib" && isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
2207
2209
|
const configs = pluginE18e.configs;
|
|
2208
2210
|
return [{
|
|
2209
2211
|
name: "antfu/e18e/rules",
|
|
@@ -2252,7 +2254,7 @@ const defaultPluginRenaming = {
|
|
|
2252
2254
|
* The merged ESLint configurations.
|
|
2253
2255
|
*/
|
|
2254
2256
|
function config(options = {}, ...userConfigs) {
|
|
2255
|
-
const { autoRenamePlugins = true, componentExts = [], e18e: enableE18e = true, gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsdoc: enableJsdoc = true, jsx: enableJsx = true, nextjs: enableNext = NextJsPackages.some((i) => isPackageExists(i)), node: enableNode = true, pnpm: enableCatalogs = !!findUpSync("pnpm-workspace.yaml"), react: enableReact = ReactPackages.some((i) => isPackageExists(i)), reactNative: enableReactNative = ReactNativePackages.some((i) => isPackageExists(i)), regexp: enableRegexp = true, tailwindcss: enableTailwindCSS = isPackageExists("tailwindcss"), typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
2257
|
+
const { autoRenamePlugins = true, componentExts = [], e18e: enableE18e = true, gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsdoc: enableJsdoc = true, jsx: enableJsx = true, nextjs: enableNext = NextJsPackages.some((i) => isPackageExists(i)), node: enableNode = true, pnpm: enableCatalogs = !!findUpSync("pnpm-workspace.yaml"), react: enableReact = ReactPackages.some((i) => isPackageExists(i)), reactNative: enableReactNative = ReactNativePackages.some((i) => isPackageExists(i)), regexp: enableRegexp = true, tailwindcss: enableTailwindCSS = isPackageExists("tailwindcss"), type: appType = "app", typescript: enableTypeScript = isPackageExists("typescript") || isPackageExists("@typescript/native-preview"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
2256
2258
|
let isInEditor = options.isInEditor;
|
|
2257
2259
|
if (isInEditor == null) {
|
|
2258
2260
|
isInEditor = isInEditorEnv();
|
|
@@ -2292,7 +2294,7 @@ function config(options = {}, ...userConfigs) {
|
|
|
2292
2294
|
...typescriptOptions,
|
|
2293
2295
|
componentExts,
|
|
2294
2296
|
overrides: getOverrides(options, "typescript"),
|
|
2295
|
-
type:
|
|
2297
|
+
type: appType
|
|
2296
2298
|
}));
|
|
2297
2299
|
if (stylisticOptions) configs.push(stylistic({
|
|
2298
2300
|
...stylisticOptions,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ghettoddos/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.1",
|
|
5
5
|
"description": "ghettoDdOS ESLint config",
|
|
6
6
|
"author": "ghettoDdOS <pen.egor2002@gamil.com> (https://github.com/ghettoDdOS/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"eslint-plugin-antfu": "^3.2.2",
|
|
110
110
|
"eslint-plugin-command": "^3.5.2",
|
|
111
111
|
"eslint-plugin-import-lite": "^0.5.2",
|
|
112
|
-
"eslint-plugin-jsdoc": "^62.
|
|
113
|
-
"eslint-plugin-jsonc": "^3.1.
|
|
112
|
+
"eslint-plugin-jsdoc": "^62.8.0",
|
|
113
|
+
"eslint-plugin-jsonc": "^3.1.2",
|
|
114
114
|
"eslint-plugin-n": "^17.24.0",
|
|
115
115
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
116
116
|
"eslint-plugin-perfectionist": "^5.6.0",
|
|
@@ -128,13 +128,13 @@
|
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@antfu/ni": "^28.3.0",
|
|
131
|
-
"@commitlint/cli": "^20.4.
|
|
132
|
-
"@commitlint/config-conventional": "^20.4.
|
|
131
|
+
"@commitlint/cli": "^20.4.4",
|
|
132
|
+
"@commitlint/config-conventional": "^20.4.4",
|
|
133
133
|
"@eslint-react/eslint-plugin": "^2.13.0",
|
|
134
134
|
"@eslint/config-inspector": "^1.5.0",
|
|
135
135
|
"@next/eslint-plugin-next": "^16.1.6",
|
|
136
136
|
"@prettier/plugin-xml": "^3.4.2",
|
|
137
|
-
"@react-native/eslint-plugin": "^0.
|
|
137
|
+
"@react-native/eslint-plugin": "^0.84.1",
|
|
138
138
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
139
139
|
"@types/node": "^25.4.0",
|
|
140
140
|
"@unocss/eslint-plugin": "^66.6.6",
|
|
@@ -155,13 +155,13 @@
|
|
|
155
155
|
"lint-staged": "^16.3.3",
|
|
156
156
|
"pnpm-workspace-yaml": "^1.6.0",
|
|
157
157
|
"simple-git-hooks": "^2.13.1",
|
|
158
|
-
"tsdown": "^0.21.
|
|
158
|
+
"tsdown": "^0.21.2",
|
|
159
159
|
"tsx": "^4.21.0",
|
|
160
160
|
"typescript": "^5.9.3",
|
|
161
|
-
"vitest": "^4.0.
|
|
161
|
+
"vitest": "^4.0.18",
|
|
162
162
|
"vue": "^3.5.30",
|
|
163
163
|
"vue-eslint-parser": "^10.4.0",
|
|
164
|
-
"@ghettoddos/eslint-config": "4.1.
|
|
164
|
+
"@ghettoddos/eslint-config": "4.1.1"
|
|
165
165
|
},
|
|
166
166
|
"resolutions": {
|
|
167
167
|
"@eslint-community/eslint-utils": "catalog:peer",
|