@jsse/eslint-config 0.4.31 → 0.5.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/CHANGELOG.md +10 -0
- package/dist/{chunk-B7RtqpM4.js → chunk-CdeBBKNj.js} +3 -3
- package/dist/cli.js +1 -2
- package/dist/index.d.ts +238 -234
- package/dist/index.js +183 -293
- package/dist/{version-CMawUObI.js → version-OtVn-Q4t.js} +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk-
|
|
2
|
-
import { n as DEBUG, r as SLOW_RULES, t as VERSION } from "./version-
|
|
1
|
+
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk-CdeBBKNj.js";
|
|
2
|
+
import { n as DEBUG, r as SLOW_RULES, t as VERSION } from "./version-OtVn-Q4t.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import process$1 from "node:process";
|
|
5
5
|
import fs, { promises, realpathSync, statSync } from "node:fs";
|
|
@@ -17101,6 +17101,162 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17101
17101
|
//#endregion
|
|
17102
17102
|
//#region src/configs/javascript.ts
|
|
17103
17103
|
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
17104
|
+
function javascriptRules() {
|
|
17105
|
+
return {
|
|
17106
|
+
"accessor-pairs": ["error", {
|
|
17107
|
+
enforceForClassMembers: true,
|
|
17108
|
+
setWithoutGet: true
|
|
17109
|
+
}],
|
|
17110
|
+
"array-callback-return": "error",
|
|
17111
|
+
"arrow-parens": [
|
|
17112
|
+
"error",
|
|
17113
|
+
"as-needed",
|
|
17114
|
+
{ requireForBlockBody: true }
|
|
17115
|
+
],
|
|
17116
|
+
"block-scoped-var": "error",
|
|
17117
|
+
"default-case-last": "error",
|
|
17118
|
+
"dot-notation": ["error", { allowKeywords: true }],
|
|
17119
|
+
eqeqeq: ["error", "smart"],
|
|
17120
|
+
"new-cap": ["error", {
|
|
17121
|
+
capIsNew: false,
|
|
17122
|
+
newIsCap: true,
|
|
17123
|
+
properties: true
|
|
17124
|
+
}],
|
|
17125
|
+
"no-alert": "error",
|
|
17126
|
+
"no-array-constructor": "error",
|
|
17127
|
+
"no-caller": "error",
|
|
17128
|
+
"no-cond-assign": ["error", "always"],
|
|
17129
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
17130
|
+
"no-empty": ["error", { allowEmptyCatch: true }],
|
|
17131
|
+
"no-eval": "error",
|
|
17132
|
+
"no-extend-native": "error",
|
|
17133
|
+
"no-extra-bind": "error",
|
|
17134
|
+
"no-implied-eval": "error",
|
|
17135
|
+
"no-invalid-this": "error",
|
|
17136
|
+
"no-iterator": "error",
|
|
17137
|
+
"no-labels": ["error", {
|
|
17138
|
+
allowLoop: false,
|
|
17139
|
+
allowSwitch: false
|
|
17140
|
+
}],
|
|
17141
|
+
"no-lone-blocks": "error",
|
|
17142
|
+
"no-multi-str": "error",
|
|
17143
|
+
"no-nested-ternary": "off",
|
|
17144
|
+
"no-new": "error",
|
|
17145
|
+
"no-new-func": "error",
|
|
17146
|
+
"no-new-object": "error",
|
|
17147
|
+
"no-new-symbol": "error",
|
|
17148
|
+
"no-new-wrappers": "error",
|
|
17149
|
+
"no-octal-escape": "error",
|
|
17150
|
+
"no-proto": "error",
|
|
17151
|
+
"no-redeclare": ["error", { builtinGlobals: false }],
|
|
17152
|
+
"no-restricted-globals": [
|
|
17153
|
+
"error",
|
|
17154
|
+
{
|
|
17155
|
+
message: "Use `globalThis` instead.",
|
|
17156
|
+
name: "global"
|
|
17157
|
+
},
|
|
17158
|
+
{
|
|
17159
|
+
message: "Use `globalThis` instead.",
|
|
17160
|
+
name: "self"
|
|
17161
|
+
}
|
|
17162
|
+
],
|
|
17163
|
+
"no-restricted-properties": [
|
|
17164
|
+
"error",
|
|
17165
|
+
{
|
|
17166
|
+
message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
|
|
17167
|
+
property: "__proto__"
|
|
17168
|
+
},
|
|
17169
|
+
{
|
|
17170
|
+
message: "Use `Object.defineProperty` instead.",
|
|
17171
|
+
property: "__defineGetter__"
|
|
17172
|
+
},
|
|
17173
|
+
{
|
|
17174
|
+
message: "Use `Object.defineProperty` instead.",
|
|
17175
|
+
property: "__defineSetter__"
|
|
17176
|
+
},
|
|
17177
|
+
{
|
|
17178
|
+
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
17179
|
+
property: "__lookupGetter__"
|
|
17180
|
+
},
|
|
17181
|
+
{
|
|
17182
|
+
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
17183
|
+
property: "__lookupSetter__"
|
|
17184
|
+
}
|
|
17185
|
+
],
|
|
17186
|
+
"no-restricted-syntax": [
|
|
17187
|
+
"error",
|
|
17188
|
+
"DebuggerStatement",
|
|
17189
|
+
"LabeledStatement",
|
|
17190
|
+
"WithStatement",
|
|
17191
|
+
"TSEnumDeclaration[const=true]",
|
|
17192
|
+
"TSExportAssignment"
|
|
17193
|
+
],
|
|
17194
|
+
"no-self-assign": ["error", { props: true }],
|
|
17195
|
+
"no-self-compare": "error",
|
|
17196
|
+
"no-sequences": "error",
|
|
17197
|
+
"no-template-curly-in-string": "error",
|
|
17198
|
+
"no-throw-literal": "error",
|
|
17199
|
+
"no-undef-init": "error",
|
|
17200
|
+
"no-unmodified-loop-condition": "error",
|
|
17201
|
+
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
|
|
17202
|
+
"no-unreachable-loop": "error",
|
|
17203
|
+
"no-unused-expressions": ["error", {
|
|
17204
|
+
allowShortCircuit: true,
|
|
17205
|
+
allowTaggedTemplates: true,
|
|
17206
|
+
allowTernary: true
|
|
17207
|
+
}],
|
|
17208
|
+
"no-unused-vars": ["error", {
|
|
17209
|
+
args: "none",
|
|
17210
|
+
caughtErrors: "none",
|
|
17211
|
+
ignoreRestSiblings: true,
|
|
17212
|
+
vars: "all"
|
|
17213
|
+
}],
|
|
17214
|
+
"no-use-before-define": ["error", {
|
|
17215
|
+
classes: false,
|
|
17216
|
+
functions: false,
|
|
17217
|
+
variables: true
|
|
17218
|
+
}],
|
|
17219
|
+
"no-useless-call": "error",
|
|
17220
|
+
"no-useless-computed-key": "error",
|
|
17221
|
+
"no-useless-constructor": "error",
|
|
17222
|
+
"no-useless-rename": "error",
|
|
17223
|
+
"no-useless-return": "error",
|
|
17224
|
+
"no-var": "error",
|
|
17225
|
+
"object-shorthand": [
|
|
17226
|
+
"error",
|
|
17227
|
+
"always",
|
|
17228
|
+
{
|
|
17229
|
+
avoidQuotes: true,
|
|
17230
|
+
ignoreConstructors: false
|
|
17231
|
+
}
|
|
17232
|
+
],
|
|
17233
|
+
"one-var": ["error", { initialized: "never" }],
|
|
17234
|
+
"prefer-arrow-callback": ["error", {
|
|
17235
|
+
allowNamedFunctions: false,
|
|
17236
|
+
allowUnboundThis: true
|
|
17237
|
+
}],
|
|
17238
|
+
"prefer-const": ["error", {
|
|
17239
|
+
destructuring: "all",
|
|
17240
|
+
ignoreReadBeforeAssign: true
|
|
17241
|
+
}],
|
|
17242
|
+
"prefer-exponentiation-operator": "error",
|
|
17243
|
+
"prefer-promise-reject-errors": "error",
|
|
17244
|
+
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
17245
|
+
"prefer-rest-params": "error",
|
|
17246
|
+
"prefer-spread": "error",
|
|
17247
|
+
"prefer-template": "error",
|
|
17248
|
+
"sort-imports": "off",
|
|
17249
|
+
"symbol-description": "error",
|
|
17250
|
+
"unicode-bom": ["error", "never"],
|
|
17251
|
+
"use-isnan": ["error", {
|
|
17252
|
+
enforceForIndexOf: true,
|
|
17253
|
+
enforceForSwitchCase: true
|
|
17254
|
+
}],
|
|
17255
|
+
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
17256
|
+
"vars-on-top": "error",
|
|
17257
|
+
yoda: ["error", "never"]
|
|
17258
|
+
};
|
|
17259
|
+
}
|
|
17104
17260
|
const javascript = async (options) => {
|
|
17105
17261
|
const { isInEditor = false, overrides = {}, reportUnusedDisableDirectives = true } = options ?? {};
|
|
17106
17262
|
return [{
|
|
@@ -17126,191 +17282,7 @@ const javascript = async (options) => {
|
|
|
17126
17282
|
plugins: { "unused-imports": pluginUnusedImports },
|
|
17127
17283
|
rules: {
|
|
17128
17284
|
...eslintjs.configs.recommended.rules,
|
|
17129
|
-
|
|
17130
|
-
enforceForClassMembers: true,
|
|
17131
|
-
setWithoutGet: true
|
|
17132
|
-
}],
|
|
17133
|
-
"array-callback-return": "error",
|
|
17134
|
-
"arrow-parens": [
|
|
17135
|
-
"error",
|
|
17136
|
-
"as-needed",
|
|
17137
|
-
{ requireForBlockBody: true }
|
|
17138
|
-
],
|
|
17139
|
-
"block-scoped-var": "error",
|
|
17140
|
-
"constructor-super": "error",
|
|
17141
|
-
"default-case-last": "error",
|
|
17142
|
-
"dot-notation": ["error", { allowKeywords: true }],
|
|
17143
|
-
eqeqeq: ["error", "smart"],
|
|
17144
|
-
"new-cap": ["error", {
|
|
17145
|
-
capIsNew: false,
|
|
17146
|
-
newIsCap: true,
|
|
17147
|
-
properties: true
|
|
17148
|
-
}],
|
|
17149
|
-
"no-alert": "error",
|
|
17150
|
-
"no-array-constructor": "error",
|
|
17151
|
-
"no-async-promise-executor": "error",
|
|
17152
|
-
"no-caller": "error",
|
|
17153
|
-
"no-case-declarations": "error",
|
|
17154
|
-
"no-class-assign": "error",
|
|
17155
|
-
"no-compare-neg-zero": "error",
|
|
17156
|
-
"no-cond-assign": ["error", "always"],
|
|
17157
|
-
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
17158
|
-
"no-const-assign": "error",
|
|
17159
|
-
"no-control-regex": "error",
|
|
17160
|
-
"no-debugger": "error",
|
|
17161
|
-
"no-delete-var": "error",
|
|
17162
|
-
"no-dupe-args": "error",
|
|
17163
|
-
"no-dupe-class-members": "error",
|
|
17164
|
-
"no-dupe-keys": "error",
|
|
17165
|
-
"no-duplicate-case": "error",
|
|
17166
|
-
"no-empty": ["error", { allowEmptyCatch: true }],
|
|
17167
|
-
"no-empty-character-class": "error",
|
|
17168
|
-
"no-empty-pattern": "error",
|
|
17169
|
-
"no-eval": "error",
|
|
17170
|
-
"no-ex-assign": "error",
|
|
17171
|
-
"no-extend-native": "error",
|
|
17172
|
-
"no-extra-bind": "error",
|
|
17173
|
-
"no-extra-boolean-cast": "error",
|
|
17174
|
-
"no-fallthrough": "error",
|
|
17175
|
-
"no-func-assign": "error",
|
|
17176
|
-
"no-global-assign": "error",
|
|
17177
|
-
"no-implied-eval": "error",
|
|
17178
|
-
"no-import-assign": "error",
|
|
17179
|
-
"no-invalid-regexp": "error",
|
|
17180
|
-
"no-invalid-this": "error",
|
|
17181
|
-
"no-irregular-whitespace": "error",
|
|
17182
|
-
"no-iterator": "error",
|
|
17183
|
-
"no-labels": ["error", {
|
|
17184
|
-
allowLoop: false,
|
|
17185
|
-
allowSwitch: false
|
|
17186
|
-
}],
|
|
17187
|
-
"no-lone-blocks": "error",
|
|
17188
|
-
"no-loss-of-precision": "error",
|
|
17189
|
-
"no-misleading-character-class": "error",
|
|
17190
|
-
"no-multi-str": "error",
|
|
17191
|
-
"no-nested-ternary": "off",
|
|
17192
|
-
"no-new": "error",
|
|
17193
|
-
"no-new-func": "error",
|
|
17194
|
-
"no-new-object": "error",
|
|
17195
|
-
"no-new-symbol": "error",
|
|
17196
|
-
"no-new-wrappers": "error",
|
|
17197
|
-
"no-obj-calls": "error",
|
|
17198
|
-
"no-octal": "error",
|
|
17199
|
-
"no-octal-escape": "error",
|
|
17200
|
-
"no-proto": "error",
|
|
17201
|
-
"no-prototype-builtins": "error",
|
|
17202
|
-
"no-redeclare": ["error", { builtinGlobals: false }],
|
|
17203
|
-
"no-regex-spaces": "error",
|
|
17204
|
-
"no-restricted-globals": [
|
|
17205
|
-
"error",
|
|
17206
|
-
{
|
|
17207
|
-
message: "Use `globalThis` instead.",
|
|
17208
|
-
name: "global"
|
|
17209
|
-
},
|
|
17210
|
-
{
|
|
17211
|
-
message: "Use `globalThis` instead.",
|
|
17212
|
-
name: "self"
|
|
17213
|
-
}
|
|
17214
|
-
],
|
|
17215
|
-
"no-restricted-properties": [
|
|
17216
|
-
"error",
|
|
17217
|
-
{
|
|
17218
|
-
message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
|
|
17219
|
-
property: "__proto__"
|
|
17220
|
-
},
|
|
17221
|
-
{
|
|
17222
|
-
message: "Use `Object.defineProperty` instead.",
|
|
17223
|
-
property: "__defineGetter__"
|
|
17224
|
-
},
|
|
17225
|
-
{
|
|
17226
|
-
message: "Use `Object.defineProperty` instead.",
|
|
17227
|
-
property: "__defineSetter__"
|
|
17228
|
-
},
|
|
17229
|
-
{
|
|
17230
|
-
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
17231
|
-
property: "__lookupGetter__"
|
|
17232
|
-
},
|
|
17233
|
-
{
|
|
17234
|
-
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
17235
|
-
property: "__lookupSetter__"
|
|
17236
|
-
}
|
|
17237
|
-
],
|
|
17238
|
-
"no-restricted-syntax": [
|
|
17239
|
-
"error",
|
|
17240
|
-
"DebuggerStatement",
|
|
17241
|
-
"LabeledStatement",
|
|
17242
|
-
"WithStatement",
|
|
17243
|
-
"TSEnumDeclaration[const=true]",
|
|
17244
|
-
"TSExportAssignment"
|
|
17245
|
-
],
|
|
17246
|
-
"no-self-assign": ["error", { props: true }],
|
|
17247
|
-
"no-self-compare": "error",
|
|
17248
|
-
"no-sequences": "error",
|
|
17249
|
-
"no-shadow-restricted-names": "error",
|
|
17250
|
-
"no-sparse-arrays": "error",
|
|
17251
|
-
"no-template-curly-in-string": "error",
|
|
17252
|
-
"no-this-before-super": "error",
|
|
17253
|
-
"no-throw-literal": "error",
|
|
17254
|
-
"no-undef": "error",
|
|
17255
|
-
"no-undef-init": "error",
|
|
17256
|
-
"no-unexpected-multiline": "error",
|
|
17257
|
-
"no-unmodified-loop-condition": "error",
|
|
17258
|
-
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
|
|
17259
|
-
"no-unreachable": "error",
|
|
17260
|
-
"no-unreachable-loop": "error",
|
|
17261
|
-
"no-unsafe-finally": "error",
|
|
17262
|
-
"no-unsafe-negation": "error",
|
|
17263
|
-
"no-unused-expressions": ["error", {
|
|
17264
|
-
allowShortCircuit: true,
|
|
17265
|
-
allowTaggedTemplates: true,
|
|
17266
|
-
allowTernary: true
|
|
17267
|
-
}],
|
|
17268
|
-
"no-unused-vars": ["error", {
|
|
17269
|
-
args: "none",
|
|
17270
|
-
caughtErrors: "none",
|
|
17271
|
-
ignoreRestSiblings: true,
|
|
17272
|
-
vars: "all"
|
|
17273
|
-
}],
|
|
17274
|
-
"no-use-before-define": ["error", {
|
|
17275
|
-
classes: false,
|
|
17276
|
-
functions: false,
|
|
17277
|
-
variables: true
|
|
17278
|
-
}],
|
|
17279
|
-
"no-useless-backreference": "error",
|
|
17280
|
-
"no-useless-call": "error",
|
|
17281
|
-
"no-useless-catch": "error",
|
|
17282
|
-
"no-useless-computed-key": "error",
|
|
17283
|
-
"no-useless-constructor": "error",
|
|
17284
|
-
"no-useless-rename": "error",
|
|
17285
|
-
"no-useless-return": "error",
|
|
17286
|
-
"no-var": "error",
|
|
17287
|
-
"no-with": "error",
|
|
17288
|
-
"object-shorthand": [
|
|
17289
|
-
"error",
|
|
17290
|
-
"always",
|
|
17291
|
-
{
|
|
17292
|
-
avoidQuotes: true,
|
|
17293
|
-
ignoreConstructors: false
|
|
17294
|
-
}
|
|
17295
|
-
],
|
|
17296
|
-
"one-var": ["error", { initialized: "never" }],
|
|
17297
|
-
"prefer-arrow-callback": ["error", {
|
|
17298
|
-
allowNamedFunctions: false,
|
|
17299
|
-
allowUnboundThis: true
|
|
17300
|
-
}],
|
|
17301
|
-
"prefer-const": ["error", {
|
|
17302
|
-
destructuring: "all",
|
|
17303
|
-
ignoreReadBeforeAssign: true
|
|
17304
|
-
}],
|
|
17305
|
-
"prefer-exponentiation-operator": "error",
|
|
17306
|
-
"prefer-promise-reject-errors": "error",
|
|
17307
|
-
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
17308
|
-
"prefer-rest-params": "error",
|
|
17309
|
-
"prefer-spread": "error",
|
|
17310
|
-
"prefer-template": "error",
|
|
17311
|
-
"sort-imports": "off",
|
|
17312
|
-
"symbol-description": "error",
|
|
17313
|
-
"unicode-bom": ["error", "never"],
|
|
17285
|
+
...javascriptRules(),
|
|
17314
17286
|
"unused-imports/no-unused-imports": isInEditor ? "off" : "error",
|
|
17315
17287
|
"unused-imports/no-unused-vars": ["error", {
|
|
17316
17288
|
args: "after-used",
|
|
@@ -17319,13 +17291,6 @@ const javascript = async (options) => {
|
|
|
17319
17291
|
vars: "all",
|
|
17320
17292
|
varsIgnorePattern: "^_"
|
|
17321
17293
|
}],
|
|
17322
|
-
"use-isnan": ["error", {
|
|
17323
|
-
enforceForIndexOf: true,
|
|
17324
|
-
enforceForSwitchCase: true
|
|
17325
|
-
}],
|
|
17326
|
-
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
17327
|
-
"vars-on-top": "error",
|
|
17328
|
-
yoda: ["error", "never"],
|
|
17329
17294
|
...overrides
|
|
17330
17295
|
}
|
|
17331
17296
|
}, {
|
|
@@ -17439,34 +17404,16 @@ const extractRules = (configs) => {
|
|
|
17439
17404
|
const rules = configs.filter((config) => config.rules !== undefined).map((config) => config.rules ?? {});
|
|
17440
17405
|
return Object.assign({}, ...rules);
|
|
17441
17406
|
};
|
|
17442
|
-
function typescriptRulesTypeAware(
|
|
17443
|
-
const tsRecomendedRulesTypeChecked = props?.strict ? extractRules(tseslint.configs.strictTypeChecked) : extractRules(tseslint.configs.recommendedTypeChecked);
|
|
17407
|
+
function typescriptRulesTypeAware() {
|
|
17444
17408
|
return {
|
|
17445
|
-
...tsRecomendedRulesTypeChecked,
|
|
17446
|
-
"@typescript-eslint/await-thenable": "error",
|
|
17447
|
-
"@typescript-eslint/no-for-in-array": "error",
|
|
17448
|
-
"no-implied-eval": "off",
|
|
17449
17409
|
"@typescript-eslint/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: true }],
|
|
17450
17410
|
"dot-notation": "off",
|
|
17451
17411
|
"@typescript-eslint/dot-notation": ["error", {
|
|
17452
17412
|
allowPattern: "^_",
|
|
17453
17413
|
allowKeywords: true
|
|
17454
17414
|
}],
|
|
17455
|
-
"@typescript-eslint/no-
|
|
17456
|
-
"@typescript-eslint/no-misused-promises": "error",
|
|
17415
|
+
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
17457
17416
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
17458
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
17459
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
17460
|
-
"no-throw-literal": "off",
|
|
17461
|
-
"@typescript-eslint/only-throw-error": "error",
|
|
17462
|
-
"@typescript-eslint/no-unsafe-argument": "error",
|
|
17463
|
-
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
17464
|
-
"@typescript-eslint/no-unsafe-call": "error",
|
|
17465
|
-
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
17466
|
-
"@typescript-eslint/no-unsafe-return": "error",
|
|
17467
|
-
"@typescript-eslint/restrict-plus-operands": "error",
|
|
17468
|
-
"@typescript-eslint/restrict-template-expressions": "error",
|
|
17469
|
-
"@typescript-eslint/unbound-method": "error",
|
|
17470
17417
|
"@typescript-eslint/no-redundant-type-constituents": "warn",
|
|
17471
17418
|
"@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }],
|
|
17472
17419
|
"@typescript-eslint/naming-convention": [
|
|
@@ -17555,22 +17502,19 @@ function typescriptRulesTypeAware(props) {
|
|
|
17555
17502
|
"@typescript-eslint/no-floating-promises": ["error", {
|
|
17556
17503
|
ignoreVoid: true,
|
|
17557
17504
|
ignoreIIFE: true
|
|
17558
|
-
}]
|
|
17505
|
+
}],
|
|
17506
|
+
"@typescript-eslint/no-deprecated": "warn"
|
|
17559
17507
|
};
|
|
17560
17508
|
}
|
|
17561
|
-
function typescriptRulesTypeOblivious(
|
|
17562
|
-
const tseslintBaseRules = props?.strict ? extractRules(tseslint.configs.strict) : extractRules(tseslint.configs.recommended);
|
|
17509
|
+
function typescriptRulesTypeOblivious() {
|
|
17563
17510
|
return {
|
|
17564
|
-
...tseslintBaseRules,
|
|
17565
17511
|
eqeqeq: "error",
|
|
17566
17512
|
camelcase: "off",
|
|
17567
17513
|
yoda: "error",
|
|
17568
17514
|
"arrow-parens": "off",
|
|
17569
17515
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
17570
17516
|
"object-curly-spacing": "off",
|
|
17571
|
-
"@typescript-eslint/object-curly-spacing": "off",
|
|
17572
17517
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
17573
|
-
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
17574
17518
|
"@typescript-eslint/consistent-type-imports": ["error", {
|
|
17575
17519
|
prefer: "type-imports",
|
|
17576
17520
|
fixStyle: "separate-type-imports"
|
|
@@ -17586,15 +17530,10 @@ function typescriptRulesTypeOblivious(props) {
|
|
|
17586
17530
|
"method"
|
|
17587
17531
|
]
|
|
17588
17532
|
}],
|
|
17589
|
-
"no-array-constructor": "off",
|
|
17590
|
-
"@typescript-eslint/no-array-constructor": "error",
|
|
17591
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
17592
|
-
"@typescript-eslint/no-misused-new": "error",
|
|
17593
17533
|
"@typescript-eslint/no-namespace": ["error", {
|
|
17594
17534
|
allowDeclarations: false,
|
|
17595
17535
|
allowDefinitionFiles: false
|
|
17596
17536
|
}],
|
|
17597
|
-
"no-unused-vars": "off",
|
|
17598
17537
|
"@typescript-eslint/no-unused-vars": ["warn", {
|
|
17599
17538
|
vars: "all",
|
|
17600
17539
|
args: "none",
|
|
@@ -17611,100 +17550,49 @@ function typescriptRulesTypeOblivious(props) {
|
|
|
17611
17550
|
typedefs: true
|
|
17612
17551
|
}],
|
|
17613
17552
|
"@typescript-eslint/prefer-namespace-keyword": "warn",
|
|
17614
|
-
"@typescript-eslint/typedef": ["warn", {
|
|
17615
|
-
arrayDestructuring: false,
|
|
17616
|
-
arrowParameter: false,
|
|
17617
|
-
memberVariableDeclaration: true,
|
|
17618
|
-
objectDestructuring: false,
|
|
17619
|
-
parameter: true,
|
|
17620
|
-
propertyDeclaration: true,
|
|
17621
|
-
variableDeclaration: false,
|
|
17622
|
-
variableDeclarationIgnoreFunction: true
|
|
17623
|
-
}],
|
|
17624
17553
|
"accessor-pairs": "error",
|
|
17625
17554
|
"for-direction": "warn",
|
|
17626
17555
|
"guard-for-in": "error",
|
|
17627
17556
|
"max-lines": ["warn", { max: 2e3 }],
|
|
17628
|
-
"no-async-promise-executor": "error",
|
|
17629
17557
|
"no-bitwise": "off",
|
|
17630
17558
|
"no-caller": "error",
|
|
17631
|
-
"no-compare-neg-zero": "error",
|
|
17632
|
-
"no-cond-assign": "error",
|
|
17633
17559
|
"no-constant-condition": "warn",
|
|
17634
|
-
"no-control-regex": "error",
|
|
17635
17560
|
"no-debugger": "warn",
|
|
17636
|
-
"no-delete-var": "error",
|
|
17637
|
-
"no-duplicate-case": "error",
|
|
17638
17561
|
"no-empty": "warn",
|
|
17639
|
-
"no-empty-character-class": "error",
|
|
17640
17562
|
"no-empty-pattern": "warn",
|
|
17641
17563
|
"no-eval": "warn",
|
|
17642
|
-
"no-ex-assign": "error",
|
|
17643
17564
|
"no-extend-native": "error",
|
|
17644
17565
|
"no-extra-boolean-cast": "warn",
|
|
17645
17566
|
"no-extra-label": "warn",
|
|
17646
|
-
"no-fallthrough": "error",
|
|
17647
17567
|
"no-func-assign": "warn",
|
|
17648
|
-
"no-implied-eval": "error",
|
|
17649
|
-
"no-invalid-regexp": "error",
|
|
17650
17568
|
"no-label-var": "error",
|
|
17651
17569
|
"no-lone-blocks": "warn",
|
|
17652
|
-
"no-misleading-character-class": "error",
|
|
17653
17570
|
"no-multi-str": "error",
|
|
17654
17571
|
"no-new": "warn",
|
|
17655
17572
|
"no-new-func": "error",
|
|
17656
17573
|
"no-new-wrappers": "warn",
|
|
17657
|
-
"no-octal": "error",
|
|
17658
17574
|
"no-octal-escape": "error",
|
|
17659
|
-
"no-regex-spaces": "error",
|
|
17660
17575
|
"no-return-assign": "error",
|
|
17661
17576
|
"no-script-url": "warn",
|
|
17662
|
-
"no-self-assign": "error",
|
|
17663
17577
|
"no-self-compare": "error",
|
|
17664
17578
|
"no-sequences": "error",
|
|
17665
|
-
"no-shadow-restricted-names": "error",
|
|
17666
|
-
"no-sparse-arrays": "error",
|
|
17667
17579
|
"no-unmodified-loop-condition": "warn",
|
|
17668
|
-
"no-unsafe-finally": "error",
|
|
17669
|
-
"no-unused-expressions": "off",
|
|
17670
|
-
"@typescript-eslint/no-unused-expressions": "error",
|
|
17671
|
-
"no-unused-labels": "error",
|
|
17672
17580
|
"no-useless-catch": "warn",
|
|
17673
17581
|
"no-useless-concat": "error",
|
|
17674
|
-
"no-var": "error",
|
|
17675
17582
|
"no-void": ["error", { allowAsStatement: true }],
|
|
17676
17583
|
"no-with": "error",
|
|
17677
|
-
"prefer-const": "error",
|
|
17678
17584
|
"require-atomic-updates": "error",
|
|
17679
17585
|
"require-yield": "warn",
|
|
17680
17586
|
strict: ["error", "never"],
|
|
17681
|
-
"use-isnan": "error",
|
|
17682
|
-
"no-useless-constructor": "off",
|
|
17683
|
-
"@typescript-eslint/no-useless-constructor": "error",
|
|
17684
|
-
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
17685
|
-
"@typescript-eslint/brace-style": [
|
|
17686
|
-
"error",
|
|
17687
|
-
"1tbs",
|
|
17688
|
-
{ allowSingleLine: false }
|
|
17689
|
-
],
|
|
17690
17587
|
"comma-spacing": "off",
|
|
17691
|
-
"@typescript-eslint/comma-spacing": ["error", {
|
|
17692
|
-
before: false,
|
|
17693
|
-
after: true
|
|
17694
|
-
}],
|
|
17695
17588
|
"default-param-last": "off",
|
|
17696
17589
|
"@typescript-eslint/default-param-last": "error",
|
|
17697
|
-
"@typescript-eslint/func-call-spacing": ["error", "never"],
|
|
17698
|
-
"@typescript-eslint/keyword-spacing": "error",
|
|
17699
|
-
"no-dupe-class-members": "off",
|
|
17700
17590
|
"@typescript-eslint/no-dupe-class-members": "error",
|
|
17701
17591
|
"no-empty-function": "off",
|
|
17702
17592
|
"@typescript-eslint/no-empty-function": "error",
|
|
17703
|
-
"@typescript-eslint/no-extra-semi": "error",
|
|
17704
17593
|
"no-loop-func": "off",
|
|
17705
17594
|
"@typescript-eslint/no-loop-func": "error",
|
|
17706
17595
|
"no-loss-of-precision": "off",
|
|
17707
|
-
"no-redeclare": "off",
|
|
17708
17596
|
"@typescript-eslint/no-redeclare": "error",
|
|
17709
17597
|
"no-restricted-imports": "off",
|
|
17710
17598
|
"@typescript-eslint/no-restricted-imports": ["error", { paths: [
|
|
@@ -17717,31 +17605,33 @@ function typescriptRulesTypeOblivious(props) {
|
|
|
17717
17605
|
"querystring",
|
|
17718
17606
|
"colors"
|
|
17719
17607
|
] }],
|
|
17720
|
-
"@typescript-eslint/padding-line-between-statements": "off",
|
|
17721
|
-
"@typescript-eslint/quotes": "off",
|
|
17722
|
-
"@typescript-eslint/space-before-function-paren": "off",
|
|
17723
|
-
"@typescript-eslint/space-infix-ops": "error",
|
|
17724
|
-
"@typescript-eslint/semi": ["error", "always"],
|
|
17725
|
-
"@typescript-eslint/space-before-blocks": ["error", "always"],
|
|
17726
|
-
"no-undef": "off",
|
|
17727
17608
|
"no-duplicate-imports": "off",
|
|
17728
|
-
"@typescript-eslint/method-signature-style": "warn"
|
|
17609
|
+
"@typescript-eslint/method-signature-style": ["warn", "property"],
|
|
17610
|
+
"@typescript-eslint/prefer-literal-enum-member": ["error", { allowBitwiseExpressions: true }],
|
|
17611
|
+
"no-restricted-syntax": [
|
|
17612
|
+
"error",
|
|
17613
|
+
"ForInStatement",
|
|
17614
|
+
"LabeledStatement"
|
|
17615
|
+
]
|
|
17729
17616
|
};
|
|
17730
17617
|
}
|
|
17618
|
+
function tsPresetRules(props) {
|
|
17619
|
+
const tseslintConfig = props?.typeAware ? props?.strict ? tseslint.configs.strictTypeChecked : tseslint.configs.recommendedTypeChecked : props?.strict ? tseslint.configs.strict : tseslint.configs.recommended;
|
|
17620
|
+
return extractRules(tseslintConfig);
|
|
17621
|
+
}
|
|
17731
17622
|
function typescriptRules(props) {
|
|
17732
17623
|
const normalized = {
|
|
17624
|
+
includeTsEslintPresetRules: true,
|
|
17733
17625
|
typeAware: false,
|
|
17734
17626
|
strict: false,
|
|
17735
17627
|
...props
|
|
17736
17628
|
};
|
|
17737
17629
|
dbg("building typescript rules: %O", normalized);
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
|
|
17742
|
-
|
|
17743
|
-
}
|
|
17744
|
-
return typescriptRulesTypeOblivious({ strict: normalized.strict });
|
|
17630
|
+
return {
|
|
17631
|
+
...normalized.includeTsEslintPresetRules ? tsPresetRules(normalized) : {},
|
|
17632
|
+
...typescriptRulesTypeOblivious(),
|
|
17633
|
+
...normalized.typeAware ? typescriptRulesTypeAware() : {}
|
|
17634
|
+
};
|
|
17745
17635
|
}
|
|
17746
17636
|
|
|
17747
17637
|
//#endregion
|
|
@@ -18641,10 +18531,10 @@ function typescriptParser(options) {
|
|
|
18641
18531
|
sourceType: "module",
|
|
18642
18532
|
...typeAware ? {
|
|
18643
18533
|
projectService: {
|
|
18644
|
-
allowDefaultProject: ["
|
|
18534
|
+
allowDefaultProject: ["./*.js"],
|
|
18645
18535
|
defaultProject: (typeof tsconfig === "string" ? tsconfig : tsconfig[0]) ?? "tsconfig.json"
|
|
18646
18536
|
},
|
|
18647
|
-
tsconfigRootDir: process$1.cwd()
|
|
18537
|
+
tsconfigRootDir: process$1.cwd()
|
|
18648
18538
|
} : {},
|
|
18649
18539
|
...parserOptionsOverride
|
|
18650
18540
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "@jsse/eslint-config ~ WYSIWYG",
|
|
6
6
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"eslint-plugin-command": "^3.4.0",
|
|
76
76
|
"eslint-plugin-de-morgan": "^2.0.0",
|
|
77
77
|
"eslint-plugin-import-lite": "^0.5.0",
|
|
78
|
-
"eslint-plugin-jsdoc": "^62.5.
|
|
78
|
+
"eslint-plugin-jsdoc": "^62.5.2",
|
|
79
79
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
80
80
|
"eslint-plugin-n": "^17.23.2",
|
|
81
81
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
82
|
-
"eslint-plugin-perfectionist": "^5.
|
|
82
|
+
"eslint-plugin-perfectionist": "^5.5.0",
|
|
83
83
|
"eslint-plugin-pnpm": "^1.5.0",
|
|
84
84
|
"eslint-plugin-react": "^7.37.5",
|
|
85
85
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -100,12 +100,13 @@
|
|
|
100
100
|
"@jsse/tsconfig": "^0.4.0",
|
|
101
101
|
"@types/debug": "^4.1.12",
|
|
102
102
|
"@types/fs-extra": "^11.0.4",
|
|
103
|
-
"@types/node": "^25.2.
|
|
103
|
+
"@types/node": "^25.2.1",
|
|
104
104
|
"cac": "^6.7.14",
|
|
105
105
|
"eslint": "^9.39.2",
|
|
106
106
|
"eslint-flat-config-utils": "^3.0.0",
|
|
107
107
|
"eslint-typegen": "^2.3.0",
|
|
108
108
|
"execa": "~9.6.1",
|
|
109
|
+
"fast-equals": "^6.0.0",
|
|
109
110
|
"fast-glob": "^3.3.3",
|
|
110
111
|
"fs-extra": "^11.3.3",
|
|
111
112
|
"globals": "^17.3.0",
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
"prettier": "^3.8.1",
|
|
116
117
|
"react": "~19.2.4",
|
|
117
118
|
"rimraf": "^6.1.2",
|
|
118
|
-
"tsdown": "^0.20.
|
|
119
|
+
"tsdown": "^0.20.3",
|
|
119
120
|
"tsx": "^4.21.0",
|
|
120
121
|
"typescript": "~5.9.3",
|
|
121
122
|
"vitest": "^4.0.18"
|