@storm-software/eslint 0.78.4 → 0.78.6
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 +878 -0
- package/dist/preset.d.ts +878 -0
- package/dist/preset.mjs +73 -70
- package/dist/rules.d.ts +878 -0
- package/package.json +1 -1
package/dist/preset.mjs
CHANGED
|
@@ -17,7 +17,6 @@ import unicorn from 'eslint-plugin-unicorn';
|
|
|
17
17
|
import yml from 'eslint-plugin-yml';
|
|
18
18
|
import globals from 'globals';
|
|
19
19
|
import jsoncParser from 'jsonc-eslint-parser';
|
|
20
|
-
import tsEslint$1 from 'typescript-eslint';
|
|
21
20
|
import require$$0 from 'eslint/use-at-your-own-risk';
|
|
22
21
|
import require$$0$1 from 'eslint';
|
|
23
22
|
import os from 'node:os';
|
|
@@ -1280,48 +1279,52 @@ const config$1 = {
|
|
|
1280
1279
|
* TypeScript Rules - The following rules are specific to the TypeScript plugin
|
|
1281
1280
|
*
|
|
1282
1281
|
**************************************************************/
|
|
1283
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
1284
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
1285
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
1286
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
1287
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
1288
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
1289
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
1290
|
-
"@typescript-eslint/no-unused-vars": [
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
],
|
|
1294
|
-
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
],
|
|
1302
|
-
"@typescript-eslint/no-restricted-imports": [
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1282
|
+
// "@typescript-eslint/no-explicit-any": "off",
|
|
1283
|
+
// "@typescript-eslint/no-empty-function": "off",
|
|
1284
|
+
// "@typescript-eslint/no-var-requires": "off",
|
|
1285
|
+
// "@typescript-eslint/ban-ts-comment": "off",
|
|
1286
|
+
// "@typescript-eslint/no-empty-interface": "off",
|
|
1287
|
+
// "@typescript-eslint/explicit-module-boundary-types": "off",
|
|
1288
|
+
// "@typescript-eslint/explicit-function-return-type": "off",
|
|
1289
|
+
// "@typescript-eslint/no-unused-vars": [
|
|
1290
|
+
// "warn",
|
|
1291
|
+
// { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }
|
|
1292
|
+
// ],
|
|
1293
|
+
// "@typescript-eslint/prefer-nullish-coalescing": [
|
|
1294
|
+
// "error",
|
|
1295
|
+
// {
|
|
1296
|
+
// ignorePrimitives: {
|
|
1297
|
+
// string: true
|
|
1298
|
+
// }
|
|
1299
|
+
// }
|
|
1300
|
+
// ],
|
|
1301
|
+
// "@typescript-eslint/no-restricted-imports": [
|
|
1302
|
+
// "error",
|
|
1303
|
+
// {
|
|
1304
|
+
// "patterns": [
|
|
1305
|
+
// {
|
|
1306
|
+
// "group": ["nx/src/plugins/js*"],
|
|
1307
|
+
// "message":
|
|
1308
|
+
// "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
|
|
1309
|
+
// },
|
|
1310
|
+
// {
|
|
1311
|
+
// "group": ["**/native-bindings", "**/native-bindings.js"],
|
|
1312
|
+
// "message":
|
|
1313
|
+
// "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
|
|
1314
|
+
// },
|
|
1315
|
+
// {
|
|
1316
|
+
// "group": ["create-storm-workspace"],
|
|
1317
|
+
// "message":
|
|
1318
|
+
// "Direct imports from `create-storm-workspace` are not allowed. Instead install this package globally (example: 'npm i create-storm-workspace -g')."
|
|
1319
|
+
// },
|
|
1320
|
+
// {
|
|
1321
|
+
// "group": ["create-nx-workspace"],
|
|
1322
|
+
// "message":
|
|
1323
|
+
// "Direct imports from `create-nx-workspace` are not allowed. Instead install this package globally (example: 'npm i create-nx-workspace -g')."
|
|
1324
|
+
// }
|
|
1325
|
+
// ]
|
|
1326
|
+
// }
|
|
1327
|
+
// ],
|
|
1325
1328
|
/*************************************************************
|
|
1326
1329
|
*
|
|
1327
1330
|
* Unicorn Rules - The following rules are specific to the Unicorn plugin
|
|
@@ -12833,7 +12836,10 @@ const plugin = {
|
|
|
12833
12836
|
processors: {}
|
|
12834
12837
|
};
|
|
12835
12838
|
plugin.configs && (plugin.configs.recommended = [
|
|
12836
|
-
{
|
|
12839
|
+
{
|
|
12840
|
+
name: "banner/recommended/plugin",
|
|
12841
|
+
plugins: { banner: plugin }
|
|
12842
|
+
},
|
|
12837
12843
|
{
|
|
12838
12844
|
name: "banner/recommended/code-files",
|
|
12839
12845
|
files: [
|
|
@@ -12880,17 +12886,14 @@ function getStormConfig(options = {
|
|
|
12880
12886
|
}, ...userConfigs) {
|
|
12881
12887
|
const configs = [
|
|
12882
12888
|
// https://eslint.org/docs/latest/rules/
|
|
12883
|
-
|
|
12889
|
+
eslint.configs.recommended,
|
|
12884
12890
|
// https://typescript-eslint.io/
|
|
12885
12891
|
// ...tsEslint.configs.recommended.map(config => ({
|
|
12886
12892
|
// ...config,
|
|
12887
12893
|
// files: [TS_FILE] // We use TS config only for TS files
|
|
12888
12894
|
// })),
|
|
12889
12895
|
// https://github.com/sindresorhus/eslint-plugin-unicorn
|
|
12890
|
-
|
|
12891
|
-
// ...unicorn.configs["flat/recommended"],
|
|
12892
|
-
// files: ["**/*.ts"]
|
|
12893
|
-
// } as Linter.FlatConfig,
|
|
12896
|
+
unicorn.configs["flat/recommended"],
|
|
12894
12897
|
// Prettier
|
|
12895
12898
|
prettierConfig,
|
|
12896
12899
|
// Import
|
|
@@ -12902,7 +12905,7 @@ function getStormConfig(options = {
|
|
|
12902
12905
|
// },
|
|
12903
12906
|
// Banner
|
|
12904
12907
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12905
|
-
plugin.configs["recommended"]
|
|
12908
|
+
...plugin.configs["recommended"],
|
|
12906
12909
|
// TSDoc
|
|
12907
12910
|
// https://www.npmjs.com/package/eslint-plugin-tsdoc
|
|
12908
12911
|
{ plugins: { tsdoc } },
|
|
@@ -12918,7 +12921,7 @@ function getStormConfig(options = {
|
|
|
12918
12921
|
// https://www.npmjs.com/package/eslint-plugin-json
|
|
12919
12922
|
// json.configs["recommended-with-comments"],
|
|
12920
12923
|
{
|
|
12921
|
-
files: ["*.
|
|
12924
|
+
files: ["*.jsonc"],
|
|
12922
12925
|
languageOptions: {
|
|
12923
12926
|
parser: jsoncParser
|
|
12924
12927
|
}
|
|
@@ -12974,7 +12977,7 @@ function getStormConfig(options = {
|
|
|
12974
12977
|
...userConfigs
|
|
12975
12978
|
].filter(Boolean);
|
|
12976
12979
|
const typescriptConfig = {
|
|
12977
|
-
files: [
|
|
12980
|
+
files: [TS_FILE],
|
|
12978
12981
|
languageOptions: {
|
|
12979
12982
|
globals: {
|
|
12980
12983
|
...Object.fromEntries(
|
|
@@ -13013,26 +13016,26 @@ function getStormConfig(options = {
|
|
|
13013
13016
|
// // https://eslint.org/docs/latest/rules/
|
|
13014
13017
|
...eslint.configs.recommended.rules,
|
|
13015
13018
|
// // https://typescript-eslint.io/
|
|
13016
|
-
...tsEslint
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
),
|
|
13020
|
-
// Prettier
|
|
13021
|
-
...prettierConfig.rules,
|
|
13022
|
-
// https://www.npmjs.com/package/eslint-plugin-unicorn
|
|
13023
|
-
...unicorn.configs["flat/recommended"].rules,
|
|
13019
|
+
// ...tsEslint.configs.recommended.reduce(
|
|
13020
|
+
// (ret, record) => ({ ...ret, ...record.rules }),
|
|
13021
|
+
// {}
|
|
13022
|
+
// ),
|
|
13023
|
+
// // Prettier
|
|
13024
|
+
// ...prettierConfig.rules,
|
|
13025
|
+
// // https://www.npmjs.com/package/eslint-plugin-unicorn
|
|
13026
|
+
// ...unicorn.configs["flat/recommended"].rules,
|
|
13024
13027
|
// Banner
|
|
13025
|
-
...
|
|
13028
|
+
// ...banner.configs!["recommended"]![1]?.rules,
|
|
13026
13029
|
...config$1,
|
|
13027
|
-
"banner/banner": [
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
],
|
|
13030
|
+
// "banner/banner": [
|
|
13031
|
+
// "error",
|
|
13032
|
+
// {
|
|
13033
|
+
// repositoryName: options.name,
|
|
13034
|
+
// banner: options.banner,
|
|
13035
|
+
// commentType: "block",
|
|
13036
|
+
// numNewlines: 2
|
|
13037
|
+
// }
|
|
13038
|
+
// ],
|
|
13036
13039
|
...options.rules ?? {}
|
|
13037
13040
|
},
|
|
13038
13041
|
ignores: [
|