-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9594a20
commit 8b7268a
Showing
7 changed files
with
760 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["@arnaud-barre"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
{ | ||
"name": "eslint-plugin-react-refresh", | ||
"version": "0.4.5", | ||
"type": "module", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "scripts/bundle.ts", | ||
"lint": "bun lint-ci --fix --cache", | ||
"lint-ci": "eslint ./ --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"prettier": "bun prettier-ci --write", | ||
"prettier-ci": "prettier --ignore-path=.gitignore --check '**/*.{ts,json,md,yml}'", | ||
"ci": "tsc && bun prettier-ci && bun test && bun run build" | ||
"ci": "tsc && bun lint-ci && bun prettier-ci && bun test && bun run build" | ||
}, | ||
"peerDependencies": { | ||
"eslint": ">=7" | ||
}, | ||
"devDependencies": { | ||
"@arnaud-barre/eslint-config": "^4.0.0", | ||
"@arnaud-barre/tnode": "^0.19.2", | ||
"@types/eslint": "^8.44.6", | ||
"@types/node": "^20.8.7", | ||
"@typescript-eslint/parser": "^6.9.0", | ||
"@typescript-eslint/utils": "^6.9.0", | ||
"bun-types": "^1.0.7", | ||
"eslint": "^8.52.0", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2" | ||
"@types/eslint": "^8.44.8", | ||
"@types/node": "^20.10.2", | ||
"@typescript-eslint/parser": "^6.13.1", | ||
"@typescript-eslint/utils": "^6.13.1", | ||
"bun-types": "^1.0.15", | ||
"eslint": "^8.55.0", | ||
"prettier": "3.0.3", | ||
"typescript": "~5.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
#!/usr/bin/env tnode | ||
import { rmSync, writeFileSync } from "fs"; | ||
import { execSync } from "child_process"; | ||
import { rmSync, writeFileSync } from "node:fs"; | ||
import { execSync } from "node:child_process"; | ||
import { build } from "esbuild"; | ||
|
||
import packageJSON from "../package.json"; | ||
|
||
rmSync("dist", { force: true, recursive: true }); | ||
|
||
build({ | ||
await build({ | ||
bundle: true, | ||
entryPoints: ["src/index.ts"], | ||
outdir: "dist", | ||
platform: "node", | ||
target: "node14", | ||
external: Object.keys(packageJSON.peerDependencies), | ||
}).then(() => { | ||
execSync("cp LICENSE README.md dist/"); | ||
|
||
writeFileSync( | ||
"dist/package.json", | ||
JSON.stringify( | ||
{ | ||
name: packageJSON.name, | ||
description: | ||
"Validate that your components can safely be updated with fast refresh", | ||
version: packageJSON.version, | ||
author: "Arnaud Barré (https://github.com/ArnaudBarre)", | ||
license: packageJSON.license, | ||
repository: "github:ArnaudBarre/eslint-plugin-react-refresh", | ||
main: "index.js", | ||
keywords: [ | ||
"eslint", | ||
"eslint-plugin", | ||
"react", | ||
"react-refresh", | ||
"fast refresh", | ||
], | ||
peerDependencies: packageJSON.peerDependencies, | ||
}, | ||
null, | ||
2, | ||
), | ||
); | ||
}); | ||
|
||
execSync("cp LICENSE README.md dist/"); | ||
|
||
writeFileSync( | ||
"dist/package.json", | ||
JSON.stringify( | ||
{ | ||
name: packageJSON.name, | ||
description: | ||
"Validate that your components can safely be updated with fast refresh", | ||
version: packageJSON.version, | ||
author: "Arnaud Barré (https://github.com/ArnaudBarre)", | ||
license: packageJSON.license, | ||
repository: "github:ArnaudBarre/eslint-plugin-react-refresh", | ||
main: "index.js", | ||
keywords: [ | ||
"eslint", | ||
"eslint-plugin", | ||
"react", | ||
"react-refresh", | ||
"fast refresh", | ||
], | ||
peerDependencies: packageJSON.peerDependencies, | ||
}, | ||
null, | ||
2, | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.