@vida0905/eslint-config 2.4.0 → 2.4.1
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/cli/index.js +1 -1
- package/dist/index.d.ts +47 -4
- package/dist/index.js +10 -11
- package/package.json +1 -1
- package/dist/cli/index.d.ts +0 -1
package/dist/cli/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,58 @@
|
|
|
1
|
-
import { ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
1
|
+
import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
|
+
import { Linter } from "eslint";
|
|
3
4
|
export * from "@antfu/eslint-config";
|
|
4
5
|
|
|
5
|
-
//#region src/
|
|
6
|
+
//#region src/typegen.d.ts
|
|
7
|
+
interface RuleOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law
|
|
10
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
11
|
+
*/
|
|
12
|
+
'de-morgan/no-negated-conjunction'?: Linter.RuleEntry<[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
15
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
16
|
+
*/
|
|
17
|
+
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Prefer recommended order of Nuxt config properties
|
|
20
|
+
* @see https://eslint.nuxt.com/packages/plugin#nuxtnuxt-config-keys-order
|
|
21
|
+
*/
|
|
22
|
+
'nuxt/nuxt-config-keys-order'?: Linter.RuleEntry<[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Prefer using `import.meta.*` over `process.*`
|
|
25
|
+
* @see https://eslint.nuxt.com/packages/plugin#nuxtprefer-import-meta
|
|
26
|
+
*/
|
|
27
|
+
'nuxt/prefer-import-meta'?: Linter.RuleEntry<[]>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ======= Declarations ======= */
|
|
6
31
|
|
|
7
|
-
|
|
32
|
+
// Names of all the configs
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/types.d.ts
|
|
35
|
+
interface Rules extends RuleOptions {}
|
|
36
|
+
type TypedFlatConfigItem$1 = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
37
|
+
/**
|
|
38
|
+
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
39
|
+
*
|
|
40
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
41
|
+
*/
|
|
42
|
+
plugins?: Record<string, any>;
|
|
43
|
+
};
|
|
44
|
+
interface OptionsOverrides {
|
|
45
|
+
overrides?: TypedFlatConfigItem$1["rules"];
|
|
46
|
+
}
|
|
47
|
+
type OptionsConfig$1 = Omit<OptionsConfig, "overrides"> & {
|
|
48
|
+
deMorgan?: boolean | OptionsOverrides;
|
|
49
|
+
nuxt?: boolean | OptionsOverrides;
|
|
50
|
+
};
|
|
8
51
|
//#endregion
|
|
9
52
|
//#region src/utils.d.ts
|
|
10
53
|
declare function deepMerge<T extends object>(target: T, source: T): T;
|
|
11
54
|
//#endregion
|
|
12
55
|
//#region src/index.d.ts
|
|
13
|
-
declare function defineConfig(options?: OptionsConfig$1 & TypedFlatConfigItem, ...userConfigs: TypedFlatConfigItem[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
56
|
+
declare function defineConfig(options?: OptionsConfig$1 & Omit<TypedFlatConfigItem, "files">, ...userConfigs: Awaitable<TypedFlatConfigItem>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
14
57
|
//#endregion
|
|
15
58
|
export { deepMerge, defineConfig as default, defineConfig };
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,14 @@ const javascript = {
|
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/overrides/stylistic.ts
|
|
44
44
|
const stylistic = {
|
|
45
|
+
"style/quotes": [
|
|
46
|
+
"error",
|
|
47
|
+
"single",
|
|
48
|
+
{
|
|
49
|
+
avoidEscape: true,
|
|
50
|
+
allowTemplateLiterals: "avoidEscape"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
45
53
|
"style/arrow-parens": ["error", "always"],
|
|
46
54
|
"style/brace-style": [
|
|
47
55
|
"error",
|
|
@@ -50,19 +58,11 @@ const stylistic = {
|
|
|
50
58
|
]
|
|
51
59
|
};
|
|
52
60
|
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/overrides/vue.ts
|
|
55
|
-
const vue = { "vue/max-attributes-per-line": ["error", {
|
|
56
|
-
singleline: 5,
|
|
57
|
-
multiline: 1
|
|
58
|
-
}] };
|
|
59
|
-
|
|
60
61
|
//#endregion
|
|
61
62
|
//#region src/overrides/index.ts
|
|
62
63
|
const overrides = {
|
|
63
64
|
javascript,
|
|
64
|
-
stylistic
|
|
65
|
-
vue
|
|
65
|
+
stylistic
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
//#endregion
|
|
@@ -85,8 +85,7 @@ function defineConfig(options = {}, ...userConfigs) {
|
|
|
85
85
|
semi: false,
|
|
86
86
|
overrides: overrides.stylistic
|
|
87
87
|
},
|
|
88
|
-
javascript: { overrides: overrides.javascript }
|
|
89
|
-
vue: { overrides: overrides.vue }
|
|
88
|
+
javascript: { overrides: overrides.javascript }
|
|
90
89
|
};
|
|
91
90
|
return antfu(deepMerge(antfuConfig, options), ...configs, ...userConfigs);
|
|
92
91
|
}
|
package/package.json
CHANGED
package/dist/cli/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|