@st1ggy/linter-config 6.3.0 → 6.3.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-04-10T20:
|
|
3
|
-
"source": "@st1ggy/linter-config@6.3.
|
|
2
|
+
"generatedAt": "2026-04-10T20:26:49.147Z",
|
|
3
|
+
"source": "@st1ggy/linter-config@6.3.2 (local tree)",
|
|
4
4
|
"linterConfigRoot": "/Users/dnbragin/Projects/personal/linter-config",
|
|
5
5
|
"flatConfigs": {
|
|
6
6
|
"eslint-common": {
|
|
@@ -6369,7 +6369,7 @@
|
|
|
6369
6369
|
"eslint-svelte": {
|
|
6370
6370
|
"module": "src/eslint/eslint-svelte.config.js",
|
|
6371
6371
|
"sampleFile": "src/examples/example.svelte",
|
|
6372
|
-
"ruleCount":
|
|
6372
|
+
"ruleCount": 940,
|
|
6373
6373
|
"rules": {
|
|
6374
6374
|
"@babel/object-curly-spacing": "off",
|
|
6375
6375
|
"@babel/semi": "off",
|
|
@@ -7005,7 +7005,6 @@
|
|
|
7005
7005
|
"@typescript-eslint/consistent-generic-constructors": "error",
|
|
7006
7006
|
"@typescript-eslint/consistent-indexed-object-style": "error",
|
|
7007
7007
|
"@typescript-eslint/consistent-type-assertions": "error",
|
|
7008
|
-
"@typescript-eslint/consistent-type-definitions": "error",
|
|
7009
7008
|
"@typescript-eslint/func-call-spacing": "off",
|
|
7010
7009
|
"@typescript-eslint/indent": "off",
|
|
7011
7010
|
"@typescript-eslint/key-spacing": "off",
|
package/index.d.ts
CHANGED
|
@@ -1,59 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type ConfigArray = Linter.Config[]
|
|
6
|
-
|
|
1
|
+
// Ambient declarations for `@st1ggy/linter-config`.
|
|
2
|
+
// This file must remain a script (no top-level `import` / `export`) so each
|
|
3
|
+
// `declare module '…'` introduces a module, not an augmentation — otherwise
|
|
4
|
+
// TypeScript reports TS2666 for `export default` in subpath entries.
|
|
7
5
|
declare module '@st1ggy/linter-config' {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import type { Linter } from 'eslint'
|
|
7
|
+
import type { Config as PrettierConfig } from 'prettier'
|
|
8
|
+
import type * as Stylelint from 'stylelint'
|
|
9
|
+
|
|
10
|
+
export const eslintCommon: Linter.Config[]
|
|
11
|
+
export const eslintReact: Linter.Config[]
|
|
12
|
+
export const eslintNext: Linter.Config[]
|
|
13
|
+
export const eslintSvelte: Linter.Config[]
|
|
12
14
|
|
|
13
15
|
export const prettierCommon: PrettierConfig
|
|
14
16
|
export const prettierSvelte: PrettierConfig
|
|
15
17
|
|
|
16
|
-
export const stylelintScss:
|
|
18
|
+
export const stylelintScss: Stylelint.Config
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
declare module '@st1ggy/linter-config/eslint-next' {
|
|
20
|
-
|
|
22
|
+
import type { Linter } from 'eslint'
|
|
23
|
+
|
|
24
|
+
const config: Linter.Config[]
|
|
21
25
|
|
|
22
26
|
export default config
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
declare module '@st1ggy/linter-config/eslint-react' {
|
|
26
|
-
|
|
30
|
+
import type { Linter } from 'eslint'
|
|
31
|
+
|
|
32
|
+
const config: Linter.Config[]
|
|
27
33
|
|
|
28
34
|
export default config
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
declare module '@st1ggy/linter-config/eslint-svelte' {
|
|
32
|
-
|
|
38
|
+
import type { Linter } from 'eslint'
|
|
39
|
+
|
|
40
|
+
const config: Linter.Config[]
|
|
33
41
|
|
|
34
42
|
export default config
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
declare module '@st1ggy/linter-config/eslint-common' {
|
|
38
|
-
|
|
46
|
+
import type { Linter } from 'eslint'
|
|
47
|
+
|
|
48
|
+
const config: Linter.Config[]
|
|
39
49
|
|
|
40
50
|
export default config
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
declare module '@st1ggy/linter-config/prettier-common' {
|
|
54
|
+
import type { Config as PrettierConfig } from 'prettier'
|
|
55
|
+
|
|
44
56
|
const config: PrettierConfig
|
|
45
57
|
|
|
46
58
|
export default config
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
declare module '@st1ggy/linter-config/prettier-svelte' {
|
|
62
|
+
import type { Config as PrettierConfig } from 'prettier'
|
|
63
|
+
|
|
50
64
|
const config: PrettierConfig
|
|
51
65
|
|
|
52
66
|
export default config
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
declare module '@st1ggy/linter-config/stylelint-scss' {
|
|
56
|
-
|
|
70
|
+
import type * as Stylelint from 'stylelint'
|
|
71
|
+
|
|
72
|
+
const config: Stylelint.Config
|
|
57
73
|
|
|
58
74
|
export default config
|
|
59
75
|
}
|
package/package.json
CHANGED
package/scripts/inventory.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { fileURLToPath } from 'node:url'
|
|
|
12
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
13
13
|
const LINTER_ROOT = process.env.LINTER_CONFIG_ROOT ?? path.resolve(__dirname, '..')
|
|
14
14
|
|
|
15
|
-
const SOURCE_LABEL = '@st1ggy/linter-config@6.3.
|
|
15
|
+
const SOURCE_LABEL = '@st1ggy/linter-config@6.3.2 (local tree)'
|
|
16
16
|
|
|
17
17
|
const flatConfigPresets = [
|
|
18
18
|
{
|
|
@@ -3,9 +3,25 @@ import { configs } from 'typescript-eslint'
|
|
|
3
3
|
|
|
4
4
|
import { filesTypeAware } from './constants.js'
|
|
5
5
|
|
|
6
|
+
// `flat/stylistic` enables `@typescript-eslint/consistent-type-definitions` as `'error'` only, which
|
|
7
|
+
// uses the rule default (`interface`). Strip it here so we set `type` explicitly below.
|
|
8
|
+
const stylisticWithoutTypeDefinitionStyle = configs.stylistic.map((block) => {
|
|
9
|
+
const rules = block.rules
|
|
10
|
+
|
|
11
|
+
if (!rules?.['@typescript-eslint/consistent-type-definitions']) {
|
|
12
|
+
return block
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const nextRules = { ...rules }
|
|
16
|
+
|
|
17
|
+
delete nextRules['@typescript-eslint/consistent-type-definitions']
|
|
18
|
+
|
|
19
|
+
return { ...block, rules: nextRules }
|
|
20
|
+
})
|
|
21
|
+
|
|
6
22
|
export default defineConfig([
|
|
7
23
|
...configs.recommended,
|
|
8
|
-
...
|
|
24
|
+
...stylisticWithoutTypeDefinitionStyle,
|
|
9
25
|
{
|
|
10
26
|
files: filesTypeAware,
|
|
11
27
|
languageOptions: {
|