@cto.af/eslint-config 4.0.0 → 4.0.2

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 (3) hide show
  1. package/package.json +10 -35
  2. package/rules/ts.js +2 -1
  3. package/ts.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cto.af/eslint-config",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "hildjj's lint rules",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,47 +15,22 @@
15
15
  "license": "MIT",
16
16
  "repository": "cto-af/eslint-config",
17
17
  "dependencies": {
18
- "@stylistic/eslint-plugin": "1.6.3",
18
+ "@stylistic/eslint-plugin": "1.7.0",
19
19
  "eslint-plugin-n": "16.6.2",
20
- "globals": "14.0.0"
21
- },
22
- "peerDependencies": {
23
- "eslint": "~8",
24
- "eslint-plugin-ava": "~14",
25
- "eslint-plugin-jsdoc": "~48",
26
- "eslint-plugin-markdown": "~4",
27
- "typescript": "~5",
28
- "typescript-eslint": "~7"
29
- },
30
- "peerDependenciesMeta": {
31
- "eslint-plugin-ava": {
32
- "optional": true
33
- },
34
- "eslint-plugin-jsdoc": {
35
- "optional": true
36
- },
37
- "eslint-plugin-markdown": {
38
- "optional": true
39
- },
40
- "typescript": {
41
- "optional": true
42
- },
43
- "typescript-eslint": {
44
- "optional": true
45
- }
20
+ "globals": "15.0.0"
46
21
  },
47
22
  "devDependencies": {
48
23
  "@hildjj/sort-rules": "link:sort-rules",
49
24
  "eslint": "^8.57.0",
50
- "eslint-find-rules": "4.1.0",
25
+ "eslint-find-rules": "^4.1.0",
51
26
  "eslint-plugin-ava": "^14.0.0",
52
- "eslint-plugin-jsdoc": "^48.2.0",
53
- "eslint-plugin-markdown": "4.0.1",
54
- "npm-check-updates": "16.14.15",
55
- "typescript": "5.3.3",
56
- "typescript-eslint": "7.1.1"
27
+ "eslint-plugin-jsdoc": "^48.2.2",
28
+ "eslint-plugin-markdown": "^4.0.1",
29
+ "npm-check-updates": "^16.14.18",
30
+ "typescript": "^5.4.3",
31
+ "typescript-eslint": "^7.5.0"
57
32
  },
58
- "packageManager": "pnpm@8.15.4",
33
+ "packageManager": "pnpm@8.15.6",
59
34
  "engines": {
60
35
  "node": ">=18"
61
36
  }
package/rules/ts.js CHANGED
@@ -129,7 +129,6 @@ module.exports = {
129
129
  '@typescript-eslint/no-restricted-imports': 'off', // Not needed
130
130
  '@typescript-eslint/no-shadow': 'error',
131
131
  '@typescript-eslint/no-this-alias': 'error',
132
- '@typescript-eslint/no-throw-literal': 'error',
133
132
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', // Can't config
134
133
  '@typescript-eslint/no-unnecessary-condition': 'off', // Can't config
135
134
  '@typescript-eslint/no-unnecessary-qualifier': 'off', // Can't config
@@ -160,6 +159,7 @@ module.exports = {
160
159
  '@typescript-eslint/no-useless-template-literals': 'error',
161
160
  '@typescript-eslint/no-var-requires': 'error',
162
161
  '@typescript-eslint/non-nullable-type-assertion-style': 'off', // Can't config
162
+ '@typescript-eslint/only-throw-error': 'error',
163
163
  '@typescript-eslint/parameter-properties': 'error',
164
164
  '@typescript-eslint/prefer-as-const': 'error',
165
165
  '@typescript-eslint/prefer-destructuring': 'error',
@@ -193,6 +193,7 @@ module.exports = {
193
193
  '@typescript-eslint/typedef': 'error',
194
194
  '@typescript-eslint/unbound-method': 'off', // Can't config
195
195
  '@typescript-eslint/unified-signatures': 'off', // Too hard
196
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
196
197
 
197
198
  // These are the stylistic rules that require TS. All of the
198
199
  // others from the JS rules should work as-is.
package/ts.js CHANGED
@@ -13,4 +13,9 @@ module.exports = [{
13
13
  ...tslint.configs.base,
14
14
  rules,
15
15
  }];
16
- module.exports[0].languageOptions.parserOptions.project = true;
16
+
17
+ module.exports[0].languageOptions.parserOptions = {
18
+ // It's undefined for now, but just in case.
19
+ ...module.exports[0].languageOptions.parserOptions,
20
+ project: true,
21
+ };