@evanpurkhiser/oxc-config 0.2.0 → 0.4.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 +7 -2
- package/oxlint.config.ts +1 -1
- package/package.json +4 -3
- package/profiles/all/oxlint.config.ts +1 -1
- package/src/index.mjs +1 -6
- package/src/oxfmt/index.mjs +33 -0
- package/src/oxfmt.mjs +1 -33
- package/src/oxlint/index.mjs +6 -0
- package/src/oxlint.mjs +1 -0
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Create an `oxlint.config.ts` file with the contents:
|
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
17
|
import {defineConfig} from 'oxlint';
|
|
18
|
-
import {all} from '@evanpurkhiser/oxc-config';
|
|
18
|
+
import {all} from '@evanpurkhiser/oxc-config/oxlint';
|
|
19
19
|
|
|
20
20
|
export default defineConfig({
|
|
21
21
|
extends: all,
|
|
@@ -32,7 +32,7 @@ For example:
|
|
|
32
32
|
|
|
33
33
|
```ts
|
|
34
34
|
import {defineConfig} from 'oxlint';
|
|
35
|
-
import {common} from '@evanpurkhiser/oxc-config';
|
|
35
|
+
import {common} from '@evanpurkhiser/oxc-config/oxlint';
|
|
36
36
|
|
|
37
37
|
export default defineConfig({
|
|
38
38
|
extends: [common],
|
|
@@ -47,3 +47,8 @@ import {oxfmt} from '@evanpurkhiser/oxc-config/oxfmt';
|
|
|
47
47
|
|
|
48
48
|
export default defineConfig(oxfmt);
|
|
49
49
|
```
|
|
50
|
+
|
|
51
|
+
This package exposes two primary modules:
|
|
52
|
+
|
|
53
|
+
- `@evanpurkhiser/oxc-config/oxlint`
|
|
54
|
+
- `@evanpurkhiser/oxc-config/oxfmt`
|
package/oxlint.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@evanpurkhiser/oxc-config",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Evan Purkhiser's personal Oxc configuration",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Evan Purkhiser",
|
|
8
8
|
"repository": "https://github.com/evanpurkhiser/oxc-config",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"main": "src/
|
|
10
|
+
"main": "src/oxlint.mjs",
|
|
11
11
|
"exports": {
|
|
12
|
-
".": "./src/
|
|
12
|
+
".": "./src/oxlint.mjs",
|
|
13
|
+
"./oxlint": "./src/oxlint.mjs",
|
|
13
14
|
"./common": "./src/common.mjs",
|
|
14
15
|
"./react": "./src/react.mjs",
|
|
15
16
|
"./oxfmt": "./src/oxfmt.mjs"
|
package/src/index.mjs
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const oxfmt = {
|
|
2
|
+
bracketSpacing: false,
|
|
3
|
+
printWidth: 90,
|
|
4
|
+
singleQuote: true,
|
|
5
|
+
arrowParens: 'avoid',
|
|
6
|
+
sortImports: {
|
|
7
|
+
sortSideEffects: true,
|
|
8
|
+
customGroups: [
|
|
9
|
+
{
|
|
10
|
+
groupName: 'react-libs',
|
|
11
|
+
selector: 'external',
|
|
12
|
+
elementNamePattern: ['react', 'react-**'],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
groupName: 'project-internal',
|
|
16
|
+
selector: 'import',
|
|
17
|
+
elementNamePattern: ['src', 'src/**', 'app', 'app/**'],
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
groups: [
|
|
21
|
+
'side_effect',
|
|
22
|
+
'react-libs',
|
|
23
|
+
'external',
|
|
24
|
+
'builtin',
|
|
25
|
+
'project-internal',
|
|
26
|
+
'parent',
|
|
27
|
+
['sibling', 'index'],
|
|
28
|
+
'unknown',
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {oxfmt};
|
package/src/oxfmt.mjs
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
bracketSpacing: false,
|
|
3
|
-
printWidth: 90,
|
|
4
|
-
singleQuote: true,
|
|
5
|
-
arrowParens: 'avoid',
|
|
6
|
-
sortImports: {
|
|
7
|
-
sortSideEffects: true,
|
|
8
|
-
customGroups: [
|
|
9
|
-
{
|
|
10
|
-
groupName: 'react-libs',
|
|
11
|
-
selector: 'external',
|
|
12
|
-
elementNamePattern: ['react', 'react-**'],
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
groupName: 'project-internal',
|
|
16
|
-
selector: 'import',
|
|
17
|
-
elementNamePattern: ['src', 'src/**', 'app', 'app/**'],
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
groups: [
|
|
21
|
-
'side_effect',
|
|
22
|
-
'react-libs',
|
|
23
|
-
'external',
|
|
24
|
-
'builtin',
|
|
25
|
-
'project-internal',
|
|
26
|
-
'parent',
|
|
27
|
-
['sibling', 'index'],
|
|
28
|
-
'unknown',
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export {oxfmt};
|
|
1
|
+
export {oxfmt} from './oxfmt/index.mjs';
|
package/src/oxlint.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {all, common, react} from './oxlint/index.mjs';
|