@so1ve/eslint-config 1.3.0 → 1.4.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.cjs CHANGED
@@ -8,8 +8,6 @@ var parserHtml = require('@html-eslint/parser');
8
8
  var pluginSo1ve = require('@so1ve/eslint-plugin');
9
9
  var pluginSortImports = require('@so1ve/eslint-plugin-sort-imports');
10
10
  var pluginStylistic = require('@stylistic/eslint-plugin');
11
- var pluginTs = require('@typescript-eslint/eslint-plugin');
12
- var parserTs = require('@typescript-eslint/parser');
13
11
  var eslintMdx = require('eslint-mdx');
14
12
  var pluginArrayFunc = require('eslint-plugin-array-func');
15
13
  var pluginEtc = require('eslint-plugin-etc');
@@ -37,6 +35,7 @@ var parserToml = require('toml-eslint-parser');
37
35
  var parserVue = require('vue-eslint-parser');
38
36
  var parserYaml = require('yaml-eslint-parser');
39
37
  var globals = require('globals');
38
+ var tseslint = require('typescript-eslint');
40
39
  var fs = require('node:fs');
41
40
  var gitignore = require('eslint-config-flat-gitignore');
42
41
  var localPkg = require('local-pkg');
@@ -67,8 +66,6 @@ var parserHtml__default = /*#__PURE__*/_interopDefaultLegacy(parserHtml);
67
66
  var pluginSo1ve__default = /*#__PURE__*/_interopDefaultLegacy(pluginSo1ve);
68
67
  var pluginSortImports__default = /*#__PURE__*/_interopDefaultLegacy(pluginSortImports);
69
68
  var pluginStylistic__default = /*#__PURE__*/_interopDefaultLegacy(pluginStylistic);
70
- var pluginTs__default = /*#__PURE__*/_interopDefaultLegacy(pluginTs);
71
- var parserTs__default = /*#__PURE__*/_interopDefaultLegacy(parserTs);
72
69
  var eslintMdx__default = /*#__PURE__*/_interopDefaultLegacy(eslintMdx);
73
70
  var pluginArrayFunc__default = /*#__PURE__*/_interopDefaultLegacy(pluginArrayFunc);
74
71
  var pluginEtc__default = /*#__PURE__*/_interopDefaultLegacy(pluginEtc);
@@ -96,6 +93,7 @@ var parserToml__default = /*#__PURE__*/_interopDefaultLegacy(parserToml);
96
93
  var parserVue__default = /*#__PURE__*/_interopDefaultLegacy(parserVue);
97
94
  var parserYaml__default = /*#__PURE__*/_interopDefaultLegacy(parserYaml);
98
95
  var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals);
96
+ var tseslint__default = /*#__PURE__*/_interopDefaultLegacy(tseslint);
99
97
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
100
98
  var gitignore__default = /*#__PURE__*/_interopDefaultLegacy(gitignore);
101
99
 
@@ -1065,14 +1063,14 @@ function typescript({
1065
1063
  // Install the plugins without globs, so they can be configured separately.
1066
1064
  plugins: {
1067
1065
  import: pluginImport__default["default"],
1068
- ts: pluginTs__default["default"],
1066
+ ts: tseslint__default["default"].plugin,
1069
1067
  etc: pluginEtc__default["default"]
1070
1068
  }
1071
1069
  },
1072
1070
  {
1073
1071
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
1074
1072
  languageOptions: {
1075
- parser: parserTs__default["default"],
1073
+ parser: tseslint__default["default"].parser,
1076
1074
  parserOptions: {
1077
1075
  sourceType: "module",
1078
1076
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
@@ -1089,12 +1087,12 @@ function typescript({
1089
1087
  },
1090
1088
  rules: {
1091
1089
  ...renameRules(
1092
- pluginTs__default["default"].configs["eslint-recommended"].overrides[0].rules,
1090
+ tseslint__default["default"].configs.eslintRecommended.rules,
1093
1091
  "@typescript-eslint/",
1094
1092
  "ts/"
1095
1093
  ),
1096
1094
  ...renameRules(
1097
- pluginTs__default["default"].configs.recommended.rules,
1095
+ tseslint__default["default"].configs.recommended.map((config) => config.rules).filter(Boolean).reduce((a, b) => ({ ...a, ...b }), {}),
1098
1096
  "@typescript-eslint/",
1099
1097
  "ts/"
1100
1098
  ),
@@ -1227,7 +1225,7 @@ function typescript({
1227
1225
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
1228
1226
  ignores: [GLOB_MARKDOWN_CODE],
1229
1227
  languageOptions: {
1230
- parser: parserTs__default["default"],
1228
+ parser: tseslint__default["default"].parser,
1231
1229
  parserOptions: {
1232
1230
  sourceType: "module",
1233
1231
  // EXPERIMENTAL_useProjectService: true,
@@ -1336,7 +1334,7 @@ const vue = ({
1336
1334
  jsx: true
1337
1335
  },
1338
1336
  extraFileExtensions: [".vue"],
1339
- parser: typescript ? parserTs__default["default"] : null,
1337
+ parser: typescript ? tseslint__default["default"].parser : null,
1340
1338
  sourceType: "module"
1341
1339
  }
1342
1340
  },
@@ -1348,7 +1346,7 @@ const vue = ({
1348
1346
  ...pluginVue__default["default"].configs["vue3-recommended"].rules,
1349
1347
  "no-unused-vars": "off",
1350
1348
  "no-undef": "off",
1351
- "@typescript-eslint/no-unused-vars": "off",
1349
+ "ts/no-unused-vars": "off",
1352
1350
  "vue/no-v-html": "off",
1353
1351
  "vue/require-prop-types": "off",
1354
1352
  "vue/require-default-prop": "off",
@@ -1685,14 +1683,6 @@ Object.defineProperty(exports, 'pluginStylistic', {
1685
1683
  enumerable: true,
1686
1684
  get: function () { return pluginStylistic__default["default"]; }
1687
1685
  });
1688
- Object.defineProperty(exports, 'pluginTs', {
1689
- enumerable: true,
1690
- get: function () { return pluginTs__default["default"]; }
1691
- });
1692
- Object.defineProperty(exports, 'parserTs', {
1693
- enumerable: true,
1694
- get: function () { return parserTs__default["default"]; }
1695
- });
1696
1686
  Object.defineProperty(exports, 'parserMdx', {
1697
1687
  enumerable: true,
1698
1688
  get: function () { return eslintMdx__default["default"]; }
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import so1vePlugin from '@so1ve/eslint-plugin';
2
2
  export { default as pluginSo1ve } from '@so1ve/eslint-plugin';
3
3
  import { ParserOptions } from '@typescript-eslint/parser';
4
- export { default as parserTs } from '@typescript-eslint/parser';
5
4
  import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
6
5
  import { Rules, FlatESLintConfigItem } from 'eslint-define-config';
7
6
  export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
@@ -9,7 +8,6 @@ export { default as pluginHtml } from '@html-eslint/eslint-plugin';
9
8
  export { default as parserHtml } from '@html-eslint/parser';
10
9
  export { default as pluginSortImports } from '@so1ve/eslint-plugin-sort-imports';
11
10
  export { default as pluginStylistic } from '@stylistic/eslint-plugin';
12
- export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
13
11
  export { default as parserMdx } from 'eslint-mdx';
14
12
  export { default as pluginArrayFunc } from 'eslint-plugin-array-func';
15
13
  export { default as pluginEtc } from 'eslint-plugin-etc';
package/dist/index.mjs CHANGED
@@ -10,10 +10,6 @@ import pluginSortImports from '@so1ve/eslint-plugin-sort-imports';
10
10
  export { default as pluginSortImports } from '@so1ve/eslint-plugin-sort-imports';
11
11
  import pluginStylistic from '@stylistic/eslint-plugin';
12
12
  export { default as pluginStylistic } from '@stylistic/eslint-plugin';
13
- import pluginTs from '@typescript-eslint/eslint-plugin';
14
- export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
15
- import parserTs from '@typescript-eslint/parser';
16
- export { default as parserTs } from '@typescript-eslint/parser';
17
13
  export { default as parserMdx } from 'eslint-mdx';
18
14
  import pluginArrayFunc from 'eslint-plugin-array-func';
19
15
  export { default as pluginArrayFunc } from 'eslint-plugin-array-func';
@@ -66,6 +62,7 @@ export { default as parserVue } from 'vue-eslint-parser';
66
62
  import parserYaml from 'yaml-eslint-parser';
67
63
  export { default as parserYaml } from 'yaml-eslint-parser';
68
64
  import globals from 'globals';
65
+ import tseslint from 'typescript-eslint';
69
66
  import fs from 'node:fs';
70
67
  import gitignore from 'eslint-config-flat-gitignore';
71
68
  import { isPackageExists } from 'local-pkg';
@@ -1036,14 +1033,14 @@ function typescript({
1036
1033
  // Install the plugins without globs, so they can be configured separately.
1037
1034
  plugins: {
1038
1035
  import: pluginImport,
1039
- ts: pluginTs,
1036
+ ts: tseslint.plugin,
1040
1037
  etc: pluginEtc
1041
1038
  }
1042
1039
  },
1043
1040
  {
1044
1041
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
1045
1042
  languageOptions: {
1046
- parser: parserTs,
1043
+ parser: tseslint.parser,
1047
1044
  parserOptions: {
1048
1045
  sourceType: "module",
1049
1046
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
@@ -1060,12 +1057,12 @@ function typescript({
1060
1057
  },
1061
1058
  rules: {
1062
1059
  ...renameRules(
1063
- pluginTs.configs["eslint-recommended"].overrides[0].rules,
1060
+ tseslint.configs.eslintRecommended.rules,
1064
1061
  "@typescript-eslint/",
1065
1062
  "ts/"
1066
1063
  ),
1067
1064
  ...renameRules(
1068
- pluginTs.configs.recommended.rules,
1065
+ tseslint.configs.recommended.map((config) => config.rules).filter(Boolean).reduce((a, b) => ({ ...a, ...b }), {}),
1069
1066
  "@typescript-eslint/",
1070
1067
  "ts/"
1071
1068
  ),
@@ -1198,7 +1195,7 @@ function typescript({
1198
1195
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
1199
1196
  ignores: [GLOB_MARKDOWN_CODE],
1200
1197
  languageOptions: {
1201
- parser: parserTs,
1198
+ parser: tseslint.parser,
1202
1199
  parserOptions: {
1203
1200
  sourceType: "module",
1204
1201
  // EXPERIMENTAL_useProjectService: true,
@@ -1307,7 +1304,7 @@ const vue = ({
1307
1304
  jsx: true
1308
1305
  },
1309
1306
  extraFileExtensions: [".vue"],
1310
- parser: typescript ? parserTs : null,
1307
+ parser: typescript ? tseslint.parser : null,
1311
1308
  sourceType: "module"
1312
1309
  }
1313
1310
  },
@@ -1319,7 +1316,7 @@ const vue = ({
1319
1316
  ...pluginVue.configs["vue3-recommended"].rules,
1320
1317
  "no-unused-vars": "off",
1321
1318
  "no-undef": "off",
1322
- "@typescript-eslint/no-unused-vars": "off",
1319
+ "ts/no-unused-vars": "off",
1323
1320
  "vue/no-v-html": "off",
1324
1321
  "vue/require-prop-types": "off",
1325
1322
  "vue/require-default-prop": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-config",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
5
5
  "description": "Ray's eslint config.",
6
6
  "keywords": [
@@ -36,8 +36,6 @@
36
36
  "@html-eslint/eslint-plugin": "^0.19.1",
37
37
  "@html-eslint/parser": "^0.19.1",
38
38
  "@stylistic/eslint-plugin": "^1.6.0",
39
- "@typescript-eslint/eslint-plugin": "^6.2.0",
40
- "@typescript-eslint/parser": "^6.2.0",
41
39
  "@unocss/eslint-config": "^0.55.0",
42
40
  "eslint-config-flat-gitignore": "^0.1.0",
43
41
  "eslint-define-config": "^1.21.0",
@@ -70,12 +68,14 @@
70
68
  "jsonc-eslint-parser": "^2.3.0",
71
69
  "local-pkg": "^0.5.0",
72
70
  "toml-eslint-parser": "^0.6.0",
71
+ "typescript-eslint": "^7.0.1",
73
72
  "vue-eslint-parser": "^9.3.1",
74
73
  "yaml-eslint-parser": "^1.2.2",
75
- "@so1ve/eslint-plugin": "1.3.0",
76
- "@so1ve/eslint-plugin-sort-imports": "1.3.0"
74
+ "@so1ve/eslint-plugin": "1.4.0",
75
+ "@so1ve/eslint-plugin-sort-imports": "1.4.0"
77
76
  },
78
77
  "devDependencies": {
78
+ "@typescript-eslint/utils": "^6.2.0",
79
79
  "eslint": "^8.46.0"
80
80
  },
81
81
  "peerDependencies": {