eslint-config-tamia 9.4.3 → 9.5.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/Readme.md CHANGED
@@ -12,6 +12,7 @@ All presets include the following ESLint plugins:
12
12
  - [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan)
13
13
  - [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
14
14
  - [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)
15
+ - [eslint-plugin-washing-code](https://github.com/sapegin/eslint-plugin-washing-code/)
15
16
 
16
17
  ## Usage
17
18
 
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.4.3",
4
+ "version": "9.5.0",
5
5
  "engines": {
6
6
  "node": ">=22"
7
7
  },
@@ -45,9 +45,9 @@
45
45
  "homepage": "https://github.com/sapegin/eslint-config-tamia",
46
46
  "devDependencies": {
47
47
  "@types/eslint__js": "^8.42.3",
48
- "@types/react": "^19.1.13",
49
- "eslint": ">=9.16",
50
- "react": "^19.1.1",
48
+ "@types/react": "^19.2.2",
49
+ "eslint": ">=9.37",
50
+ "react": "^19.2.0",
51
51
  "vitest": "^3.2.4"
52
52
  },
53
53
  "peerDependencies": {
@@ -55,12 +55,13 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
58
- "@eslint/js": "9.36.0",
59
- "@vitest/eslint-plugin": "1.3.16",
58
+ "@eslint/js": "9.37.0",
59
+ "@vitest/eslint-plugin": "1.3.19",
60
60
  "eslint-plugin-de-morgan": "2.0.0",
61
61
  "eslint-plugin-react": "7.37.5",
62
62
  "eslint-plugin-unicorn": "61.0.2",
63
+ "eslint-plugin-washing-code": "1.0.0",
63
64
  "globals": "16.4.0",
64
- "typescript-eslint": "8.44.1"
65
+ "typescript-eslint": "8.46.1"
65
66
  }
66
67
  }
package/rules/misc.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import comments from '@eslint-community/eslint-plugin-eslint-comments/configs';
2
2
  import deMorgan from 'eslint-plugin-de-morgan';
3
+ import washingCode from 'eslint-plugin-washing-code';
3
4
 
4
5
  export default [
5
6
  // Disallows useless ESLint disable comments, etc.
@@ -7,6 +8,8 @@ export default [
7
8
  // Enforces logical consistency by transforming negated boolean expressions
8
9
  // according to De Morgan’s laws
9
10
  deMorgan.configs.recommended,
11
+ // Rules inspired by Washing your code book
12
+ washingCode.configs.recommended,
10
13
  {
11
14
  rules: {},
12
15
  },
@@ -4,14 +4,16 @@ import tseslint from 'typescript-eslint';
4
4
  // produces false positives, for examples, in CommonJS files
5
5
 
6
6
  function findConfig(name) {
7
- return tseslint.configs.recommended.find((x) => x.name === name);
7
+ return tseslint.configs.recommendedTypeChecked.find((x) => x.name === name);
8
8
  }
9
9
 
10
10
  const baseConfig = findConfig('typescript-eslint/base');
11
11
  const eslintRecommendedConfig = findConfig(
12
12
  'typescript-eslint/eslint-recommended'
13
13
  );
14
- const recommendedConfig = findConfig('typescript-eslint/recommended');
14
+ const recommendedTypeCheckedConfig = findConfig(
15
+ 'typescript-eslint/recommended-type-checked'
16
+ );
15
17
 
16
18
  /** @type { import("eslint").Linter.FlatConfig[] } */
17
19
  export default [
@@ -19,22 +21,24 @@ export default [
19
21
  // Only apply to files with TypeScript
20
22
  files: ['**/*.{ts,tsx,mts,mtsx,astro}'],
21
23
 
22
- // Copy the basic options from the recommended config
23
- languageOptions: baseConfig.languageOptions,
24
+ // Apply default TypeScript options and enable type checking
25
+ languageOptions: {
26
+ ...baseConfig.languageOptions,
27
+ parserOptions: {
28
+ projectService: true,
29
+ },
30
+ },
24
31
  plugins: baseConfig.plugins,
25
32
 
26
33
  rules: {
27
34
  // Recommended rules
28
35
  ...eslintRecommendedConfig.rules,
29
- ...recommendedConfig.rules,
36
+ ...recommendedTypeCheckedConfig.rules,
30
37
 
31
38
  // Disable generic rules that conflict with TypeScript
32
39
  // Most of them are disabled in typescript-eslint/eslint-recommended
33
40
  // config, but here are a few more
34
41
  camelcase: 'off',
35
- 'no-array-constructor': 'off',
36
- 'no-unused-vars': 'off',
37
- 'no-unused-expressions': 'off',
38
42
  'no-use-before-define': 'off',
39
43
  'no-shadow': 'off',
40
44
  // Conflicts with TypeScript check for unreachable code
@@ -88,8 +92,6 @@ export default [
88
92
  '@typescript-eslint/no-inferrable-types': 'error',
89
93
  // Disallow non-null assertions using the ! postfix operator
90
94
  '@typescript-eslint/no-non-null-assertion': 'error',
91
- // Disallow unused expressions
92
- '@typescript-eslint/no-unused-expressions': 'error',
93
95
  // Disallow variable declarations from shadowing variables declared
94
96
  // in the outer scope
95
97
  '@typescript-eslint/no-shadow': 'error',
package/rules/unicorn.mjs CHANGED
@@ -15,6 +15,13 @@ export default [
15
15
  'unicorn/prefer-set-has': 'off',
16
16
  // Ternaries often reduce readability
17
17
  'unicorn/prefer-ternary': 'off',
18
+ // Avoid conflicts with Prettier
19
+ 'unicorn/escape-case': ['warn', 'lowercase'],
20
+ // Avoid conflicts with Prettier
21
+ 'unicorn/number-literal-case': [
22
+ 'warn',
23
+ { hexadecimalValue: 'lowercase' },
24
+ ],
18
25
  },
19
26
  },
20
27
  ];