@danielwaltz/eslint-config 0.0.1 → 0.0.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.
package/dist/index.d.mts CHANGED
@@ -1,10 +1,8 @@
1
- import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
- import { ResolvableFlatConfig, FlatConfigComposer } from 'eslint-flat-config-utils';
3
1
  import * as eslint from 'eslint';
4
- import { Linter } from 'eslint';
2
+ import { ResolvableFlatConfig, FlatConfigComposer } from 'eslint-flat-config-utils';
5
3
 
6
- declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer<Linter.Config>;
4
+ declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer;
7
5
 
8
- declare function danielwaltz(...userConfigs: ResolvableFlatConfig[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord>, never>;
6
+ declare function danielwaltz(...userConfigs: ResolvableFlatConfig[]): Promise<eslint.Linter.Config<eslint.Linter.RulesRecord>[]>;
9
7
 
10
8
  export { danielwaltz, defineFlatConfigs };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
- import { ResolvableFlatConfig, FlatConfigComposer } from 'eslint-flat-config-utils';
3
1
  import * as eslint from 'eslint';
4
- import { Linter } from 'eslint';
2
+ import { ResolvableFlatConfig, FlatConfigComposer } from 'eslint-flat-config-utils';
5
3
 
6
- declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer<Linter.Config>;
4
+ declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer;
7
5
 
8
- declare function danielwaltz(...userConfigs: ResolvableFlatConfig[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord>, never>;
6
+ declare function danielwaltz(...userConfigs: ResolvableFlatConfig[]): Promise<eslint.Linter.Config<eslint.Linter.RulesRecord>[]>;
9
7
 
10
8
  export { danielwaltz, defineFlatConfigs };
package/dist/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  import prettier from 'eslint-plugin-prettier/recommended';
2
2
  import { composer } from 'eslint-flat-config-utils';
3
+ import eslint from '@eslint/js';
4
+ import tseslint from 'typescript-eslint';
3
5
 
4
6
  function global() {
5
7
  return [
@@ -10,10 +12,11 @@ function global() {
10
12
  "**/build/**",
11
13
  "**/coverage/**",
12
14
  "**/dist/**",
15
+ "**/generated/**",
13
16
  "**/node_modules/**",
14
17
  "**/out/**"
15
18
  ],
16
- name: "danielwaltz/global"
19
+ name: "danielwaltz/global/ignores"
17
20
  }
18
21
  ];
19
22
  }
@@ -22,7 +25,7 @@ function formatting() {
22
25
  return [
23
26
  {
24
27
  ...prettier,
25
- name: "danielwaltz/formatting"
28
+ name: "danielwaltz/formatting/prettier"
26
29
  }
27
30
  ];
28
31
  }
@@ -31,10 +34,44 @@ function defineFlatConfigs(...configs) {
31
34
  return composer(...configs);
32
35
  }
33
36
 
34
- function danielwaltz(...userConfigs) {
37
+ function typescript() {
38
+ return tseslint.config(
39
+ eslint.configs.recommended,
40
+ tseslint.configs.recommendedTypeChecked,
41
+ tseslint.configs.strictTypeChecked,
42
+ {
43
+ languageOptions: {
44
+ parserOptions: {
45
+ projectService: true,
46
+ tsconfigRootDir: import.meta.dirname
47
+ }
48
+ },
49
+ name: "danielwaltz/typescript/language-options"
50
+ },
51
+ {
52
+ files: ["**/*.{js,mjs,cjs,jsx}"],
53
+ extends: [tseslint.configs.disableTypeChecked],
54
+ name: "danielwaltz/typescript/disable-in-javascript"
55
+ },
56
+ {
57
+ files: ["**/*.{ts,mts,cts,tsx,d.ts,vue,svelte,astro}"],
58
+ rules: {
59
+ "@typescript-eslint/consistent-type-imports": [
60
+ "error",
61
+ { fixStyle: "inline-type-imports" }
62
+ ],
63
+ "@typescript-eslint/no-import-type-side-effects": "error"
64
+ },
65
+ name: "danielwaltz/typescript/customized"
66
+ }
67
+ );
68
+ }
69
+
70
+ async function danielwaltz(...userConfigs) {
35
71
  const composer = defineFlatConfigs(...userConfigs);
36
- composer.prepend(global());
37
- composer.append(formatting());
72
+ await composer.prepend(global());
73
+ await composer.append(typescript());
74
+ await composer.append(formatting());
38
75
  return composer;
39
76
  }
40
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielwaltz/eslint-config",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "license": "MIT",
5
5
  "author": "Daniel Waltz",
6
6
  "repository": {
@@ -21,26 +21,31 @@
21
21
  "files": [
22
22
  "dist"
23
23
  ],
24
+ "packageManager": "pnpm@9.15.0",
25
+ "scripts": {
26
+ "build": "unbuild",
27
+ "stub": "unbuild --stub",
28
+ "lint": "eslint .",
29
+ "type-check": "tsc --noEmit",
30
+ "prepack": "pnpm build",
31
+ "release": "pnpm prepack && pnpx publint@latest && pnpx @arethetypeswrong/cli@latest --pack --profile esm-only && changelogen --release --push --publish && changelogen gh release"
32
+ },
24
33
  "peerDependencies": {
25
34
  "eslint": ">=9",
26
35
  "prettier": ">=3"
27
36
  },
28
37
  "dependencies": {
38
+ "@eslint/js": "^9.16.0",
29
39
  "eslint-config-prettier": "^9.1.0",
30
40
  "eslint-flat-config-utils": "^0.4.0",
31
- "eslint-plugin-prettier": "^5.2.1"
41
+ "eslint-plugin-prettier": "^5.2.1",
42
+ "typescript-eslint": "^8.17.0"
32
43
  },
33
44
  "devDependencies": {
34
45
  "@tsconfig/node22": "^22.0.0",
35
46
  "@types/node": "~22.10.1",
47
+ "changelogen": "^0.5.7",
36
48
  "typescript": "~5.7.2",
37
49
  "unbuild": "^2.0.0"
38
- },
39
- "scripts": {
40
- "build": "unbuild",
41
- "stub": "unbuild --stub",
42
- "lint": "eslint .",
43
- "type-check": "tsc --noEmit",
44
- "release": "pnpx publint@latest && pnpx @arethetypeswrong/cli@latest --pack --profile esm-only && pnpm publish"
45
50
  }
46
- }
51
+ }