@vitest/eslint-plugin 1.1.0 → 1.1.2
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 +2 -2
- package/dist/index.cjs +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Add `vitest` to the plugins section of your `.eslintrc` configuration file. You
|
|
|
46
46
|
|
|
47
47
|
```json
|
|
48
48
|
{
|
|
49
|
-
"plugins": ["
|
|
49
|
+
"plugins": ["vitest"]
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -69,7 +69,7 @@ If you're using old Eslint configuration, make sure to use legacy key like the f
|
|
|
69
69
|
|
|
70
70
|
```js
|
|
71
71
|
{
|
|
72
|
-
"extends": ["plugin
|
|
72
|
+
"extends": ["plugin:vitest/legacy-recommended"] // or legacy-all
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ function _interopNamespaceCompat(e) {
|
|
|
23
23
|
const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
24
24
|
const ts__default = /*#__PURE__*/_interopDefaultCompat(ts);
|
|
25
25
|
|
|
26
|
-
const version = "1.
|
|
26
|
+
const version = "1.1.1";
|
|
27
27
|
|
|
28
28
|
function createEslintRule(rule) {
|
|
29
29
|
const createRule = utils.ESLintUtils.RuleCreator(
|
|
@@ -393,7 +393,8 @@ const lowerCaseTitle = createEslintRule({
|
|
|
393
393
|
},
|
|
394
394
|
fixable: "code",
|
|
395
395
|
messages: {
|
|
396
|
-
lowerCaseTitle: "`{{ method }}`s should begin with lowercase"
|
|
396
|
+
lowerCaseTitle: "`{{ method }}`s should begin with lowercase",
|
|
397
|
+
fullyLowerCaseTitle: "`{{ method }}`s should be lowercase"
|
|
397
398
|
},
|
|
398
399
|
schema: [
|
|
399
400
|
{
|
|
@@ -456,7 +457,7 @@ const lowerCaseTitle = createEslintRule({
|
|
|
456
457
|
if (ignores.includes(vitestFnCall.name) || lowercaseFirstCharacterOnly && (!firstCharacter || firstCharacter === firstCharacter.toLowerCase()) || !lowercaseFirstCharacterOnly && description === description.toLowerCase())
|
|
457
458
|
return;
|
|
458
459
|
context.report({
|
|
459
|
-
messageId: "lowerCaseTitle",
|
|
460
|
+
messageId: lowercaseFirstCharacterOnly ? "lowerCaseTitle" : "fullyLowerCaseTitle",
|
|
460
461
|
node: node.arguments[0],
|
|
461
462
|
data: {
|
|
462
463
|
method: vitestFnCall.name
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { isAbsolute, posix } from 'node:path';
|
|
|
4
4
|
import ts from 'typescript';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
|
|
7
|
-
const version = "1.
|
|
7
|
+
const version = "1.1.1";
|
|
8
8
|
|
|
9
9
|
function createEslintRule(rule) {
|
|
10
10
|
const createRule = ESLintUtils.RuleCreator(
|
|
@@ -374,7 +374,8 @@ const lowerCaseTitle = createEslintRule({
|
|
|
374
374
|
},
|
|
375
375
|
fixable: "code",
|
|
376
376
|
messages: {
|
|
377
|
-
lowerCaseTitle: "`{{ method }}`s should begin with lowercase"
|
|
377
|
+
lowerCaseTitle: "`{{ method }}`s should begin with lowercase",
|
|
378
|
+
fullyLowerCaseTitle: "`{{ method }}`s should be lowercase"
|
|
378
379
|
},
|
|
379
380
|
schema: [
|
|
380
381
|
{
|
|
@@ -437,7 +438,7 @@ const lowerCaseTitle = createEslintRule({
|
|
|
437
438
|
if (ignores.includes(vitestFnCall.name) || lowercaseFirstCharacterOnly && (!firstCharacter || firstCharacter === firstCharacter.toLowerCase()) || !lowercaseFirstCharacterOnly && description === description.toLowerCase())
|
|
438
439
|
return;
|
|
439
440
|
context.report({
|
|
440
|
-
messageId: "lowerCaseTitle",
|
|
441
|
+
messageId: lowercaseFirstCharacterOnly ? "lowerCaseTitle" : "fullyLowerCaseTitle",
|
|
441
442
|
node: node.arguments[0],
|
|
442
443
|
data: {
|
|
443
444
|
method: vitestFnCall.name
|