@miskamyasa/eslint-config 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +38 -2
  2. package/package.json +42 -35
package/dist/index.js CHANGED
@@ -385,13 +385,38 @@ function react() {
385
385
 
386
386
  // src/configs/stylistic.ts
387
387
  import stylisticPlugin from "@stylistic/eslint-plugin";
388
+ var JSX_SORT_PROPS_DEPRECATION_WARNING = '[@stylistic/eslint-plugin]: You are using deprecated rule("jsx-sort-props")';
389
+ var jsxSortPropsRule = stylisticPlugin.rules["jsx-sort-props"];
390
+ var patchedStylisticPlugin = {
391
+ ...stylisticPlugin,
392
+ rules: {
393
+ ...stylisticPlugin.rules,
394
+ "jsx-sort-props": {
395
+ ...jsxSortPropsRule,
396
+ create(context) {
397
+ const warn = console.warn;
398
+ console.warn = (...args) => {
399
+ if (typeof args[0] === "string" && args[0].startsWith(JSX_SORT_PROPS_DEPRECATION_WARNING)) {
400
+ return;
401
+ }
402
+ warn(...args);
403
+ };
404
+ try {
405
+ return jsxSortPropsRule.create(context);
406
+ } finally {
407
+ console.warn = warn;
408
+ }
409
+ }
410
+ }
411
+ }
412
+ };
388
413
  function stylistic() {
389
414
  return [
390
415
  // Plugin setup (global - registers the @stylistic plugin)
391
416
  {
392
417
  name: "miskamyasa/stylistic/setup",
393
418
  plugins: {
394
- "@stylistic": stylisticPlugin
419
+ "@stylistic": patchedStylisticPlugin
395
420
  }
396
421
  },
397
422
  // Disable legacy ESLint formatting rules - scoped to source files
@@ -555,7 +580,14 @@ function stylistic() {
555
580
  "comma-spacing": ["error", { "before": false, "after": true }],
556
581
  "no-console": ["warn", { allow: ["warn", "error"] }],
557
582
  "brace-style": ["error", "stroustrup"],
558
- "no-use-before-define": "error"
583
+ "no-use-before-define": "error",
584
+ "no-restricted-syntax": ["error", {
585
+ "selector": [
586
+ "SwitchStatement:has(SwitchCase > BlockStatement.consequent)",
587
+ "> SwitchCase:has(> *.consequent[type!='BlockStatement'])"
588
+ ].join(" "),
589
+ "message": "Switch cases must consistently use braces when any case uses braces"
590
+ }]
559
591
  }
560
592
  }
561
593
  ];
@@ -671,6 +703,10 @@ function typescript(options) {
671
703
  "@typescript-eslint/no-misused-promises": [
672
704
  "error",
673
705
  { checksVoidReturn: { attributes: false } }
706
+ ],
707
+ "@typescript-eslint/switch-exhaustiveness-check": [
708
+ "error",
709
+ { allowDefaultCaseForExhaustiveSwitch: false }
674
710
  ]
675
711
  }
676
712
  }
package/package.json CHANGED
@@ -1,19 +1,44 @@
1
1
  {
2
- "name": "@miskamyasa/eslint-config",
3
- "type": "module",
4
- "version": "1.0.3",
2
+ "author": "Denis <MiskaMyasa> Zaitsev",
3
+ "bugs": {
4
+ "url": "https://github.com/Miskamyasa/eslint-config/issues"
5
+ },
6
+ "dependencies": {
7
+ "@eslint-react/eslint-plugin": "2.13.0",
8
+ "@eslint/js": "10.0.1",
9
+ "@eslint/markdown": "7.5.1",
10
+ "@stylistic/eslint-plugin": "5.10.0",
11
+ "eslint-import-resolver-typescript": "4.4.5",
12
+ "eslint-plugin-format": "2.0.1",
13
+ "eslint-plugin-import-x": "4.17.0",
14
+ "eslint-plugin-jsonc": "3.2.0",
15
+ "eslint-plugin-react-hooks": "7.1.1",
16
+ "eslint-plugin-toml": "1.4.0",
17
+ "eslint-plugin-unused-imports": "4.4.1",
18
+ "eslint-plugin-yml": "3.5.0",
19
+ "jsonc-eslint-parser": "3.1.0",
20
+ "toml-eslint-parser": "1.0.3",
21
+ "typescript-eslint": "8.62.0",
22
+ "yaml-eslint-parser": "2.0.0"
23
+ },
5
24
  "description": "Opinionated ESLint config for React + TypeScript projects",
25
+ "devDependencies": {
26
+ "@types/node": "24.12.4",
27
+ "eslint": "10.5.0",
28
+ "jiti": "2.7.0",
29
+ "tsup": "8.5.1",
30
+ "typescript": "5.9.3"
31
+ },
6
32
  "exports": {
7
33
  ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js"
34
+ "import": "./dist/index.js",
35
+ "types": "./dist/index.d.ts"
10
36
  }
11
37
  },
12
- "types": "./dist/index.d.ts",
13
38
  "files": [
14
39
  "dist"
15
40
  ],
16
- "sideEffects": false,
41
+ "homepage": "https://github.com/Miskamyasa/eslint-config",
17
42
  "keywords": [
18
43
  "eslint",
19
44
  "eslint-config",
@@ -21,40 +46,22 @@
21
46
  "react",
22
47
  "stylistic"
23
48
  ],
24
- "author": "Denis <MiskaMyasa> Zaitsev",
25
49
  "license": "MIT",
26
- "engines": {
27
- "node": ">=24.0.0"
28
- },
29
- "dependencies": {
30
- "@eslint-react/eslint-plugin": "2.13.0",
31
- "@eslint/js": "10.0.1",
32
- "@eslint/markdown": "7.5.1",
33
- "@stylistic/eslint-plugin": "5.10.0",
34
- "eslint-import-resolver-typescript": "4.4.4",
35
- "eslint-plugin-format": "2.0.1",
36
- "eslint-plugin-import-x": "4.16.2",
37
- "eslint-plugin-jsonc": "3.1.2",
38
- "eslint-plugin-react-hooks": "7.1.1",
39
- "eslint-plugin-toml": "1.3.1",
40
- "eslint-plugin-unused-imports": "4.4.1",
41
- "eslint-plugin-yml": "3.3.2",
42
- "jsonc-eslint-parser": "3.1.0",
43
- "toml-eslint-parser": "1.0.3",
44
- "typescript-eslint": "8.59.4",
45
- "yaml-eslint-parser": "2.0.0"
46
- },
50
+ "main": "./dist/index.cjs",
51
+ "module": "./dist/index.js",
52
+ "name": "@miskamyasa/eslint-config",
47
53
  "peerDependencies": {
48
54
  "eslint": ">=9.0.0",
49
55
  "typescript": ">=5.0.0"
50
56
  },
51
- "devDependencies": {
52
- "@types/node": "24.12.4",
53
- "eslint": "10.4.0",
54
- "jiti": "2.7.0",
55
- "tsup": "8.5.1",
56
- "typescript": "5.9.3"
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+ssh://github.com/Miskamyasa/eslint-config.git"
57
60
  },
61
+ "sideEffects": false,
62
+ "type": "module",
63
+ "types": "./dist/index.d.ts",
64
+ "version": "1.0.5",
58
65
  "scripts": {
59
66
  "build": "tsup",
60
67
  "lint": "eslint .",