@ntnyq/eslint-config 2.0.0-beta.10 → 2.0.0-beta.12

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.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { FlatESLintConfig } from 'eslint-define-config';
2
- export { default as tsParser } from '@typescript-eslint/parser';
2
+ import * as parser from '@typescript-eslint/parser';
3
+ export { parser as tsParser };
3
4
  export { default as tsPlugin } from '@typescript-eslint/eslint-plugin';
4
5
  export { default as vueParser } from 'vue-eslint-parser';
5
6
  export { default as vuePlugin } from 'eslint-plugin-vue';
@@ -9,12 +10,12 @@ export { default as reactHooksPlugin } from 'eslint-plugin-react-hooks';
9
10
  /**
10
11
  * @file shared constants
11
12
  */
12
- declare const GLOB_SRC_EXT = "?([mt])[jt]s?(x)";
13
- declare const GLOB_SRC = "**/*.?([mt])[jt]s?(x)";
14
- declare const GLOB_JS = "**/*.?([mt])js";
15
- declare const GLOB_JSX = "**/*.?([mt])jsx";
16
- declare const GLOB_TS = "**/*.?([mt])ts";
17
- declare const GLOB_TSX = "**/*.?([mt])tsx";
13
+ declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
14
+ declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
15
+ declare const GLOB_JS = "**/*.?([cm])js";
16
+ declare const GLOB_JSX = "**/*.?([cm])jsx";
17
+ declare const GLOB_TS = "**/*.?([cm])ts";
18
+ declare const GLOB_TSX = "**/*.?([cm])tsx";
18
19
  declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
19
20
  declare const GLOB_CSS = "**/*.css";
20
21
  declare const GLOB_LESS = "**/*.less";
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  // src/shared.ts
2
- var GLOB_SRC_EXT = "?([mt])[jt]s?(x)";
3
- var GLOB_SRC = "**/*.?([mt])[jt]s?(x)";
4
- var GLOB_JS = "**/*.?([mt])js";
5
- var GLOB_JSX = "**/*.?([mt])jsx";
6
- var GLOB_TS = "**/*.?([mt])ts";
7
- var GLOB_TSX = "**/*.?([mt])tsx";
2
+ var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
3
+ var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
4
+ var GLOB_JS = "**/*.?([cm])js";
5
+ var GLOB_JSX = "**/*.?([cm])jsx";
6
+ var GLOB_TS = "**/*.?([cm])ts";
7
+ var GLOB_TSX = "**/*.?([cm])tsx";
8
8
  var GLOB_STYLE = "**/*.{c,le,sc}ss";
9
9
  var GLOB_CSS = "**/*.css";
10
10
  var GLOB_LESS = "**/*.less";
@@ -38,7 +38,7 @@ var GLOB_EXCLUDE = [
38
38
  "**/*.min.*",
39
39
  "**/LICENSE*",
40
40
  "**/__snapshots__",
41
- "**/auto-import.d.ts",
41
+ "**/auto-import?(s).d.ts",
42
42
  "**/components.d.ts",
43
43
  "**/output",
44
44
  "**/coverage",
@@ -505,6 +505,13 @@ var unicorn = [
505
505
  "unicorn/prefer-optional-catch-binding": "error",
506
506
  "unicorn/prefer-prototype-methods": "error",
507
507
  "unicorn/prefer-reflect-apply": "error",
508
+ "unicorn/catch-error-name": [
509
+ "error",
510
+ {
511
+ name: "err",
512
+ ignore: ["^_."]
513
+ }
514
+ ],
508
515
  "unicorn/prefer-date-now": "error",
509
516
  // String
510
517
  "unicorn/prefer-string-slice": "error",
@@ -534,7 +541,7 @@ var unicorn = [
534
541
  ];
535
542
 
536
543
  // src/configs/ts.ts
537
- import tsParser from "@typescript-eslint/parser";
544
+ import * as tsParser from "@typescript-eslint/parser";
538
545
  import tsPlugin from "@typescript-eslint/eslint-plugin";
539
546
  var ts = [
540
547
  {
@@ -543,15 +550,16 @@ var ts = [
543
550
  // @ts-expect-error 2322
544
551
  parser: tsParser,
545
552
  parserOptions: {
546
- sourceType: "module"
553
+ sourceType: "module",
554
+ project: true
547
555
  }
548
556
  },
549
557
  plugins: {
550
558
  "@typescript-eslint": tsPlugin
551
559
  },
552
560
  rules: {
553
- ...tsPlugin.configs["eslint-recommended"].overrides[0].rules,
554
561
  ...tsPlugin.configs.recommended.rules,
562
+ ...tsPlugin.configs.stylistic.rules,
555
563
  "@typescript-eslint/no-unused-vars": "error",
556
564
  "@typescript-eslint/no-redeclare": "error",
557
565
  "@typescript-eslint/consistent-type-imports": [
@@ -658,7 +666,7 @@ var vue = [
658
666
 
659
667
  // src/configs/yml.ts
660
668
  import ymlPlugin, { configs } from "eslint-plugin-yml";
661
- import ymlParser from "yaml-eslint-parser";
669
+ import * as ymlParser from "yaml-eslint-parser";
662
670
  var yml = [
663
671
  {
664
672
  files: [GLOB_YAML],
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.10",
5
- "packageManager": "pnpm@8.4.0",
4
+ "version": "2.0.0-beta.12",
5
+ "packageManager": "pnpm@8.6.7",
6
6
  "description": "ESLint flat config of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -30,42 +30,42 @@
30
30
  "eslint": "^8.30.0"
31
31
  },
32
32
  "dependencies": {
33
- "@eslint/js": "^8.40.0",
34
- "@typescript-eslint/eslint-plugin": "^5.59.2",
35
- "@typescript-eslint/parser": "^5.59.2",
36
- "astro-eslint-parser": "^0.13.3",
33
+ "@eslint/js": "^8.44.0",
34
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
35
+ "@typescript-eslint/parser": "^6.0.0",
36
+ "astro-eslint-parser": "^0.14.0",
37
37
  "eslint-config-prettier": "^8.8.0",
38
- "eslint-define-config": "^1.20.0",
39
- "eslint-plugin-astro": "^0.26.1",
38
+ "eslint-define-config": "^1.21.0",
39
+ "eslint-plugin-astro": "^0.27.2",
40
40
  "eslint-plugin-eslint-comments": "^3.2.0",
41
41
  "eslint-plugin-import": "^2.27.5",
42
- "eslint-plugin-jsonc": "^2.7.0",
42
+ "eslint-plugin-jsonc": "^2.9.0",
43
43
  "eslint-plugin-markdown": "^3.0.0",
44
- "eslint-plugin-prettier": "^4.2.1",
44
+ "eslint-plugin-prettier": "^5.0.0-alpha.2",
45
45
  "eslint-plugin-react": "^7.32.2",
46
46
  "eslint-plugin-react-hooks": "^4.6.0",
47
47
  "eslint-plugin-unicorn": "^47.0.0",
48
- "eslint-plugin-vue": "^9.11.1",
49
- "eslint-plugin-yml": "^1.6.0",
48
+ "eslint-plugin-vue": "^9.15.1",
49
+ "eslint-plugin-yml": "^1.8.0",
50
50
  "globals": "^13.20.0",
51
- "jsonc-eslint-parser": "^2.2.0",
51
+ "jsonc-eslint-parser": "^2.3.0",
52
52
  "local-pkg": "^0.4.3",
53
- "prettier": "^2.8.8",
54
- "vue-eslint-parser": "^9.2.1",
55
- "yaml-eslint-parser": "^1.2.1"
53
+ "prettier": "^3.0.0",
54
+ "vue-eslint-parser": "^9.3.1",
55
+ "yaml-eslint-parser": "^1.2.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@ntnyq/prettier-config": "^1.7.2",
59
- "@types/node": "^20.1.0",
60
- "bumpp": "^9.1.0",
61
- "eslint": "^8.40.0",
58
+ "@ntnyq/prettier-config": "^1.10.0",
59
+ "@types/node": "^20.4.1",
60
+ "bumpp": "^9.1.1",
61
+ "eslint": "^8.44.0",
62
62
  "husky": "^8.0.3",
63
63
  "nano-staged": "^0.8.0",
64
64
  "npm-run-all": "^4.1.5",
65
- "pnpm": "^8.4.0",
66
- "rimraf": "^5.0.0",
67
- "tsup": "^6.7.0",
68
- "typescript": "5.0.4"
65
+ "pnpm": "^8.6.7",
66
+ "rimraf": "^5.0.1",
67
+ "tsup": "^7.1.0",
68
+ "typescript": "5.1.6"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=16.14.0"