@curev/eslint-config 0.4.0 → 0.4.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.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,32 +17,55 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
21
31
  var index_exports = {};
22
32
  __export(index_exports, {
23
33
  curev: () => curev,
24
- default: () => index_default
34
+ default: () => index_default,
35
+ defaultConfig: () => defaultConfig
25
36
  });
26
37
  module.exports = __toCommonJS(index_exports);
27
38
  var import_eslint_config = require("@antfu/eslint-config");
28
- function curev(options = {}, ...userConfigs) {
29
- return (0, import_eslint_config.antfu)({
30
- stylistic: {
31
- indent: 2,
32
- semi: true,
33
- quotes: "double",
34
- overrides: {
35
- "style/comma-dangle": ["error", "only-multiline"],
36
- "style/brace-style": ["error", "1tbs"]
37
- }
39
+ var import_defu = __toESM(require("defu"), 1);
40
+ var defaultConfig = {
41
+ stylistic: {
42
+ indent: 2,
43
+ semi: true,
44
+ quotes: "double",
45
+ overrides: {
46
+ "style/comma-dangle": ["error", "only-multiline"],
47
+ "style/brace-style": ["error", "1tbs"],
48
+ "style/arrow-parens": ["error", "always"],
49
+ "style/multiline-ternary": ["error", "always-multiline"],
50
+ "curly": ["error", "multi-line", "consistent"]
51
+ }
52
+ },
53
+ unocss: {
54
+ overrides: {
55
+ "unocss/order": ["error"]
38
56
  },
39
- ...options
40
- }, ...userConfigs);
57
+ strict: true
58
+ }
59
+ };
60
+ function curev(options = {}, ...userConfigs) {
61
+ return (0, import_eslint_config.antfu)((0, import_defu.default)(
62
+ options,
63
+ defaultConfig
64
+ ), ...userConfigs);
41
65
  }
42
66
  var index_default = curev;
43
67
  // Annotate the CommonJS export names for ESM import in node:
44
68
  0 && (module.exports = {
45
- curev
69
+ curev,
70
+ defaultConfig
46
71
  });
package/dist/index.d.cts CHANGED
@@ -4,6 +4,7 @@ import { Linter } from 'eslint';
4
4
  import { Awaitable, FlatConfigComposer } from 'eslint-flat-config-utils';
5
5
 
6
6
  type CurevOptions = OptionsConfig & Omit<TypedFlatConfigItem, "files">;
7
+ declare const defaultConfig: CurevOptions;
7
8
  declare function curev(options?: CurevOptions, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
8
9
 
9
- export { type CurevOptions, curev, curev as default };
10
+ export { type CurevOptions, curev, curev as default, defaultConfig };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { Linter } from 'eslint';
4
4
  import { Awaitable, FlatConfigComposer } from 'eslint-flat-config-utils';
5
5
 
6
6
  type CurevOptions = OptionsConfig & Omit<TypedFlatConfigItem, "files">;
7
+ declare const defaultConfig: CurevOptions;
7
8
  declare function curev(options?: CurevOptions, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
8
9
 
9
- export { type CurevOptions, curev, curev as default };
10
+ export { type CurevOptions, curev, curev as default, defaultConfig };
package/dist/index.js CHANGED
@@ -1,21 +1,35 @@
1
1
  // src/index.ts
2
2
  import { antfu } from "@antfu/eslint-config";
3
- function curev(options = {}, ...userConfigs) {
4
- return antfu({
5
- stylistic: {
6
- indent: 2,
7
- semi: true,
8
- quotes: "double",
9
- overrides: {
10
- "style/comma-dangle": ["error", "only-multiline"],
11
- "style/brace-style": ["error", "1tbs"]
12
- }
3
+ import defu from "defu";
4
+ var defaultConfig = {
5
+ stylistic: {
6
+ indent: 2,
7
+ semi: true,
8
+ quotes: "double",
9
+ overrides: {
10
+ "style/comma-dangle": ["error", "only-multiline"],
11
+ "style/brace-style": ["error", "1tbs"],
12
+ "style/arrow-parens": ["error", "always"],
13
+ "style/multiline-ternary": ["error", "always-multiline"],
14
+ "curly": ["error", "multi-line", "consistent"]
15
+ }
16
+ },
17
+ unocss: {
18
+ overrides: {
19
+ "unocss/order": ["error"]
13
20
  },
14
- ...options
15
- }, ...userConfigs);
21
+ strict: true
22
+ }
23
+ };
24
+ function curev(options = {}, ...userConfigs) {
25
+ return antfu(defu(
26
+ options,
27
+ defaultConfig
28
+ ), ...userConfigs);
16
29
  }
17
30
  var index_default = curev;
18
31
  export {
19
32
  curev,
20
- index_default as default
33
+ index_default as default,
34
+ defaultConfig
21
35
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@curev/eslint-config",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "author": "Chizuki<chizukicn@outlook.com> (https://github.com/chizukicn/)",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/curev/eslint-config",