@dg-scripts/eslint-config 5.15.2 → 5.16.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 +16 -0
- package/index.js +25 -0
- package/package.json +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.16.0](https://github.com/sabertazimi/bod/compare/v5.15.2...v5.16.0) (2024-03-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **eslint-config:** change brace-style to '1tbs' ([#1136](https://github.com/sabertazimi/bod/issues/1136)) ([06529a5](https://github.com/sabertazimi/bod/commit/06529a50b59bbeacb3bec4187a8ac240d8c39026))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **eslint-config:** add optional Next.js support ([#1135](https://github.com/sabertazimi/bod/issues/1135)) ([eeac1bc](https://github.com/sabertazimi/bod/commit/eeac1bcbca17d41e11664a5d8f2212c6778674b3))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [5.15.2](https://github.com/sabertazimi/bod/compare/v5.15.1...v5.15.2) (2024-03-30)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @dg-scripts/eslint-config
|
package/index.js
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { isPackageExists } from 'local-pkg'
|
|
1
4
|
import antfu from '@antfu/eslint-config'
|
|
5
|
+
import { FlatCompat } from '@eslint/eslintrc'
|
|
6
|
+
|
|
7
|
+
const baseDirectory = path.dirname(fileURLToPath(import.meta.url))
|
|
8
|
+
|
|
9
|
+
const compat = new FlatCompat({
|
|
10
|
+
baseDirectory,
|
|
11
|
+
resolvePluginsRelativeTo: baseDirectory,
|
|
12
|
+
})
|
|
2
13
|
|
|
3
14
|
export default antfu(
|
|
4
15
|
{
|
|
16
|
+
typescript: {
|
|
17
|
+
tsconfigPath: 'tsconfig.json',
|
|
18
|
+
},
|
|
5
19
|
react: true,
|
|
6
20
|
formatters: {
|
|
7
21
|
css: true,
|
|
@@ -9,8 +23,19 @@ export default antfu(
|
|
|
9
23
|
markdown: 'prettier',
|
|
10
24
|
},
|
|
11
25
|
},
|
|
26
|
+
isPackageExists('next') && isPackageExists('eslint-config-next')
|
|
27
|
+
? compat.config({
|
|
28
|
+
overrides: [
|
|
29
|
+
{
|
|
30
|
+
files: '**/*.{ts,tsx}',
|
|
31
|
+
extends: 'next/core-web-vitals',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
})
|
|
35
|
+
: {},
|
|
12
36
|
{
|
|
13
37
|
rules: {
|
|
38
|
+
'style/brace-style': ['error', '1tbs'],
|
|
14
39
|
'ts/prefer-literal-enum-member': [
|
|
15
40
|
'error',
|
|
16
41
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dg-scripts/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.16.0",
|
|
5
5
|
"description": "ESLint configuration used by dg-scripts.",
|
|
6
6
|
"author": "sabertazimi <sabertazimi@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,15 +35,27 @@
|
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"eslint": "^8.0.0",
|
|
38
|
+
"eslint-config-next": "^14.0.0",
|
|
39
|
+
"next": "^14.0.0",
|
|
38
40
|
"prettier": "^3.0.0",
|
|
39
41
|
"typescript": "^5.0.0"
|
|
40
42
|
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"eslint-config-next": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"next": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
41
51
|
"dependencies": {
|
|
42
52
|
"@antfu/eslint-config": "^2.11.5",
|
|
53
|
+
"@eslint/eslintrc": "^3.0.2",
|
|
43
54
|
"eslint-plugin-format": "^0.1.0",
|
|
44
55
|
"eslint-plugin-react": "^7.34.1",
|
|
45
56
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
46
|
-
"eslint-plugin-react-refresh": "^0.4.6"
|
|
57
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
58
|
+
"local-pkg": "^0.5.0"
|
|
47
59
|
},
|
|
48
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "5fc2f0beb64314994b9b2c4915533c289bc066e7"
|
|
49
61
|
}
|