@lvce-editor/eslint-config 1.9.0 → 1.11.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/index.js +15 -4
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import eslint from '@eslint/js'
|
|
2
|
+
import pluginJest from 'eslint-plugin-jest'
|
|
2
3
|
import nodePlugin from 'eslint-plugin-n'
|
|
3
4
|
import perfectionist from 'eslint-plugin-perfectionist'
|
|
4
5
|
import { createFileComposition, createFolderStructure, projectStructurePlugin } from 'eslint-plugin-project-structure'
|
|
5
|
-
import tseslint from 'typescript-eslint'
|
|
6
|
-
import process from 'node:process'
|
|
7
|
-
import { join } from 'node:path'
|
|
8
6
|
import { mkdirSync } from 'node:fs'
|
|
7
|
+
import { join } from 'node:path'
|
|
8
|
+
import process from 'node:process'
|
|
9
|
+
import tseslint from 'typescript-eslint'
|
|
9
10
|
|
|
10
11
|
const root = process.cwd()
|
|
11
12
|
|
|
@@ -58,6 +59,14 @@ const defaultConfig = tseslint.config(
|
|
|
58
59
|
},
|
|
59
60
|
},
|
|
60
61
|
},
|
|
62
|
+
pluginJest.configs['flat/recommended'],
|
|
63
|
+
{
|
|
64
|
+
settings: {
|
|
65
|
+
jest: {
|
|
66
|
+
version: 29,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
61
70
|
{
|
|
62
71
|
ignores: [
|
|
63
72
|
'dist',
|
|
@@ -77,10 +86,11 @@ const defaultConfig = tseslint.config(
|
|
|
77
86
|
},
|
|
78
87
|
{
|
|
79
88
|
rules: {
|
|
80
|
-
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
81
89
|
'@typescript-eslint/consistent-type-exports': 'error',
|
|
82
90
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
91
|
+
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
83
92
|
'@typescript-eslint/prefer-readonly-parameter-types': 'error',
|
|
93
|
+
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
84
94
|
},
|
|
85
95
|
},
|
|
86
96
|
{
|
|
@@ -100,6 +110,7 @@ const defaultConfig = tseslint.config(
|
|
|
100
110
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
101
111
|
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
102
112
|
'@typescript-eslint/require-await': 'off',
|
|
113
|
+
'@typescript-eslint/no-unused-vars': 'off', // handled by typescript
|
|
103
114
|
},
|
|
104
115
|
},
|
|
105
116
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"description": "",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@eslint/js": "^9.18.0",
|
|
23
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
23
24
|
"eslint-plugin-n": "^17.15.1",
|
|
24
25
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
25
26
|
"eslint-plugin-project-structure": "^3.13.1",
|