@storm-software/eslint 0.129.2 → 0.129.4
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.ts +1 -1
- package/dist/preset.js +39 -13
- package/dist/{types-CqEOmL6d.d.ts → types-DFxU53F5.d.ts} +18 -2
- package/dist/utils/combine.d.ts +1 -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 -->
|
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-DFxU53F5.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
|
@@ -215,7 +215,7 @@ async function stylistic(options = {}) {
|
|
|
215
215
|
...options
|
|
216
216
|
};
|
|
217
217
|
const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
|
|
218
|
-
const
|
|
218
|
+
const config2 = pluginStylistic.configs.customize({
|
|
219
219
|
indent,
|
|
220
220
|
jsx: jsx2,
|
|
221
221
|
pluginName: "style",
|
|
@@ -229,7 +229,7 @@ async function stylistic(options = {}) {
|
|
|
229
229
|
style: pluginStylistic
|
|
230
230
|
},
|
|
231
231
|
rules: {
|
|
232
|
-
...
|
|
232
|
+
...config2.rules,
|
|
233
233
|
"style/lines-around-comment": "off",
|
|
234
234
|
"style/linebreak-style": [
|
|
235
235
|
"error",
|
|
@@ -811,8 +811,9 @@ import * as pluginImport from "eslint-plugin-import-x";
|
|
|
811
811
|
import { default as default4 } from "eslint-plugin-n";
|
|
812
812
|
import { default as default5 } from "eslint-plugin-no-secrets";
|
|
813
813
|
import { default as default6 } from "eslint-plugin-perfectionist";
|
|
814
|
-
import { default as default7 } from "eslint-plugin-
|
|
815
|
-
import { default as default8 } from "eslint-plugin-
|
|
814
|
+
import { default as default7 } from "eslint-plugin-prettier";
|
|
815
|
+
import { default as default8 } from "eslint-plugin-unicorn";
|
|
816
|
+
import { default as default9 } from "eslint-plugin-unused-imports";
|
|
816
817
|
|
|
817
818
|
// src/configs/imports.ts
|
|
818
819
|
async function imports(options = {}) {
|
|
@@ -901,7 +902,7 @@ async function javascript(options = {}) {
|
|
|
901
902
|
{
|
|
902
903
|
name: "storm/javascript/rules",
|
|
903
904
|
plugins: {
|
|
904
|
-
"unused-imports":
|
|
905
|
+
"unused-imports": default9
|
|
905
906
|
},
|
|
906
907
|
rules: {
|
|
907
908
|
// disallow use of console
|
|
@@ -2608,8 +2609,8 @@ async function nx(options = {}) {
|
|
|
2608
2609
|
ignoredDependencies: [],
|
|
2609
2610
|
ignoredFiles: [],
|
|
2610
2611
|
checkMissingDependencies: true,
|
|
2611
|
-
checkObsoleteDependencies:
|
|
2612
|
-
checkVersionMismatches:
|
|
2612
|
+
checkObsoleteDependencies: false,
|
|
2613
|
+
checkVersionMismatches: true,
|
|
2613
2614
|
includeTransitiveDependencies: true,
|
|
2614
2615
|
useLocalPathsForWorkspaceDependencies: true
|
|
2615
2616
|
})
|
|
@@ -2714,6 +2715,28 @@ async function perfectionist() {
|
|
|
2714
2715
|
}
|
|
2715
2716
|
__name(perfectionist, "perfectionist");
|
|
2716
2717
|
|
|
2718
|
+
// src/configs/prettier.ts
|
|
2719
|
+
import config from "eslint-config-prettier";
|
|
2720
|
+
async function prettier() {
|
|
2721
|
+
return [
|
|
2722
|
+
{
|
|
2723
|
+
...config,
|
|
2724
|
+
name: "storm/prettier/rules",
|
|
2725
|
+
plugins: {
|
|
2726
|
+
...config.plugins,
|
|
2727
|
+
prettier: default7
|
|
2728
|
+
},
|
|
2729
|
+
rules: {
|
|
2730
|
+
...config.rules,
|
|
2731
|
+
"prettier/prettier": "error",
|
|
2732
|
+
"arrow-body-style": "off",
|
|
2733
|
+
"prefer-arrow-callback": "off"
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
];
|
|
2737
|
+
}
|
|
2738
|
+
__name(prettier, "prettier");
|
|
2739
|
+
|
|
2717
2740
|
// src/configs/react.ts
|
|
2718
2741
|
import { isPackageExists } from "local-pkg";
|
|
2719
2742
|
var ReactRefreshAllowConstantExportPackages = [
|
|
@@ -2924,9 +2947,9 @@ __name(reactNative, "reactNative");
|
|
|
2924
2947
|
// src/configs/regexp.ts
|
|
2925
2948
|
import { configs } from "eslint-plugin-regexp";
|
|
2926
2949
|
async function regexp(options = {}) {
|
|
2927
|
-
const
|
|
2950
|
+
const config2 = configs["flat/recommended"];
|
|
2928
2951
|
const rules = {
|
|
2929
|
-
...
|
|
2952
|
+
...config2.rules
|
|
2930
2953
|
};
|
|
2931
2954
|
if (options.level === "warn") {
|
|
2932
2955
|
for (const key in rules) {
|
|
@@ -2935,7 +2958,7 @@ async function regexp(options = {}) {
|
|
|
2935
2958
|
}
|
|
2936
2959
|
return [
|
|
2937
2960
|
{
|
|
2938
|
-
...
|
|
2961
|
+
...config2,
|
|
2939
2962
|
name: "storm/regexp/rules",
|
|
2940
2963
|
rules: {
|
|
2941
2964
|
...rules,
|
|
@@ -3666,10 +3689,10 @@ async function unicorn(options = {}) {
|
|
|
3666
3689
|
{
|
|
3667
3690
|
name: "storm/unicorn/rules",
|
|
3668
3691
|
plugins: {
|
|
3669
|
-
unicorn:
|
|
3692
|
+
unicorn: default8
|
|
3670
3693
|
},
|
|
3671
3694
|
rules: {
|
|
3672
|
-
...options.allRecommended ?
|
|
3695
|
+
...options.allRecommended ? default8.configs["recommended"].rules : {
|
|
3673
3696
|
"unicorn/consistent-empty-array-spread": "error",
|
|
3674
3697
|
"unicorn/error-message": "error",
|
|
3675
3698
|
"unicorn/escape-case": "error",
|
|
@@ -3843,7 +3866,7 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
3843
3866
|
if (isInEditor)
|
|
3844
3867
|
console.log("[@storm-software/eslint] Detected running in editor, some rules are disabled.");
|
|
3845
3868
|
}
|
|
3846
|
-
const stylisticOptions = options.stylistic
|
|
3869
|
+
const stylisticOptions = !options.stylistic ? false : typeof options.stylistic === "object" ? options.stylistic : {};
|
|
3847
3870
|
if (stylisticOptions && !("jsx" in stylisticOptions)) stylisticOptions.jsx = enableJsx;
|
|
3848
3871
|
const configs2 = [];
|
|
3849
3872
|
if (enableGitignore) {
|
|
@@ -3881,6 +3904,9 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
3881
3904
|
}), nx(resolveSubOptions(options, "nx")), perfectionist(), secrets({
|
|
3882
3905
|
json: options.jsonc !== false
|
|
3883
3906
|
}));
|
|
3907
|
+
if (!stylisticOptions) {
|
|
3908
|
+
configs2.push(prettier());
|
|
3909
|
+
}
|
|
3884
3910
|
if (enableCSpell) {
|
|
3885
3911
|
configs2.push(cspell(resolveSubOptions(options, "cspell")));
|
|
3886
3912
|
}
|
|
@@ -3811,6 +3811,10 @@ Backward pagination arguments
|
|
|
3811
3811
|
* @see https://eslint.org/docs/latest/rules/prefer-template
|
|
3812
3812
|
*/
|
|
3813
3813
|
'prefer-template'?: Linter.RuleEntry<[]>
|
|
3814
|
+
/**
|
|
3815
|
+
* @see https://github.com/prettier/eslint-plugin-prettier#options
|
|
3816
|
+
*/
|
|
3817
|
+
'prettier/prettier'?: Linter.RuleEntry<PrettierPrettier>
|
|
3814
3818
|
/**
|
|
3815
3819
|
* Require quotes around object literal property names
|
|
3816
3820
|
* @see https://eslint.org/docs/latest/rules/quote-props
|
|
@@ -12712,6 +12716,18 @@ type PreferReflect = []|[{
|
|
|
12712
12716
|
type PreferRegexLiterals = []|[{
|
|
12713
12717
|
disallowRedundantWrapping?: boolean
|
|
12714
12718
|
}]
|
|
12719
|
+
// ----- prettier/prettier -----
|
|
12720
|
+
type PrettierPrettier = []|[{
|
|
12721
|
+
[k: string]: unknown | undefined
|
|
12722
|
+
}]|[{
|
|
12723
|
+
[k: string]: unknown | undefined
|
|
12724
|
+
}, {
|
|
12725
|
+
usePrettierrc?: boolean
|
|
12726
|
+
fileInfoOptions?: {
|
|
12727
|
+
[k: string]: unknown | undefined
|
|
12728
|
+
}
|
|
12729
|
+
[k: string]: unknown | undefined
|
|
12730
|
+
}]
|
|
12715
12731
|
// ----- quote-props -----
|
|
12716
12732
|
type QuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
12717
12733
|
keywords?: boolean
|
|
@@ -16244,7 +16260,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
16244
16260
|
onlyEquality?: boolean
|
|
16245
16261
|
}]
|
|
16246
16262
|
// Names of all the configs
|
|
16247
|
-
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/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-type-aware' | 'storm/unicorn/rules' | 'storm/unocss' | 'storm/yaml/setup' | 'storm/yaml/rules'
|
|
16263
|
+
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-type-aware' | 'storm/unicorn/rules' | 'storm/unocss' | 'storm/yaml/setup' | 'storm/yaml/rules'
|
|
16248
16264
|
|
|
16249
16265
|
/**
|
|
16250
16266
|
* Vendor types from Prettier so we don't rely on the dependency.
|
|
@@ -16815,7 +16831,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsJavascript, Options
|
|
|
16815
16831
|
*
|
|
16816
16832
|
* @see https://eslint.style/
|
|
16817
16833
|
*
|
|
16818
|
-
* @default
|
|
16834
|
+
* @default false
|
|
16819
16835
|
*/
|
|
16820
16836
|
stylistic?: boolean | (StylisticConfig & OptionsOverrides);
|
|
16821
16837
|
/**
|
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-DFxU53F5.js';
|
|
3
3
|
import '@nx/eslint-plugin/src/utils/runtime-lint-utils';
|
|
4
4
|
import '@stylistic/eslint-plugin';
|
|
5
5
|
import '@typescript-eslint/parser';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.129.
|
|
3
|
+
"version": "0.129.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"repository": {
|
|
@@ -176,6 +176,7 @@
|
|
|
176
176
|
"eslint-plugin-n": "^17.8.1",
|
|
177
177
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
178
178
|
"eslint-plugin-no-secrets": "^2.2.1",
|
|
179
|
+
"eslint-plugin-paths": "^1.1.0",
|
|
179
180
|
"eslint-plugin-perfectionist": "^4.9.0",
|
|
180
181
|
"eslint-plugin-prettier": "^5.2.3",
|
|
181
182
|
"eslint-plugin-regexp": "^2.7.0",
|