@cto.af/eslint-config 5.0.4 → 5.1.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/js.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import globals from 'globals';
2
2
  import n from 'eslint-plugin-n';
3
+ import redos from 'eslint-plugin-redos';
3
4
  import {rules} from './rules/js.js';
4
5
  import stylistic from '@stylistic/eslint-plugin';
5
6
 
@@ -13,6 +14,7 @@ export default [{
13
14
  plugins: {
14
15
  '@stylistic': stylistic,
15
16
  n,
17
+ redos,
16
18
  },
17
19
  languageOptions: {
18
20
  globals: globals.node,
package/json.js CHANGED
@@ -13,7 +13,7 @@ export default [
13
13
  rules,
14
14
  },
15
15
  {
16
- files: ['**/*.jsonc', '.vscode/*.json', 'tsconfig.json'],
16
+ files: ['**/*.jsonc', '.vscode/*.json', '**/tsconfig.json'],
17
17
  language: 'json/jsonc',
18
18
  languageOptions: {
19
19
  allowTrailingCommas: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cto.af/eslint-config",
3
- "version": "5.0.4",
3
+ "version": "5.1.0",
4
4
  "description": "hildjj's lint rules",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -14,12 +14,12 @@
14
14
  "url": "git+https://github.com/cto-af/eslint-config.git"
15
15
  },
16
16
  "dependencies": {
17
- "@eslint/json": "0.6.0",
18
- "@stylistic/eslint-plugin": "2.10.1",
19
- "eslint-plugin-n": "17.12.0",
20
- "globals": "15.12.0"
17
+ "@eslint/json": "0.8.0",
18
+ "@stylistic/eslint-plugin": "2.11.0",
19
+ "eslint-plugin-n": "17.14.0",
20
+ "globals": "15.13.0"
21
21
  },
22
- "packageManager": "pnpm@9.12.3",
22
+ "packageManager": "pnpm@9.14.4",
23
23
  "engines": {
24
24
  "node": ">=18"
25
25
  }
package/rules/js.js CHANGED
@@ -385,4 +385,7 @@ export const rules = {
385
385
  // Not yet
386
386
  'n/prefer-promises/dns': 'off',
387
387
  'n/prefer-promises/fs': 'off',
388
+
389
+ // [ReDoS](https://makenowjust-labs.github.io/recheck/docs/usage/as-eslint-plugin/)
390
+ 'redos/no-vulnerable': 'error',
388
391
  };
package/rules/json.js CHANGED
@@ -2,4 +2,6 @@ export const rules = {
2
2
  // [Rules](https://github.com/eslint/json?tab=readme-ov-file#rules)
3
3
  'json/no-duplicate-keys': 'error',
4
4
  'json/no-empty-keys': 'error',
5
+ 'json/no-unnormalized-keys': ['error', {form: 'NFD'}],
6
+ 'json/no-unsafe-values': 'error',
5
7
  };
package/rules/ts.js CHANGED
@@ -115,6 +115,7 @@ export const rules = {
115
115
  '@typescript-eslint/no-unsafe-function-type': 'error',
116
116
  '@typescript-eslint/no-unsafe-member-access': 'off', // Can't config
117
117
  '@typescript-eslint/no-unsafe-return': 'off', // Can't config
118
+ '@typescript-eslint/no-unsafe-type-assertion': 'off', // Used all the time
118
119
  '@typescript-eslint/no-unsafe-unary-minus': 'error',
119
120
  '@typescript-eslint/no-unused-expressions': 'error',
120
121
  '@typescript-eslint/no-unused-vars': [
@@ -153,6 +154,7 @@ export const rules = {
153
154
  '@typescript-eslint/prefer-return-this-type': 'off', // Can't config
154
155
  '@typescript-eslint/prefer-string-starts-ends-with': 'off', // Can't config
155
156
  '@typescript-eslint/promise-function-async': 'off', // Can't config
157
+ '@typescript-eslint/related-getter-setter-pairs': 'error',
156
158
  '@typescript-eslint/require-array-sort-compare': 'off', // Can't config
157
159
  '@typescript-eslint/require-await': 'error',
158
160
  '@typescript-eslint/restrict-plus-operands': 'off', // Can't config