@storm-software/eslint 0.67.0 → 0.68.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/preset.d.mts +0 -1147
- package/dist/preset.d.ts +0 -1147
- package/dist/preset.mjs +40 -13
- package/dist/rules.d.ts +0 -1362
- package/package.json +1 -1
package/dist/preset.mjs
CHANGED
|
@@ -13647,6 +13647,7 @@ plugin.configs.recommended = [
|
|
|
13647
13647
|
|
|
13648
13648
|
const CODE_BLOCK = "**/*.md{,x}/*";
|
|
13649
13649
|
const TS_FILE = "**/*.{,c,m}ts{,x}";
|
|
13650
|
+
const JS_FILE = "**/*.{,c}js{,x}";
|
|
13650
13651
|
|
|
13651
13652
|
const formatConfig = (name, config = []) => {
|
|
13652
13653
|
return config.map((config2, index) => {
|
|
@@ -13766,18 +13767,6 @@ function getStormConfig(options = {
|
|
|
13766
13767
|
...userConfigs
|
|
13767
13768
|
].filter(Boolean);
|
|
13768
13769
|
const typescriptConfig = {
|
|
13769
|
-
// https://typescript-eslint.io/
|
|
13770
|
-
// ...tsEslint.configs.stylisticTypeChecked,
|
|
13771
|
-
// https://www.npmjs.com/package/eslint-plugin-unicorn
|
|
13772
|
-
// ...unicorn.configs["flat/recommended"],
|
|
13773
|
-
// plugins: {
|
|
13774
|
-
// "@typescript-eslint": tsPlugin,
|
|
13775
|
-
// "@nx": nxPlugin,
|
|
13776
|
-
// unicorn,
|
|
13777
|
-
// prettier,
|
|
13778
|
-
// banner,
|
|
13779
|
-
// tsdoc
|
|
13780
|
-
// },
|
|
13781
13770
|
files: [TS_FILE],
|
|
13782
13771
|
languageOptions: {
|
|
13783
13772
|
globals: {
|
|
@@ -13870,7 +13859,45 @@ function getStormConfig(options = {
|
|
|
13870
13859
|
}
|
|
13871
13860
|
};
|
|
13872
13861
|
}
|
|
13873
|
-
|
|
13862
|
+
const javascriptConfig = {
|
|
13863
|
+
files: [JS_FILE],
|
|
13864
|
+
languageOptions: {
|
|
13865
|
+
globals: {
|
|
13866
|
+
...Object.fromEntries(
|
|
13867
|
+
Object.keys(globals).flatMap(
|
|
13868
|
+
(group) => Object.keys(globals[group]).map((key) => [
|
|
13869
|
+
key,
|
|
13870
|
+
"readonly"
|
|
13871
|
+
])
|
|
13872
|
+
)
|
|
13873
|
+
),
|
|
13874
|
+
...globals.browser,
|
|
13875
|
+
...globals.node,
|
|
13876
|
+
"window": "readonly",
|
|
13877
|
+
"Storm": "readonly"
|
|
13878
|
+
},
|
|
13879
|
+
ecmaVersion: "latest"
|
|
13880
|
+
},
|
|
13881
|
+
rules: {
|
|
13882
|
+
// Prettier
|
|
13883
|
+
...prettierConfig.rules,
|
|
13884
|
+
// Banner
|
|
13885
|
+
...plugin.configs["recommended"][1]?.rules,
|
|
13886
|
+
...config$1,
|
|
13887
|
+
"banner/banner": [
|
|
13888
|
+
"error",
|
|
13889
|
+
{
|
|
13890
|
+
repositoryName: options.name,
|
|
13891
|
+
banner: options.banner,
|
|
13892
|
+
commentType: "block",
|
|
13893
|
+
numNewlines: 2
|
|
13894
|
+
}
|
|
13895
|
+
],
|
|
13896
|
+
...options.rules ?? {}
|
|
13897
|
+
},
|
|
13898
|
+
ignores: ["dist", "coverage", "tmp", ".nx", ...options.ignores || []]
|
|
13899
|
+
};
|
|
13900
|
+
configs.push(javascriptConfig);
|
|
13874
13901
|
if (options.markdown) {
|
|
13875
13902
|
configs.push(...markdown.configs.recommended);
|
|
13876
13903
|
configs.push({
|