@viclafouch/eslint-config-viclafouch 4.7.0 → 4.8.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.
Files changed (2) hide show
  1. package/package.json +16 -16
  2. package/rules/typescript.js +21 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viclafouch/eslint-config-viclafouch",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "ESLint and Prettier Config from Victor de la Fouchardiere",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -24,33 +24,33 @@
24
24
  "license": "MIT",
25
25
  "homepage": "https://github.com/viclafouch/eslint-config-viclafouch#readme",
26
26
  "peerDependencies": {
27
- "eslint": "^8.56.0",
28
- "prettier": "^3.1.1",
29
- "typescript": "^5.3.3"
27
+ "eslint": "^8.57.0",
28
+ "prettier": "^3.2.5",
29
+ "typescript": "^5.4.3"
30
30
  },
31
31
  "dependencies": {
32
- "@babel/core": "^7.23.7",
33
- "@babel/eslint-parser": "^7.23.3",
34
- "@next/eslint-plugin-next": "^14.1.0",
35
- "@rushstack/eslint-patch": "^1.7.0",
32
+ "@babel/core": "^7.24.3",
33
+ "@babel/eslint-parser": "^7.24.1",
34
+ "@next/eslint-plugin-next": "^14.1.4",
35
+ "@rushstack/eslint-patch": "^1.8.0",
36
36
  "@total-typescript/ts-reset": "^0.5.1",
37
- "@typescript-eslint/eslint-plugin": "^6.19.1",
38
- "@typescript-eslint/parser": "^6.19.1",
37
+ "@typescript-eslint/eslint-plugin": "^7.4.0",
38
+ "@typescript-eslint/parser": "^7.4.0",
39
39
  "app-root-path": "^3.1.0",
40
40
  "babel-loader": "^9.1.3",
41
- "eslint": "^8.56.0",
41
+ "eslint": "^8.57.0",
42
42
  "eslint-config-prettier": "^9.1.0",
43
43
  "eslint-plugin-import": "^2.29.1",
44
44
  "eslint-plugin-jsx-a11y": "^6.8.0",
45
45
  "eslint-plugin-prettier": "^5.1.3",
46
46
  "eslint-plugin-promise": "^6.1.1",
47
- "eslint-plugin-react": "^7.33.2",
47
+ "eslint-plugin-react": "^7.34.1",
48
48
  "eslint-plugin-react-hooks": "^4.6.0",
49
- "eslint-plugin-simple-import-sort": "^10.0.0",
49
+ "eslint-plugin-simple-import-sort": "^12.0.0",
50
50
  "eslint-plugin-testing-library": "^6.2.0",
51
- "get-tsconfig": "^4.7.2",
52
- "prettier": "^3.2.4",
53
- "typescript": "^5.3.3"
51
+ "get-tsconfig": "^4.7.3",
52
+ "prettier": "^3.2.5",
53
+ "typescript": "^5.4.3"
54
54
  },
55
55
  "scripts": {
56
56
  "lint": "eslint .",
@@ -120,7 +120,27 @@ module.exports = {
120
120
 
121
121
  // Require consistently using T[] instead of Array<T>
122
122
  // https://typescript-eslint.io/rules/array-type
123
- '@typescript-eslint/array-type': 'error'
123
+ '@typescript-eslint/array-type': 'error',
124
+
125
+ // Forbid delete array, use splice for example
126
+ // https://typescript-eslint.io/rules/no-array-delete/
127
+ '@typescript-eslint/no-array-delete': 'error',
128
+
129
+ // Don't do array.filter(callback)[0], use arrat.find instead
130
+ // https://typescript-eslint.io/rules/prefer-find
131
+ '@typescript-eslint/prefer-find': 'error',
132
+
133
+ // Prefer to use String.startsWith and String.endsWith
134
+ // https://typescript-eslint.io/rules/prefer-string-starts-ends-with
135
+ '@typescript-eslint/prefer-string-starts-ends-with': 'error',
136
+
137
+ // Prefer to use unknown instead of any for error in catch callback
138
+ // https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
139
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
140
+
141
+ // No more "as Record<any, any>" in Array.reduce initial value, use generics
142
+ // https://typescript-eslint.io/rules/prefer-reduce-type-parameter
143
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error'
124
144
 
125
145
  // '@typescript-eslint/ban-types': [
126
146
  // 'error',