@map-colonies/eslint-config 7.1.0 → 7.2.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.
@@ -0,0 +1,15 @@
1
+ declare const vitestConfig: import("eslint/config").Config[];
2
+ /**
3
+ * The default export for the Vitest configuration.
4
+ * This configuration is used to set up and customize the behavior of Vitest,
5
+ * a JavaScript testing framework.
6
+ *
7
+ * @group configs
8
+ * @example
9
+ * import vitestConfig from '@map-colonies/eslint-config/vitest';
10
+ * import { defineConfig } from 'eslint/config';
11
+ *
12
+ * export default defineConfig(vitestConfig);
13
+ */
14
+ export default vitestConfig;
15
+ //# sourceMappingURL=vitest.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.d.mts","sourceRoot":"","sources":["../../src/configs/vitest.mts"],"names":[],"mappings":"AAMA,QAAA,MAAM,YAAY,kCAgBhB,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { defineConfig } from 'eslint/config';
2
+ import { importOrThrow } from '../internal/helpers.js';
3
+ const vitestPlugin = await importOrThrow('@vitest/eslint-plugin');
4
+ const vitestConfig = defineConfig({
5
+ name: 'map-colonies/vitest/rules',
6
+ files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'],
7
+ plugins: { vitest: vitestPlugin },
8
+ rules: {
9
+ ...vitestPlugin.configs.recommended.rules,
10
+ 'vitest/expect-expect': ['error', { assertFunctionNames: ['expect', 'expectTypeOf', 'expectResponseStatus'] }],
11
+ 'vitest/padding-around-all': 'warn',
12
+ 'vitest/prefer-expect-resolves': 'warn',
13
+ 'vitest/prefer-hooks-in-order': 'warn',
14
+ 'vitest/prefer-to-have-length': 'warn',
15
+ 'vitest/prefer-strict-boolean-matchers': 'warn',
16
+ 'vitest/require-top-level-describe': 'warn',
17
+ 'vitest/prefer-equality-matcher': 'warn',
18
+ 'vitest/valid-title': ['warn', { mustMatch: { it: ['^should .+.$'] } }],
19
+ },
20
+ });
21
+ /**
22
+ * The default export for the Vitest configuration.
23
+ * This configuration is used to set up and customize the behavior of Vitest,
24
+ * a JavaScript testing framework.
25
+ *
26
+ * @group configs
27
+ * @example
28
+ * import vitestConfig from '@map-colonies/eslint-config/vitest';
29
+ * import { defineConfig } from 'eslint/config';
30
+ *
31
+ * export default defineConfig(vitestConfig);
32
+ */
33
+ export default vitestConfig;
34
+ //# sourceMappingURL=vitest.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.mjs","sourceRoot":"","sources":["../../src/configs/vitest.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,YAAY,GAAG,MAAM,aAAa,CAA0B,uBAAuB,CAAC,CAAC;AAE3F,MAAM,YAAY,GAAG,YAAY,CAAC;IAChC,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,CAAC;IACzE,OAAO,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;IACjC,KAAK,EAAE;QACL,GAAG,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK;QACzC,sBAAsB,EAAE,CAAC,OAAO,EAAE,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,sBAAsB,CAAC,EAAE,CAAC;QAC9G,2BAA2B,EAAE,MAAM;QACnC,+BAA+B,EAAE,MAAM;QACvC,8BAA8B,EAAE,MAAM;QACtC,8BAA8B,EAAE,MAAM;QACtC,uCAAuC,EAAE,MAAM;QAC/C,mCAAmC,EAAE,MAAM;QAC3C,gCAAgC,EAAE,MAAM;QACxC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC;KACxE;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@map-colonies/eslint-config",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "eslint configs for map colonies organization",
5
5
  "type": "module",
6
6
  "exports": {
@@ -16,6 +16,10 @@
16
16
  "types": "./dist/configs/jest.d.mts",
17
17
  "import": "./dist/configs/jest.mjs"
18
18
  },
19
+ "./vitest": {
20
+ "types": "./dist/configs/vitest.d.mts",
21
+ "import": "./dist/configs/vitest.mjs"
22
+ },
19
23
  "./helpers": {
20
24
  "types": "./dist/helpers.d.mts",
21
25
  "import": "./dist/helpers.mjs"
@@ -33,6 +37,7 @@
33
37
  "eslint-plugin-jest": "^28.11.0 || ^29.0.0",
34
38
  "eslint-plugin-react": "^7.37.4",
35
39
  "eslint-plugin-react-hooks": "^5.1.0 || ^7.0.0",
40
+ "@vitest/eslint-plugin": "^1.6.7",
36
41
  "globals": "^15.14.0 || ^17.0.0"
37
42
  },
38
43
  "peerDependenciesMeta": {
@@ -45,6 +50,9 @@
45
50
  "eslint-plugin-react-hooks": {
46
51
  "optional": true
47
52
  },
53
+ "@vitest/eslint-plugin": {
54
+ "optional": true
55
+ },
48
56
  "globals": {
49
57
  "optional": true
50
58
  }
@@ -65,9 +73,10 @@
65
73
  "eslint-plugin-react-hooks": "7.0.1",
66
74
  "eslint-plugin-jest": "29.12.1",
67
75
  "eslint-plugin-react": "7.37.5",
76
+ "@vitest/eslint-plugin": "1.6.7",
68
77
  "vitest": "^4.0.15",
69
- "@map-colonies/tsconfig": "^2.0.0",
70
- "vitest-config": "^0.0.0"
78
+ "vitest-config": "^0.0.0",
79
+ "@map-colonies/tsconfig": "^2.0.0"
71
80
  },
72
81
  "scripts": {
73
82
  "lint": "eslint .",