@jiakun-zhao/eslint-config 2.1.0 → 3.1.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.
package/dist/index.cjs ADDED
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ const antfu = require('@antfu/eslint-config');
4
+ const localPkg = require('local-pkg');
5
+
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
7
+
8
+ const antfu__default = /*#__PURE__*/_interopDefaultCompat(antfu);
9
+
10
+ const index = antfu__default({
11
+ stylistic: {
12
+ overrides: {
13
+ "no-console": "warn",
14
+ // typescript
15
+ "ts/ban-ts-comment": "off",
16
+ // unused-imports
17
+ "unused-imports/no-unused-imports": "warn",
18
+ // jsx
19
+ "style/jsx-quotes": ["off", "prefer-single"],
20
+ "style/jsx-one-expression-per-line": "off"
21
+ }
22
+ },
23
+ vue: {
24
+ overrides: {
25
+ "vue/html-self-closing": "off",
26
+ "vue/singleline-html-element-content-newline": "off",
27
+ "vue/static-class-names-order": "warn"
28
+ }
29
+ },
30
+ astro: localPkg.isPackageExists("eslint-plugin-astro")
31
+ });
32
+
33
+ module.exports = index;
@@ -0,0 +1,3 @@
1
+ declare const _default: unknown;
2
+
3
+ export { _default as default };
@@ -0,0 +1,3 @@
1
+ declare const _default: unknown;
2
+
3
+ export { _default as default };
@@ -0,0 +1,3 @@
1
+ declare const _default: unknown;
2
+
3
+ export { _default as default };
package/dist/index.mjs CHANGED
@@ -1,25 +1,27 @@
1
1
  import antfu from '@antfu/eslint-config';
2
+ import { isPackageExists } from 'local-pkg';
2
3
 
3
4
  const index = antfu({
4
- rules: {
5
- "no-console": "warn"
6
- },
7
5
  stylistic: {
8
6
  overrides: {
7
+ "no-console": "warn",
8
+ // typescript
9
+ "ts/ban-ts-comment": "off",
10
+ // unused-imports
11
+ "unused-imports/no-unused-imports": "warn",
12
+ // jsx
13
+ "style/jsx-quotes": ["off", "prefer-single"],
9
14
  "style/jsx-one-expression-per-line": "off"
10
15
  }
11
16
  },
12
- typescript: {
13
- overrides: {
14
- "ts/ban-ts-comment": "off"
15
- }
16
- },
17
17
  vue: {
18
18
  overrides: {
19
19
  "vue/html-self-closing": "off",
20
- "vue/singleline-html-element-content-newline": "off"
20
+ "vue/singleline-html-element-content-newline": "off",
21
+ "vue/static-class-names-order": "warn"
21
22
  }
22
- }
23
+ },
24
+ astro: isPackageExists("eslint-plugin-astro")
23
25
  });
24
26
 
25
27
  export { index as default };
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@jiakun-zhao/eslint-config",
3
3
  "type": "module",
4
- "version": "2.1.0",
5
- "packageManager": "pnpm@8.15.5",
4
+ "version": "3.1.0",
6
5
  "description": "Jiakun's ESLint config.",
7
6
  "author": "Jiakun Zhao <hi@zhaojiakun.com>",
8
7
  "license": "MIT",
@@ -10,27 +9,40 @@
10
9
  "keywords": [
11
10
  "eslint-config"
12
11
  ],
13
- "main": "dist/index.mjs",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.mjs",
16
+ "require": "./dist/index.cjs"
17
+ }
18
+ },
19
+ "main": "./dist/index.cjs",
20
+ "module": "./dist/index.mjs",
21
+ "types": "./dist/index.d.ts",
14
22
  "files": [
15
- "dist/index.mjs",
16
- "package.json"
23
+ "dist"
17
24
  ],
18
25
  "peerDependencies": {
19
- "eslint": ">=8.40.0"
26
+ "eslint": ">=9.0.0",
27
+ "eslint-plugin-astro": "^0.31.4"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "eslint-plugin-astro": {
31
+ "optional": true
32
+ }
20
33
  },
21
34
  "dependencies": {
22
- "@antfu/eslint-config": "^2.9.0"
35
+ "@antfu/eslint-config": "^2.14.0",
36
+ "local-pkg": "^0.5.0"
23
37
  },
24
38
  "devDependencies": {
25
- "@types/node": "^20.11.30",
39
+ "@types/node": "^20.12.7",
26
40
  "bumpp": "^9.4.0",
27
- "eslint": "^8.57.0",
28
- "typescript": "^5.4.3",
41
+ "eslint": "^9.0.0",
42
+ "eslint-plugin-astro": "^0.34.0",
43
+ "typescript": "^5.4.5",
29
44
  "unbuild": "^2.0.0"
30
45
  },
31
- "eslintConfig": {
32
- "extends": "./dist/index.cjs"
33
- },
34
46
  "scripts": {
35
47
  "build": "unbuild",
36
48
  "release": "bumpp && pnpm publish && npx cnpm sync @jiakun-zhao/eslint-config",