@cany748/eslint-config 3.0.1 → 3.0.3

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.js CHANGED
@@ -1,15 +1,15 @@
1
1
  // src/configs/comments.ts
2
- import pluginComments from "eslint-plugin-eslint-comments";
2
+ import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
3
3
  function comments() {
4
4
  return [
5
5
  {
6
- name: "eslint-comments",
6
+ name: "@eslint-community/eslint-comments",
7
7
  plugins: {
8
- "eslint-comments": pluginComments
8
+ "@eslint-community/eslint-comments": pluginComments
9
9
  },
10
10
  rules: {
11
11
  ...pluginComments.configs.recommended.rules,
12
- "eslint-comments/disable-enable-pair": "off"
12
+ "@eslint-community/eslint-comments/disable-enable-pair": "off"
13
13
  }
14
14
  }
15
15
  ];
@@ -333,7 +333,6 @@ function javascript(options = {}) {
333
333
  "no-dupe-else-if": "error",
334
334
  "no-dupe-keys": "error",
335
335
  "no-duplicate-case": "error",
336
- "no-duplicate-imports": "error",
337
336
  "no-empty-character-class": "error",
338
337
  "no-empty-pattern": "error",
339
338
  "no-empty-static-block": "error",
@@ -382,14 +381,7 @@ function javascript(options = {}) {
382
381
  { message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
383
382
  { message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
384
383
  ],
385
- "no-restricted-syntax": [
386
- "error",
387
- "DebuggerStatement",
388
- "LabeledStatement",
389
- "WithStatement",
390
- "TSEnumDeclaration[const=true]",
391
- "TSExportAssignment"
392
- ],
384
+ "no-restricted-syntax": ["error", "TSEnumDeclaration[const=true]", "TSExportAssignment"],
393
385
  "no-return-assign": ["error", "except-parens"],
394
386
  "no-self-assign": ["error", { props: true }],
395
387
  "no-self-compare": "error",
@@ -788,7 +780,7 @@ var _pluginTest;
788
780
  async function test(options = {}) {
789
781
  const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
790
782
  const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
791
- interopDefault(import("eslint-plugin-vitest")),
783
+ interopDefault(import("@vitest/eslint-plugin")),
792
784
  interopDefault(import("eslint-plugin-no-only-tests"))
793
785
  ]);
794
786
  _pluginTest = _pluginTest || {
@@ -821,7 +813,7 @@ async function test(options = {}) {
821
813
 
822
814
  // src/configs/typescript.ts
823
815
  async function typescript(options = {}) {
824
- const { componentExts = [], overrides = {}, parserOptions = {}, type = "app" } = options;
816
+ const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
825
817
  const files = options.files ?? [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)];
826
818
  const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
827
819
  const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
@@ -862,7 +854,7 @@ async function typescript(options = {}) {
862
854
  }
863
855
  },
864
856
  // assign type-aware parser for type-aware files and type-unaware parser for the rest
865
- ...isTypeAware ? [makeParser(true, filesTypeAware, ignoresTypeAware), makeParser(false, files, filesTypeAware)] : [makeParser(false, files)],
857
+ ...isTypeAware ? [makeParser(false, files), makeParser(true, filesTypeAware, ignoresTypeAware)] : [makeParser(false, files)],
866
858
  {
867
859
  files,
868
860
  name: "typescript/rules",
@@ -926,7 +918,7 @@ async function typescript(options = {}) {
926
918
  "no-throw-literal": "off",
927
919
  "@typescript-eslint/only-throw-error": "error"
928
920
  } : {},
929
- ...overrides
921
+ ...overridesTypeAware
930
922
  }
931
923
  }
932
924
  ] : [],
@@ -971,6 +963,7 @@ function unicorn() {
971
963
  ...pluginUnicorn.configs["flat/recommended"].rules,
972
964
  "unicorn/consistent-function-scoping": "off",
973
965
  "unicorn/filename-case": "off",
966
+ "unicorn/import-style": "off",
974
967
  "unicorn/no-array-callback-reference": "off",
975
968
  "unicorn/no-null": "off",
976
969
  "unicorn/prefer-string-replace-all": "off",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cany748/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.1",
4
+ "version": "3.0.3",
5
5
  "exports": {
6
6
  ".": {
7
7
  "import": "./dist/index.js",
@@ -14,9 +14,9 @@
14
14
  "dist"
15
15
  ],
16
16
  "peerDependencies": {
17
- "@unocss/eslint-plugin": "^0.62.1",
18
- "eslint-plugin-vue": "^9.27.0",
19
- "typescript-eslint": "^8.1.0"
17
+ "@unocss/eslint-plugin": "^0.62.3",
18
+ "eslint-plugin-vue": "^9.28.0",
19
+ "typescript-eslint": "^8.5.0"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "@unocss/eslint-plugin": {
@@ -30,37 +30,37 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "eslint": "^9.9.0",
34
- "eslint-config-flat-gitignore": "^0.1.8",
33
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
34
+ "@vitest/eslint-plugin": "^1.1.0",
35
+ "eslint": "^9.10.0",
36
+ "eslint-config-flat-gitignore": "^0.3.0",
35
37
  "eslint-config-prettier": "^9.1.0",
36
- "eslint-flat-config-utils": "^0.3.0",
37
- "eslint-plugin-eslint-comments": "^3.2.0",
38
- "eslint-plugin-import-x": "^3.1.0",
38
+ "eslint-flat-config-utils": "^0.4.0",
39
+ "eslint-plugin-import-x": "^4.2.1",
39
40
  "eslint-plugin-jsonc": "^2.16.0",
40
41
  "eslint-plugin-n": "^17.10.2",
41
- "eslint-plugin-no-only-tests": "^3.1.0",
42
+ "eslint-plugin-no-only-tests": "^3.3.0",
42
43
  "eslint-plugin-prettier": "^5.2.1",
43
44
  "eslint-plugin-regexp": "^2.6.0",
44
45
  "eslint-plugin-unicorn": "^55.0.0",
45
46
  "eslint-plugin-unused-imports": "^4.1.3",
46
- "eslint-plugin-vitest": "^0.5.4",
47
47
  "globals": "^15.9.0",
48
48
  "jsonc-eslint-parser": "^2.4.0",
49
49
  "local-pkg": "^0.5.0",
50
50
  "prettier": "^3.3.3"
51
51
  },
52
52
  "devDependencies": {
53
- "@types/node": "^22.2.0",
54
- "@unocss/eslint-plugin": "^0.62.1",
55
- "bumpp": "^9.4.2",
56
- "eslint-plugin-vue": "^9.27.0",
57
- "eslint-typegen": "^0.3.0",
53
+ "@types/node": "^22.5.4",
54
+ "@unocss/eslint-plugin": "^0.62.3",
55
+ "bumpp": "^9.5.2",
56
+ "eslint-plugin-vue": "^9.28.0",
57
+ "eslint-typegen": "^0.3.2",
58
58
  "esno": "^4.7.0",
59
- "lint-staged": "^15.2.9",
59
+ "lint-staged": "^15.2.10",
60
60
  "simple-git-hooks": "^2.11.1",
61
61
  "tsup": "^8.2.4",
62
- "typescript": "^5.5.4",
63
- "typescript-eslint": "^8.1.0"
62
+ "typescript": "^5.6.2",
63
+ "typescript-eslint": "^8.5.0"
64
64
  },
65
65
  "simple-git-hooks": {
66
66
  "pre-commit": "pnpm lint-staged"