ultracite 4.1.6 → 4.1.7
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 +8 -0
- package/package.json +6 -2
- package/scripts/run.js +18 -0
package/README.md
CHANGED
|
@@ -73,6 +73,14 @@ Lastly, ensure your `tsconfig.json` (if it exists) includes your new ESLint conf
|
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
Ultracite will automatically lint, fix and format your code on save. If you'd like to run Ultracite manually, you can do so with the following command:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npx ultracite
|
|
82
|
+
```
|
|
83
|
+
|
|
76
84
|
## Configuration
|
|
77
85
|
|
|
78
86
|
While Ultracite is designed to be zero-config, you can modify anything you'd like in your `biome.json` file. For example, to enable the `noAutofocus` rule, you can do the following:
|
package/package.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Hayden Bleasel <hello@haydenbleasel.com>",
|
|
3
|
+
"bin": {
|
|
4
|
+
"ultracite": "./scripts/run.js"
|
|
5
|
+
},
|
|
3
6
|
"auto": {
|
|
4
7
|
"plugins": [
|
|
5
8
|
"npm",
|
|
@@ -14,7 +17,8 @@
|
|
|
14
17
|
},
|
|
15
18
|
"description": "Strict, opinionated linting config for modern TypeScript apps.",
|
|
16
19
|
"files": [
|
|
17
|
-
"biome.json"
|
|
20
|
+
"biome.json",
|
|
21
|
+
"scripts/run.js"
|
|
18
22
|
],
|
|
19
23
|
"homepage": "https://github.com/haydenbleasel/ultracite#readme",
|
|
20
24
|
"keywords": [
|
|
@@ -35,7 +39,7 @@
|
|
|
35
39
|
"type": "git",
|
|
36
40
|
"url": "git+https://github.com/haydenbleasel/ultracite.git"
|
|
37
41
|
},
|
|
38
|
-
"version": "4.1.
|
|
42
|
+
"version": "4.1.7",
|
|
39
43
|
"devDependencies": {
|
|
40
44
|
"@biomejs/biome": "^1.9.4"
|
|
41
45
|
}
|
package/scripts/run.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require('node:child_process');
|
|
4
|
+
const args = process.argv.slice(2);
|
|
5
|
+
|
|
6
|
+
if (args.length) {
|
|
7
|
+
console.log('Usage: npx ultracite');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
execSync('npx biome check --write ./', {
|
|
13
|
+
stdio: 'inherit',
|
|
14
|
+
});
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.error('Failed to run Ultracite:', error.message);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|