@lincy/eslint-config 3.0.2 → 3.0.4

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 (3) hide show
  1. package/LICENSE +1 -1
  2. package/dist/index.js +13 -4
  3. package/package.json +11 -4
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
3
+ Copyright (c) 2023 LinCenYing<https://github.com/lincenying>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -215,7 +215,8 @@ function javascript(options = {}) {
215
215
  "no-class-assign": "error",
216
216
  "no-compare-neg-zero": "error",
217
217
  "no-cond-assign": ["error", "always"],
218
- "no-console": ["error", { allow: ["warn", "error"] }],
218
+ // 'no-console': ['error', { allow: ['warn', 'error'] }],
219
+ "no-console": OFF,
219
220
  "no-const-assign": "error",
220
221
  "no-constant-condition": "warn",
221
222
  "no-control-regex": "error",
@@ -1108,9 +1109,9 @@ function vue(options = {}) {
1108
1109
  ...default14.configs["vue3-strongly-recommended"].rules,
1109
1110
  ...default14.configs["vue3-recommended"].rules
1110
1111
  } : {
1111
- ...default14.configs["essential"].rules,
1112
+ ...default14.configs.essential.rules,
1112
1113
  ...default14.configs["strongly-recommended"].rules,
1113
- ...default14.configs["recommended"].rules
1114
+ ...default14.configs.recommended.rules
1114
1115
  },
1115
1116
  "vue/array-bracket-spacing": ["error", "never"],
1116
1117
  "vue/arrow-spacing": ["error", { after: true, before: true }],
@@ -1128,13 +1129,21 @@ function vue(options = {}) {
1128
1129
  "vue/comma-style": ["error", "last"],
1129
1130
  "vue/component-name-in-template-casing": ["error", "PascalCase"],
1130
1131
  "vue/component-options-name-casing": ["error", "PascalCase"],
1131
- "vue/custom-event-name-casing": ["error", "camelCase"],
1132
+ "vue/custom-event-name-casing": vueVersion === "3" ? ["error", "camelCase"] : ["error", "kebab-case"],
1133
+ ...vueVersion === "2" ? { "vue/require-explicit-emits": "off" } : null,
1132
1134
  "vue/define-macros-order": ["error", {
1133
1135
  order: ["defineOptions", "defineProps", "defineEmits", "defineSlots"]
1134
1136
  }],
1135
1137
  "vue/dot-location": ["error", "property"],
1136
1138
  "vue/dot-notation": ["error", { allowKeywords: true }],
1137
1139
  "vue/eqeqeq": ["error", "smart"],
1140
+ "vue/html-indent": ["error", 4, {
1141
+ attribute: 1,
1142
+ baseIndent: 1,
1143
+ closeBracket: 0,
1144
+ alignAttributesVertically: true,
1145
+ ignores: []
1146
+ }],
1138
1147
  "vue/html-comment-content-spacing": ["error", "always", {
1139
1148
  exceptions: ["-"]
1140
1149
  }],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.2",
4
+ "version": "3.0.4",
5
5
  "packageManager": "pnpm@8.7.6",
6
6
  "description": "LinCenYing's ESLint config",
7
7
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
@@ -18,6 +18,7 @@
18
18
  "build": "tsup src/index.ts --format esm --clean --dts",
19
19
  "stub": "tsup src/index.ts --format esm --clean",
20
20
  "lint": "pnpm run stub && eslint .",
21
+ "postpublish": "open https://npmmirror.com/package/@lincy/eslint-config",
21
22
  "prepublishOnly": "nr build",
22
23
  "release": "bumpp && npm publish -r --access public",
23
24
  "test": "vitest",
@@ -71,14 +72,20 @@
71
72
  "unbuild": "^2.0.0",
72
73
  "vitest": "^0.34.5"
73
74
  },
74
- "publishConfig": {
75
- "registry": "https://registry.npmjs.org/"
76
- },
77
75
  "pnpm": {
78
76
  "peerDependencyRules": {
79
77
  "ignoreMissing": [
80
78
  "prettier"
81
79
  ]
82
80
  }
81
+ },
82
+ "simple-git-hooks": {
83
+ "pre-commit": "pnpm lint-staged"
84
+ },
85
+ "lint-staged": {
86
+ "*.{ts,tsx,vue}": "eslint --fix"
87
+ },
88
+ "publishConfig": {
89
+ "registry": "https://registry.npmjs.org/"
83
90
  }
84
91
  }