@dg-scripts/eslint-config 5.21.6 → 5.21.8
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/index.js +5 -22
- package/package.json +12 -13
package/README.md
CHANGED
|
@@ -63,5 +63,5 @@ export { disableTypeAware as default } from '@dg-scripts/eslint-config'
|
|
|
63
63
|
## Contact
|
|
64
64
|
|
|
65
65
|
[](mailto:sabertazimi@gmail.com)
|
|
66
|
-
[](https://x.com/sabertazimi)
|
|
67
67
|
[](https://github.com/sabertazimi)
|
package/index.js
CHANGED
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import
|
|
3
|
-
import { fileURLToPath } from 'node:url'
|
|
4
|
-
import antfu, { GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SRC, GLOB_TESTS, GLOB_TS, GLOB_TSX } from '@antfu/eslint-config'
|
|
5
|
-
import { FlatCompat } from '@eslint/eslintrc'
|
|
2
|
+
import antfu, { GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SRC, GLOB_TESTS } from '@antfu/eslint-config'
|
|
6
3
|
import eslintPluginPromise from 'eslint-plugin-promise'
|
|
7
4
|
import eslintPluginSecurity from 'eslint-plugin-security'
|
|
8
5
|
import eslintPluginTestingLibrary from 'eslint-plugin-testing-library'
|
|
9
6
|
import { isPackageExists } from 'local-pkg'
|
|
10
7
|
|
|
11
|
-
const baseDirectory = path.dirname(fileURLToPath(import.meta.url))
|
|
12
|
-
|
|
13
|
-
const compat = new FlatCompat({
|
|
14
|
-
baseDirectory,
|
|
15
|
-
resolvePluginsRelativeTo: baseDirectory,
|
|
16
|
-
})
|
|
17
|
-
|
|
18
8
|
const eslintConfigNext
|
|
19
|
-
= isPackageExists('next') && isPackageExists('eslint-
|
|
20
|
-
?
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
files: [GLOB_TS, GLOB_TSX],
|
|
24
|
-
extends: 'next/core-web-vitals',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
})
|
|
28
|
-
: []
|
|
9
|
+
= isPackageExists('next') && isPackageExists('@next/eslint-plugin-next')
|
|
10
|
+
? { nextjs: true }
|
|
11
|
+
: { nextjs: false }
|
|
29
12
|
|
|
30
13
|
/** @type {import('@antfu/eslint-config').TypedFlatConfigItem} */
|
|
31
14
|
const eslintConfigMarkdown = {
|
|
@@ -126,7 +109,6 @@ const eslintConfigRules = {
|
|
|
126
109
|
|
|
127
110
|
/** @type {import('@antfu/eslint-config').TypedFlatConfigItem[]} */
|
|
128
111
|
const eslintConfig = [
|
|
129
|
-
...eslintConfigNext,
|
|
130
112
|
eslintConfigMarkdown,
|
|
131
113
|
eslintConfigTestingLibrary,
|
|
132
114
|
eslintConfigSecurity,
|
|
@@ -137,6 +119,7 @@ const eslintConfig = [
|
|
|
137
119
|
/** @type {import('@antfu/eslint-config').OptionsConfig} */
|
|
138
120
|
const eslintConfigAntfu = {
|
|
139
121
|
react: true,
|
|
122
|
+
...eslintConfigNext,
|
|
140
123
|
formatters: {
|
|
141
124
|
css: true,
|
|
142
125
|
html: true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dg-scripts/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.21.
|
|
4
|
+
"version": "5.21.8",
|
|
5
5
|
"description": "ESLint configuration used by dg-scripts.",
|
|
6
6
|
"author": "sabertazimi <sabertazimi@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"lint:fix": "eslint . --config=index.js --fix"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
+
"@next/eslint-plugin-next": "^16.0.0",
|
|
44
45
|
"eslint": "^9.0.0",
|
|
45
|
-
"
|
|
46
|
-
"next": "^15.0.0",
|
|
46
|
+
"next": "^16.0.0",
|
|
47
47
|
"prettier": "^3.0.0",
|
|
48
48
|
"typescript": "^5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
|
-
"eslint-
|
|
51
|
+
"@next/eslint-plugin-next": {
|
|
52
52
|
"optional": true
|
|
53
53
|
},
|
|
54
54
|
"next": {
|
|
@@ -56,16 +56,15 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@antfu/eslint-config": "^
|
|
60
|
-
"@eslint-react/eslint-plugin": "^
|
|
61
|
-
"
|
|
62
|
-
"eslint-plugin-format": "^1.0.1",
|
|
59
|
+
"@antfu/eslint-config": "^6.2.0",
|
|
60
|
+
"@eslint-react/eslint-plugin": "^2.3.9",
|
|
61
|
+
"eslint-plugin-format": "^1.0.2",
|
|
63
62
|
"eslint-plugin-promise": "^7.2.1",
|
|
64
|
-
"eslint-plugin-react-hooks": "^
|
|
65
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
63
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
64
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
66
65
|
"eslint-plugin-security": "^3.0.1",
|
|
67
|
-
"eslint-plugin-testing-library": "^7.
|
|
68
|
-
"local-pkg": "^1.1.
|
|
66
|
+
"eslint-plugin-testing-library": "^7.13.5",
|
|
67
|
+
"local-pkg": "^1.1.2"
|
|
69
68
|
},
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "74eab627b3c0388b1f96c802df1674b37d42838f"
|
|
71
70
|
}
|