Skip to content

Commit 80867d1

Browse files
committed
Dogfood the rule on the test folder
1 parent 67bd361 commit 80867d1

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.eslintrc.dogfood.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"rules": {
3+
"imports": "error",
4+
"exports": "error"
5+
},
6+
"parserOptions": {
7+
"sourceType": "module",
8+
"ecmaVersion": "latest"
9+
}
10+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"private": true,
33
"type": "commonjs",
44
"scripts": {
5-
"pretest": "prettier --check . && eslint . --report-unused-disable-directives",
5+
"pretest": "prettier --check . && eslint . --report-unused-disable-directives && npm run dogfood",
66
"test": "vitest run",
77
"posttest": "npm run build",
88
"build": "node build.js",
9+
"dogfood": "eslint --rulesdir src --config .eslintrc.dogfood.json test",
910
"examples": "eslint --rulesdir src --no-ignore --fix-dry-run --format json --report-unused-disable-directives examples --ext .js,.ts,.vue,.md"
1011
},
1112
"devDependencies": {

test/examples.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { describe, expect, test } from "vitest";
21
import { spawnSync } from "child_process";
32
import { readFileSync } from "fs";
43
import { basename } from "path";
54
import { format } from "prettier";
5+
import { describe, expect, test } from "vitest";
66

77
// Make snapshots easier to read.
88
// Before: `"\\"string\\""`

0 commit comments

Comments
 (0)