@vinicunca/eslint-config 2.4.4 → 2.5.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.
package/dist/index.js CHANGED
@@ -771,13 +771,14 @@ var NEVER = "never";
771
771
  var ALWAYS = "always";
772
772
 
773
773
  // src/plugins.ts
774
- import { default as default2 } from "@vinicunca/eslint-plugin-vinicunca";
774
+ import { default as default2 } from "eslint-plugin-antfu";
775
775
  import { default as default3 } from "eslint-plugin-eslint-comments";
776
776
  import * as pluginImport from "eslint-plugin-import-x";
777
777
  import { default as default4 } from "eslint-plugin-n";
778
778
  import { default as default5 } from "eslint-plugin-perfectionist";
779
- import { default as default6 } from "eslint-plugin-unicorn";
780
- import { default as default7 } from "eslint-plugin-unused-imports";
779
+ import { default as default6 } from "eslint-plugin-sonarjs";
780
+ import { default as default7 } from "eslint-plugin-unicorn";
781
+ import { default as default8 } from "eslint-plugin-unused-imports";
781
782
 
782
783
  // src/configs/comments.ts
783
784
  async function comments() {
@@ -962,8 +963,8 @@ async function stylistic(options = {}) {
962
963
  {
963
964
  name: "vinicunca/stylistic/rules",
964
965
  plugins: {
965
- style: pluginStylistic,
966
- vinicunca: default2
966
+ antfu: default2,
967
+ style: pluginStylistic
967
968
  },
968
969
  rules: {
969
970
  ...config.rules,
@@ -1025,17 +1026,8 @@ async function stylistic(options = {}) {
1025
1026
  "style/rest-spread-spacing": [ERROR, NEVER],
1026
1027
  "style/semi": [ERROR, semi ? ALWAYS : NEVER],
1027
1028
  "style/semi-spacing": [ERROR, { after: true, before: false }],
1028
- "vinicunca/consistent-list-newline": ERROR,
1029
- "vinicunca/if-newline": ERROR,
1030
- "vinicunca/top-level-function": ERROR,
1031
1029
  ...overrides
1032
1030
  }
1033
- },
1034
- {
1035
- files: [GLOB_JSX, GLOB_TSX],
1036
- rules: {
1037
- "vinicunca/consistent-list-newline": OFF
1038
- }
1039
1031
  }
1040
1032
  ];
1041
1033
  }
@@ -1216,8 +1208,8 @@ async function imports() {
1216
1208
  {
1217
1209
  name: "vinicunca/imports/rules",
1218
1210
  plugins: {
1219
- import: pluginImport,
1220
- vinicunca: default2
1211
+ antfu: default2,
1212
+ import: pluginImport
1221
1213
  },
1222
1214
  rules: {
1223
1215
  "import/export": ERROR,
@@ -1232,9 +1224,7 @@ async function imports() {
1232
1224
  "import/no-self-import": ERROR,
1233
1225
  "import/no-webpack-loader-syntax": ERROR,
1234
1226
  // Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-imports
1235
- "import/order": OFF,
1236
- "vinicunca/import-dedupe": ERROR,
1237
- "vinicunca/no-import-node-modules-by-path": ERROR
1227
+ "import/order": OFF
1238
1228
  }
1239
1229
  }
1240
1230
  ];
@@ -1273,8 +1263,8 @@ async function javascript(options = {}) {
1273
1263
  },
1274
1264
  name: "vinicunca/javascript/rules",
1275
1265
  plugins: {
1276
- "unused-imports": default7,
1277
- "vinicunca": default2
1266
+ "antfu": default2,
1267
+ "unused-imports": default8
1278
1268
  },
1279
1269
  rules: {
1280
1270
  "accessor-pairs": [ERROR, {
@@ -1494,7 +1484,6 @@ async function javascript(options = {}) {
1494
1484
  }],
1495
1485
  "vars-on-top": ERROR,
1496
1486
  "yoda": [ERROR, NEVER],
1497
- ...default2.configs.recommended.rules,
1498
1487
  ...overrides
1499
1488
  }
1500
1489
  },
@@ -1712,7 +1701,6 @@ async function markdown(options = {}) {
1712
1701
  "ts/restrict-template-expressions": OFF,
1713
1702
  "ts/unbound-method": OFF
1714
1703
  },
1715
- "vinicunca/no-ts-export-equal": OFF,
1716
1704
  ...overrides
1717
1705
  }
1718
1706
  }
@@ -1851,6 +1839,21 @@ async function react(options = {}) {
1851
1839
  ];
1852
1840
  }
1853
1841
 
1842
+ // src/configs/sonar.ts
1843
+ async function sonar() {
1844
+ return [
1845
+ {
1846
+ name: "vinicunca/sonar/rules",
1847
+ plugins: {
1848
+ sonar: default6
1849
+ },
1850
+ rules: {
1851
+ ...default6.configs.recommended.rules
1852
+ }
1853
+ }
1854
+ ];
1855
+ }
1856
+
1854
1857
  // src/configs/sort-package-json.ts
1855
1858
  async function sortPackageJson() {
1856
1859
  return [
@@ -2191,8 +2194,8 @@ async function typescript(options = {}) {
2191
2194
  // Install the plugins without globs, so they can be configured separately.
2192
2195
  name: "vinicunca/typescript/setup",
2193
2196
  plugins: {
2194
- ts: pluginTs,
2195
- vinicunca: default2
2197
+ antfu: default2,
2198
+ ts: pluginTs
2196
2199
  }
2197
2200
  },
2198
2201
  // assign type-aware parser for type-aware files and type-unaware parser for the rest
@@ -2296,7 +2299,7 @@ async function unicorn() {
2296
2299
  {
2297
2300
  name: "vinicunca/unicorn/rules",
2298
2301
  plugins: {
2299
- unicorn: default6
2302
+ unicorn: default7
2300
2303
  },
2301
2304
  rules: {
2302
2305
  "unicorn/error-message": ERROR,
@@ -2581,6 +2584,7 @@ var defaultPluginRenaming = {
2581
2584
  "@typescript-eslint": "ts",
2582
2585
  "import-x": "import",
2583
2586
  "n": "node",
2587
+ "sonarjs": "sonar",
2584
2588
  "vitest": "test",
2585
2589
  "yml": "yaml"
2586
2590
  };
@@ -2627,7 +2631,8 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2627
2631
  }),
2628
2632
  imports(),
2629
2633
  unicorn(),
2630
- perfectionist()
2634
+ perfectionist(),
2635
+ sonar()
2631
2636
  );
2632
2637
  if (enableVue) {
2633
2638
  componentExts.push("vue");
@@ -2714,15 +2719,15 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
2714
2719
  configs.push([fusedConfig]);
2715
2720
  }
2716
2721
  ;
2717
- let pipeline = new FlatConfigComposer();
2718
- pipeline = pipeline.append(
2722
+ let composer = new FlatConfigComposer();
2723
+ composer = composer.append(
2719
2724
  ...configs,
2720
2725
  ...userConfigs
2721
2726
  );
2722
2727
  if (autoRenamePlugins) {
2723
- pipeline = pipeline.renamePlugins(defaultPluginRenaming);
2728
+ composer = composer.renamePlugins(defaultPluginRenaming);
2724
2729
  }
2725
- return pipeline;
2730
+ return composer;
2726
2731
  }
2727
2732
  function getOverrides(options, key) {
2728
2733
  const sub = resolveSubOptions(options, key);
@@ -2772,16 +2777,18 @@ export {
2772
2777
  node,
2773
2778
  parserPlain,
2774
2779
  perfectionist,
2780
+ default2 as pluginAntfu,
2775
2781
  default3 as pluginComments,
2776
2782
  pluginImport,
2777
2783
  default4 as pluginNode,
2778
2784
  default5 as pluginPerfectionist,
2779
- default6 as pluginUnicorn,
2780
- default7 as pluginUnusedImports,
2781
- default2 as pluginVinicunca,
2785
+ default6 as pluginSonar,
2786
+ default7 as pluginUnicorn,
2787
+ default8 as pluginUnusedImports,
2782
2788
  react,
2783
2789
  renamePluginInConfigs,
2784
2790
  renameRules,
2791
+ sonar,
2785
2792
  sortPackageJson,
2786
2793
  sortTsconfig,
2787
2794
  stylistic,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "2.4.4",
4
+ "version": "2.5.0",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -58,49 +58,48 @@
58
58
  "eslint": ">=8.57.0"
59
59
  },
60
60
  "dependencies": {
61
- "@stylistic/eslint-plugin": "^1.7.0",
62
- "@typescript-eslint/eslint-plugin": "^7.6.0",
63
- "@typescript-eslint/parser": "^7.6.0",
64
- "@unocss/eslint-plugin": "^0.59.0",
65
- "@vinicunca/eslint-plugin-vinicunca": "^1.0.10",
66
- "eslint": "^9.0.0",
61
+ "@stylistic/eslint-plugin": "^2.1.0",
62
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
63
+ "@typescript-eslint/parser": "^7.8.0",
64
+ "@unocss/eslint-plugin": "^0.60.0",
67
65
  "eslint-config-flat-gitignore": "^0.1.5",
68
- "eslint-flat-config-utils": "^0.2.2",
66
+ "eslint-flat-config-utils": "^0.2.4",
69
67
  "eslint-merge-processors": "^0.1.0",
68
+ "eslint-plugin-antfu": "^2.2.0",
70
69
  "eslint-plugin-eslint-comments": "^3.2.0",
71
- "eslint-plugin-format": "^0.1.0",
70
+ "eslint-plugin-format": "^0.1.1",
72
71
  "eslint-plugin-import-x": "^0.5.0",
73
- "eslint-plugin-jsdoc": "^48.2.3",
74
- "eslint-plugin-jsonc": "^2.15.0",
75
- "eslint-plugin-markdown": "^4.0.1",
76
- "eslint-plugin-n": "^17.2.0",
72
+ "eslint-plugin-jsdoc": "^48.2.4",
73
+ "eslint-plugin-jsonc": "^2.15.1",
74
+ "eslint-plugin-markdown": "^5.0.0",
75
+ "eslint-plugin-n": "^17.6.0",
77
76
  "eslint-plugin-no-only-tests": "^3.1.0",
78
- "eslint-plugin-perfectionist": "^2.8.0",
77
+ "eslint-plugin-perfectionist": "^2.10.0",
79
78
  "eslint-plugin-react": "^7.34.1",
80
- "eslint-plugin-react-hooks": "^4.6.0",
81
- "eslint-plugin-unicorn": "^52.0.0",
82
- "eslint-plugin-unused-imports": "^3.1.0",
83
- "eslint-plugin-vitest": "^0.5.1",
84
- "eslint-plugin-vue": "^9.24.1",
79
+ "eslint-plugin-react-hooks": "^4.6.2",
80
+ "eslint-plugin-sonarjs": "^1.0.3",
81
+ "eslint-plugin-unicorn": "^53.0.0",
82
+ "eslint-plugin-unused-imports": "^3.2.0",
83
+ "eslint-plugin-vitest": "^0.5.4",
84
+ "eslint-plugin-vue": "^9.26.0",
85
85
  "eslint-plugin-yml": "^1.14.0",
86
- "eslint-processor-vue-blocks": "^0.1.1",
87
- "eslint-typegen": "^0.2.2",
88
- "globals": "^15.0.0",
86
+ "eslint-processor-vue-blocks": "^0.1.2",
87
+ "globals": "^15.2.0",
89
88
  "jsonc-eslint-parser": "^2.4.0",
90
89
  "local-pkg": "^0.5.0",
91
90
  "vue-eslint-parser": "^9.4.2",
92
91
  "yaml-eslint-parser": "^1.2.2"
93
92
  },
94
93
  "devDependencies": {
95
- "@eslint-stylistic/metadata": "^1.7.0",
96
- "@types/eslint": "^8.56.7",
94
+ "@types/eslint": "^8.56.10",
97
95
  "@types/fs-extra": "^11.0.4",
98
- "execa": "^8.0.1",
96
+ "eslint-typegen": "^0.2.4",
97
+ "execa": "^9.0.2",
99
98
  "fast-glob": "^3.3.2",
100
99
  "fs-extra": "^11.2.0",
101
- "react": "^18.2.0",
100
+ "react": "^18.3.1",
102
101
  "tsup": "^8.0.2",
103
- "vue": "^3.4.21"
102
+ "vue": "^3.4.27"
104
103
  },
105
104
  "scripts": {
106
105
  "lint": "eslint -v",