@lzear/eslint-config 4.0.0 → 4.0.2
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/dist/index.js +16 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -200,7 +200,7 @@ var preferRelativeImports = {
|
|
|
200
200
|
create: (context) => {
|
|
201
201
|
const opts = context.options[0];
|
|
202
202
|
const maxParentPrefixes = opts?.maxParentPrefixes ?? 1;
|
|
203
|
-
const filename = context.physicalFilename
|
|
203
|
+
const filename = context.physicalFilename;
|
|
204
204
|
const check = (source) => {
|
|
205
205
|
const importPath = source.value;
|
|
206
206
|
if (typeof importPath !== "string" || importPath.startsWith(".")) {
|
|
@@ -278,6 +278,8 @@ var core = () => {
|
|
|
278
278
|
...regexpPlugin.configs.recommended.rules,
|
|
279
279
|
...sonarRules,
|
|
280
280
|
"sonarjs/fixme-tag": 0,
|
|
281
|
+
"sonarjs/no-invariant-returns": 0,
|
|
282
|
+
// annoying
|
|
281
283
|
"sonarjs/no-os-command-from-path": 0,
|
|
282
284
|
// annoying
|
|
283
285
|
"sonarjs/os-command": 0,
|
|
@@ -372,7 +374,7 @@ var node = async (config) => {
|
|
|
372
374
|
n: nodePlugin
|
|
373
375
|
},
|
|
374
376
|
rules: {
|
|
375
|
-
...nodePlugin.configs["flat/recommended"]
|
|
377
|
+
...nodePlugin.configs["flat/recommended"].rules,
|
|
376
378
|
"n/hashbang": 0,
|
|
377
379
|
// n resolver doesn't understand TypeScript imports; TypeScript handles this
|
|
378
380
|
"n/no-extraneous-import": 0,
|
|
@@ -509,10 +511,21 @@ var typescript = async (config) => {
|
|
|
509
511
|
name: "lzear/typescript",
|
|
510
512
|
extends: [
|
|
511
513
|
eslint.configs.recommended,
|
|
512
|
-
tseslint.configs.
|
|
514
|
+
tseslint.configs.strictTypeChecked,
|
|
513
515
|
tseslint.configs.stylisticTypeChecked
|
|
514
516
|
],
|
|
515
517
|
files,
|
|
518
|
+
rules: {
|
|
519
|
+
"@typescript-eslint/no-unnecessary-condition": [
|
|
520
|
+
2,
|
|
521
|
+
{ allowConstantLoopConditions: "only-allowed-literals" }
|
|
522
|
+
],
|
|
523
|
+
"@typescript-eslint/no-unused-expressions": [2, { allowTernary: true }],
|
|
524
|
+
"@typescript-eslint/restrict-template-expressions": [
|
|
525
|
+
2,
|
|
526
|
+
{ allowNumber: true }
|
|
527
|
+
]
|
|
528
|
+
},
|
|
516
529
|
languageOptions: {
|
|
517
530
|
parser: typescriptParser,
|
|
518
531
|
parserOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lzear/eslint-config",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Shared ESLint flat config for lzear repos",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"typescript-eslint": "^8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@lzear/configs": "
|
|
61
|
+
"@lzear/configs": "4.0.2",
|
|
62
62
|
"@vitest/coverage-v8": "^4",
|
|
63
63
|
"eslint": "^9",
|
|
64
64
|
"tsup": "^8",
|
|
@@ -74,4 +74,4 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
}
|
|
77
|
-
}
|
|
77
|
+
}
|