@bfra.me/eslint-config 0.36.0 → 0.38.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/lib/index.d.ts +5 -6
- package/lib/index.js +8 -3
- package/package.json +15 -15
- package/src/config.d.ts +0 -6
- package/src/configs/json-schema.ts +2 -2
- package/src/configs/markdown.ts +2 -1
- package/src/configs/nextjs.ts +5 -0
- package/src/rules.d.ts +5 -0
package/lib/index.d.ts
CHANGED
|
@@ -4555,6 +4555,11 @@ interface Rules {
|
|
|
4555
4555
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
4556
4556
|
*/
|
|
4557
4557
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
4558
|
+
/**
|
|
4559
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
4560
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
4561
|
+
*/
|
|
4562
|
+
'react/jsx-dollar'?: Linter.RuleEntry<[]>
|
|
4558
4563
|
/**
|
|
4559
4564
|
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
4560
4565
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
@@ -16433,7 +16438,6 @@ type ConfigNames =
|
|
|
16433
16438
|
| '@bfra.me/jsonc/unnamed1'
|
|
16434
16439
|
| '@bfra.me/jsonc/json-schema/plugins'
|
|
16435
16440
|
| '@bfra.me/jsonc/json-schema/unnamed1'
|
|
16436
|
-
| '@bfra.me/jsonc/json-schema/unnamed2'
|
|
16437
16441
|
| '@bfra.me/jsonc/json-schema'
|
|
16438
16442
|
| '@bfra.me/jsonc'
|
|
16439
16443
|
| '@bfra.me/markdown/plugin'
|
|
@@ -16447,7 +16451,6 @@ type ConfigNames =
|
|
|
16447
16451
|
| '@bfra.me/package-json/plugins'
|
|
16448
16452
|
| '@bfra.me/package-json/unnamed1'
|
|
16449
16453
|
| '@bfra.me/package-json/json-schema/plugins'
|
|
16450
|
-
| '@bfra.me/package-json/json-schema/unnamed1'
|
|
16451
16454
|
| '@bfra.me/package-json/json-schema'
|
|
16452
16455
|
| '@bfra.me/perfectionist'
|
|
16453
16456
|
| '@bfra.me/pnpm/package-json'
|
|
@@ -16462,11 +16465,9 @@ type ConfigNames =
|
|
|
16462
16465
|
| '@bfra.me/sort/package-json'
|
|
16463
16466
|
| '@bfra.me/sort/renovate-config'
|
|
16464
16467
|
| '@bfra.me/renovate-config/json-schema/plugins'
|
|
16465
|
-
| '@bfra.me/renovate-config/json-schema/unnamed1'
|
|
16466
16468
|
| '@bfra.me/renovate-config/json-schema'
|
|
16467
16469
|
| '@bfra.me/sort/tsconfig'
|
|
16468
16470
|
| '@bfra.me/tsconfig/json-schema/plugins'
|
|
16469
|
-
| '@bfra.me/tsconfig/json-schema/unnamed1'
|
|
16470
16471
|
| '@bfra.me/tsconfig/json-schema'
|
|
16471
16472
|
| '@bfra.me/stylistic'
|
|
16472
16473
|
| '@bfra.me/toml/plugins'
|
|
@@ -16474,7 +16475,6 @@ type ConfigNames =
|
|
|
16474
16475
|
| '@bfra.me/toml/unnamed2'
|
|
16475
16476
|
| '@bfra.me/toml/json-schema/plugins'
|
|
16476
16477
|
| '@bfra.me/toml/json-schema/unnamed1'
|
|
16477
|
-
| '@bfra.me/toml/json-schema/unnamed2'
|
|
16478
16478
|
| '@bfra.me/toml/json-schema'
|
|
16479
16479
|
| '@bfra.me/toml'
|
|
16480
16480
|
| '@bfra.me/typescript/plugins'
|
|
@@ -16490,7 +16490,6 @@ type ConfigNames =
|
|
|
16490
16490
|
| '@bfra.me/yaml/unnamed2'
|
|
16491
16491
|
| '@bfra.me/yaml/json-schema/plugins'
|
|
16492
16492
|
| '@bfra.me/yaml/json-schema/unnamed1'
|
|
16493
|
-
| '@bfra.me/yaml/json-schema/unnamed2'
|
|
16494
16493
|
| '@bfra.me/yaml/json-schema'
|
|
16495
16494
|
| '@bfra.me/yaml'
|
|
16496
16495
|
|
package/lib/index.js
CHANGED
|
@@ -105,7 +105,7 @@ var GLOB_EXCLUDE = [
|
|
|
105
105
|
import { fileURLToPath } from "url";
|
|
106
106
|
|
|
107
107
|
// package.json
|
|
108
|
-
var version = "0.
|
|
108
|
+
var version = "0.38.0";
|
|
109
109
|
|
|
110
110
|
// src/parsers/any-parser.ts
|
|
111
111
|
var lineBreakPattern = /\r\n|[\n\r\u2028\u2029]/u;
|
|
@@ -659,7 +659,7 @@ async function jsonSchema(name, files) {
|
|
|
659
659
|
import("eslint-plugin-json-schema-validator")
|
|
660
660
|
);
|
|
661
661
|
return [
|
|
662
|
-
...pluginJsonSchemaValidator.configs["flat/
|
|
662
|
+
...pluginJsonSchemaValidator.configs["flat/base"].map((config2) => {
|
|
663
663
|
if (config2.files == null) {
|
|
664
664
|
return { ...config2, files };
|
|
665
665
|
}
|
|
@@ -675,7 +675,7 @@ async function jsonSchema(name, files) {
|
|
|
675
675
|
name: `@bfra.me/${name}/json-schema`,
|
|
676
676
|
files,
|
|
677
677
|
rules: {
|
|
678
|
-
"json-schema-validator/no-invalid":
|
|
678
|
+
"json-schema-validator/no-invalid": "off"
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
];
|
|
@@ -885,6 +885,11 @@ async function nextjs(options = {}) {
|
|
|
885
885
|
const pluginNextJs = await interopDefault(import("@next/eslint-plugin-next"));
|
|
886
886
|
function getRules(name) {
|
|
887
887
|
const rules = pluginNextJs.configs?.[name]?.rules;
|
|
888
|
+
if (!rules) {
|
|
889
|
+
throw new Error(
|
|
890
|
+
`[@bfra.me/eslint-config] No rules found for @next/eslint-plugin-next config: ${name}`
|
|
891
|
+
);
|
|
892
|
+
}
|
|
888
893
|
return normalizeRules(rules);
|
|
889
894
|
}
|
|
890
895
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bfra.me/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Shared ESLint configuration for bfra.me",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bfra.me",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
|
|
41
|
-
"@eslint/markdown": "7.5.
|
|
41
|
+
"@eslint/markdown": "7.5.1",
|
|
42
42
|
"@stylistic/eslint-plugin": "5.5.0",
|
|
43
43
|
"eslint-config-flat-gitignore": "2.1.0",
|
|
44
44
|
"eslint-flat-config-utils": "2.1.4",
|
|
45
45
|
"eslint-merge-processors": "2.0.0",
|
|
46
46
|
"eslint-plugin-command": "3.3.1",
|
|
47
47
|
"eslint-plugin-import-x": "4.16.1",
|
|
48
|
-
"eslint-plugin-jsdoc": "61.1.
|
|
48
|
+
"eslint-plugin-jsdoc": "61.1.12",
|
|
49
49
|
"eslint-plugin-json-schema-validator": "5.4.1",
|
|
50
50
|
"eslint-plugin-jsonc": "2.21.0",
|
|
51
51
|
"eslint-plugin-n": "17.23.1",
|
|
@@ -55,26 +55,26 @@
|
|
|
55
55
|
"eslint-plugin-unicorn": "62.0.0",
|
|
56
56
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
57
57
|
"eslint-plugin-yml": "1.19.0",
|
|
58
|
-
"globals": "16.
|
|
58
|
+
"globals": "16.5.0",
|
|
59
59
|
"is-in-ci": "2.0.0",
|
|
60
60
|
"local-pkg": "1.1.2",
|
|
61
61
|
"package-directory": "8.1.0",
|
|
62
62
|
"package-manager-detector": "1.5.0",
|
|
63
63
|
"sort-package-json": "3.4.0",
|
|
64
|
-
"typescript-eslint": "8.46.
|
|
64
|
+
"typescript-eslint": "8.46.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@eslint-react/eslint-plugin": "2.
|
|
67
|
+
"@eslint-react/eslint-plugin": "2.3.1",
|
|
68
68
|
"@eslint/config-inspector": "1.3.0",
|
|
69
69
|
"@eslint/core": "0.17.0",
|
|
70
|
-
"@next/eslint-plugin-next": "
|
|
70
|
+
"@next/eslint-plugin-next": "16.0.1",
|
|
71
71
|
"@types/eslint-config-prettier": "6.11.3",
|
|
72
|
-
"@typescript-eslint/types": "8.46.
|
|
73
|
-
"@vitest/eslint-plugin": "1.
|
|
72
|
+
"@typescript-eslint/types": "8.46.3",
|
|
73
|
+
"@vitest/eslint-plugin": "1.4.1",
|
|
74
74
|
"astro-eslint-parser": "1.2.2",
|
|
75
|
-
"eslint": "9.
|
|
75
|
+
"eslint": "9.39.1",
|
|
76
76
|
"eslint-config-prettier": "10.1.8",
|
|
77
|
-
"eslint-plugin-astro": "1.
|
|
77
|
+
"eslint-plugin-astro": "1.5.0",
|
|
78
78
|
"eslint-plugin-node-dependencies": "1.2.0",
|
|
79
79
|
"eslint-plugin-pnpm": "1.3.0",
|
|
80
80
|
"eslint-plugin-prettier": "5.5.4",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"eslint-typegen": "2.3.0",
|
|
84
84
|
"tsup": "8.5.0",
|
|
85
85
|
"tsx": "4.20.6",
|
|
86
|
-
"@bfra.me/eslint-config": "0.
|
|
87
|
-
"@bfra.me/
|
|
88
|
-
"@bfra.me/
|
|
86
|
+
"@bfra.me/eslint-config": "0.38.0",
|
|
87
|
+
"@bfra.me/tsconfig": "0.12.0",
|
|
88
|
+
"@bfra.me/prettier-config": "0.16.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@eslint-react/eslint-plugin": "^2.0.1",
|
|
92
|
-
"@next/eslint-plugin-next": "
|
|
92
|
+
"@next/eslint-plugin-next": ">=15.5.3",
|
|
93
93
|
"@vitest/eslint-plugin": "^1.1.21",
|
|
94
94
|
"astro-eslint-parser": "^1.2.2",
|
|
95
95
|
"eslint": "^9.38.0",
|
package/src/config.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ export type ConfigNames =
|
|
|
41
41
|
| '@bfra.me/jsonc/unnamed1'
|
|
42
42
|
| '@bfra.me/jsonc/json-schema/plugins'
|
|
43
43
|
| '@bfra.me/jsonc/json-schema/unnamed1'
|
|
44
|
-
| '@bfra.me/jsonc/json-schema/unnamed2'
|
|
45
44
|
| '@bfra.me/jsonc/json-schema'
|
|
46
45
|
| '@bfra.me/jsonc'
|
|
47
46
|
| '@bfra.me/markdown/plugin'
|
|
@@ -55,7 +54,6 @@ export type ConfigNames =
|
|
|
55
54
|
| '@bfra.me/package-json/plugins'
|
|
56
55
|
| '@bfra.me/package-json/unnamed1'
|
|
57
56
|
| '@bfra.me/package-json/json-schema/plugins'
|
|
58
|
-
| '@bfra.me/package-json/json-schema/unnamed1'
|
|
59
57
|
| '@bfra.me/package-json/json-schema'
|
|
60
58
|
| '@bfra.me/perfectionist'
|
|
61
59
|
| '@bfra.me/pnpm/package-json'
|
|
@@ -70,11 +68,9 @@ export type ConfigNames =
|
|
|
70
68
|
| '@bfra.me/sort/package-json'
|
|
71
69
|
| '@bfra.me/sort/renovate-config'
|
|
72
70
|
| '@bfra.me/renovate-config/json-schema/plugins'
|
|
73
|
-
| '@bfra.me/renovate-config/json-schema/unnamed1'
|
|
74
71
|
| '@bfra.me/renovate-config/json-schema'
|
|
75
72
|
| '@bfra.me/sort/tsconfig'
|
|
76
73
|
| '@bfra.me/tsconfig/json-schema/plugins'
|
|
77
|
-
| '@bfra.me/tsconfig/json-schema/unnamed1'
|
|
78
74
|
| '@bfra.me/tsconfig/json-schema'
|
|
79
75
|
| '@bfra.me/stylistic'
|
|
80
76
|
| '@bfra.me/toml/plugins'
|
|
@@ -82,7 +78,6 @@ export type ConfigNames =
|
|
|
82
78
|
| '@bfra.me/toml/unnamed2'
|
|
83
79
|
| '@bfra.me/toml/json-schema/plugins'
|
|
84
80
|
| '@bfra.me/toml/json-schema/unnamed1'
|
|
85
|
-
| '@bfra.me/toml/json-schema/unnamed2'
|
|
86
81
|
| '@bfra.me/toml/json-schema'
|
|
87
82
|
| '@bfra.me/toml'
|
|
88
83
|
| '@bfra.me/typescript/plugins'
|
|
@@ -98,6 +93,5 @@ export type ConfigNames =
|
|
|
98
93
|
| '@bfra.me/yaml/unnamed2'
|
|
99
94
|
| '@bfra.me/yaml/json-schema/plugins'
|
|
100
95
|
| '@bfra.me/yaml/json-schema/unnamed1'
|
|
101
|
-
| '@bfra.me/yaml/json-schema/unnamed2'
|
|
102
96
|
| '@bfra.me/yaml/json-schema'
|
|
103
97
|
| '@bfra.me/yaml'
|
|
@@ -12,7 +12,7 @@ export async function jsonSchema(name: string, files: string[]): Promise<Config[
|
|
|
12
12
|
import('eslint-plugin-json-schema-validator'),
|
|
13
13
|
)
|
|
14
14
|
return [
|
|
15
|
-
...pluginJsonSchemaValidator.configs['flat/
|
|
15
|
+
...pluginJsonSchemaValidator.configs['flat/base']
|
|
16
16
|
.map((config: Config) => {
|
|
17
17
|
if (config.files == null) {
|
|
18
18
|
return {...config, files}
|
|
@@ -33,7 +33,7 @@ export async function jsonSchema(name: string, files: string[]): Promise<Config[
|
|
|
33
33
|
name: `@bfra.me/${name}/json-schema`,
|
|
34
34
|
files,
|
|
35
35
|
rules: {
|
|
36
|
-
'json-schema-validator/no-invalid':
|
|
36
|
+
'json-schema-validator/no-invalid': 'off',
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
]
|
package/src/configs/markdown.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type {Plugin} from '@eslint/core'
|
|
1
2
|
import type {Config} from '../config'
|
|
2
3
|
import type {Flatten, OptionsFiles, OptionsOverrides} from '../options'
|
|
3
4
|
import {mergeProcessors, processorPassThrough} from 'eslint-merge-processors'
|
|
@@ -28,7 +29,7 @@ export async function markdown(options: MarkdownOptions = {}): Promise<Config[]>
|
|
|
28
29
|
{
|
|
29
30
|
name: '@bfra.me/markdown/plugin',
|
|
30
31
|
plugins: {
|
|
31
|
-
markdown,
|
|
32
|
+
markdown: markdown as unknown as Plugin,
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
{
|
package/src/configs/nextjs.ts
CHANGED
|
@@ -41,6 +41,11 @@ export async function nextjs(options: NextjsOptions = {}): Promise<Config[]> {
|
|
|
41
41
|
|
|
42
42
|
function getRules(name: keyof typeof pluginNextJs.configs) {
|
|
43
43
|
const rules = pluginNextJs.configs?.[name]?.rules
|
|
44
|
+
if (!rules) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
`[@bfra.me/eslint-config] No rules found for @next/eslint-plugin-next config: ${name}`,
|
|
47
|
+
)
|
|
48
|
+
}
|
|
44
49
|
return normalizeRules(rules)
|
|
45
50
|
}
|
|
46
51
|
|
package/src/rules.d.ts
CHANGED
|
@@ -4546,6 +4546,11 @@ export interface Rules {
|
|
|
4546
4546
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
4547
4547
|
*/
|
|
4548
4548
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
4549
|
+
/**
|
|
4550
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
4551
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
4552
|
+
*/
|
|
4553
|
+
'react/jsx-dollar'?: Linter.RuleEntry<[]>
|
|
4549
4554
|
/**
|
|
4550
4555
|
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
4551
4556
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|