feat(core-eslint): conformance plugin module + ./plugin export
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
"./base": "./base.js",
|
"./base": "./base.js",
|
||||||
"./next": "./next.js",
|
"./next": "./next.js",
|
||||||
"./react-internal": "./react-internal.js"
|
"./react-internal": "./react-internal.js",
|
||||||
|
"./plugin": "./plugin.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest run --passWithNoTests"
|
"test": "vitest run --passWithNoTests"
|
||||||
|
|||||||
27
packages/core-eslint/plugin.js
Normal file
27
packages/core-eslint/plugin.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import featureMustHaveManifest from "./rules/feature-must-have-manifest.js";
|
||||||
|
import usecaseMustHaveTestFile from "./rules/usecase-must-have-test-file.js";
|
||||||
|
import requiredCoresInstalled from "./rules/required-cores-installed.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `@repo/core-eslint` conformance plugin. Aggregates custom rules that
|
||||||
|
* enforce feature-conformance contracts (manifest presence, sibling tests,
|
||||||
|
* required-cores ↔ workspace consistency).
|
||||||
|
*
|
||||||
|
* Registered as the `conformance` plugin in flat config:
|
||||||
|
*
|
||||||
|
* import conformancePlugin from "@repo/core-eslint/plugin";
|
||||||
|
* export default [
|
||||||
|
* { plugins: { conformance: conformancePlugin } },
|
||||||
|
* { rules: { "conformance/feature-must-have-manifest": ["warn", { repoRoot: import.meta.dirname }] } },
|
||||||
|
* ];
|
||||||
|
*/
|
||||||
|
const plugin = {
|
||||||
|
meta: { name: "conformance", version: "0.1.0" },
|
||||||
|
rules: {
|
||||||
|
"feature-must-have-manifest": featureMustHaveManifest,
|
||||||
|
"usecase-must-have-test-file": usecaseMustHaveTestFile,
|
||||||
|
"required-cores-installed": requiredCoresInstalled,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default plugin;
|
||||||
Reference in New Issue
Block a user