@h1fra/eslint-config 1.0.11 → 1.0.13

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@h1fra/eslint-config",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "repository": {
@@ -32,6 +32,7 @@
32
32
  "@eslint/js": "^9.23.0",
33
33
  "@typescript-eslint/eslint-plugin": "^8.28.0",
34
34
  "@typescript-eslint/parser": "^8.28.0",
35
+ "@vitest/eslint-plugin": "^1.1.38",
35
36
  "eslint": "^9.23.0",
36
37
  "eslint-config-prettier": "^10.1.1",
37
38
  "eslint-import-resolver-typescript": "^4.3.0",
@@ -41,10 +42,13 @@
41
42
  "eslint-plugin-unicorn": "^58.0.0",
42
43
  "globals": "^16.0.0",
43
44
  "prettier": "^3.5.3",
44
- "typescript-eslint": "^8.28.0"
45
+ "typescript-eslint": "^8.28.0",
46
+ "eslint-plugin-tailwindcss": "^3.18.2"
45
47
  },
46
48
  "peerDependencies": {
47
49
  "typescript": ">=5.0.0"
48
50
  },
49
- "devDependencies": {}
51
+ "devDependencies": {
52
+ "vitest": "3.0.9"
53
+ }
50
54
  }
@@ -1,5 +1,6 @@
1
1
  import eslint from '@eslint/js';
2
2
  import tsParser from '@typescript-eslint/parser';
3
+ import vitest from '@vitest/eslint-plugin';
3
4
  import prettier from 'eslint-config-prettier';
4
5
  import importEslint from 'eslint-plugin-import-x';
5
6
  import prettierRecommended from 'eslint-plugin-prettier/recommended';
@@ -191,5 +192,29 @@ export default tseslint.config(
191
192
  '@typescript-eslint/prefer-enum-initializers': 'error',
192
193
  '@typescript-eslint/switch-exhaustiveness-check': 'error',
193
194
  },
195
+ },
196
+ {
197
+ files: ['**/*.test.{ts,js,tsx,jsx}'], // or any other pattern
198
+ plugins: {
199
+ vitest,
200
+ },
201
+ rules: {
202
+ ...vitest.configs.recommended.rules,
203
+ 'vitest/consistent-test-it': 'error',
204
+ 'vitest/max-nested-describe': ['error', { max: 3 }],
205
+ 'vitest/no-conditional-expect': 'error',
206
+ 'vitest/no-duplicate-hooks': 'error',
207
+ 'vitest/no-focused-tests': 'error',
208
+ 'vitest/no-standalone-expect': 'error',
209
+ 'vitest/no-test-return-statement': 'error',
210
+ 'vitest/padding-around-all': 'error',
211
+ 'vitest/prefer-hooks-in-order': 'error',
212
+ 'vitest/prefer-hooks-on-top': 'error',
213
+ 'vitest/prefer-lowercase-title': 'error',
214
+ 'vitest/prefer-strict-equal': 'error',
215
+ 'vitest/prefer-todo': 'error',
216
+ 'vitest/require-to-throw-message': 'error',
217
+ 'vitest/valid-title': ['error', { mustMatch: { it: ['^should .+$'] } }],
218
+ },
194
219
  }
195
220
  );
@@ -5,7 +5,7 @@ import * as tseslint from 'typescript-eslint';
5
5
  export default [
6
6
  ...tseslint.configs.strict,
7
7
  ...tseslint.configs.stylistic,
8
- eslintPluginUnicorn.configs['flat/recommended'],
8
+ eslintPluginUnicorn.configs['recommended'],
9
9
  {
10
10
  files: ['**/*.{ts,mts,cts,tsx,mtsx}'],
11
11
  plugins: {
@@ -0,0 +1,5 @@
1
+ import eslintPluginTailwindcss from 'eslint-plugin-tailwindcss';
2
+
3
+ export default [
4
+ eslintPluginTailwindcss.configs['flat/recommended'],
5
+ ];