@luxass/eslint-config 4.8.2 → 4.9.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
@@ -1075,22 +1075,24 @@ async function typescript(options = {}) {
1075
1075
  const typeAwareRules = {
1076
1076
  "dot-notation": "off",
1077
1077
  "no-implied-eval": "off",
1078
- "no-throw-literal": "off",
1079
1078
  "ts/await-thenable": "error",
1080
1079
  "ts/dot-notation": ["error", { allowKeywords: true }],
1081
1080
  "ts/no-floating-promises": "error",
1082
1081
  "ts/no-for-in-array": "error",
1083
1082
  "ts/no-implied-eval": "error",
1084
1083
  "ts/no-misused-promises": "error",
1085
- "ts/no-throw-literal": "error",
1086
1084
  "ts/no-unnecessary-type-assertion": "error",
1087
1085
  "ts/no-unsafe-argument": "error",
1088
1086
  "ts/no-unsafe-assignment": "error",
1089
1087
  "ts/no-unsafe-call": "error",
1090
1088
  "ts/no-unsafe-member-access": "error",
1091
1089
  "ts/no-unsafe-return": "error",
1090
+ "ts/promise-function-async": "error",
1092
1091
  "ts/restrict-plus-operands": "error",
1093
1092
  "ts/restrict-template-expressions": "error",
1093
+ "ts/return-await": ["error", "in-try-catch"],
1094
+ "ts/strict-boolean-expressions": ["error", { allowNullableBoolean: true, allowNullableObject: true }],
1095
+ "ts/switch-exhaustiveness-check": "error",
1094
1096
  "ts/unbound-method": "error"
1095
1097
  };
1096
1098
  const [
@@ -1111,7 +1113,10 @@ async function typescript(options = {}) {
1111
1113
  extraFileExtensions: exts.map((ext) => `.${ext}`),
1112
1114
  sourceType: "module",
1113
1115
  ...typeAware ? {
1114
- project: tsconfigPath,
1116
+ projectService: {
1117
+ allowDefaultProject: ["./*.js"],
1118
+ defaultProject: tsconfigPath
1119
+ },
1115
1120
  tsconfigRootDir: process2.cwd()
1116
1121
  } : {},
1117
1122
  ...parserOptions
@@ -1148,48 +1153,17 @@ async function typescript(options = {}) {
1148
1153
  ),
1149
1154
  "no-dupe-class-members": "off",
1150
1155
  "no-invalid-this": "off",
1151
- "no-loss-of-precision": "off",
1156
+ "no-loss-of-precision": "error",
1152
1157
  "no-redeclare": "off",
1153
1158
  "no-use-before-define": "off",
1154
1159
  "no-useless-constructor": "off",
1155
1160
  "ts/ban-ts-comment": [
1156
1161
  "error",
1157
- { "ts-ignore": "allow-with-description" }
1158
- ],
1159
- "ts/ban-types": ["error", {
1160
- extendDefaults: false,
1161
- types: {
1162
- BigInt: {
1163
- fixWith: "bigint",
1164
- message: "Use `bigint` instead."
1165
- },
1166
- Boolean: {
1167
- fixWith: "boolean",
1168
- message: "Use `boolean` instead."
1169
- },
1170
- Function: "Use a specific function type instead, like `() => void`.",
1171
- Number: {
1172
- fixWith: "number",
1173
- message: "Use `number` instead."
1174
- },
1175
- Object: {
1176
- fixWith: "Record<string, unknown>",
1177
- message: "The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848"
1178
- },
1179
- String: {
1180
- fixWith: "string",
1181
- message: "Use `string` instead."
1182
- },
1183
- Symbol: {
1184
- fixWith: "symbol",
1185
- message: "Use `symbol` instead."
1186
- },
1187
- object: {
1188
- fixWith: "Record<string, unknown>",
1189
- message: "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848"
1190
- }
1162
+ {
1163
+ "ts-ignore": "allow-with-description",
1164
+ "ts-expect-error": "allow-with-description"
1191
1165
  }
1192
- }],
1166
+ ],
1193
1167
  "ts/consistent-type-definitions": ["error", "interface"],
1194
1168
  "ts/consistent-type-imports": [
1195
1169
  "error",
@@ -1199,12 +1173,12 @@ async function typescript(options = {}) {
1199
1173
  // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
1200
1174
  "ts/no-dupe-class-members": "error",
1201
1175
  "ts/no-dynamic-delete": "off",
1176
+ "ts/no-empty-object-type": "error",
1202
1177
  "ts/no-explicit-any": "off",
1203
1178
  "ts/no-extraneous-class": "off",
1204
1179
  "ts/no-import-type-side-effects": "error",
1205
1180
  "ts/no-invalid-this": "error",
1206
1181
  "ts/no-invalid-void-type": "off",
1207
- "ts/no-loss-of-precision": "error",
1208
1182
  "ts/no-non-null-assertion": "off",
1209
1183
  "ts/no-redeclare": "error",
1210
1184
  "ts/no-require-imports": "error",
@@ -1214,7 +1188,7 @@ async function typescript(options = {}) {
1214
1188
  { classes: false, functions: false, variables: true }
1215
1189
  ],
1216
1190
  "ts/no-useless-constructor": "off",
1217
- "ts/prefer-ts-expect-error": "error",
1191
+ "ts/no-wrapper-object-types": "error",
1218
1192
  "ts/triple-slash-reference": "off",
1219
1193
  "ts/unified-signatures": "off",
1220
1194
  ...overrides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxass/eslint-config",
3
- "version": "4.8.2",
3
+ "version": "4.9.0",
4
4
  "description": "ESLint config for @luxass",
5
5
  "type": "module",
6
6
  "author": {
@@ -8,7 +8,7 @@
8
8
  "email": "lucasnrgaard@gmail.com",
9
9
  "url": "https://luxass.dev"
10
10
  },
11
- "packageManager": "pnpm@9.4.0",
11
+ "packageManager": "pnpm@9.5.0",
12
12
  "license": "MIT",
13
13
  "repository": {
14
14
  "type": "git",
@@ -39,7 +39,7 @@
39
39
  "scripts": {
40
40
  "build": "pnpm typegen && tsup --format esm,cjs --clean --dts",
41
41
  "stub": "tsup --format esm",
42
- "dev": "pnpm eslint-config-inspector --config eslint.config.ts",
42
+ "dev": "pnpm eslint-config-inspector --config eslint.config.mjs",
43
43
  "build:inspector": "pnpm build && pnpm eslint-config-inspector build",
44
44
  "test": "vitest --run",
45
45
  "typegen": "pnpx tsx ./scripts/typegen.ts",
@@ -92,27 +92,27 @@
92
92
  "@antfu/install-pkg": "^0.3.3",
93
93
  "@clack/prompts": "^0.7.0",
94
94
  "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
95
- "@stylistic/eslint-plugin": "^2.1.0",
96
- "@typescript-eslint/eslint-plugin": "^7.12.0",
97
- "@typescript-eslint/parser": "^7.12.0",
98
- "eslint-config-flat-gitignore": "^0.1.5",
95
+ "@stylistic/eslint-plugin": "^2.6.0-beta.0",
96
+ "@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
97
+ "@typescript-eslint/parser": "8.0.0-alpha.40",
98
+ "eslint-config-flat-gitignore": "^0.1.6",
99
99
  "eslint-flat-config-utils": "^0.2.5",
100
100
  "eslint-merge-processors": "^0.1.0",
101
- "eslint-plugin-antfu": "^2.3.3",
102
- "eslint-plugin-import-x": "^0.5.1",
103
- "eslint-plugin-jsdoc": "^48.2.9",
101
+ "eslint-plugin-antfu": "^2.3.4",
102
+ "eslint-plugin-import-x": "^0.5.3",
103
+ "eslint-plugin-jsdoc": "^48.5.2",
104
104
  "eslint-plugin-jsonc": "^2.16.0",
105
105
  "eslint-plugin-markdown": "^5.0.0",
106
- "eslint-plugin-n": "^17.8.1",
106
+ "eslint-plugin-n": "^17.9.0",
107
107
  "eslint-plugin-regexp": "^2.6.0",
108
- "eslint-plugin-toml": "^0.11.0",
108
+ "eslint-plugin-toml": "^0.11.1",
109
109
  "eslint-plugin-unicorn": "^54.0.0",
110
110
  "eslint-plugin-unused-imports": "^4.0.0",
111
111
  "eslint-plugin-vitest": "^0.5.4",
112
- "eslint-plugin-vue": "^9.26.0",
112
+ "eslint-plugin-vue": "^9.27.0",
113
113
  "eslint-plugin-yml": "^1.14.0",
114
114
  "eslint-processor-vue-blocks": "^0.1.2",
115
- "globals": "^15.4.0",
115
+ "globals": "^15.8.0",
116
116
  "jsonc-eslint-parser": "^2.4.0",
117
117
  "local-pkg": "^0.5.0",
118
118
  "parse-gitignore": "^2.0.0",
@@ -121,14 +121,14 @@
121
121
  "yaml-eslint-parser": "^1.2.3"
122
122
  },
123
123
  "devDependencies": {
124
- "@eslint-react/eslint-plugin": "^1.5.19",
124
+ "@eslint-react/eslint-plugin": "^1.5.23",
125
125
  "@eslint/config-inspector": "^0.5.1",
126
126
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
127
127
  "@types/eslint": "^8.56.10",
128
128
  "@types/estree": "^1.0.5",
129
129
  "@types/node": "^20.14.9",
130
- "@typescript-eslint/rule-tester": "^7.14.1",
131
- "@unocss/eslint-plugin": "^0.61.0",
130
+ "@typescript-eslint/rule-tester": "^7.15.0",
131
+ "@unocss/eslint-plugin": "^0.61.3",
132
132
  "astro-eslint-parser": "^1.0.2",
133
133
  "eslint": "^9.6.0",
134
134
  "eslint-plugin-astro": "^1.2.2",
@@ -143,7 +143,7 @@
143
143
  "simple-git-hooks": "^2.11.1",
144
144
  "tailwindcss": "^3.4.4",
145
145
  "tsup": "^8.1.0",
146
- "typescript": "^5.5.2",
146
+ "typescript": "^5.5.3",
147
147
  "unocss": "^0.61.3",
148
148
  "vitest": "^1.6.0",
149
149
  "vue": "^3.4.31"