@storm-software/eslint 0.83.3 → 0.84.1
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 +2 -1
- package/dist/preset.d.ts +2 -1
- package/dist/preset.mjs +78 -73
- package/package.json +4 -2
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.mts
CHANGED
|
@@ -7008,7 +7008,7 @@ type YmlSpacedComment =
|
|
|
7008
7008
|
|
|
7009
7009
|
type TypeScriptEslintConfigType = "none" | "all" | "base" | "disable-type-checked" | "eslint-recommended" | "recommended-type-checked-only" | "recommended-type-checked" | "recommended" | "strict-type-checked" | "strict" | "stylistic-type-checked-only" | "stylistic-type-checked" | "stylistic";
|
|
7010
7010
|
interface GetStormRulesConfigOptions {
|
|
7011
|
-
|
|
7011
|
+
typescriptEslintConfigType?: TypeScriptEslintConfigType;
|
|
7012
7012
|
useUnicorn?: boolean;
|
|
7013
7013
|
}
|
|
7014
7014
|
|
|
@@ -7036,6 +7036,7 @@ type PresetOptions = GetStormRulesConfigOptions & {
|
|
|
7036
7036
|
rules?: RuleOptions;
|
|
7037
7037
|
ignores?: string[];
|
|
7038
7038
|
tsconfig?: string;
|
|
7039
|
+
typescriptEslintConfigType?: TypeScriptEslintConfigType;
|
|
7039
7040
|
parserOptions?: Linter.ParserOptions;
|
|
7040
7041
|
markdown?: false | Linter.RulesRecord;
|
|
7041
7042
|
react?: false | Linter.RulesRecord;
|
package/dist/preset.d.ts
CHANGED
|
@@ -7008,7 +7008,7 @@ type YmlSpacedComment =
|
|
|
7008
7008
|
|
|
7009
7009
|
type TypeScriptEslintConfigType = "none" | "all" | "base" | "disable-type-checked" | "eslint-recommended" | "recommended-type-checked-only" | "recommended-type-checked" | "recommended" | "strict-type-checked" | "strict" | "stylistic-type-checked-only" | "stylistic-type-checked" | "stylistic";
|
|
7010
7010
|
interface GetStormRulesConfigOptions {
|
|
7011
|
-
|
|
7011
|
+
typescriptEslintConfigType?: TypeScriptEslintConfigType;
|
|
7012
7012
|
useUnicorn?: boolean;
|
|
7013
7013
|
}
|
|
7014
7014
|
|
|
@@ -7036,6 +7036,7 @@ type PresetOptions = GetStormRulesConfigOptions & {
|
|
|
7036
7036
|
rules?: RuleOptions;
|
|
7037
7037
|
ignores?: string[];
|
|
7038
7038
|
tsconfig?: string;
|
|
7039
|
+
typescriptEslintConfigType?: TypeScriptEslintConfigType;
|
|
7039
7040
|
parserOptions?: Linter.ParserOptions;
|
|
7040
7041
|
markdown?: false | Linter.RulesRecord;
|
|
7041
7042
|
react?: false | Linter.RulesRecord;
|
package/dist/preset.mjs
CHANGED
|
@@ -17,6 +17,7 @@ import tsdoc from 'eslint-plugin-tsdoc';
|
|
|
17
17
|
import unicorn from 'eslint-plugin-unicorn';
|
|
18
18
|
import yml from 'eslint-plugin-yml';
|
|
19
19
|
import globals from 'globals';
|
|
20
|
+
import { merge } from 'radash';
|
|
20
21
|
import tsEslint$1 from 'typescript-eslint';
|
|
21
22
|
import require$$0 from 'eslint/use-at-your-own-risk';
|
|
22
23
|
import require$$0$1 from 'eslint';
|
|
@@ -1298,7 +1299,7 @@ const getStormRulesConfig = (options) => {
|
|
|
1298
1299
|
}
|
|
1299
1300
|
]
|
|
1300
1301
|
};
|
|
1301
|
-
if (options.
|
|
1302
|
+
if (options.typescriptEslintConfigType !== "none") {
|
|
1302
1303
|
rules = {
|
|
1303
1304
|
...rules,
|
|
1304
1305
|
/*************************************************************
|
|
@@ -12887,19 +12888,20 @@ function getStormConfig(options = {
|
|
|
12887
12888
|
ignores: [],
|
|
12888
12889
|
tsconfig: "./tsconfig.base.json",
|
|
12889
12890
|
parserOptions: {},
|
|
12890
|
-
|
|
12891
|
+
typescriptEslintConfigType: "eslint-recommended",
|
|
12891
12892
|
useUnicorn: true,
|
|
12892
12893
|
markdown: {},
|
|
12893
12894
|
react: {},
|
|
12894
12895
|
useReactCompiler: false
|
|
12895
12896
|
}, ...userConfigs) {
|
|
12896
12897
|
const tsconfig = options.tsconfig ?? "./tsconfig.base.json";
|
|
12897
|
-
const
|
|
12898
|
+
const typescriptEslintConfigType = options.typescriptEslintConfigType || "eslint-recommended";
|
|
12898
12899
|
const useUnicorn = options.useUnicorn ?? true;
|
|
12899
12900
|
const react = options.react ?? {};
|
|
12900
12901
|
const useReactCompiler = options.useReactCompiler ?? false;
|
|
12901
12902
|
const bannerConfig = {
|
|
12902
12903
|
...plugin.configs["recommended"],
|
|
12904
|
+
files: [TS_FILE],
|
|
12903
12905
|
rules: {
|
|
12904
12906
|
"banner/banner": [
|
|
12905
12907
|
"error",
|
|
@@ -12981,92 +12983,34 @@ function getStormConfig(options = {
|
|
|
12981
12983
|
// User overrides
|
|
12982
12984
|
...userConfigs
|
|
12983
12985
|
].filter(Boolean);
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
if (tsConfigType !== "none") {
|
|
12988
|
-
if (!(tsConfigType in tsEslint$1.configs)) {
|
|
12986
|
+
configs.push(eslint.configs.recommended);
|
|
12987
|
+
if (typescriptEslintConfigType !== "none") {
|
|
12988
|
+
if (!(typescriptEslintConfigType in tsEslint$1.configs)) {
|
|
12989
12989
|
console.warn(
|
|
12990
12990
|
"Invalid TypeScript ESLint configuration type:",
|
|
12991
|
-
|
|
12991
|
+
typescriptEslintConfigType
|
|
12992
12992
|
);
|
|
12993
12993
|
} else {
|
|
12994
|
-
|
|
12995
|
-
...tsEslint$1.configs[
|
|
12996
|
-
...config,
|
|
12997
|
-
files: [TS_FILE]
|
|
12998
|
-
})) ?? []
|
|
12994
|
+
configs.push(
|
|
12995
|
+
...Array.isArray(tsEslint$1.configs[typescriptEslintConfigType]) ? tsEslint$1.configs[typescriptEslintConfigType] : [tsEslint$1.configs[typescriptEslintConfigType]]
|
|
12999
12996
|
);
|
|
13000
12997
|
}
|
|
13001
12998
|
}
|
|
13002
12999
|
if (useUnicorn) {
|
|
13003
|
-
|
|
13000
|
+
configs.push({
|
|
13001
|
+
files: [TS_FILE],
|
|
13004
13002
|
plugins: { unicorn },
|
|
13005
13003
|
rules: {
|
|
13006
13004
|
...unicorn.configs["flat/recommended"].rules
|
|
13007
13005
|
}
|
|
13008
13006
|
});
|
|
13009
13007
|
}
|
|
13010
|
-
|
|
13008
|
+
configs.push({
|
|
13011
13009
|
files: [TS_FILE],
|
|
13012
13010
|
plugins: { tsdoc },
|
|
13013
13011
|
rules: config
|
|
13014
13012
|
});
|
|
13015
|
-
|
|
13016
|
-
configs.push(
|
|
13017
|
-
...tsEslint$1.config({
|
|
13018
|
-
files: [TS_FILE],
|
|
13019
|
-
extends: typescriptConfigs,
|
|
13020
|
-
languageOptions: {
|
|
13021
|
-
globals: {
|
|
13022
|
-
...Object.fromEntries(
|
|
13023
|
-
Object.keys(globals).flatMap(
|
|
13024
|
-
(group) => Object.keys(globals[group]).map((key) => [
|
|
13025
|
-
key,
|
|
13026
|
-
"readonly"
|
|
13027
|
-
])
|
|
13028
|
-
)
|
|
13029
|
-
),
|
|
13030
|
-
...globals.browser,
|
|
13031
|
-
...globals.node,
|
|
13032
|
-
"window": "readonly",
|
|
13033
|
-
"Storm": "readonly"
|
|
13034
|
-
},
|
|
13035
|
-
parserOptions: {
|
|
13036
|
-
emitDecoratorMetadata: true,
|
|
13037
|
-
experimentalDecorators: true,
|
|
13038
|
-
project: tsconfig,
|
|
13039
|
-
projectService: true,
|
|
13040
|
-
sourceType: "module",
|
|
13041
|
-
projectFolderIgnoreList: [
|
|
13042
|
-
"**/node_modules/**",
|
|
13043
|
-
"**/dist/**",
|
|
13044
|
-
"**/coverage/**",
|
|
13045
|
-
"**/tmp/**",
|
|
13046
|
-
"**/.nx/**",
|
|
13047
|
-
"**/.tamagui/**",
|
|
13048
|
-
"**/.next/**",
|
|
13049
|
-
...options.ignores || []
|
|
13050
|
-
],
|
|
13051
|
-
...options.parserOptions
|
|
13052
|
-
}
|
|
13053
|
-
},
|
|
13054
|
-
rules: {
|
|
13055
|
-
...getStormRulesConfig({ ...options, tsConfigType, useUnicorn }),
|
|
13056
|
-
...options.rules ?? {}
|
|
13057
|
-
},
|
|
13058
|
-
ignores: [
|
|
13059
|
-
"**/node_modules/**",
|
|
13060
|
-
"**/dist/**",
|
|
13061
|
-
"**/coverage/**",
|
|
13062
|
-
"**/tmp/**",
|
|
13063
|
-
"**/.nx/**",
|
|
13064
|
-
"**/.tamagui/**",
|
|
13065
|
-
"**/.next/**",
|
|
13066
|
-
...options.ignores || []
|
|
13067
|
-
]
|
|
13068
|
-
})
|
|
13069
|
-
);
|
|
13013
|
+
configs.push(bannerConfig);
|
|
13070
13014
|
if (react) {
|
|
13071
13015
|
const reactConfigs = [
|
|
13072
13016
|
{
|
|
@@ -13086,7 +13030,7 @@ function getStormConfig(options = {
|
|
|
13086
13030
|
},
|
|
13087
13031
|
{
|
|
13088
13032
|
...reactHooks.configs?.recommended,
|
|
13089
|
-
files: [
|
|
13033
|
+
files: [TS_FILE],
|
|
13090
13034
|
ignores: [
|
|
13091
13035
|
"**/node_modules/**",
|
|
13092
13036
|
"**/dist/**",
|
|
@@ -13142,6 +13086,61 @@ function getStormConfig(options = {
|
|
|
13142
13086
|
files: options.nextFiles
|
|
13143
13087
|
});
|
|
13144
13088
|
}
|
|
13089
|
+
configs.push({
|
|
13090
|
+
files: [TS_FILE],
|
|
13091
|
+
languageOptions: {
|
|
13092
|
+
globals: {
|
|
13093
|
+
...Object.fromEntries(
|
|
13094
|
+
Object.keys(globals).flatMap(
|
|
13095
|
+
(group) => Object.keys(globals[group]).map((key) => [
|
|
13096
|
+
key,
|
|
13097
|
+
"readonly"
|
|
13098
|
+
])
|
|
13099
|
+
)
|
|
13100
|
+
),
|
|
13101
|
+
...globals.browser,
|
|
13102
|
+
...globals.node,
|
|
13103
|
+
"window": "readonly",
|
|
13104
|
+
"Storm": "readonly"
|
|
13105
|
+
},
|
|
13106
|
+
parserOptions: {
|
|
13107
|
+
emitDecoratorMetadata: true,
|
|
13108
|
+
experimentalDecorators: true,
|
|
13109
|
+
project: tsconfig,
|
|
13110
|
+
projectService: true,
|
|
13111
|
+
sourceType: "module",
|
|
13112
|
+
projectFolderIgnoreList: [
|
|
13113
|
+
"**/node_modules/**",
|
|
13114
|
+
"**/dist/**",
|
|
13115
|
+
"**/coverage/**",
|
|
13116
|
+
"**/tmp/**",
|
|
13117
|
+
"**/.nx/**",
|
|
13118
|
+
"**/.tamagui/**",
|
|
13119
|
+
"**/.next/**",
|
|
13120
|
+
...options.ignores || []
|
|
13121
|
+
],
|
|
13122
|
+
...options.parserOptions
|
|
13123
|
+
}
|
|
13124
|
+
},
|
|
13125
|
+
rules: {
|
|
13126
|
+
...getStormRulesConfig({
|
|
13127
|
+
...options,
|
|
13128
|
+
typescriptEslintConfigType,
|
|
13129
|
+
useUnicorn
|
|
13130
|
+
}),
|
|
13131
|
+
...options.rules ?? {}
|
|
13132
|
+
},
|
|
13133
|
+
ignores: [
|
|
13134
|
+
"**/node_modules/**",
|
|
13135
|
+
"**/dist/**",
|
|
13136
|
+
"**/coverage/**",
|
|
13137
|
+
"**/tmp/**",
|
|
13138
|
+
"**/.nx/**",
|
|
13139
|
+
"**/.tamagui/**",
|
|
13140
|
+
"**/.next/**",
|
|
13141
|
+
...options.ignores || []
|
|
13142
|
+
]
|
|
13143
|
+
});
|
|
13145
13144
|
if (options.markdown) {
|
|
13146
13145
|
configs.push(...markdown.configs.recommended);
|
|
13147
13146
|
configs.push({
|
|
@@ -13172,7 +13171,13 @@ function getStormConfig(options = {
|
|
|
13172
13171
|
}
|
|
13173
13172
|
});
|
|
13174
13173
|
}
|
|
13175
|
-
return formatConfig(
|
|
13174
|
+
return formatConfig(
|
|
13175
|
+
"Preset",
|
|
13176
|
+
configs.reduce(
|
|
13177
|
+
(ret, config) => merge(ret, [config], (c) => c.files),
|
|
13178
|
+
[]
|
|
13179
|
+
)
|
|
13180
|
+
);
|
|
13176
13181
|
}
|
|
13177
13182
|
|
|
13178
13183
|
export { getStormConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"repository": {
|
|
@@ -95,8 +95,9 @@
|
|
|
95
95
|
"eslint-plugin-yml": "1.14.0",
|
|
96
96
|
"globals": "^15.8.0",
|
|
97
97
|
"jsonc-eslint-parser": "2.4.0",
|
|
98
|
+
"radash": "12.1.0",
|
|
98
99
|
"synckit": "0.9.0",
|
|
99
|
-
"typescript-eslint": "8.
|
|
100
|
+
"typescript-eslint": "8.10.0",
|
|
100
101
|
"ws": "8.17.1",
|
|
101
102
|
"yaml-eslint-parser": "1.2.3"
|
|
102
103
|
},
|
|
@@ -110,6 +111,7 @@
|
|
|
110
111
|
"eslint": "9.5.0",
|
|
111
112
|
"eslint-typegen": "^0.2.4",
|
|
112
113
|
"graphql": ">=16.9.0",
|
|
114
|
+
"typescript": ">=5.5.3",
|
|
113
115
|
"unbuild": "^2.0.0"
|
|
114
116
|
},
|
|
115
117
|
"publishConfig": {
|