@storm-software/eslint 0.124.2 → 0.125.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/dist/{chunk-X3L37QNE.js → chunk-AIKLBIPC.js} +3 -0
- package/dist/{chunk-J2PN7K74.js → chunk-KDHZD7SF.js} +3 -3
- package/dist/{chunk-LFZMLUCG.js → chunk-QX5WDYBX.js} +2 -2
- package/dist/preset.d.ts +1 -1
- package/dist/preset.js +43 -8
- package/dist/{types-Cnmfgj1g.d.ts → types-Bz2mGFHi.d.ts} +7 -1
- package/dist/utils/banner-plugin.js +3 -3
- package/dist/utils/combine.d.ts +1 -1
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/constants.js +3 -1
- package/dist/utils/get-file-banner.js +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +3 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ var GLOB_JSON = "**/*.json";
|
|
|
57
57
|
var GLOB_JSON5 = "**/*.json5";
|
|
58
58
|
var GLOB_JSONC = "**/*.jsonc";
|
|
59
59
|
var GLOB_MARKDOWN = "**/*.md";
|
|
60
|
+
var GLOB_MDX = "**/*.mdx";
|
|
60
61
|
var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
61
62
|
var GLOB_SVELTE = "**/*.svelte";
|
|
62
63
|
var GLOB_VUE = "**/*.vue";
|
|
@@ -82,6 +83,7 @@ var GLOB_ALL_SRC = [
|
|
|
82
83
|
GLOB_JSON,
|
|
83
84
|
GLOB_JSON5,
|
|
84
85
|
GLOB_MARKDOWN,
|
|
86
|
+
GLOB_MDX,
|
|
85
87
|
GLOB_SVELTE,
|
|
86
88
|
GLOB_VUE,
|
|
87
89
|
GLOB_YAML,
|
|
@@ -143,6 +145,7 @@ export {
|
|
|
143
145
|
GLOB_JSON5,
|
|
144
146
|
GLOB_JSONC,
|
|
145
147
|
GLOB_MARKDOWN,
|
|
148
|
+
GLOB_MDX,
|
|
146
149
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
147
150
|
GLOB_SVELTE,
|
|
148
151
|
GLOB_VUE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACRONYMS_LIST
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AIKLBIPC.js";
|
|
4
4
|
import {
|
|
5
5
|
__name
|
|
6
6
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -26,7 +26,7 @@ var getFileBanner = /* @__PURE__ */ __name((name = "") => {
|
|
|
26
26
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
27
27
|
}).join(" ");
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return ` -------------------------------------------------------------------
|
|
30
30
|
|
|
31
31
|
${padding}\u26A1 Storm Software ${titleName ? `- ${titleName}` : ""}
|
|
32
32
|
|
|
@@ -41,7 +41,7 @@ ${padding}\u26A1 Storm Software ${titleName ? `- ${titleName}` : ""}
|
|
|
41
41
|
Contact: ${process.env.STORM_HOMEPAGE ? process.env.STORM_HOMEPAGE.endsWith("/") ? process.env.STORM_HOMEPAGE.slice(-1) : process.env.STORM_HOMEPAGE : "https://stormsoftware.com"}/contact
|
|
42
42
|
License: ${process.env.STORM_LICENSING ? process.env.STORM_LICENSING : `https://stormsoftware.com/${name ? `projects/${name}/` : ""}license`}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
------------------------------------------------------------------- `;
|
|
45
45
|
}, "getFileBanner");
|
|
46
46
|
|
|
47
47
|
export {
|
package/dist/preset.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Linter } from 'eslint';
|
|
2
2
|
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
3
|
-
import { O as OptionsConfig, R as RuleOptions, T as TypedFlatConfigItem, A as Awaitable, C as ConfigNames } from './types-
|
|
3
|
+
import { O as OptionsConfig, R as RuleOptions, T as TypedFlatConfigItem, A as Awaitable, C as ConfigNames } from './types-Bz2mGFHi.js';
|
|
4
4
|
import '@nx/eslint-plugin/src/utils/runtime-lint-utils';
|
|
5
5
|
import '@stylistic/eslint-plugin';
|
|
6
6
|
import '@typescript-eslint/parser';
|
package/dist/preset.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
banner_plugin_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QX5WDYBX.js";
|
|
4
|
+
import "./chunk-KDHZD7SF.js";
|
|
5
5
|
import {
|
|
6
6
|
GLOB_ASTRO,
|
|
7
7
|
GLOB_ASTRO_TS,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
GLOB_MARKDOWN,
|
|
18
18
|
GLOB_MARKDOWN_CODE,
|
|
19
19
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
20
|
+
GLOB_MDX,
|
|
20
21
|
GLOB_POSTCSS,
|
|
21
22
|
GLOB_SCSS,
|
|
22
23
|
GLOB_SRC,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
GLOB_TSX,
|
|
29
30
|
GLOB_XML,
|
|
30
31
|
GLOB_YAML
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AIKLBIPC.js";
|
|
32
33
|
import {
|
|
33
34
|
ensurePackages,
|
|
34
35
|
interopDefault,
|
|
@@ -2080,7 +2081,7 @@ async function jsx() {
|
|
|
2080
2081
|
]);
|
|
2081
2082
|
return [
|
|
2082
2083
|
{
|
|
2083
|
-
name: "storm/jsx/
|
|
2084
|
+
name: "storm/jsx/rules",
|
|
2084
2085
|
files: [
|
|
2085
2086
|
GLOB_JSX,
|
|
2086
2087
|
GLOB_TSX
|
|
@@ -2094,10 +2095,7 @@ async function jsx() {
|
|
|
2094
2095
|
},
|
|
2095
2096
|
plugins: {
|
|
2096
2097
|
"jsx-a11y": pluginJsxA11y
|
|
2097
|
-
}
|
|
2098
|
-
},
|
|
2099
|
-
{
|
|
2100
|
-
name: "storm/jsx/rules",
|
|
2098
|
+
},
|
|
2101
2099
|
rules: {
|
|
2102
2100
|
"jsx-a11y/alt-text": "error",
|
|
2103
2101
|
"jsx-a11y/anchor-ambiguous-text": "off",
|
|
@@ -3665,6 +3663,38 @@ async function cspell(options = {}) {
|
|
|
3665
3663
|
}
|
|
3666
3664
|
__name(cspell, "cspell");
|
|
3667
3665
|
|
|
3666
|
+
// src/configs/mdx.ts
|
|
3667
|
+
async function mdx(options = {}) {
|
|
3668
|
+
const { files = [
|
|
3669
|
+
GLOB_MDX
|
|
3670
|
+
], overrides = {} } = options;
|
|
3671
|
+
await ensurePackages([
|
|
3672
|
+
"eslint-plugin-mdx"
|
|
3673
|
+
]);
|
|
3674
|
+
const mdx1 = await interopDefault(import("eslint-plugin-mdx"));
|
|
3675
|
+
return [
|
|
3676
|
+
{
|
|
3677
|
+
name: "storm/mdx/setup",
|
|
3678
|
+
plugins: {
|
|
3679
|
+
mdx: mdx1
|
|
3680
|
+
},
|
|
3681
|
+
...mdx1.flat,
|
|
3682
|
+
files,
|
|
3683
|
+
processor: mdx1.createRemarkProcessor({
|
|
3684
|
+
lintCodeBlocks: true,
|
|
3685
|
+
// optional, if you want to disable language mapper, set it to `false`
|
|
3686
|
+
// if you want to override the default language mapper inside, you can provide your own
|
|
3687
|
+
languageMapper: {}
|
|
3688
|
+
}),
|
|
3689
|
+
rules: {
|
|
3690
|
+
...mdx1.flat.rules,
|
|
3691
|
+
...overrides
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
];
|
|
3695
|
+
}
|
|
3696
|
+
__name(mdx, "mdx");
|
|
3697
|
+
|
|
3668
3698
|
// src/preset.ts
|
|
3669
3699
|
var flatConfigProps = [
|
|
3670
3700
|
"name",
|
|
@@ -3821,6 +3851,11 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
3821
3851
|
overrides: getOverrides(options, "markdown")
|
|
3822
3852
|
}));
|
|
3823
3853
|
}
|
|
3854
|
+
if (options.mdx ?? true) {
|
|
3855
|
+
configs2.push(mdx({
|
|
3856
|
+
overrides: getOverrides(options, "mdx")
|
|
3857
|
+
}));
|
|
3858
|
+
}
|
|
3824
3859
|
if (options.formatters) {
|
|
3825
3860
|
configs2.push(formatters(options.formatters, typeof stylisticOptions === "boolean" ? {} : stylisticOptions));
|
|
3826
3861
|
}
|
|
@@ -14637,7 +14637,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
14637
14637
|
onlyEquality?: boolean
|
|
14638
14638
|
}]
|
|
14639
14639
|
// Names of all the configs
|
|
14640
|
-
type ConfigNames = 'storm/astro/setup' | 'storm/astro/rules' | 'storm/formatter/setup' | 'storm/imports/rules' | 'storm/javascript/setup' | 'storm/javascript/banner' | 'storm/javascript/rules' | 'storm/jsx/
|
|
14640
|
+
type ConfigNames = 'storm/astro/setup' | 'storm/astro/rules' | 'storm/formatter/setup' | 'storm/imports/rules' | '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/node/rules' | 'storm/perfectionist/setup' | 'storm/react/setup' | 'storm/react/rules' | 'storm/sort/package-json' | 'storm/stylistic/rules' | '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-type-aware' | 'storm/unicorn/rules' | 'storm/unocss' | 'storm/yaml/setup' | 'storm/yaml/rules'
|
|
14641
14641
|
|
|
14642
14642
|
/**
|
|
14643
14643
|
* Vendor types from Prettier so we don't rely on the dependency.
|
|
@@ -15189,6 +15189,12 @@ interface OptionsConfig extends OptionsComponentExts, OptionsJavascript, Options
|
|
|
15189
15189
|
* @default true
|
|
15190
15190
|
*/
|
|
15191
15191
|
markdown?: boolean | OptionsOverrides;
|
|
15192
|
+
/**
|
|
15193
|
+
* Enable linting for mdx files.
|
|
15194
|
+
*
|
|
15195
|
+
* @default true
|
|
15196
|
+
*/
|
|
15197
|
+
mdx?: boolean | OptionsOverrides;
|
|
15192
15198
|
/**
|
|
15193
15199
|
* Enable stylistic rules.
|
|
15194
15200
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
banner_plugin_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-QX5WDYBX.js";
|
|
4
|
+
import "../chunk-KDHZD7SF.js";
|
|
5
|
+
import "../chunk-AIKLBIPC.js";
|
|
6
6
|
import "../chunk-SHUYVCID.js";
|
|
7
7
|
export {
|
|
8
8
|
banner_plugin_default as default
|
package/dist/utils/combine.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Awaitable } from 'eslint-flat-config-utils';
|
|
2
|
-
import { T as TypedFlatConfigItem } from '../types-
|
|
2
|
+
import { T as TypedFlatConfigItem } from '../types-Bz2mGFHi.js';
|
|
3
3
|
import '@nx/eslint-plugin/src/utils/runtime-lint-utils';
|
|
4
4
|
import '@stylistic/eslint-plugin';
|
|
5
5
|
import '@typescript-eslint/parser';
|
|
@@ -16,6 +16,7 @@ declare const GLOB_JSON = "**/*.json";
|
|
|
16
16
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
17
17
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
18
18
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
19
|
+
declare const GLOB_MDX = "**/*.mdx";
|
|
19
20
|
declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
20
21
|
declare const GLOB_SVELTE = "**/*.svelte";
|
|
21
22
|
declare const GLOB_VUE = "**/*.vue";
|
|
@@ -32,4 +33,4 @@ declare const GLOB_TESTS: string[];
|
|
|
32
33
|
declare const GLOB_ALL_SRC: string[];
|
|
33
34
|
declare const GLOB_EXCLUDE: string[];
|
|
34
35
|
|
|
35
|
-
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML };
|
|
36
|
+
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML };
|
package/dist/utils/constants.js
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
GLOB_MARKDOWN,
|
|
19
19
|
GLOB_MARKDOWN_CODE,
|
|
20
20
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
21
|
+
GLOB_MDX,
|
|
21
22
|
GLOB_POSTCSS,
|
|
22
23
|
GLOB_SCSS,
|
|
23
24
|
GLOB_SRC,
|
|
@@ -32,7 +33,7 @@ import {
|
|
|
32
33
|
GLOB_VUE,
|
|
33
34
|
GLOB_XML,
|
|
34
35
|
GLOB_YAML
|
|
35
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-AIKLBIPC.js";
|
|
36
37
|
import "../chunk-SHUYVCID.js";
|
|
37
38
|
export {
|
|
38
39
|
ACRONYMS_LIST,
|
|
@@ -54,6 +55,7 @@ export {
|
|
|
54
55
|
GLOB_MARKDOWN,
|
|
55
56
|
GLOB_MARKDOWN_CODE,
|
|
56
57
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
58
|
+
GLOB_MDX,
|
|
57
59
|
GLOB_POSTCSS,
|
|
58
60
|
GLOB_SCSS,
|
|
59
61
|
GLOB_SRC,
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { formatConfig } from './format-config.js';
|
|
2
2
|
export { DEFAULT_IGNORES } from './ignores.js';
|
|
3
|
-
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from './constants.js';
|
|
3
|
+
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from './constants.js';
|
|
4
4
|
import 'eslint';
|
package/dist/utils/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
GLOB_MARKDOWN,
|
|
22
22
|
GLOB_MARKDOWN_CODE,
|
|
23
23
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
24
|
+
GLOB_MDX,
|
|
24
25
|
GLOB_POSTCSS,
|
|
25
26
|
GLOB_SCSS,
|
|
26
27
|
GLOB_SRC,
|
|
@@ -35,7 +36,7 @@ import {
|
|
|
35
36
|
GLOB_VUE,
|
|
36
37
|
GLOB_XML,
|
|
37
38
|
GLOB_YAML
|
|
38
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-AIKLBIPC.js";
|
|
39
40
|
import {
|
|
40
41
|
DEFAULT_IGNORES
|
|
41
42
|
} from "../chunk-UAGSKXUP.js";
|
|
@@ -61,6 +62,7 @@ export {
|
|
|
61
62
|
GLOB_MARKDOWN,
|
|
62
63
|
GLOB_MARKDOWN_CODE,
|
|
63
64
|
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
65
|
+
GLOB_MDX,
|
|
64
66
|
GLOB_POSTCSS,
|
|
65
67
|
GLOB_SCSS,
|
|
66
68
|
GLOB_SRC,
|
package/package.json
CHANGED