@dword-design/eslint-config 8.0.4 → 9.0.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.
@@ -1,4 +1,4 @@
1
1
  declare const _default: ({ cwd }?: {
2
2
  cwd?: string | undefined;
3
- }) => import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
3
+ }) => import("@eslint/config-helpers").Config[];
4
4
  export default _default;
@@ -12,19 +12,20 @@ import { importX } from "eslint-plugin-import-x";
12
12
  import eslintPluginJsonc from "eslint-plugin-jsonc";
13
13
  import pluginPlaywright from "eslint-plugin-playwright";
14
14
  import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
15
- import pluginPromise from "eslint-plugin-promise";
16
15
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
17
16
  import pluginVue from "eslint-plugin-vue";
18
17
  import globals from "globals";
19
- import loadPkg from "load-pkg";
20
18
  import { compact, omit, without } from "lodash-es";
19
+ import { readPackageSync } from "read-pkg";
21
20
  import { sortOrder as packageJsonSortOrder } from "sort-package-json";
22
21
  import tseslint from "typescript-eslint";
23
22
  import restrictedImports from "./restricted-imports.js";
24
23
  export default ({
25
24
  cwd = "."
26
25
  } = {}) => {
27
- const packageConfig = loadPkg.sync(cwd) || {};
26
+ const packageConfig = readPackageSync({
27
+ cwd
28
+ });
28
29
  const eslintRestrictedImports = restrictedImports.filter(importDef => importDef.alternative === void 0 || importDef.alternative !== packageConfig.name).map(importDef => ({
29
30
  ...omit(importDef, ["alternative"]),
30
31
  message: compact([importDef.message, importDef.alternative ? `Use '${importDef.alternative}' instead` : ""]).join(" ")
@@ -36,7 +37,11 @@ export default ({
36
37
  });
37
38
  return defineConfig([gitignore({
38
39
  strict: false
39
- }), tseslint.configs.recommended, importX.flatConfigs.recommended, importX.flatConfigs.typescript, pluginPromise.configs["flat/recommended"], ...pluginVue.configs["flat/recommended"].map(plugin => ({
40
+ }), tseslint.configs.recommended,
41
+ // @ts-expect-error https://github.com/un-ts/eslint-plugin-import-x/issues/439
42
+ importX.flatConfigs.recommended,
43
+ // @ts-expect-error https://github.com/un-ts/eslint-plugin-import-x/issues/439
44
+ importX.flatConfigs.typescript, ...pluginVue.configs["flat/recommended"].map(plugin => ({
40
45
  files: ["**/*.ts", "**/*.vue"],
41
46
  ...plugin
42
47
  })), {
@@ -83,11 +88,6 @@ export default ({
83
88
  }
84
89
  },
85
90
  rules: {
86
- "@dword-design/import-alias/prefer-alias": ["error", {
87
- alias: {
88
- "@": "."
89
- }
90
- }],
91
91
  "@stylistic/linebreak-style": ["error", "unix"],
92
92
  "@stylistic/padding-line-between-statements": ["error", {
93
93
  blankLine: "never",
@@ -228,11 +228,13 @@ export default ({
228
228
  alphabetical: true
229
229
  }],
230
230
  "vue/component-api-style": ["error", ["script-setup"]],
231
+ "vue/define-emits-declaration": "error",
231
232
  "vue/multi-word-component-names": "off",
232
233
  "vue/no-deprecated-functional-template": "error",
233
234
  "vue/prefer-true-attribute-shorthand": "error",
234
235
  "vue/prefer-use-template-ref": "error",
235
- "vue/require-default-prop": "off"
236
+ "vue/require-default-prop": "off",
237
+ "vue/slot-name-casing": "error"
236
238
  }
237
239
  }]);
238
240
  };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
1
+ declare const _default: import("@eslint/config-helpers").Config[];
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/eslint-config",
3
- "version": "8.0.4",
3
+ "version": "9.0.0",
4
4
  "repository": "dword-design/eslint-config",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",
@@ -8,10 +8,8 @@
8
8
  "type": "module",
9
9
  "exports": {
10
10
  ".": {
11
- "import": {
12
- "default": "./dist/index.js",
13
- "types": "./dist/index.d.ts"
14
- }
11
+ "default": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
15
13
  }
16
14
  },
17
15
  "main": "dist/index.js",
@@ -31,11 +29,11 @@
31
29
  "verify": "base verify"
32
30
  },
33
31
  "dependencies": {
34
- "@dword-design/eslint-plugin-import-alias": "^6.0.3",
32
+ "@dword-design/eslint-plugin-import-alias": "^8.0.1",
35
33
  "@eslint/eslintrc": "^3.3.1",
36
34
  "@stylistic/eslint-plugin": "^5.2.0",
37
35
  "confusing-browser-globals": "^1.0.11",
38
- "depcheck-package-name": "^4.0.0",
36
+ "depcheck-package-name": "^5.0.0",
39
37
  "eslint": "^9.29.0",
40
38
  "eslint-config-flat-gitignore": "^2.1.0",
41
39
  "eslint-config-prettier": "^10.1.5",
@@ -45,28 +43,28 @@
45
43
  "eslint-plugin-playwright": "^2.2.0",
46
44
  "eslint-plugin-prefer-arrow": "^1.2.3",
47
45
  "eslint-plugin-prettier": "^5.5.0",
48
- "eslint-plugin-promise": "^7.2.1",
49
46
  "eslint-plugin-simple-import-sort": "^12.1.1",
50
47
  "eslint-plugin-sort-keys-fix": "^1.1.2",
51
- "eslint-plugin-unicorn": "npm:@dword-design/eslint-plugin-unicorn@^0.0.1",
48
+ "eslint-plugin-unicorn": "^62.0.0",
52
49
  "eslint-plugin-vue": "^10.2.0",
53
- "globals": "^16.2.0",
54
- "load-pkg": "^4.0.0",
50
+ "globals": "^17.0.0",
55
51
  "lodash-es": "^4.17.21",
56
52
  "prettier": "^3.5.3",
53
+ "read-pkg": "^10.0.0",
57
54
  "sort-package-json": "^3.2.1",
58
55
  "typescript-eslint": "^8.34.1",
59
56
  "vue-eslint-parser": "^10.2.0"
60
57
  },
61
58
  "devDependencies": {
62
- "@dword-design/base": "^15.0.0",
59
+ "@dword-design/base": "^16.0.0",
63
60
  "@playwright/test": "^1.53.1",
61
+ "@types/confusing-browser-globals": "^1.0.3",
64
62
  "endent": "npm:@dword-design/endent@^1.4.1",
65
63
  "output-files": "^3.0.0"
66
64
  },
67
65
  "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
68
66
  "engines": {
69
- "node": ">=20"
67
+ "node": ">=22"
70
68
  },
71
69
  "publishConfig": {
72
70
  "access": "public"