eslint-config-tamia 9.2.2 → 9.3.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/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.2.2",
4
+ "version": "9.3.0",
5
5
  "type": "module",
6
6
  "main": "index.mjs",
7
7
  "exports": {
@@ -42,19 +42,19 @@
42
42
  "homepage": "https://github.com/sapegin/eslint-config-tamia",
43
43
  "devDependencies": {
44
44
  "@types/eslint__js": "^8.42.3",
45
- "@types/react": "^18.3.5",
45
+ "@types/react": "^19.1.13",
46
46
  "eslint": ">=9.16",
47
- "react": "^18.3.1",
48
- "vitest": "^2.1.8"
47
+ "react": "^19.1.1",
48
+ "vitest": "^3.2.4"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "eslint": ">=9.7"
52
52
  },
53
53
  "dependencies": {
54
- "@eslint/js": "^9.16.0",
55
- "eslint-plugin-react": "^7.37.2",
56
- "eslint-plugin-unicorn": "^56.0.1",
57
- "globals": "^15.13.0",
58
- "typescript-eslint": "^8.17.0"
54
+ "@eslint/js": "^9.36.0",
55
+ "eslint-plugin-react": "^7.37.5",
56
+ "eslint-plugin-unicorn": "^61.0.2",
57
+ "globals": "^16.4.0",
58
+ "typescript-eslint": "^8.44.1"
59
59
  }
60
60
  }
@@ -5,7 +5,7 @@ import js from '@eslint/js';
5
5
  export default [
6
6
  js.configs.recommended,
7
7
  {
8
- files: ['**/*.{js,mjs,cjs,jsx,ts,tsx,astro}'],
8
+ files: ['**/*.{js,jsx,mjs,cjs,ts,tsx,mts,mtsx,astro}'],
9
9
  languageOptions: {
10
10
  globals: {
11
11
  ...globals.es2024,
package/rules/react.mjs CHANGED
@@ -4,7 +4,7 @@ import react from 'eslint-plugin-react';
4
4
  /** @type { import("eslint").Linter.FlatConfig[] } */
5
5
  export default [
6
6
  {
7
- files: ['**/*.{js,jsx,mjs,cjs,tsx}'],
7
+ files: ['**/*.{js,jsx,mjs,cjs,tsx,mts,mtsx,spec.js,test.js}'],
8
8
  ...react.configs.flat.recommended,
9
9
  languageOptions: {
10
10
  ...react.configs.flat.recommended.languageOptions,
@@ -17,7 +17,7 @@ const recommendedConfig = findConfig('typescript-eslint/recommended');
17
17
  export default [
18
18
  {
19
19
  // Only apply to files with TypeScript
20
- files: ['**/*.{ts,tsx,astro}'],
20
+ files: ['**/*.{ts,tsx,mts,mtsx,astro}'],
21
21
 
22
22
  // Copy the basic options from the recommended config
23
23
  languageOptions: baseConfig.languageOptions,
@@ -60,7 +60,7 @@ export default [
60
60
  {
61
61
  selector: 'property',
62
62
  // Null is a requirement
63
-
63
+
64
64
  format: null,
65
65
  },
66
66
  {
package/rules/unicorn.mjs CHANGED
@@ -1,36 +1,23 @@
1
1
  import eslintPluginUnicorn from 'eslint-plugin-unicorn';
2
2
 
3
3
  export default [
4
- eslintPluginUnicorn.configs['flat/recommended'],
4
+ eslintPluginUnicorn.configs.unopinionated,
5
5
  {
6
6
  rules: {
7
- // Opinionated, doesn't allow Button.tsx
8
- 'unicorn/filename-case': 'off',
9
- // Opinionated, sometimes you need it
10
- 'unicorn/no-array-reduce': 'off',
11
- // This is too opinionated
12
- 'unicorn/no-magic-array-flat-depth': 'off',
13
- // JavaScript and third-party libraries still rely too much on `null`
14
- 'unicorn/no-null': 'off',
15
- // I don't need this
16
- 'unicorn/no-process-exit': 'off',
17
7
  // Prevents explicitly exporting `undefined` as a value:
18
- // `return x.length > 0 x : undefined`
8
+ // - `return x.length > 0 x : undefined`
19
9
  'unicorn/no-useless-undefined': 'off',
20
- // This breaks a lot of code, like `typeof window` to detect that
21
- // we're in the browser
10
+ // This breaks a lot of code, like `typeof window` to detect that we're in
11
+ // the browser
22
12
  'unicorn/prefer-global-this': 'off',
23
- // Prefer reading a JSON file as a buffer
13
+ // Prefer reading a JSON file as a buffer. Buffers can be passed directly to
14
+ // JSON.parse()
24
15
  'unicorn/prefer-json-parse-buffer': 'error',
25
- // Set.has() might be faster than Array.includes() but who cares
26
- // if the array is short. Set is less readable
16
+ // Set.has() might be faster than Array.includes() but who cares if the array
17
+ // is short. Set is less readable
27
18
  'unicorn/prefer-set-has': 'off',
28
- // Reduces readability
19
+ // Ternaries often reduce readability
29
20
  'unicorn/prefer-ternary': 'off',
30
- // Disable abbreviation replacements because it breaks many
31
- // established naming conventions and often produces ugly code, like
32
- // `import { vars as variables } from '.'`
33
- 'unicorn/prevent-abbreviations': 'off',
34
21
  },
35
22
  },
36
23
  ];