@vida0905/eslint-config 0.1.3 → 0.1.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vida0905/eslint-config
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@vida0905/eslint-config.svg)](https://npmjs.com/package/@vida0905/eslint-config)
3
+ [![npm](https://img.shields.io/npm/v/@vida0905/eslint-config.svg?color=444&label=)](https://npmjs.com/package/@vida0905/eslint-config) [![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)
4
4
 
5
5
  Self use eslint config, extends [antfu's config](https://github.com/antfu/eslint-config)
6
6
 
@@ -51,7 +51,12 @@ in `.vscode/settings.json`, more info to [@antfu/eslint-config](https://github.c
51
51
  "markdown",
52
52
  "json",
53
53
  "jsonc",
54
- "yaml"
54
+ "yaml",
55
+ "toml",
56
+ "xml",
57
+ "gql",
58
+ "graphql",
59
+ "astro"
55
60
  ]
56
61
  }
57
62
  ```
package/dist/index.cjs CHANGED
@@ -40,10 +40,12 @@ var import_local_pkg = require("local-pkg");
40
40
  // src/configs/pinia.ts
41
41
  var import_eslint_config = require("@antfu/eslint-config");
42
42
  var import_eslint_plugin_pinia = __toESM(require("eslint-plugin-pinia"), 1);
43
+ var GLOB_PINIA_JS = `stores/${import_eslint_config.GLOB_JS}`;
44
+ var GLOB_PINIA_TS = `stores/${import_eslint_config.GLOB_TS}`;
43
45
  var pinia = [
44
46
  {
45
47
  name: "vida/pinia",
46
- files: [import_eslint_config.GLOB_JS, import_eslint_config.GLOB_TS],
48
+ files: [GLOB_PINIA_JS, GLOB_PINIA_TS],
47
49
  plugins: {
48
50
  pinia: import_eslint_plugin_pinia.default
49
51
  },
@@ -53,11 +55,19 @@ var pinia = [
53
55
  checkStoreNameMismatch: true,
54
56
  storeSuffix: "Store"
55
57
  }],
56
- "pinia/require-setup-store-properties-export": ["warn"]
58
+ "pinia/require-setup-store-properties-export": ["warn"],
59
+ "pinia/no-duplicate-store-ids": ["error"]
57
60
  }
58
61
  }
59
62
  ];
60
63
 
64
+ // src/overrides/javascript.ts
65
+ var javascript = {
66
+ "arrow-body-style": ["error", "as-needed"],
67
+ "no-unused-private-class-members": "error",
68
+ "require-atomic-updates": ["error", { allowProperties: true }]
69
+ };
70
+
61
71
  // src/overrides/vue.ts
62
72
  var vue = {
63
73
  "vue/max-attributes-per-line": ["error", {
@@ -80,9 +90,9 @@ function vida(options = {}, ...userConfigs) {
80
90
  quotes: "single",
81
91
  semi: true
82
92
  },
83
- formatters: {
84
- css: true,
85
- html: true
93
+ formatters: false,
94
+ javascript: {
95
+ overrides: javascript
86
96
  },
87
97
  vue: {
88
98
  overrides: vue
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
+ import * as _antfu_eslint_config from '@antfu/eslint-config';
2
3
  import { antfu, TypedFlatConfigItem } from '@antfu/eslint-config';
3
4
 
4
5
  type AntfuOptions = Parameters<typeof antfu>[0];
@@ -11,6 +12,6 @@ type OptionsConfig = AntfuOptions & {
11
12
  pinia?: boolean;
12
13
  };
13
14
 
14
- declare function vida(options?: OptionsConfig, ...userConfigs: TypedFlatConfigItem[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem, string>;
15
+ declare function vida(options?: OptionsConfig, ...userConfigs: TypedFlatConfigItem[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
15
16
 
16
17
  export { vida as default, vida };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
+ import * as _antfu_eslint_config from '@antfu/eslint-config';
2
3
  import { antfu, TypedFlatConfigItem } from '@antfu/eslint-config';
3
4
 
4
5
  type AntfuOptions = Parameters<typeof antfu>[0];
@@ -11,6 +12,6 @@ type OptionsConfig = AntfuOptions & {
11
12
  pinia?: boolean;
12
13
  };
13
14
 
14
- declare function vida(options?: OptionsConfig, ...userConfigs: TypedFlatConfigItem[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem, string>;
15
+ declare function vida(options?: OptionsConfig, ...userConfigs: TypedFlatConfigItem[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
15
16
 
16
17
  export { vida as default, vida };
package/dist/index.js CHANGED
@@ -5,10 +5,12 @@ import { isPackageExists } from "local-pkg";
5
5
  // src/configs/pinia.ts
6
6
  import { GLOB_JS, GLOB_TS } from "@antfu/eslint-config";
7
7
  import pluginPinia from "eslint-plugin-pinia";
8
+ var GLOB_PINIA_JS = `stores/${GLOB_JS}`;
9
+ var GLOB_PINIA_TS = `stores/${GLOB_TS}`;
8
10
  var pinia = [
9
11
  {
10
12
  name: "vida/pinia",
11
- files: [GLOB_JS, GLOB_TS],
13
+ files: [GLOB_PINIA_JS, GLOB_PINIA_TS],
12
14
  plugins: {
13
15
  pinia: pluginPinia
14
16
  },
@@ -18,11 +20,19 @@ var pinia = [
18
20
  checkStoreNameMismatch: true,
19
21
  storeSuffix: "Store"
20
22
  }],
21
- "pinia/require-setup-store-properties-export": ["warn"]
23
+ "pinia/require-setup-store-properties-export": ["warn"],
24
+ "pinia/no-duplicate-store-ids": ["error"]
22
25
  }
23
26
  }
24
27
  ];
25
28
 
29
+ // src/overrides/javascript.ts
30
+ var javascript = {
31
+ "arrow-body-style": ["error", "as-needed"],
32
+ "no-unused-private-class-members": "error",
33
+ "require-atomic-updates": ["error", { allowProperties: true }]
34
+ };
35
+
26
36
  // src/overrides/vue.ts
27
37
  var vue = {
28
38
  "vue/max-attributes-per-line": ["error", {
@@ -45,9 +55,9 @@ function vida(options = {}, ...userConfigs) {
45
55
  quotes: "single",
46
56
  semi: true
47
57
  },
48
- formatters: {
49
- css: true,
50
- html: true
58
+ formatters: false,
59
+ javascript: {
60
+ overrides: javascript
51
61
  },
52
62
  vue: {
53
63
  overrides: vue
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@vida0905/eslint-config",
3
3
  "type": "module",
4
- "version": "0.1.3",
5
- "packageManager": "pnpm@8.15.6",
4
+ "version": "0.1.5",
6
5
  "description": "Vida Xie's ESLint Config",
7
6
  "author": "Vida Xie <vida_2020@163.com> (https://github.com/9romise/)",
8
7
  "license": "MIT",
@@ -28,6 +27,18 @@
28
27
  "files": [
29
28
  "dist"
30
29
  ],
30
+ "dependencies": {
31
+ "@antfu/eslint-config": "^2.18.1",
32
+ "eslint-plugin-pinia": "^0.1.13",
33
+ "local-pkg": "^0.5.0"
34
+ },
35
+ "devDependencies": {
36
+ "@eslint/config-inspector": "^0.4.8",
37
+ "bumpp": "^9.4.1",
38
+ "eslint": "^9.3.0",
39
+ "tsup": "^8.0.2",
40
+ "typescript": "^5.4.5"
41
+ },
31
42
  "scripts": {
32
43
  "lint": "eslint .",
33
44
  "lint:fix": "eslint . --fix",
@@ -35,23 +46,6 @@
35
46
  "build": "tsup",
36
47
  "release": "bumpp && pnpm publish",
37
48
  "typecheck": "tsc --noEmit",
38
- "prepare": "npm run build"
39
- },
40
- "peerDependencies": {
41
- "eslint": ">=8.40.0"
42
- },
43
- "dependencies": {
44
- "@antfu/eslint-config": "^2.13.3",
45
- "eslint-plugin-pinia": "^0.1.12",
46
- "local-pkg": "^0.5.0"
47
- },
48
- "devDependencies": {
49
- "@eslint/config-inspector": "^0.3.1",
50
- "@unocss/eslint-plugin": "0.59.0-beta.1",
51
- "bumpp": "^9.4.0",
52
- "eslint": "^9.0.0",
53
- "eslint-plugin-format": "^0.1.0",
54
- "tsup": "^8.0.2",
55
- "typescript": "^5.4.5"
49
+ "prepublish": "npm run build"
56
50
  }
57
- }
51
+ }