mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Adds oxfmt as a devDependency alongside oxlint and wires it into the
lint pipeline. The .oxfmtrc.json config matches Electron's current JS
style (single quotes, semicolons, 2-space indent, trailing commas off,
printWidth 100) and configures sortImports with custom groups that
mirror the import/order pathGroups previously enforced by ESLint:
@electron/internal, @electron/*, and {electron,electron/**} each get
their own ordered group ahead of external modules.
- `yarn lint:fmt` runs `oxfmt --check` over JS/TS sources and is
chained into `yarn lint` so CI enforces it automatically.
- `yarn format` runs `oxfmt --write` for local fix-up.
- lint-staged invokes `oxfmt --write` on staged .js/.ts/.mjs/.cjs
files before oxlint, so formatting is applied at commit time.
The next commit applies the formatter to the existing codebase so the
check actually passes.
162 lines
5.9 KiB
JSON
162 lines
5.9 KiB
JSON
{
|
|
"name": "@electron-ci/dev-root",
|
|
"version": "0.0.0-development",
|
|
"repository": "https://github.com/electron/electron",
|
|
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
|
"devDependencies": {
|
|
"@azure/storage-blob": "^12.28.0",
|
|
"@datadog/datadog-ci": "^5.9.1",
|
|
"@electron/asar": "^4.0.1",
|
|
"@electron/docs-parser": "^2.0.0",
|
|
"@electron/fiddle-core": "^1.3.4",
|
|
"@electron/github-app-auth": "^3.2.0",
|
|
"@electron/lint-roller": "^3.2.0",
|
|
"@electron/typescript-definitions": "^9.1.5",
|
|
"@hurdlegroup/robotjs": "^0.12.3",
|
|
"@octokit/rest": "^20.1.2",
|
|
"@primer/octicons": "^10.0.0",
|
|
"@sentry/cli": "1.72.0",
|
|
"@types/minimist": "^1.2.5",
|
|
"@types/node": "^24.9.0",
|
|
"@types/semver": "^7.5.8",
|
|
"@types/stream-json": "^1.7.8",
|
|
"@types/temp": "^0.9.4",
|
|
"@xmldom/xmldom": "^0.8.11",
|
|
"buffer": "^6.0.3",
|
|
"chalk": "^4.1.0",
|
|
"check-for-leaks": "^1.2.1",
|
|
"events": "^3.2.0",
|
|
"folder-hash": "^4.1.2",
|
|
"got": "^11.8.5",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.1.0",
|
|
"markdownlint-cli2": "^0.18.0",
|
|
"minimist": "^1.2.8",
|
|
"node-gyp": "^11.4.2",
|
|
"null-loader": "^4.0.1",
|
|
"oxfmt": "^0.42.0",
|
|
"oxlint": "^1.57.0",
|
|
"pre-flight": "^2.0.0",
|
|
"process": "^0.11.10",
|
|
"semver": "^7.6.3",
|
|
"stream-json": "^1.9.1",
|
|
"tap-xunit": "^2.4.1",
|
|
"temp": "^0.9.4",
|
|
"ts-loader": "^8.0.2",
|
|
"ts-node": "6.2.0",
|
|
"typescript": "^5.8.3",
|
|
"url": "^0.11.4",
|
|
"webpack": "^5.104.1",
|
|
"webpack-cli": "^6.0.1",
|
|
"wrapper-webpack-plugin": "^2.2.0",
|
|
"yaml": "^2.8.1"
|
|
},
|
|
"private": true,
|
|
"scripts": {
|
|
"asar": "asar",
|
|
"generate-version-json": "node script/generate-version-json.js",
|
|
"lint": "node ./script/lint.js && npm run lint:fmt && npm run lint:docs && npm run lint:chromium-roller",
|
|
"lint:js": "node ./script/lint.js --js",
|
|
"lint:fmt": "oxfmt --check \"{lib,spec,script,build,default_app,npm}/**/*.{js,ts,mjs,cjs}\"",
|
|
"format": "oxfmt --write \"{lib,spec,script,build,default_app,npm}/**/*.{js,ts,mjs,cjs}\"",
|
|
"lint:clang-format": "python3 script/run-clang-format.py -r -c shell/ || (echo \"\\nCode not formatted correctly.\" && exit 1)",
|
|
"lint:clang-tidy": "ts-node ./script/run-clang-tidy.ts",
|
|
"lint:cpp": "node ./script/lint.js --cc",
|
|
"lint:objc": "node ./script/lint.js --objc",
|
|
"lint:py": "node ./script/lint.js --py",
|
|
"lint:gn": "node ./script/lint.js --gn",
|
|
"lint:docs": "npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:ts-check-js-in-markdown && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdown && npm run lint:api-history",
|
|
"lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"",
|
|
"lint:docs-relative-links": "lint-roller-markdown-links --resource-root . --root docs \"**/*.md\"",
|
|
"lint:markdown": "node ./script/lint.js --md",
|
|
"lint:ts-check-js-in-markdown": "lint-roller-markdown-ts-check --root docs \"**/*.md\" --ignore \"breaking-changes.md\"",
|
|
"lint:js-in-markdown": "lint-roller-markdown-standard --root docs \"**/*.md\"",
|
|
"lint:api-history": "lint-roller-markdown-api-history --root \"./docs/api/\" --schema \"./docs/api-history.schema.json\" --breaking-changes-file \"./docs/breaking-changes.md\" --check-placement --check-strings \"*.md\"",
|
|
"lint:chromium-roller": "node ./script/lint-roller-chromium-changes.mjs",
|
|
"create-api-json": "node script/create-api-json.mjs",
|
|
"create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js",
|
|
"gn-typescript-definitions": "npm run create-typescript-definitions && node script/cp.mjs electron.d.ts",
|
|
"pre-flight": "pre-flight",
|
|
"gn-check": "node ./script/gn-check.js",
|
|
"gn-format": "python3 script/run-gn-format.py",
|
|
"precommit": "lint-staged",
|
|
"preinstall": "node -e 'process.exit(0)'",
|
|
"pretest": "npm run create-typescript-definitions",
|
|
"prepack": "check-for-leaks",
|
|
"prepare": "husky",
|
|
"repl": "node ./script/start.js --interactive",
|
|
"start": "node ./script/start.js",
|
|
"test": "node ./script/spec-runner.js",
|
|
"tsc": "tsc",
|
|
"webpack": "webpack"
|
|
},
|
|
"license": "MIT",
|
|
"author": "Electron Community",
|
|
"keywords": [
|
|
"electron"
|
|
],
|
|
"lint-staged": {
|
|
"*": [
|
|
"npm run lint:chromium-roller"
|
|
],
|
|
"*.{js,ts,mjs,cjs}": [
|
|
"oxfmt --write"
|
|
],
|
|
"*.{js,ts}": [
|
|
"node script/lint.js --js --fix --only --"
|
|
],
|
|
"*.{js,ts,d.ts}": [
|
|
"ts-node script/gen-filenames.ts"
|
|
],
|
|
"*.{cc,mm,c,h}": [
|
|
"python3 script/run-clang-format.py -r -c --fix"
|
|
],
|
|
"*.md": [
|
|
"npm run lint:docs"
|
|
],
|
|
"*.{gn,gni}": [
|
|
"npm run gn-check",
|
|
"npm run gn-format"
|
|
],
|
|
"*.py": [
|
|
"node script/lint.js --py --fix --only --"
|
|
],
|
|
"docs/api/**/*.md": [
|
|
"ts-node script/gen-filenames.ts",
|
|
"markdownlint-cli2 --config .autofix.markdownlint-cli2.jsonc --fix",
|
|
"git add filenames.auto.gni"
|
|
],
|
|
"{*.patch,.patches}": [
|
|
"node script/lint.js --patches --only --",
|
|
"ts-node script/check-patch-diff.ts"
|
|
],
|
|
"DEPS": [
|
|
"node script/gen-hunspell-filenames.js",
|
|
"node script/gen-libc++-filenames.js"
|
|
],
|
|
".github/workflows/pipeline-segment-electron-build.yml": [
|
|
"node script/copy-pipeline-segment-publish.js",
|
|
"git add .github/workflows/pipeline-segment-electron-publish.yml"
|
|
]
|
|
},
|
|
"resolutions": {
|
|
"dbus-native/xml2js": "0.5.0",
|
|
"abstract-socket": "github:deepak1556/node-abstractsocket#928cc591decd12aff7dad96449da8afc29832c19",
|
|
"minimist@npm:~0.0.1": "0.2.4"
|
|
},
|
|
"packageManager": "yarn@4.12.0",
|
|
"workspaces": [
|
|
".github/workflows",
|
|
"spec",
|
|
"spec/fixtures/native-addon/*"
|
|
],
|
|
"dependenciesMeta": {
|
|
"@sentry/cli": {
|
|
"built": true
|
|
},
|
|
"abstract-socket": {
|
|
"built": true
|
|
}
|
|
}
|
|
}
|