Problem: the hexagonal refactor churns the backend tree for nine more phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper, compose/web image) must move to its own repo first so doc/layout rewrites land once on a backend-only tree. Change: - New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/ (updateURL repointed to oikos-web releases), compose/, own CI (web + desktop jobs), own deploy script (CI-green gate, TOCTOU guard, version-tagged images, prune-to-3), own webhook receiver on :9798 + launchd unit, own compose project publishing the same 8091:80. - Cutover executed on mac-mini in order: oikos stack's web service stopped+removed, oikos-web project brought up on 8091; outer Caddy untouched (targets the published port) — serving + Authentik flow + /wails 404 quirk verified post-cutover. - Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install targets, the compose web service, oikos-web from deploy.sh's fallback prune list; wails + go-keyring dropped from go.mod, vendor synced. - README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now point at the new repo; mbse + mascot design docs carry a path note. Risk: production SPA serving depends on the new pipeline now; rollback is versioned-image re-up of the old web service from a pre-split checkout (port 8091). Desktop builds installed before the split still check dtoro/oikos releases — one manual reinstall, noted in the oikos-web release notes. Verification: go vet, make test (race), make generate-check, golangci (no new findings; baseline down 400→365); post-cutover curls — localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
146 lines
6.6 KiB
Markdown
146 lines
6.6 KiB
Markdown
# ESLintRC Library
|
|
|
|
This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.
|
|
|
|
**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system.
|
|
|
|
## Installation
|
|
|
|
You can install the package as follows:
|
|
|
|
```shell
|
|
npm install @eslint/eslintrc -D
|
|
# or
|
|
yarn add @eslint/eslintrc -D
|
|
# or
|
|
pnpm install @eslint/eslintrc -D
|
|
# or
|
|
bun install @eslint/eslintrc -D
|
|
```
|
|
|
|
## Usage (ESM)
|
|
|
|
The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file:
|
|
|
|
```js
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
import js from "@eslint/js";
|
|
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
// mimic CommonJS variables -- not needed if using CommonJS
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname, // optional; default: process.cwd()
|
|
resolvePluginsRelativeTo: __dirname, // optional
|
|
recommendedConfig: js.configs.recommended, // optional unless you're using "eslint:recommended"
|
|
allConfig: js.configs.all, // optional unless you're using "eslint:all"
|
|
});
|
|
|
|
export default [
|
|
|
|
// mimic ESLintRC-style extends
|
|
...compat.extends("standard", "example", "plugin:react/recommended"),
|
|
|
|
// mimic environments
|
|
...compat.env({
|
|
es2020: true,
|
|
node: true
|
|
}),
|
|
|
|
// mimic plugins
|
|
...compat.plugins("jsx-a11y", "react"),
|
|
|
|
// translate an entire config
|
|
...compat.config({
|
|
plugins: ["jsx-a11y", "react"],
|
|
extends: "standard",
|
|
env: {
|
|
es2020: true,
|
|
node: true
|
|
},
|
|
rules: {
|
|
semi: "error"
|
|
}
|
|
})
|
|
];
|
|
```
|
|
|
|
## Usage (CommonJS)
|
|
|
|
Using `FlatCompat` in CommonJS files is similar to ESM, but you'll use `require()` and `module.exports` instead of `import` and `export`. Here's how you use it inside of your `eslint.config.js` CommonJS file:
|
|
|
|
```js
|
|
const { FlatCompat } = require("@eslint/eslintrc");
|
|
const js = require("@eslint/js");
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname, // optional; default: process.cwd()
|
|
resolvePluginsRelativeTo: __dirname, // optional
|
|
recommendedConfig: js.configs.recommended, // optional unless using "eslint:recommended"
|
|
allConfig: js.configs.all, // optional unless using "eslint:all"
|
|
});
|
|
|
|
module.exports = [
|
|
|
|
// mimic ESLintRC-style extends
|
|
...compat.extends("standard", "example", "plugin:react/recommended"),
|
|
|
|
// mimic environments
|
|
...compat.env({
|
|
es2020: true,
|
|
node: true
|
|
}),
|
|
|
|
// mimic plugins
|
|
...compat.plugins("jsx-a11y", "react"),
|
|
|
|
// translate an entire config
|
|
...compat.config({
|
|
plugins: ["jsx-a11y", "react"],
|
|
extends: "standard",
|
|
env: {
|
|
es2020: true,
|
|
node: true
|
|
},
|
|
rules: {
|
|
semi: "error"
|
|
}
|
|
})
|
|
];
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
**TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor**
|
|
|
|
The `recommendedConfig` option is required when any config uses `eslint:recommended`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:recommended` config.
|
|
|
|
**TypeError: Missing parameter 'allConfig' in FlatCompat constructor**
|
|
|
|
The `allConfig` option is required when any config uses `eslint:all`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:all` config.
|
|
|
|
## License
|
|
|
|
MIT License
|
|
|
|
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
|
|
<!--sponsorsstart-->
|
|
|
|
## Sponsors
|
|
|
|
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
|
|
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
|
|
|
|
<h3>Platinum Sponsors</h3>
|
|
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a></p><h3>Gold Sponsors</h3>
|
|
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a> <a href="https://www.coderabbit.ai/?utm_source=cr_org&utm_medium=github"><img src="https://avatars.githubusercontent.com/u/132028505" alt="CodeRabbit" height="96"></a></p><h3>Silver Sponsors</h3>
|
|
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/d472863/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
|
|
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://opensource.sap.com"><img src="https://avatars.githubusercontent.com/u/2531208" alt="SAP" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://citadel-ai.com"><img src="https://avatars.githubusercontent.com/u/75781367" alt="Citadel AI" height="32"></a></p>
|
|
<h3>Technology Sponsors</h3>
|
|
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
|
|
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
|
|
<!--sponsorsend-->
|