@tb-dev/eslint-config 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +53 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1 +1,54 @@
1
+ declare function config(options: ConfigOptions): Promise<Partial<ConfigObject>[]>;
2
+ export default config;
3
+
4
+ /** @see https://eslint.org/docs/latest/use/configure/configuration-files-new#configuration-objects */
5
+ declare interface ConfigObject {
6
+ files: string[];
7
+ ignores?: Ignores['ignores'];
8
+ languageOptions: {
9
+ ecmaVersion?: 'latest';
10
+ globals?: Record<string, boolean | 'readonly' | 'writeable'>;
11
+ parser?: unknown;
12
+ parserOptions?: Record<string, unknown>;
13
+ sourceType?: 'module';
14
+ };
15
+ plugins?: Record<string, unknown>;
16
+ processor?: unknown;
17
+ rules: Rules;
18
+ }
19
+
20
+ declare interface ConfigOptions {
21
+ /** @default true */
22
+ perfectionist?: boolean;
23
+ /** @default true */
24
+ prettier?: boolean;
25
+ /** @default true */
26
+ unicorn?: boolean;
27
+ /** @default false */
28
+ vitest?: boolean;
29
+ /** @default false */
30
+ vue?: boolean;
31
+ ignores?: Ignores['ignores'];
32
+ overrides?: {
33
+ javascript?: Rules;
34
+ perfectionist?: Rules;
35
+ typescript?: Rules;
36
+ unicorn?: Rules;
37
+ vitest?: Rules;
38
+ vue?: Rules;
39
+ };
40
+ /** `tsconfig.json` files for Typescript. */
41
+ project: string[];
42
+ }
43
+
44
+ declare interface Ignores {
45
+ ignores: string[];
46
+ }
47
+
48
+ declare type RuleOption = [Severity, string | Record<string, unknown>] | [Severity, string, Record<string, unknown>];
49
+
50
+ declare type Rules = Record<string, Severity | RuleOption>;
51
+
52
+ declare type Severity = 'error' | 'warn' | 'off' | 0 | 1;
53
+
1
54
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",