@cto.af/eslint-config 6.0.15 → 6.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cto.af/eslint-config",
3
- "version": "6.0.15",
3
+ "version": "6.0.17",
4
4
  "description": "hildjj's lint rules",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -15,12 +15,12 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@eslint/json": "0.13.2",
18
- "@stylistic/eslint-plugin": "5.4.0",
18
+ "@stylistic/eslint-plugin": "5.5.0",
19
19
  "eslint-plugin-n": "17.23.1",
20
20
  "eslint-plugin-redos": "4.4.5",
21
21
  "globals": "16.4.0"
22
22
  },
23
- "packageManager": "pnpm@10.17.1",
23
+ "packageManager": "pnpm@10.19.0",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  }
package/rules/js.js CHANGED
@@ -241,6 +241,7 @@ export const rules = {
241
241
  '@stylistic/curly-newline': 'off', // Too much config
242
242
  '@stylistic/dot-location': ['error', 'property'],
243
243
  '@stylistic/eol-last': 'error',
244
+ '@stylistic/exp-list-style': 'off', // Still experimental
244
245
  '@stylistic/function-call-argument-newline': ['error', 'consistent'],
245
246
  '@stylistic/function-call-spacing': 'error',
246
247
  '@stylistic/function-paren-newline': ['error', 'consistent'],
@@ -291,6 +292,7 @@ export const rules = {
291
292
  ignoreStrings: true,
292
293
  ignoreTemplateLiterals: true,
293
294
  ignoreUrls: true,
295
+ ignorePattern: '^\\s*\\/\\/ eslint-',
294
296
  }],
295
297
  '@stylistic/max-statements-per-line': 'off',
296
298
  '@stylistic/member-delimiter-style': 'off',
package/rules/jsdoc.js CHANGED
@@ -19,6 +19,7 @@ export const rules = {
19
19
  'jsdoc/check-values': 'error',
20
20
  'jsdoc/convert-to-jsdoc-comments': 'off', // Seems odd
21
21
  'jsdoc/empty-tags': 'error',
22
+ 'jsdoc/escape-inline-tags': 'warn', // Provisional.
22
23
  'jsdoc/implements-on-classes': 'error',
23
24
  'jsdoc/imports-as-dependencies': 'error',
24
25
  'jsdoc/informative-docs': 'off', // This sounds annoying
@@ -65,6 +66,7 @@ export const rules = {
65
66
  'jsdoc/require-returns-type': 'error',
66
67
  'jsdoc/require-tags': 'off', // Not useful
67
68
  'jsdoc/require-template': 'error',
69
+ 'jsdoc/require-template-description': 'error',
68
70
  'jsdoc/require-throws': 'error',
69
71
  'jsdoc/require-throws-description': 'error',
70
72
  'jsdoc/require-throws-type': 'error',
@@ -75,6 +77,10 @@ export const rules = {
75
77
  'jsdoc/sort-tags': 'error',
76
78
  'jsdoc/tag-lines': 'off',
77
79
  'jsdoc/text-escaping': 'off', // Painful
80
+ 'jsdoc/ts-method-signature-style': ['error', 'method'],
81
+ 'jsdoc/ts-no-empty-object-type': 'error',
82
+ 'jsdoc/ts-no-unnecessary-template-expression': 'error',
83
+ 'jsdoc/ts-prefer-function-type': 'error',
78
84
  'jsdoc/type-formatting': 'off', // Experimental
79
- 'jsdoc/valid-types': 'error',
85
+ 'jsdoc/valid-types': 'off', // Let TS check.
80
86
  };
package/ts.js CHANGED
@@ -28,4 +28,24 @@ blob.languageOptions.parserOptions = {
28
28
  project: true,
29
29
  };
30
30
 
31
- export default [blob];
31
+ // Allow importing .ts files directly in tests, for now.
32
+ const testBlob = {...blob};
33
+ testBlob.files = ['**/test/**/*.ts'];
34
+ testBlob.settings = {
35
+ n: {
36
+ // Ensure that importing real .js files works
37
+ typescriptExtensionMap: [
38
+ ['', '.js'],
39
+ ['.js', '.js'],
40
+ ['.ts', '.ts'],
41
+ ['.cts', '.cjs'],
42
+ ['.mts', '.mjs'],
43
+ ['.tsx', '.js'],
44
+ ],
45
+ },
46
+ };
47
+
48
+ export default [
49
+ blob,
50
+ testBlob,
51
+ ];