@storm-software/eslint 0.82.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.mjs +79 -67
- package/package.json +1 -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.mjs
CHANGED
|
@@ -12890,6 +12890,8 @@ 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
|
|
@@ -12899,8 +12901,6 @@ function getStormConfig(options = {
|
|
|
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);
|
|
12979
|
+
const typescriptConfigs = [
|
|
12980
|
+
eslint.configs.recommended
|
|
12981
|
+
];
|
|
12986
12982
|
if (tsConfigType !== "none") {
|
|
12987
|
-
configs
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
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, tsConfigType, 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