@faircopy/config 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @faircopy/config
|
|
2
|
+
|
|
3
|
+
`defineConfig()` helper for `faircopy.config.ts`. An identity function with full TypeScript inference — no runtime effect beyond type-checking.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm i -D @faircopy/config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// faircopy.config.ts
|
|
15
|
+
import { defineConfig } from '@faircopy/config'
|
|
16
|
+
import { astro } from '@faircopy/astro'
|
|
17
|
+
|
|
18
|
+
export default defineConfig({
|
|
19
|
+
files: ['src/**/*.astro'],
|
|
20
|
+
ignore: ['src/content/blog/**'],
|
|
21
|
+
adapters: [astro()],
|
|
22
|
+
rules: {
|
|
23
|
+
'no-em-dash': 'error',
|
|
24
|
+
'no-weasel-words': ['error', { words: ['actually', 'truly', 'really', 'literally'] }],
|
|
25
|
+
'no-rhetorical-scaffolding': 'error',
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
All public types from `@faircopy/core` are re-exported from this package.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FaircopyConfig } from '@faircopy/core';
|
|
2
|
+
export { Adapter, Diagnostic, ExtractedText, FaircopyConfig, Rule, RuleConfig, RuleInput, Severity, Suggestion } from '@faircopy/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Identity function with full type inference. Modeled on Vite's defineConfig.
|
|
6
|
+
* No runtime effect — purely for TypeScript completion on rule names and options.
|
|
7
|
+
*/
|
|
8
|
+
declare function defineConfig(config: FaircopyConfig): FaircopyConfig;
|
|
9
|
+
|
|
10
|
+
export { defineConfig };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type {\n FaircopyConfig,\n RuleConfig,\n Severity,\n Adapter,\n ExtractedText,\n Rule,\n RuleInput,\n Diagnostic,\n Suggestion,\n} from '@faircopy/core'\n\nimport type { FaircopyConfig } from '@faircopy/core'\n\n/**\n * Identity function with full type inference. Modeled on Vite's defineConfig.\n * No runtime effect — purely for TypeScript completion on rule names and options.\n */\nexport function defineConfig(config: FaircopyConfig): FaircopyConfig {\n return config\n}\n"],"mappings":";AAkBO,SAAS,aAAa,QAAwC;AACnE,SAAO;AACT;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@faircopy/config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "defineConfig helper and type re-exports for faircopy",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@faircopy/core": "0.1.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"tsup": "^8.4.0",
|
|
21
|
+
"typescript": "^5.8.0"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"author": "omniaura",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsup",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"test": "echo 'no tests'"
|
|
32
|
+
}
|
|
33
|
+
}
|