@ankhorage/devtools 1.0.0 → 1.0.2
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 +42 -51
- package/package.json +14 -4
package/README.md
CHANGED
|
@@ -1,78 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# devtools
|
|
2
2
|
|
|
3
|
-
Shared
|
|
3
|
+
Shared ESLint and Prettier configuration for modern TypeScript projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## What you get
|
|
6
|
+
|
|
7
|
+
- Consistent linting across repos
|
|
8
|
+
- Zero-config Prettier setup
|
|
9
|
+
- Strict TypeScript rules without compromise
|
|
10
|
+
- One source of truth for tooling
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- Flat ESLint config (latest standard)
|
|
15
|
+
- Preconfigured plugin ecosystem
|
|
16
|
+
- Prettier integration
|
|
17
|
+
- Monorepo-friendly
|
|
6
18
|
|
|
7
19
|
## Installation
|
|
8
20
|
|
|
9
21
|
```bash
|
|
10
|
-
bun add -
|
|
11
|
-
# or
|
|
12
|
-
npm install --save-dev @ankhorage/devtools
|
|
22
|
+
bun add -D @ankhorage/devtools
|
|
13
23
|
```
|
|
14
24
|
|
|
15
|
-
## Features
|
|
16
|
-
|
|
17
|
-
- **One Package, Two Exports**: Access everything via `@ankhorage/devtools/eslint` and `@ankhorage/devtools/prettier`.
|
|
18
|
-
- **Modern Standards**: Built for ESLint 9+ and Prettier 3+.
|
|
19
|
-
- **Type-Safe**: Uses `typescript-eslint`'s recommended type-checked and stylistic rules.
|
|
20
|
-
- **Unified Policy**: Converges all repositories to a single, high-quality linting standard.
|
|
21
|
-
|
|
22
25
|
## Usage
|
|
23
26
|
|
|
24
27
|
### ESLint
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
```js
|
|
30
|
+
import config from '@ankhorage/devtools/eslint';
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
import path from 'node:path';
|
|
30
|
-
import { fileURLToPath } from 'node:url';
|
|
31
|
-
import { createConfig } from '@ankhorage/devtools/eslint';
|
|
32
|
-
|
|
33
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
34
|
-
|
|
35
|
-
export default createConfig({
|
|
36
|
-
tsconfigRootDir: __dirname,
|
|
37
|
-
project: ['./tsconfig.json'],
|
|
38
|
-
files: ['src/**/*.ts'],
|
|
39
|
-
});
|
|
32
|
+
export default config();
|
|
40
33
|
```
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
The `createConfig` function accepts the following required options:
|
|
35
|
+
### Prettier
|
|
45
36
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"extends": "@ankhorage/devtools/prettier"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
## Use Cases
|
|
51
44
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
- `overrides`: An array of raw ESLint flat config objects to append to the configuration.
|
|
56
|
-
- `includePrettier`: Whether to include the Prettier configuration (defaults to `true`).
|
|
45
|
+
- Monorepos with shared standards
|
|
46
|
+
- Teams that want strict, predictable linting
|
|
47
|
+
- Projects avoiding duplicated config
|
|
57
48
|
|
|
58
|
-
|
|
49
|
+
## Why this exists
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
Maintaining ESLint + Prettier configs across multiple repositories leads to:
|
|
61
52
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
53
|
+
- duplication
|
|
54
|
+
- inconsistency
|
|
55
|
+
- drift over time
|
|
66
56
|
|
|
67
|
-
|
|
57
|
+
This package centralizes tooling so all projects stay aligned.
|
|
68
58
|
|
|
69
|
-
##
|
|
59
|
+
## Scope
|
|
70
60
|
|
|
71
|
-
|
|
61
|
+
Includes:
|
|
72
62
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
63
|
+
- ESLint configuration
|
|
64
|
+
- Prettier configuration
|
|
75
65
|
|
|
76
|
-
|
|
66
|
+
Excludes:
|
|
77
67
|
|
|
78
|
-
|
|
68
|
+
- runtime code
|
|
69
|
+
- build tooling
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/devtools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Shared Lint and Format Configuration for Ankhorage",
|
|
5
|
+
"homepage": "https://github.com/ankhorage/devtools#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/ankhorage/devtools/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/ankhorage/devtools.git"
|
|
12
|
+
},
|
|
5
13
|
"type": "module",
|
|
6
14
|
"publishConfig": {
|
|
7
15
|
"access": "public"
|
|
@@ -26,7 +34,8 @@
|
|
|
26
34
|
"lint": "eslint .",
|
|
27
35
|
"format": "prettier --write .",
|
|
28
36
|
"format:check": "prettier --check .",
|
|
29
|
-
"test": "bun test"
|
|
37
|
+
"test": "bun test",
|
|
38
|
+
"version-packages": "changeset version"
|
|
30
39
|
},
|
|
31
40
|
"dependencies": {
|
|
32
41
|
"@eslint/js": "^10.0.1",
|
|
@@ -41,8 +50,9 @@
|
|
|
41
50
|
},
|
|
42
51
|
"devDependencies": {
|
|
43
52
|
"@changesets/cli": "^2.30.0",
|
|
53
|
+
"@types/bun": "^1.3.13",
|
|
44
54
|
"@types/node": "^25.2.3",
|
|
45
|
-
"bun-types": "^1.3.11",
|
|
46
55
|
"typescript": "^5.9.3"
|
|
47
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"packageManager": "bun@1.3.13"
|
|
48
58
|
}
|