@marcalexiei/oxlint-config 1.2.0 → 1.3.1

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/dist/vitest.d.ts CHANGED
@@ -1,33 +1,89 @@
1
1
  declare const vitestConfig: {
2
- plugins: "vitest"[];
3
- rules: {
4
- 'vitest/consistent-each-for': (string | {
5
- describe: string;
6
- suite: string;
7
- it: string;
8
- test: string;
9
- })[];
10
- 'vitest/consistent-test-filename': (string | {
11
- pattern: string;
12
- allTestPattern: string;
13
- })[];
14
- 'vitest/consistent-vitest-vi': (string | {
15
- fn: string;
16
- })[];
17
- 'vitest/hoisted-apis-on-top': "error";
18
- 'vitest/no-conditional-tests': "error";
19
- 'vitest/no-import-node-test': "error";
20
- 'vitest/no-importing-vitest-globals': "off";
21
- 'vitest/prefer-called-once': "off";
22
- 'vitest/prefer-called-times': "error";
23
- 'vitest/prefer-describe-function-title': "error";
24
- 'vitest/prefer-expect-type-of': "error";
25
- 'vitest/prefer-import-in-mock': "error";
26
- 'vitest/prefer-to-be-falsy': "error";
27
- 'vitest/prefer-to-be-object': "error";
28
- 'vitest/prefer-to-be-truthy': "error";
29
- 'vitest/require-local-test-context-for-concurrent-snapshots': "error";
30
- 'vitest/warn-todo': "error";
2
+ readonly plugins: ["jest", "vitest"];
3
+ readonly rules: {
4
+ readonly 'jest/consistent-test-it': "error";
5
+ readonly 'jest/expect-expect': "error";
6
+ readonly 'jest/max-expects': "error";
7
+ readonly 'jest/max-nested-describe': ["error", {
8
+ readonly max: 3;
9
+ }];
10
+ readonly 'jest/no-alias-methods': "error";
11
+ readonly 'jest/no-commented-out-tests': "error";
12
+ readonly 'jest/no-conditional-expect': "error";
13
+ readonly 'jest/no-conditional-in-test': "error";
14
+ readonly 'jest/no-confusing-set-timeout': "off";
15
+ readonly 'jest/no-deprecated-functions': "off";
16
+ readonly 'jest/no-disabled-tests': "error";
17
+ readonly 'jest/no-done-callback': "off";
18
+ readonly 'jest/no-duplicate-hooks': "error";
19
+ readonly 'jest/no-export': "error";
20
+ readonly 'jest/no-focused-tests': "error";
21
+ readonly 'jest/no-hooks': "off";
22
+ readonly 'jest/no-identical-title': "error";
23
+ readonly 'jest/no-interpolation-in-snapshots': "error";
24
+ readonly 'jest/no-jasmine-globals': "off";
25
+ readonly 'jest/no-large-snapshots': "error";
26
+ readonly 'jest/no-mocks-import': "error";
27
+ readonly 'jest/no-restricted-jest-methods': "error";
28
+ readonly 'jest/no-restricted-matchers': "error";
29
+ readonly 'jest/no-standalone-expect': "error";
30
+ readonly 'jest/no-test-prefixes': "error";
31
+ readonly 'jest/no-test-return-statement': "error";
32
+ readonly 'jest/no-unneeded-async-expect-function': "error";
33
+ readonly 'jest/no-untyped-mock-factory': "off";
34
+ readonly 'jest/padding-around-test-blocks': "off";
35
+ readonly 'jest/prefer-called-with': "error";
36
+ readonly 'jest/prefer-comparison-matcher': "error";
37
+ readonly 'jest/prefer-each': "error";
38
+ readonly 'jest/prefer-equality-matcher': "error";
39
+ readonly 'jest/prefer-expect-resolves': "error";
40
+ readonly 'jest/prefer-hooks-in-order': "error";
41
+ readonly 'jest/prefer-hooks-on-top': "error";
42
+ readonly 'jest/prefer-jest-mocked': "off";
43
+ readonly 'jest/prefer-lowercase-title': "off";
44
+ readonly 'jest/prefer-mock-promise-shorthand': "error";
45
+ readonly 'jest/prefer-mock-return-shorthand': "error";
46
+ readonly 'jest/prefer-spy-on': "error";
47
+ readonly 'jest/prefer-strict-equal': "error";
48
+ readonly 'jest/prefer-to-be': "error";
49
+ readonly 'jest/prefer-to-contain': "error";
50
+ readonly 'jest/prefer-to-have-been-called': "off";
51
+ readonly 'jest/prefer-to-have-been-called-times': "off";
52
+ readonly 'jest/prefer-to-have-length': "error";
53
+ readonly 'jest/prefer-todo': "error";
54
+ readonly 'jest/require-hook': "error";
55
+ readonly 'jest/require-to-throw-message': "error";
56
+ readonly 'jest/require-top-level-describe': "error";
57
+ readonly 'jest/valid-describe-callback': "error";
58
+ readonly 'jest/valid-expect': "error";
59
+ readonly 'jest/valid-title': "off";
60
+ readonly 'vitest/consistent-each-for': ["error", {
61
+ readonly describe: "each";
62
+ readonly suite: "each";
63
+ readonly it: "each";
64
+ readonly test: "each";
65
+ }];
66
+ readonly 'vitest/consistent-test-filename': ["error", {
67
+ readonly pattern: ".*\\.spec\\.[tj]sx?$";
68
+ readonly allTestPattern: ".*\\.(test|spec)\\.[tj]sx?$";
69
+ }];
70
+ readonly 'vitest/consistent-vitest-vi': ["error", {
71
+ readonly fn: "vi";
72
+ }];
73
+ readonly 'vitest/hoisted-apis-on-top': "error";
74
+ readonly 'vitest/no-conditional-tests': "error";
75
+ readonly 'vitest/no-import-node-test': "error";
76
+ readonly 'vitest/no-importing-vitest-globals': "off";
77
+ readonly 'vitest/prefer-called-once': "off";
78
+ readonly 'vitest/prefer-called-times': "error";
79
+ readonly 'vitest/prefer-describe-function-title': "error";
80
+ readonly 'vitest/prefer-expect-type-of': "error";
81
+ readonly 'vitest/prefer-import-in-mock': "error";
82
+ readonly 'vitest/prefer-to-be-falsy': "error";
83
+ readonly 'vitest/prefer-to-be-object': "error";
84
+ readonly 'vitest/prefer-to-be-truthy': "error";
85
+ readonly 'vitest/require-local-test-context-for-concurrent-snapshots': "error";
86
+ readonly 'vitest/warn-todo': "error";
31
87
  };
32
88
  };
33
89
  export { vitestConfig, vitestConfig as default };
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../src/vitest.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDhB,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../src/vitest.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIe,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI,OAAO,EAAE,CAAC"}
package/dist/vitest.js CHANGED
@@ -1,7 +1,75 @@
1
- import { defineConfig } from 'oxlint';
2
- const vitestConfig = defineConfig({
3
- plugins: ['vitest'],
1
+ const vitestConfig = {
2
+ plugins: ['jest', 'vitest'],
4
3
  rules: {
4
+ //=============================================================================
5
+ // JEST
6
+ //=============================================================================
7
+ // https://oxc.rs/docs/guide/usage/linter/rules.html?sort=name&dir=asc&scope=jest
8
+ // https://oxc.rs/docs/guide/usage/linter/rules/jest/consistent-test-it
9
+ 'jest/consistent-test-it': 'error',
10
+ 'jest/expect-expect': 'error',
11
+ 'jest/max-expects': 'error',
12
+ 'jest/max-nested-describe': ['error', { max: 3 }],
13
+ 'jest/no-alias-methods': 'error',
14
+ 'jest/no-commented-out-tests': 'error',
15
+ 'jest/no-conditional-expect': 'error',
16
+ 'jest/no-conditional-in-test': 'error',
17
+ 'jest/no-confusing-set-timeout': 'off',
18
+ 'jest/no-deprecated-functions': 'off',
19
+ 'jest/no-disabled-tests': 'error',
20
+ 'jest/no-done-callback': 'off',
21
+ 'jest/no-duplicate-hooks': 'error',
22
+ 'jest/no-export': 'error',
23
+ 'jest/no-focused-tests': 'error',
24
+ // https://oxc.rs/docs/guide/usage/linter/rules/jest/no-hooks
25
+ 'jest/no-hooks': 'off',
26
+ 'jest/no-identical-title': 'error',
27
+ 'jest/no-interpolation-in-snapshots': 'error',
28
+ 'jest/no-jasmine-globals': 'off',
29
+ 'jest/no-large-snapshots': 'error',
30
+ 'jest/no-mocks-import': 'error',
31
+ 'jest/no-restricted-jest-methods': 'error',
32
+ 'jest/no-restricted-matchers': 'error',
33
+ 'jest/no-standalone-expect': 'error',
34
+ 'jest/no-test-prefixes': 'error',
35
+ 'jest/no-test-return-statement': 'error',
36
+ 'jest/no-unneeded-async-expect-function': 'error',
37
+ 'jest/no-untyped-mock-factory': 'off',
38
+ 'jest/padding-around-test-blocks': 'off',
39
+ 'jest/prefer-called-with': 'error',
40
+ 'jest/prefer-comparison-matcher': 'error',
41
+ 'jest/prefer-each': 'error',
42
+ 'jest/prefer-equality-matcher': 'error',
43
+ 'jest/prefer-expect-resolves': 'error',
44
+ 'jest/prefer-hooks-in-order': 'error',
45
+ 'jest/prefer-hooks-on-top': 'error',
46
+ 'jest/prefer-jest-mocked': 'off',
47
+ // https://oxc.rs/docs/guide/usage/linter/rules/jest/prefer-lowercase-title
48
+ 'jest/prefer-lowercase-title': 'off',
49
+ 'jest/prefer-mock-promise-shorthand': 'error',
50
+ 'jest/prefer-mock-return-shorthand': 'error',
51
+ 'jest/prefer-spy-on': 'error',
52
+ 'jest/prefer-strict-equal': 'error',
53
+ 'jest/prefer-to-be': 'error',
54
+ 'jest/prefer-to-contain': 'error',
55
+ 'jest/prefer-to-have-been-called': 'off',
56
+ 'jest/prefer-to-have-been-called-times': 'off',
57
+ 'jest/prefer-to-have-length': 'error',
58
+ 'jest/prefer-todo': 'error',
59
+ 'jest/require-hook': 'error',
60
+ // https://oxc.rs/docs/guide/usage/linter/rules/jest/require-to-throw-message
61
+ 'jest/require-to-throw-message': 'error',
62
+ 'jest/require-top-level-describe': 'error',
63
+ 'jest/valid-describe-callback': 'error',
64
+ 'jest/valid-expect': 'error',
65
+ // this rule is enabled by default when a test file is detected
66
+ // vitest allows to pass Function as parameters to infer the name
67
+ // https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title
68
+ 'jest/valid-title': 'off',
69
+ //=============================================================================
70
+ // VITEST
71
+ //=============================================================================
72
+ // https://oxc.rs/docs/guide/usage/linter/rules.html?sort=name&dir=asc&scope=vitest
5
73
  // https://oxc.rs/docs/guide/usage/linter/rules/vitest/consistent-each-for
6
74
  'vitest/consistent-each-for': [
7
75
  'error',
@@ -41,6 +109,6 @@ const vitestConfig = defineConfig({
41
109
  'vitest/require-local-test-context-for-concurrent-snapshots': 'error',
42
110
  'vitest/warn-todo': 'error',
43
111
  },
44
- });
112
+ };
45
113
  export { vitestConfig, vitestConfig as default };
46
114
  //# sourceMappingURL=vitest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.js","sourceRoot":"","sources":["../src/vitest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,YAAY,GAAG,YAAY,CAAC;IAChC,OAAO,EAAE,CAAC,QAAQ,CAAC;IAEnB,KAAK,EAAE;QACL,0EAA0E;QAC1E,4BAA4B,EAAE;YAC5B,OAAO;YACP;gBACE,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,MAAM;gBACb,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,MAAM;aACb;SACF;QAED,+EAA+E;QAC/E,iCAAiC,EAAE;YACjC,OAAO;YACP;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,cAAc,EAAE,6BAA6B;aAC9C;SACF;QAED,2EAA2E;QAC3E,6BAA6B,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QAEtD,4BAA4B,EAAE,OAAO;QACrC,6BAA6B,EAAE,OAAO;QACtC,4BAA4B,EAAE,OAAO;QAErC,kFAAkF;QAClF,oCAAoC,EAAE,KAAK;QAE3C,iCAAiC;QACjC,yEAAyE;QACzE,2BAA2B,EAAE,KAAK;QAElC,0EAA0E;QAC1E,4BAA4B,EAAE,OAAO;QAErC,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO;QACvC,8BAA8B,EAAE,OAAO;QACvC,2BAA2B,EAAE,OAAO;QACpC,4BAA4B,EAAE,OAAO;QACrC,4BAA4B,EAAE,OAAO;QACrC,4DAA4D,EAAE,OAAO;QACrE,kBAAkB,EAAE,OAAO;KAC5B;CACF,CAAC,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":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C,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO;QACvC,8BAA8B,EAAE,OAAO;QACvC,2BAA2B,EAAE,OAAO;QACpC,4BAA4B,EAAE,OAAO;QACrC,4BAA4B,EAAE,OAAO;QACrC,4DAA4D,EAAE,OAAO;QACrE,kBAAkB,EAAE,OAAO;KAC5B;CAC8B,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI,OAAO,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcalexiei/oxlint-config",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Custom oxlint config",
5
5
  "keywords": [
6
6
  "config",