@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.
Files changed (2) hide show
  1. package/README.md +42 -51
  2. package/package.json +14 -4
package/README.md CHANGED
@@ -1,78 +1,69 @@
1
- # @ankhorage/devtools
1
+ # devtools
2
2
 
3
- Shared Lint and Format Configuration for Ankhorage.
3
+ Shared ESLint and Prettier configuration for modern TypeScript projects.
4
4
 
5
- This package provides a unified, modern ESLint and Prettier configuration policy used across Ankhorage projects. It is built on top of **ESLint Flat Config** and **typescript-eslint**, ensuring a seamless, type-safe development experience.
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 -d @ankhorage/devtools
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
- Create an `eslint.config.mjs` file in your project root:
29
+ ```js
30
+ import config from '@ankhorage/devtools/eslint';
27
31
 
28
- ```javascript
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
- #### Configuration Options
43
-
44
- The `createConfig` function accepts the following required options:
35
+ ### Prettier
45
36
 
46
- - `tsconfigRootDir`: The root directory for tsconfig resolution (typically `import.meta.dirname` or equivalent).
47
- - `project`: An array of paths to your `tsconfig` files (e.g., `['./tsconfig.json']`).
48
- - `files`: An array of glob patterns for the files you want to lint (e.g., `['src/**/*.{ts,tsx}']`).
37
+ ```json
38
+ {
39
+ "extends": "@ankhorage/devtools/prettier"
40
+ }
41
+ ```
49
42
 
50
- Optional options:
43
+ ## Use Cases
51
44
 
52
- - `allowDefaultProject`: Glob patterns for files to allow in the default project.
53
- - `additionalIgnores`: Extra glob patterns to ignore.
54
- - `restrictedImports`: An array of `{ name, message }` objects to append to the default restricted imports.
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
- ### Prettier
49
+ ## Why this exists
59
50
 
60
- Create a `prettier.config.cjs` file in your project root:
51
+ Maintaining ESLint + Prettier configs across multiple repositories leads to:
61
52
 
62
- ```javascript
63
- /** @type {import('prettier').Config} */
64
- module.exports = require('@ankhorage/devtools/prettier');
65
- ```
53
+ - duplication
54
+ - inconsistency
55
+ - drift over time
66
56
 
67
- **Note**: You should keep a local `.prettierignore` file in your repository to define ignored patterns.
57
+ This package centralizes tooling so all projects stay aligned.
68
58
 
69
- ## Examples
59
+ ## Scope
70
60
 
71
- Check the [examples](./examples) directory for copy-pasteable configurations:
61
+ Includes:
72
62
 
73
- - `examples/monorepo/eslint.config.mjs`: For monorepo project structures.
74
- - `examples/package/eslint.config.mjs`: For standalone package structures.
63
+ - ESLint configuration
64
+ - Prettier configuration
75
65
 
76
- ## License
66
+ Excludes:
77
67
 
78
- MIT
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.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
  }