@phaicom/eslint-config 0.5.0 → 0.6.0

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.js +13 -5
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -55,19 +55,27 @@ var eslintConfig = (options, ...configs) => {
55
55
  const {
56
56
  phaicom: enablePhaicom = true,
57
57
  tailwind: enableTailwind = false,
58
- vue: enableVue
58
+ vue: enableVue,
59
+ rules: customRules = {}
59
60
  } = options;
61
+ const baseConfigs = [];
60
62
  if (enableTailwind) {
61
- configs.push(tailwind());
63
+ baseConfigs.push(tailwind());
62
64
  }
63
65
  if (enablePhaicom) {
64
66
  options.unicorn = true;
65
- configs.push(base_default.base);
67
+ baseConfigs.push(base_default.base);
66
68
  if (enableVue) {
67
- configs.push(base_default.vue);
69
+ baseConfigs.push(base_default.vue);
68
70
  }
69
71
  }
70
- return antfu(options, ...configs);
72
+ const { rules, ...restOptions } = options;
73
+ return antfu(
74
+ restOptions,
75
+ ...baseConfigs,
76
+ { rules: customRules },
77
+ ...configs
78
+ );
71
79
  };
72
80
  var index_default = eslintConfig;
73
81
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@phaicom/eslint-config",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.6.0",
5
5
  "description": "Phaicom's config based on @antfu/eslint-config",
6
6
  "author": "Reawpai Chunsoi <reawpai.chunsoi@gmail.com> (https://github.com/phaicom)",
7
7
  "license": "MIT",
@@ -29,13 +29,13 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@antfu/eslint-config": "^5.2.0",
32
+ "@antfu/eslint-config": "^5.2.1",
33
33
  "eslint": "^9.33.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@commitlint/cli": "^19.8.1",
37
37
  "@commitlint/config-conventional": "^19.8.1",
38
- "bumpp": "^10.2.2",
38
+ "bumpp": "^10.2.3",
39
39
  "eslint-plugin-better-tailwindcss": "^3.7.4",
40
40
  "eslint-plugin-format": "^1.0.1",
41
41
  "lint-staged": "^16.1.5",