@storm-software/eslint 0.145.21 → 0.145.23
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.
|
@@ -36,16 +36,16 @@ var parserPlain = {
|
|
|
36
36
|
}
|
|
37
37
|
}), "parseForESLint")
|
|
38
38
|
};
|
|
39
|
+
function isInGitHooksOrLintStaged() {
|
|
40
|
+
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged") || process.env.npm_lifecycle_script?.startsWith("lefthook") || process.env.npm_lifecycle_script === "push");
|
|
41
|
+
}
|
|
42
|
+
__name(isInGitHooksOrLintStaged, "isInGitHooksOrLintStaged");
|
|
39
43
|
function isInEditorEnv() {
|
|
40
44
|
if (process.env.CI) return false;
|
|
41
45
|
if (isInGitHooksOrLintStaged()) return false;
|
|
42
46
|
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
|
|
43
47
|
}
|
|
44
48
|
__name(isInEditorEnv, "isInEditorEnv");
|
|
45
|
-
function isInGitHooksOrLintStaged() {
|
|
46
|
-
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
|
|
47
|
-
}
|
|
48
|
-
__name(isInGitHooksOrLintStaged, "isInGitHooksOrLintStaged");
|
|
49
49
|
async function interopDefault(m) {
|
|
50
50
|
const resolved = await m;
|
|
51
51
|
return resolved.default || resolved;
|
|
@@ -90,8 +90,8 @@ __name(renameRules, "renameRules");
|
|
|
90
90
|
|
|
91
91
|
export {
|
|
92
92
|
parserPlain,
|
|
93
|
-
isInEditorEnv,
|
|
94
93
|
isInGitHooksOrLintStaged,
|
|
94
|
+
isInEditorEnv,
|
|
95
95
|
interopDefault,
|
|
96
96
|
isPackageInScope,
|
|
97
97
|
ensurePackages,
|
package/dist/preset.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isPackageInScope,
|
|
6
6
|
parserPlain,
|
|
7
7
|
renameRules
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SZFP4QOA.js";
|
|
9
9
|
import {
|
|
10
10
|
getTsConfigPath
|
|
11
11
|
} from "./chunk-D3EN5HD2.js";
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
GLOB_JSX,
|
|
27
27
|
GLOB_LESS,
|
|
28
28
|
GLOB_MARKDOWN,
|
|
29
|
-
GLOB_MARKDOWN_CODE,
|
|
30
29
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
31
30
|
GLOB_MDX,
|
|
32
31
|
GLOB_POSTCSS,
|
|
@@ -3073,11 +3072,10 @@ __name(jsx, "jsx");
|
|
|
3073
3072
|
// src/configs/markdown.ts
|
|
3074
3073
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
3075
3074
|
async function markdown(options = {}) {
|
|
3076
|
-
const {
|
|
3075
|
+
const { files = [
|
|
3077
3076
|
GLOB_MARKDOWN
|
|
3078
3077
|
], overrides = {} } = options;
|
|
3079
3078
|
const markdown1 = await interopDefault(import("@eslint/markdown"));
|
|
3080
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
3081
3079
|
return [
|
|
3082
3080
|
{
|
|
3083
3081
|
name: "storm/markdown/setup",
|
|
@@ -3104,51 +3102,8 @@ async function markdown(options = {}) {
|
|
|
3104
3102
|
languageOptions: {
|
|
3105
3103
|
parser: parserPlain
|
|
3106
3104
|
},
|
|
3107
|
-
name: "storm/markdown/parser"
|
|
3108
|
-
|
|
3109
|
-
{
|
|
3110
|
-
files: [
|
|
3111
|
-
GLOB_MARKDOWN_CODE,
|
|
3112
|
-
...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
|
|
3113
|
-
],
|
|
3114
|
-
languageOptions: {
|
|
3115
|
-
parserOptions: {
|
|
3116
|
-
projectService: true,
|
|
3117
|
-
tsconfigRootDir: workspaceRoot,
|
|
3118
|
-
ecmaFeatures: {
|
|
3119
|
-
impliedStrict: true
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
},
|
|
3123
|
-
name: "storm/markdown/disables",
|
|
3124
|
-
rules: {
|
|
3125
|
-
"import/newline-after-import": "off",
|
|
3126
|
-
"banner/banner": "off",
|
|
3127
|
-
"no-alert": "off",
|
|
3128
|
-
"no-console": "off",
|
|
3129
|
-
"no-labels": "off",
|
|
3130
|
-
"no-lone-blocks": "off",
|
|
3131
|
-
"no-restricted-syntax": "off",
|
|
3132
|
-
"no-undef": "off",
|
|
3133
|
-
"no-unused-expressions": "off",
|
|
3134
|
-
"no-unused-labels": "off",
|
|
3135
|
-
"no-unused-vars": "off",
|
|
3136
|
-
"node/prefer-global/process": "off",
|
|
3137
|
-
"style/comma-dangle": "off",
|
|
3138
|
-
"style/eol-last": "off",
|
|
3139
|
-
"ts/consistent-type-imports": "off",
|
|
3140
|
-
"ts/explicit-function-return-type": "off",
|
|
3141
|
-
"ts/no-namespace": "off",
|
|
3142
|
-
"ts/no-redeclare": "off",
|
|
3143
|
-
"ts/no-require-imports": "off",
|
|
3144
|
-
"ts/no-unused-expressions": "off",
|
|
3145
|
-
"ts/no-unused-vars": "off",
|
|
3146
|
-
"ts/no-use-before-define": "off",
|
|
3147
|
-
"unicode-bom": "off",
|
|
3148
|
-
"unused-imports/no-unused-imports": "off",
|
|
3149
|
-
"unused-imports/no-unused-vars": "off",
|
|
3150
|
-
...overrides
|
|
3151
|
-
}
|
|
3105
|
+
name: "storm/markdown/parser",
|
|
3106
|
+
...overrides
|
|
3152
3107
|
}
|
|
3153
3108
|
];
|
|
3154
3109
|
}
|
|
@@ -4209,8 +4164,7 @@ async function typescript(options = {}) {
|
|
|
4209
4164
|
GLOB_ASTRO_TS
|
|
4210
4165
|
];
|
|
4211
4166
|
const workspaceRoot = findWorkspaceRoot();
|
|
4212
|
-
const tsconfigPath = getTsConfigPath(options?.tsconfigPath
|
|
4213
|
-
const isTypeAware = !!tsconfigPath;
|
|
4167
|
+
const tsconfigPath = getTsConfigPath(options?.tsconfigPath || workspaceRoot);
|
|
4214
4168
|
const typeAwareRules = {
|
|
4215
4169
|
"dot-notation": "off",
|
|
4216
4170
|
"no-implied-eval": "off",
|
|
@@ -4288,11 +4242,9 @@ async function typescript(options = {}) {
|
|
|
4288
4242
|
}
|
|
4289
4243
|
},
|
|
4290
4244
|
// assign type-aware parser for type-aware files and type-unaware parser for the rest
|
|
4291
|
-
...
|
|
4245
|
+
...[
|
|
4292
4246
|
makeParser(false, files),
|
|
4293
4247
|
makeParser(true, filesTypeAware, ignoresTypeAware)
|
|
4294
|
-
] : [
|
|
4295
|
-
makeParser(false, files)
|
|
4296
4248
|
],
|
|
4297
4249
|
{
|
|
4298
4250
|
files,
|
|
@@ -4451,7 +4403,7 @@ async function typescript(options = {}) {
|
|
|
4451
4403
|
"tsdoc/syntax": tsdoc
|
|
4452
4404
|
}
|
|
4453
4405
|
},
|
|
4454
|
-
...
|
|
4406
|
+
...[
|
|
4455
4407
|
{
|
|
4456
4408
|
files: filesTypeAware,
|
|
4457
4409
|
ignores: ignoresTypeAware,
|
|
@@ -4461,7 +4413,7 @@ async function typescript(options = {}) {
|
|
|
4461
4413
|
...overridesTypeAware
|
|
4462
4414
|
}
|
|
4463
4415
|
}
|
|
4464
|
-
]
|
|
4416
|
+
]
|
|
4465
4417
|
].filter(Boolean);
|
|
4466
4418
|
}
|
|
4467
4419
|
__name(typescript, "typescript");
|
package/dist/types.d.ts
CHANGED
|
@@ -16725,7 +16725,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
16725
16725
|
onlyEquality?: boolean
|
|
16726
16726
|
}]
|
|
16727
16727
|
// Names of all the configs
|
|
16728
|
-
type ConfigNames = 'storm/cspell/rules' | 'storm/astro/setup' | 'storm/astro/rules' | 'storm/formatter/setup' | 'storm/imports/rules' | 'storm/graphql/setup' | 'storm/graphql/rules' | 'storm/graphql/relay' | 'storm/javascript/setup' | 'storm/javascript/banner' | 'storm/javascript/rules' | 'storm/jsx/rules' | 'storm/jsdoc/rules' | 'storm/jsonc/setup' | 'storm/jsonc/rules' | 'storm/markdown/setup' | 'storm/markdown/processor' | 'storm/markdown/parser' | 'storm/
|
|
16728
|
+
type ConfigNames = 'storm/cspell/rules' | 'storm/astro/setup' | 'storm/astro/rules' | 'storm/formatter/setup' | 'storm/imports/rules' | 'storm/graphql/setup' | 'storm/graphql/rules' | 'storm/graphql/relay' | 'storm/javascript/setup' | 'storm/javascript/banner' | 'storm/javascript/rules' | 'storm/jsx/rules' | 'storm/jsdoc/rules' | 'storm/jsonc/setup' | 'storm/jsonc/rules' | 'storm/markdown/setup' | 'storm/markdown/processor' | 'storm/markdown/parser' | 'storm/mdx/setup' | 'storm/node/rules' | 'storm/nx/setup' | 'storm/nx/schema' | 'storm/nx/dependency-check' | 'storm/nx/module-boundaries' | 'storm/next/rules' | 'storm/prettier/rules' | 'storm/perfectionist/rules' | 'storm/pnpm/setup' | 'storm/pnpm/package-json' | 'storm/pnpm/pnpm-workspace-yaml' | 'storm/react/setup' | 'storm/react/rules' | 'storm/react-native/rules' | 'storm/sort/package-json' | 'storm/stylistic/rules' | 'storm/secrets/rules' | 'storm/storybook/setup' | 'storm/storybook/rules' | 'storm/storybook/main' | 'storm/test/setup' | 'storm/test/rules' | 'storm/toml/setup' | 'storm/toml/rules' | 'storm/regexp/rules' | 'storm/typescript/setup' | 'storm/typescript/parser' | 'storm/typescript/type-aware-parser' | 'storm/typescript/rules' | 'storm/typescript/rules-tsdoc' | 'storm/typescript/rules-type-aware' | 'storm/unicorn/rules' | 'storm/unocss' | 'storm/yaml/setup' | 'storm/yaml/rules'
|
|
16729
16729
|
|
|
16730
16730
|
/**
|
|
16731
16731
|
* Vendor types from Prettier so we don't rely on the dependency.
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ declare const parserPlain: {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
declare function isInEditorEnv(): boolean;
|
|
29
28
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
29
|
+
declare function isInEditorEnv(): boolean;
|
|
30
30
|
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
31
31
|
default: infer U;
|
|
32
32
|
} ? U : T>;
|
package/dist/utils/helpers.js
CHANGED
package/package.json
CHANGED