@storm-software/eslint 0.81.0 → 0.83.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 +2 -1
- package/dist/preset.d.ts +2 -1
- package/dist/preset.mjs +83 -71
- package/package.json +2 -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
|
@@ -7006,8 +7006,9 @@ type YmlSpacedComment =
|
|
|
7006
7006
|
}
|
|
7007
7007
|
];
|
|
7008
7008
|
|
|
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";
|
|
7009
7010
|
interface GetStormRulesConfigOptions {
|
|
7010
|
-
|
|
7011
|
+
tsConfigType?: TypeScriptEslintConfigType;
|
|
7011
7012
|
useUnicorn?: boolean;
|
|
7012
7013
|
}
|
|
7013
7014
|
|
package/dist/preset.d.ts
CHANGED
|
@@ -7006,8 +7006,9 @@ type YmlSpacedComment =
|
|
|
7006
7006
|
}
|
|
7007
7007
|
];
|
|
7008
7008
|
|
|
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";
|
|
7009
7010
|
interface GetStormRulesConfigOptions {
|
|
7010
|
-
|
|
7011
|
+
tsConfigType?: TypeScriptEslintConfigType;
|
|
7011
7012
|
useUnicorn?: boolean;
|
|
7012
7013
|
}
|
|
7013
7014
|
|
package/dist/preset.mjs
CHANGED
|
@@ -1296,7 +1296,7 @@ const getStormRulesConfig = (options) => {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
]
|
|
1298
1298
|
};
|
|
1299
|
-
if (options.
|
|
1299
|
+
if (options.tsConfigType !== "none") {
|
|
1300
1300
|
rules = {
|
|
1301
1301
|
...rules,
|
|
1302
1302
|
/*************************************************************
|
|
@@ -1348,7 +1348,7 @@ const getStormRulesConfig = (options) => {
|
|
|
1348
1348
|
]
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
1351
|
-
if (options.useUnicorn) {
|
|
1351
|
+
if (options.useUnicorn !== false) {
|
|
1352
1352
|
rules = {
|
|
1353
1353
|
...rules,
|
|
1354
1354
|
/*************************************************************
|
|
@@ -12890,17 +12890,17 @@ function getStormConfig(options = {
|
|
|
12890
12890
|
ignores: [],
|
|
12891
12891
|
tsconfig: "./tsconfig.base.json",
|
|
12892
12892
|
parserOptions: {},
|
|
12893
|
+
tsConfigType: "eslint-recommended",
|
|
12894
|
+
useUnicorn: true,
|
|
12893
12895
|
markdown: {},
|
|
12894
12896
|
react: {},
|
|
12895
12897
|
useReactCompiler: false
|
|
12896
12898
|
}, ...userConfigs) {
|
|
12897
|
-
const
|
|
12899
|
+
const tsConfigType = options.tsConfigType || "eslint-recommended";
|
|
12898
12900
|
const useUnicorn = options.useUnicorn ?? true;
|
|
12899
12901
|
const react = options.react ?? {};
|
|
12900
12902
|
const useReactCompiler = options.useReactCompiler ?? false;
|
|
12901
12903
|
const configs = [
|
|
12902
|
-
// https://eslint.org/docs/latest/rules/
|
|
12903
|
-
eslint.configs.recommended,
|
|
12904
12904
|
// Prettier
|
|
12905
12905
|
prettierConfig,
|
|
12906
12906
|
// Import
|
|
@@ -12913,13 +12913,6 @@ function getStormConfig(options = {
|
|
|
12913
12913
|
// Banner
|
|
12914
12914
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12915
12915
|
...plugin.configs["recommended"],
|
|
12916
|
-
// TSDoc
|
|
12917
|
-
// https://www.npmjs.com/package/eslint-plugin-tsdoc
|
|
12918
|
-
{
|
|
12919
|
-
files: [TS_FILE],
|
|
12920
|
-
plugins: { tsdoc },
|
|
12921
|
-
rules: config
|
|
12922
|
-
},
|
|
12923
12916
|
// NX
|
|
12924
12917
|
{
|
|
12925
12918
|
plugins: { "@nx": nxPlugin }
|
|
@@ -12983,75 +12976,94 @@ function getStormConfig(options = {
|
|
|
12983
12976
|
// User overrides
|
|
12984
12977
|
...userConfigs
|
|
12985
12978
|
].filter(Boolean);
|
|
12986
|
-
|
|
12987
|
-
configs.
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12979
|
+
const typescriptConfigs = [
|
|
12980
|
+
eslint.configs.recommended
|
|
12981
|
+
];
|
|
12982
|
+
if (tsConfigType !== "none") {
|
|
12983
|
+
if (!(tsConfigType in tsEslint$1.configs)) {
|
|
12984
|
+
console.warn(
|
|
12985
|
+
"Invalid TypeScript ESLint configuration type:",
|
|
12986
|
+
tsConfigType
|
|
12987
|
+
);
|
|
12988
|
+
} else {
|
|
12989
|
+
typescriptConfigs.push(
|
|
12990
|
+
...tsEslint$1.configs[tsConfigType]?.map((config) => ({
|
|
12991
|
+
...config,
|
|
12992
|
+
files: [TS_FILE]
|
|
12993
|
+
})) ?? []
|
|
12994
|
+
);
|
|
12995
|
+
}
|
|
12994
12996
|
}
|
|
12995
12997
|
if (useUnicorn) {
|
|
12996
|
-
|
|
12998
|
+
typescriptConfigs.push({
|
|
12997
12999
|
plugins: { unicorn },
|
|
12998
13000
|
rules: {
|
|
12999
13001
|
...unicorn.configs["flat/recommended"].rules
|
|
13000
13002
|
}
|
|
13001
13003
|
});
|
|
13002
13004
|
}
|
|
13003
|
-
|
|
13005
|
+
typescriptConfigs.push({
|
|
13004
13006
|
files: [TS_FILE],
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13007
|
+
plugins: { tsdoc },
|
|
13008
|
+
rules: config
|
|
13009
|
+
});
|
|
13010
|
+
typescriptConfigs.push(
|
|
13011
|
+
...plugin.configs["recommended"]
|
|
13012
|
+
);
|
|
13013
|
+
configs.push(
|
|
13014
|
+
...tsEslint$1.config({
|
|
13015
|
+
files: [TS_FILE],
|
|
13016
|
+
extends: typescriptConfigs,
|
|
13017
|
+
languageOptions: {
|
|
13018
|
+
globals: {
|
|
13019
|
+
...Object.fromEntries(
|
|
13020
|
+
Object.keys(globals).flatMap(
|
|
13021
|
+
(group) => Object.keys(globals[group]).map((key) => [
|
|
13022
|
+
key,
|
|
13023
|
+
"readonly"
|
|
13024
|
+
])
|
|
13025
|
+
)
|
|
13026
|
+
),
|
|
13027
|
+
...globals.browser,
|
|
13028
|
+
...globals.node,
|
|
13029
|
+
"window": "readonly",
|
|
13030
|
+
"Storm": "readonly"
|
|
13031
|
+
},
|
|
13032
|
+
parserOptions: {
|
|
13033
|
+
emitDecoratorMetadata: true,
|
|
13034
|
+
experimentalDecorators: true,
|
|
13035
|
+
project: options.tsconfig ? options.tsconfig : "./tsconfig.base.json",
|
|
13036
|
+
projectService: true,
|
|
13037
|
+
sourceType: "module",
|
|
13038
|
+
projectFolderIgnoreList: [
|
|
13039
|
+
"**/node_modules/**",
|
|
13040
|
+
"**/dist/**",
|
|
13041
|
+
"**/coverage/**",
|
|
13042
|
+
"**/tmp/**",
|
|
13043
|
+
"**/.nx/**",
|
|
13044
|
+
"**/.tamagui/**",
|
|
13045
|
+
"**/.next/**",
|
|
13046
|
+
...options.ignores || []
|
|
13047
|
+
],
|
|
13048
|
+
...options.parserOptions
|
|
13049
|
+
}
|
|
13019
13050
|
},
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
...options.parserOptions
|
|
13037
|
-
}
|
|
13038
|
-
},
|
|
13039
|
-
rules: {
|
|
13040
|
-
...getStormRulesConfig({ ...options, useTypeScriptEslint, useUnicorn }),
|
|
13041
|
-
...options.rules ?? {}
|
|
13042
|
-
},
|
|
13043
|
-
ignores: [
|
|
13044
|
-
"**/node_modules/**",
|
|
13045
|
-
"**/dist/**",
|
|
13046
|
-
"**/coverage/**",
|
|
13047
|
-
"**/tmp/**",
|
|
13048
|
-
"**/.nx/**",
|
|
13049
|
-
"**/.tamagui/**",
|
|
13050
|
-
"**/.next/**",
|
|
13051
|
-
...options.ignores || []
|
|
13052
|
-
]
|
|
13053
|
-
};
|
|
13054
|
-
configs.push(typescriptConfig);
|
|
13051
|
+
rules: {
|
|
13052
|
+
...getStormRulesConfig({ ...options, tsConfigType, useUnicorn }),
|
|
13053
|
+
...options.rules ?? {}
|
|
13054
|
+
},
|
|
13055
|
+
ignores: [
|
|
13056
|
+
"**/node_modules/**",
|
|
13057
|
+
"**/dist/**",
|
|
13058
|
+
"**/coverage/**",
|
|
13059
|
+
"**/tmp/**",
|
|
13060
|
+
"**/.nx/**",
|
|
13061
|
+
"**/.tamagui/**",
|
|
13062
|
+
"**/.next/**",
|
|
13063
|
+
...options.ignores || []
|
|
13064
|
+
]
|
|
13065
|
+
})
|
|
13066
|
+
);
|
|
13055
13067
|
if (react) {
|
|
13056
13068
|
const reactConfigs = [
|
|
13057
13069
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.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": {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"globals": "^15.8.0",
|
|
97
97
|
"jsonc-eslint-parser": "2.4.0",
|
|
98
98
|
"synckit": "0.9.0",
|
|
99
|
-
"typescript-eslint": "
|
|
99
|
+
"typescript-eslint": "8.6.0",
|
|
100
100
|
"ws": "8.17.1",
|
|
101
101
|
"yaml-eslint-parser": "1.2.3"
|
|
102
102
|
},
|