@storm-software/eslint 0.138.1 → 0.140.0
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/README.md +1 -1
- package/dist/chunk-7JRBTALJ.js +91 -0
- package/dist/{chunk-GXNMSXDL.js → chunk-D3EN5HD2.js} +7 -4
- package/dist/preset.js +55 -19
- package/dist/types.d.ts +51 -2
- package/dist/utils/find-workspace-root.d.ts +16 -0
- package/dist/utils/find-workspace-root.js +10 -0
- package/dist/utils/index.js +3 -3
- package/dist/utils/tsconfig-path.d.ts +1 -1
- package/dist/utils/tsconfig-path.js +2 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
correctPaths
|
|
3
|
+
} from "./chunk-G7QVU75O.js";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "./chunk-SHUYVCID.js";
|
|
7
|
+
|
|
8
|
+
// src/utils/find-workspace-root.ts
|
|
9
|
+
import { existsSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
12
|
+
var depth = 0;
|
|
13
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
14
|
+
const _startPath = startPath ?? process.cwd();
|
|
15
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
16
|
+
return _startPath;
|
|
17
|
+
}
|
|
18
|
+
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
19
|
+
return _startPath;
|
|
20
|
+
}
|
|
21
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
22
|
+
const parent = join(_startPath, "..");
|
|
23
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
24
|
+
}
|
|
25
|
+
return void 0;
|
|
26
|
+
}
|
|
27
|
+
__name(findFolderUp, "findFolderUp");
|
|
28
|
+
var rootFiles = [
|
|
29
|
+
"storm-workspace.json",
|
|
30
|
+
"storm-workspace.json",
|
|
31
|
+
"storm-workspace.yaml",
|
|
32
|
+
"storm-workspace.yml",
|
|
33
|
+
"storm-workspace.js",
|
|
34
|
+
"storm-workspace.ts",
|
|
35
|
+
".storm-workspace.json",
|
|
36
|
+
".storm-workspace.yaml",
|
|
37
|
+
".storm-workspace.yml",
|
|
38
|
+
".storm-workspace.js",
|
|
39
|
+
".storm-workspace.ts",
|
|
40
|
+
"lerna.json",
|
|
41
|
+
"nx.json",
|
|
42
|
+
"turbo.json",
|
|
43
|
+
"npm-workspace.json",
|
|
44
|
+
"yarn-workspace.json",
|
|
45
|
+
"pnpm-workspace.json",
|
|
46
|
+
"npm-workspace.yaml",
|
|
47
|
+
"yarn-workspace.yaml",
|
|
48
|
+
"pnpm-workspace.yaml",
|
|
49
|
+
"npm-workspace.yml",
|
|
50
|
+
"yarn-workspace.yml",
|
|
51
|
+
"pnpm-workspace.yml",
|
|
52
|
+
"npm-lock.json",
|
|
53
|
+
"yarn-lock.json",
|
|
54
|
+
"pnpm-lock.json",
|
|
55
|
+
"npm-lock.yaml",
|
|
56
|
+
"yarn-lock.yaml",
|
|
57
|
+
"pnpm-lock.yaml",
|
|
58
|
+
"npm-lock.yml",
|
|
59
|
+
"yarn-lock.yml",
|
|
60
|
+
"pnpm-lock.yml",
|
|
61
|
+
"bun.lockb"
|
|
62
|
+
];
|
|
63
|
+
var rootDirectories = [
|
|
64
|
+
".storm-workspace",
|
|
65
|
+
".nx",
|
|
66
|
+
".github",
|
|
67
|
+
".vscode",
|
|
68
|
+
".verdaccio"
|
|
69
|
+
];
|
|
70
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
71
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
72
|
+
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
73
|
+
}
|
|
74
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
75
|
+
}
|
|
76
|
+
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
77
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
78
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
79
|
+
if (!result) {
|
|
80
|
+
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
81
|
+
${rootFiles.join("\n")}
|
|
82
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
findWorkspaceRootSafe,
|
|
90
|
+
findWorkspaceRoot
|
|
91
|
+
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
joinPaths
|
|
3
|
+
} from "./chunk-G7QVU75O.js";
|
|
1
4
|
import {
|
|
2
5
|
__name
|
|
3
6
|
} from "./chunk-SHUYVCID.js";
|
|
4
7
|
|
|
5
8
|
// src/utils/tsconfig-path.ts
|
|
6
9
|
import { existsSync } from "node:fs";
|
|
7
|
-
function getTsConfigPath() {
|
|
10
|
+
function getTsConfigPath(basePath = "./") {
|
|
8
11
|
let tsconfigPath = "tsconfig.json";
|
|
9
|
-
if (existsSync("tsconfig.base.json")) {
|
|
12
|
+
if (existsSync(joinPaths(basePath, "tsconfig.base.json"))) {
|
|
10
13
|
tsconfigPath = "tsconfig.base.json";
|
|
11
|
-
} else if (existsSync("tsconfig.app.json")) {
|
|
14
|
+
} else if (existsSync(joinPaths(basePath, "tsconfig.app.json"))) {
|
|
12
15
|
tsconfigPath = "tsconfig.app.json";
|
|
13
|
-
} else if (existsSync("tsconfig.lib.json")) {
|
|
16
|
+
} else if (existsSync(joinPaths(basePath, "tsconfig.lib.json"))) {
|
|
14
17
|
tsconfigPath = "tsconfig.lib.json";
|
|
15
18
|
} else {
|
|
16
19
|
console.warn("No tsconfig.json found. Consider adding a tsconfig.json file to your project's ESLint configuration.");
|
package/dist/preset.js
CHANGED
|
@@ -8,13 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-7NZUDX62.js";
|
|
9
9
|
import {
|
|
10
10
|
getTsConfigPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D3EN5HD2.js";
|
|
12
12
|
import {
|
|
13
13
|
banner_plugin_default
|
|
14
14
|
} from "./chunk-VMGPCABA.js";
|
|
15
|
-
import {
|
|
16
|
-
joinPaths
|
|
17
|
-
} from "./chunk-G7QVU75O.js";
|
|
18
15
|
import "./chunk-ZUIV57VZ.js";
|
|
19
16
|
import {
|
|
20
17
|
GLOB_ASTRO,
|
|
@@ -44,6 +41,12 @@ import {
|
|
|
44
41
|
GLOB_XML,
|
|
45
42
|
GLOB_YAML
|
|
46
43
|
} from "./chunk-AIKLBIPC.js";
|
|
44
|
+
import {
|
|
45
|
+
findWorkspaceRoot
|
|
46
|
+
} from "./chunk-7JRBTALJ.js";
|
|
47
|
+
import {
|
|
48
|
+
joinPaths
|
|
49
|
+
} from "./chunk-G7QVU75O.js";
|
|
47
50
|
import {
|
|
48
51
|
__name
|
|
49
52
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -113,10 +116,6 @@ __name(astro, "astro");
|
|
|
113
116
|
import cspellConfig from "@cspell/eslint-plugin/recommended";
|
|
114
117
|
async function cspell(options = {}) {
|
|
115
118
|
const { configFile = "./.vscode/cspell.json", overrides = {} } = options;
|
|
116
|
-
let workspaceConfigFile = configFile;
|
|
117
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
118
|
-
workspaceConfigFile = joinPaths(process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH || "./", configFile);
|
|
119
|
-
}
|
|
120
119
|
return [
|
|
121
120
|
{
|
|
122
121
|
name: "storm/cspell/rules",
|
|
@@ -126,7 +125,7 @@ async function cspell(options = {}) {
|
|
|
126
125
|
"@cspell/spellchecker": [
|
|
127
126
|
"warn",
|
|
128
127
|
{
|
|
129
|
-
configFile:
|
|
128
|
+
configFile: joinPaths(findWorkspaceRoot(), configFile),
|
|
130
129
|
generateSuggestions: true,
|
|
131
130
|
numSuggestions: 10,
|
|
132
131
|
autoFix: true
|
|
@@ -2574,7 +2573,7 @@ __name(node, "node");
|
|
|
2574
2573
|
// src/configs/nx.ts
|
|
2575
2574
|
import defu3 from "defu";
|
|
2576
2575
|
async function nx(options = {}) {
|
|
2577
|
-
const { depsCheck =
|
|
2576
|
+
const { depsCheck = false, depsCheckSeverity = "error", moduleBoundaries, ignoredDependencies = [], ignoredFiles = [], checkObsoleteDependencies = true } = options;
|
|
2578
2577
|
return [
|
|
2579
2578
|
{
|
|
2580
2579
|
name: "storm/nx/setup",
|
|
@@ -2704,6 +2703,44 @@ async function perfectionist() {
|
|
|
2704
2703
|
}
|
|
2705
2704
|
__name(perfectionist, "perfectionist");
|
|
2706
2705
|
|
|
2706
|
+
// src/configs/pnpm.ts
|
|
2707
|
+
async function pnpm(options = {}) {
|
|
2708
|
+
const { overrides = {} } = options;
|
|
2709
|
+
const [pluginPnpm, parserJsonc] = await Promise.all([
|
|
2710
|
+
interopDefault(import("eslint-plugin-pnpm")),
|
|
2711
|
+
interopDefault(import("jsonc-eslint-parser"))
|
|
2712
|
+
]);
|
|
2713
|
+
return [
|
|
2714
|
+
{
|
|
2715
|
+
name: "storm/pnpm/setup",
|
|
2716
|
+
plugins: {
|
|
2717
|
+
pnpm: pluginPnpm
|
|
2718
|
+
},
|
|
2719
|
+
ignores: [
|
|
2720
|
+
"**/node_modules/**",
|
|
2721
|
+
"**/dist/**"
|
|
2722
|
+
],
|
|
2723
|
+
files: [
|
|
2724
|
+
"package.json",
|
|
2725
|
+
"**/package.json"
|
|
2726
|
+
],
|
|
2727
|
+
languageOptions: {
|
|
2728
|
+
parser: parserJsonc
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
name: "storm/pnpm/rules",
|
|
2733
|
+
rules: {
|
|
2734
|
+
"pnpm/enforce-catalog": "error",
|
|
2735
|
+
"pnpm/valid-catalog": "error",
|
|
2736
|
+
"pnpm/prefer-workspace-settings": "error",
|
|
2737
|
+
...overrides
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
];
|
|
2741
|
+
}
|
|
2742
|
+
__name(pnpm, "pnpm");
|
|
2743
|
+
|
|
2707
2744
|
// src/configs/prettier.ts
|
|
2708
2745
|
import config from "eslint-config-prettier";
|
|
2709
2746
|
async function prettier() {
|
|
@@ -3414,10 +3451,6 @@ __name(toml, "toml");
|
|
|
3414
3451
|
// src/configs/typescript.ts
|
|
3415
3452
|
async function typescript(options = {}) {
|
|
3416
3453
|
const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, tsdoc = "warn", type = "app" } = options;
|
|
3417
|
-
let tsconfigRootDir = process.cwd();
|
|
3418
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
3419
|
-
tsconfigRootDir = process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
3420
|
-
}
|
|
3421
3454
|
const files = options.files ?? [
|
|
3422
3455
|
GLOB_TS,
|
|
3423
3456
|
GLOB_TSX,
|
|
@@ -3431,10 +3464,8 @@ async function typescript(options = {}) {
|
|
|
3431
3464
|
`${GLOB_MARKDOWN}/**`,
|
|
3432
3465
|
GLOB_ASTRO_TS
|
|
3433
3466
|
];
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
tsconfigPath = getTsConfigPath();
|
|
3437
|
-
}
|
|
3467
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
3468
|
+
const tsconfigPath = getTsConfigPath(options?.tsconfigPath ?? workspaceRoot);
|
|
3438
3469
|
const isTypeAware = !!tsconfigPath;
|
|
3439
3470
|
const typeAwareRules = {
|
|
3440
3471
|
"dot-notation": "off",
|
|
@@ -3494,7 +3525,7 @@ async function typescript(options = {}) {
|
|
|
3494
3525
|
],
|
|
3495
3526
|
defaultProject: tsconfigPath
|
|
3496
3527
|
},
|
|
3497
|
-
tsconfigRootDir
|
|
3528
|
+
tsconfigRootDir: workspaceRoot
|
|
3498
3529
|
} : {},
|
|
3499
3530
|
...parserOptions
|
|
3500
3531
|
}
|
|
@@ -3982,6 +4013,11 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
3982
4013
|
stylistic: stylisticOptions
|
|
3983
4014
|
}));
|
|
3984
4015
|
}
|
|
4016
|
+
if (options.pnpm ?? true) {
|
|
4017
|
+
configs2.push(pnpm({
|
|
4018
|
+
overrides: getOverrides(options, "pnpm")
|
|
4019
|
+
}));
|
|
4020
|
+
}
|
|
3985
4021
|
if (options.jsonc ?? true) {
|
|
3986
4022
|
configs2.push(jsonc({
|
|
3987
4023
|
overrides: getOverrides(options, "jsonc"),
|
package/dist/types.d.ts
CHANGED
|
@@ -3740,6 +3740,21 @@ Backward pagination arguments
|
|
|
3740
3740
|
* @see https://perfectionist.dev/rules/sort-variable-declarations
|
|
3741
3741
|
*/
|
|
3742
3742
|
'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>
|
|
3743
|
+
/**
|
|
3744
|
+
* Enforce using "catalog:" in `package.json`
|
|
3745
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/enforce-catalog.test.ts
|
|
3746
|
+
*/
|
|
3747
|
+
'pnpm/enforce-catalog'?: Linter.RuleEntry<PnpmEnforceCatalog>
|
|
3748
|
+
/**
|
|
3749
|
+
* Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This would requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
|
|
3750
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/prefer-workspace-settings.test.ts
|
|
3751
|
+
*/
|
|
3752
|
+
'pnpm/prefer-workspace-settings'?: Linter.RuleEntry<PnpmPreferWorkspaceSettings>
|
|
3753
|
+
/**
|
|
3754
|
+
* Enforce using valid catalog in `package.json`
|
|
3755
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/valid-catalog.test.ts
|
|
3756
|
+
*/
|
|
3757
|
+
'pnpm/valid-catalog'?: Linter.RuleEntry<PnpmValidCatalog>
|
|
3743
3758
|
/**
|
|
3744
3759
|
* Require using arrow functions for callbacks
|
|
3745
3760
|
* @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
|
|
@@ -12692,6 +12707,30 @@ type PerfectionistSortVariableDeclarations = []|[{
|
|
|
12692
12707
|
|
|
12693
12708
|
partitionByNewLine?: boolean
|
|
12694
12709
|
}]
|
|
12710
|
+
// ----- pnpm/enforce-catalog -----
|
|
12711
|
+
type PnpmEnforceCatalog = []|[{
|
|
12712
|
+
|
|
12713
|
+
allowedProtocols?: string[]
|
|
12714
|
+
|
|
12715
|
+
autofix?: boolean
|
|
12716
|
+
|
|
12717
|
+
defaultCatalog?: string
|
|
12718
|
+
|
|
12719
|
+
reuseExistingCatalog?: boolean
|
|
12720
|
+
}]
|
|
12721
|
+
// ----- pnpm/prefer-workspace-settings -----
|
|
12722
|
+
type PnpmPreferWorkspaceSettings = []|[{
|
|
12723
|
+
autofix?: boolean
|
|
12724
|
+
}]
|
|
12725
|
+
// ----- pnpm/valid-catalog -----
|
|
12726
|
+
type PnpmValidCatalog = []|[{
|
|
12727
|
+
|
|
12728
|
+
autoInsert?: boolean
|
|
12729
|
+
|
|
12730
|
+
autoInsertDefaultSpecifier?: string
|
|
12731
|
+
|
|
12732
|
+
autofix?: boolean
|
|
12733
|
+
}]
|
|
12695
12734
|
// ----- prefer-arrow-callback -----
|
|
12696
12735
|
type PreferArrowCallback = []|[{
|
|
12697
12736
|
allowNamedFunctions?: boolean
|
|
@@ -16290,7 +16329,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
16290
16329
|
onlyEquality?: boolean
|
|
16291
16330
|
}]
|
|
16292
16331
|
// Names of all the configs
|
|
16293
|
-
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/markdown/disables' | '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/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'
|
|
16332
|
+
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/markdown/disables' | '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/rules' | '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'
|
|
16294
16333
|
|
|
16295
16334
|
/**
|
|
16296
16335
|
* Vendor types from Prettier so we don't rely on the dependency.
|
|
@@ -16754,6 +16793,8 @@ interface OptionsNx extends OptionsOverrides {
|
|
|
16754
16793
|
*
|
|
16755
16794
|
* @remarks
|
|
16756
16795
|
* If any values are overridden here, the `ignoredDependencies`, `ignoredFiles`, and `checkObsoleteDependencies` options will be ignored.
|
|
16796
|
+
*
|
|
16797
|
+
* @defaultValue false
|
|
16757
16798
|
*/
|
|
16758
16799
|
depsCheck?: OptionsNxDependencyChecks | false;
|
|
16759
16800
|
/**
|
|
@@ -16806,7 +16847,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsJavascript, Options
|
|
|
16806
16847
|
*/
|
|
16807
16848
|
gitignore?: boolean | FlatGitignoreOptions;
|
|
16808
16849
|
/**
|
|
16809
|
-
* Disable some opinionated rules to
|
|
16850
|
+
* Disable some opinionated rules to Antfu's preference.
|
|
16810
16851
|
*
|
|
16811
16852
|
* @defaultValue false
|
|
16812
16853
|
*/
|
|
@@ -16836,6 +16877,14 @@ interface OptionsConfig extends OptionsComponentExts, OptionsJavascript, Options
|
|
|
16836
16877
|
* Enable Nx monorepo support.
|
|
16837
16878
|
*/
|
|
16838
16879
|
nx?: OptionsNx;
|
|
16880
|
+
/**
|
|
16881
|
+
* Enable PNPM related rules.
|
|
16882
|
+
*
|
|
16883
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm
|
|
16884
|
+
*
|
|
16885
|
+
* @defaultValue true
|
|
16886
|
+
*/
|
|
16887
|
+
pnpm?: boolean | OptionsOverrides;
|
|
16839
16888
|
/**
|
|
16840
16889
|
* Enable JSX related rules.
|
|
16841
16890
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
3
|
+
*
|
|
4
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
5
|
+
* @returns The monorepo root directory
|
|
6
|
+
*/
|
|
7
|
+
declare function findWorkspaceRootSafe(pathInsideMonorepo?: string): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
10
|
+
*
|
|
11
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
12
|
+
* @returns The monorepo root directory
|
|
13
|
+
*/
|
|
14
|
+
declare function findWorkspaceRoot(pathInsideMonorepo?: string): string;
|
|
15
|
+
|
|
16
|
+
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_IGNORES
|
|
3
3
|
} from "../chunk-NXBMVNV2.js";
|
|
4
|
-
import {
|
|
5
|
-
formatConfig
|
|
6
|
-
} from "../chunk-FTXILLLE.js";
|
|
7
4
|
import {
|
|
8
5
|
ACRONYMS_LIST,
|
|
9
6
|
GLOB_ALL_SRC,
|
|
@@ -40,6 +37,9 @@ import {
|
|
|
40
37
|
GLOB_XML,
|
|
41
38
|
GLOB_YAML
|
|
42
39
|
} from "../chunk-AIKLBIPC.js";
|
|
40
|
+
import {
|
|
41
|
+
formatConfig
|
|
42
|
+
} from "../chunk-FTXILLLE.js";
|
|
43
43
|
import "../chunk-SHUYVCID.js";
|
|
44
44
|
export {
|
|
45
45
|
ACRONYMS_LIST,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.140.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"repository": {
|
|
@@ -186,6 +186,7 @@
|
|
|
186
186
|
"eslint-plugin-no-secrets": "^2.2.1",
|
|
187
187
|
"eslint-plugin-paths": "^1.1.0",
|
|
188
188
|
"eslint-plugin-perfectionist": "^4.9.0",
|
|
189
|
+
"eslint-plugin-pnpm": "^0.1.2",
|
|
189
190
|
"eslint-plugin-prettier": "^5.2.3",
|
|
190
191
|
"eslint-plugin-regexp": "^2.7.0",
|
|
191
192
|
"eslint-plugin-toml": "^0.12.0",
|