eslint-config-tamia 9.1.13 → 9.1.14

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 +6 -6
  2. package/rules/unicorn.mjs +21 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-config-tamia",
3
3
  "description": "Tâmia ESLint config",
4
- "version": "9.1.13",
4
+ "version": "9.1.14",
5
5
  "type": "module",
6
6
  "main": "index.mjs",
7
7
  "exports": {
@@ -42,8 +42,8 @@
42
42
  "homepage": "https://github.com/tamiadev/eslint-config-tamia",
43
43
  "devDependencies": {
44
44
  "@types/eslint__js": "^8.42.3",
45
- "@types/react": "^18.3.3",
46
- "eslint": ">=9.8",
45
+ "@types/react": "^18.3.5",
46
+ "eslint": ">=9.10",
47
47
  "react": "^18.3.1",
48
48
  "vitest": "^2.0.5"
49
49
  },
@@ -51,10 +51,10 @@
51
51
  "eslint": ">=9.7"
52
52
  },
53
53
  "dependencies": {
54
- "@eslint/js": "^9.8.0",
55
- "eslint-plugin-react": "^7.35.0",
54
+ "@eslint/js": "^9.10.0",
55
+ "eslint-plugin-react": "^7.35.2",
56
56
  "eslint-plugin-unicorn": "^55.0.0",
57
57
  "globals": "^15.9.0",
58
- "typescript-eslint": "^8.0.0"
58
+ "typescript-eslint": "^8.4.0"
59
59
  }
60
60
  }
package/rules/unicorn.mjs CHANGED
@@ -4,6 +4,27 @@ export default [
4
4
  eslintPluginUnicorn.configs['flat/recommended'],
5
5
  {
6
6
  rules: {
7
+ // Prefer reading a JSON file as a buffer
8
+ 'unicorn/prefer-json-parse-buffer': 'error',
9
+ // Enforce better typography in strings
10
+ 'unicorn/string-content': [
11
+ 'error',
12
+ {
13
+ patterns: {
14
+ // Ellipsis: ... → …
15
+ '\\.\\.\\.': '…',
16
+ // Apostrophe: ' → ’
17
+ "’": '’',
18
+ // Fancy arrows: -> → →
19
+ '→': '→',
20
+ // Fancy quotes: " → “ or ”
21
+ '“”': {
22
+ suggest: '“”',
23
+ message: 'Please use `“` or `”` instead of `“”`.',
24
+ },
25
+ },
26
+ },
27
+ ],
7
28
  // Reduces readability
8
29
  'unicorn/prefer-ternary': 'off',
9
30
  // Opinionated, doesn't allow Button.tsx