Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions babel.config.cjs

This file was deleted.

20 changes: 11 additions & 9 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ export default [
},
{
files: ["*.ts"],
parser: "@typescript-eslint/parser",
parserOptions: {
// eslint-disable-next-line no-undef
tsconfigRootDir: process.cwd(),
project: [
"./tsconfig.json",
"./packages/*/tsconfig.json",
"./examples/*/tsconfig.json",
],
languageOptions: {
parser: tsParser,
parserOptions: {
// eslint-disable-next-line no-undef
tsconfigRootDir: process.cwd(),
project: [
"./tsconfig.json",
"./packages/*/tsconfig.json",
"./examples/*/tsconfig.json",
],
},
},
rules: {
...typescriptPlugin.configs["recommended-requiring-type-checking"].rules,
Expand Down
16 changes: 0 additions & 16 deletions jest.config.mjs

This file was deleted.

17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,26 @@
"lint:fix:package": "prettier-package-json --write package.json",
"package:copy:files": "cp README.md LICENSE CHANGELOG.md packages/eslint-plugin-react-prefer-function-component",
"prepare": "husky install",
"test": "pnpm jest",
"test:ci": "pnpm jest --coverage",
"test": "pnpm vitest",
"test:ci": "pnpm vitest --coverage",
"typecheck": "pnpm run --recursive typecheck"
},
"devDependencies": {
"@babel/preset-env": "^7.26.9",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@types/eslint": "^9.6.1",
"@types/estree": "^1.0.6",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.10",
"@typescript-eslint/eslint-plugin": "^8.26.1",
"@typescript-eslint/parser": "^8.26.1",
"@typescript-eslint/eslint-plugin": "^8.27.0",
"@typescript-eslint/parser": "^8.27.0",
"@vitest/coverage-v8": "3.0.9",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"prettier": "^3.5.3",
"prettier-package-json": "^2.8.0",
"typescript": "^5.8.2"
"typescript": "^5.8.2",
"vitest": "^3.0.9"
},
"packageManager": "pnpm@8.6.9"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* c8 ignore start */
import type { ESLint } from "eslint";
import preferFunctionComponent from "./prefer-function-component/index.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* c8 ignore start */
import type { ESLint } from "eslint";
import PreferFunctionComponent from "./prefer-function-component/index.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { spawnSync } from "child_process";
import { describe, beforeAll, it, expect } from "vitest";

function run(cmd: string) {
return spawnSync(cmd, { shell: true, encoding: "utf8" });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { spawnSync } from "child_process";
import { describe, beforeAll, it, expect } from "vitest";

function run(cmd: string) {
return spawnSync(cmd, { shell: true, encoding: "utf8" });
Expand All @@ -8,7 +9,7 @@ function removeAbsolutePathToEslintFile(str: string): string {
return str.replace(__dirname, "");
}

describe("flat config", () => {
describe("legacy config", () => {
beforeAll(() => process.chdir(__dirname));

it("flags errors", () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/legacy-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "legacy-config",
"type": "module",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand All @@ -12,6 +11,6 @@
"license": "ISC",
"devDependencies": {
"eslint": "7.32.0",
"eslint-plugin-react-prefer-function-component": "^4.0.0"
"eslint-plugin-react-prefer-function-component": "workspace:^"
}
}
Loading