@evanpurkhiser/oxc-config 0.7.0 → 0.9.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/.github/workflows/ci.yml +3 -2
- package/.github/workflows/main.yml +6 -4
- package/package.json +4 -3
- package/src/common.mjs +71 -1
- package/src/react.mjs +9 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -12,8 +12,9 @@ jobs:
|
|
|
12
12
|
- uses: actions/setup-node@v4
|
|
13
13
|
with:
|
|
14
14
|
node-version: '24'
|
|
15
|
-
-
|
|
16
|
-
- run:
|
|
15
|
+
- uses: pnpm/action-setup@v4
|
|
16
|
+
- run: pnpm install --frozen-lockfile
|
|
17
|
+
- run: pnpm run check
|
|
17
18
|
|
|
18
19
|
publish:
|
|
19
20
|
runs-on: ubuntu-latest
|
|
@@ -27,11 +28,12 @@ jobs:
|
|
|
27
28
|
with:
|
|
28
29
|
node-version: '24'
|
|
29
30
|
registry-url: 'https://registry.npmjs.org'
|
|
30
|
-
-
|
|
31
|
+
- uses: pnpm/action-setup@v4
|
|
32
|
+
- run: pnpm install --frozen-lockfile
|
|
31
33
|
- name: bump version
|
|
32
34
|
run: |
|
|
33
35
|
git config user.name "GitHub Actions"
|
|
34
36
|
git config user.email "<>"
|
|
35
|
-
|
|
37
|
+
pnpm version minor
|
|
36
38
|
git push
|
|
37
39
|
- run: npm publish --provenance --access=public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@evanpurkhiser/oxc-config",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"description": "Evan Purkhiser's personal Oxc configuration",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Evan Purkhiser",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"lint": "oxlint src oxlint.config.ts profiles/all/oxlint.config.ts",
|
|
20
20
|
"format": "oxfmt .",
|
|
21
21
|
"format:check": "oxfmt --check .",
|
|
22
|
-
"check": "
|
|
22
|
+
"check": "pnpm run lint && pnpm run format:check"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"oxfmt": "^0.41.0",
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"volta": {
|
|
33
33
|
"node": "24.3.0"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"packageManager": "pnpm@10.15.1"
|
|
35
36
|
}
|
package/src/common.mjs
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
const common = {
|
|
2
|
-
plugins: [
|
|
2
|
+
plugins: [
|
|
3
|
+
'eslint',
|
|
4
|
+
'typescript',
|
|
5
|
+
'unicorn',
|
|
6
|
+
'oxc',
|
|
7
|
+
'import',
|
|
8
|
+
'react',
|
|
9
|
+
'promise',
|
|
10
|
+
'node',
|
|
11
|
+
],
|
|
3
12
|
|
|
4
13
|
rules: {
|
|
5
14
|
// Best practices
|
|
@@ -30,6 +39,22 @@ const common = {
|
|
|
30
39
|
'prefer-template': ['warn'],
|
|
31
40
|
'arrow-body-style': ['error', 'as-needed'],
|
|
32
41
|
|
|
42
|
+
// Correctness
|
|
43
|
+
'no-template-curly-in-string': ['error'],
|
|
44
|
+
'no-throw-literal': ['error'],
|
|
45
|
+
'default-case-last': ['error'],
|
|
46
|
+
'prefer-promise-reject-errors': ['error'],
|
|
47
|
+
'no-extend-native': ['error'],
|
|
48
|
+
'preserve-caught-error': ['error'],
|
|
49
|
+
'no-implicit-coercion': ['warn'],
|
|
50
|
+
|
|
51
|
+
// Style cleanup
|
|
52
|
+
'object-shorthand': ['warn'],
|
|
53
|
+
'no-useless-rename': ['warn'],
|
|
54
|
+
'no-unneeded-ternary': ['warn'],
|
|
55
|
+
'prefer-object-spread': ['warn'],
|
|
56
|
+
'prefer-object-has-own': ['warn'],
|
|
57
|
+
|
|
33
58
|
// Disabled for TypeScript
|
|
34
59
|
'no-unused-expressions': ['off'],
|
|
35
60
|
|
|
@@ -43,6 +68,51 @@ const common = {
|
|
|
43
68
|
'typescript/no-unused-expressions': ['error'],
|
|
44
69
|
'typescript/no-useless-constructor': ['error'],
|
|
45
70
|
'typescript/array-type': ['error', {default: 'array-simple'}],
|
|
71
|
+
'typescript/consistent-type-imports': ['error'],
|
|
72
|
+
'typescript/no-import-type-side-effects': ['error'],
|
|
73
|
+
'typescript/no-non-null-asserted-optional-chain': ['error'],
|
|
74
|
+
'typescript/no-non-null-asserted-nullish-coalescing': ['error'],
|
|
75
|
+
'typescript/prefer-as-const': ['error'],
|
|
76
|
+
'typescript/ban-ts-comment': ['warn'],
|
|
77
|
+
'typescript/prefer-ts-expect-error': ['error'],
|
|
78
|
+
'typescript/prefer-enum-initializers': ['error'],
|
|
79
|
+
'typescript/prefer-literal-enum-member': ['error'],
|
|
80
|
+
'typescript/no-mixed-enums': ['error'],
|
|
81
|
+
'typescript/no-inferrable-types': ['warn'],
|
|
82
|
+
'typescript/consistent-generic-constructors': ['warn'],
|
|
83
|
+
|
|
84
|
+
// Imports
|
|
85
|
+
'import/no-duplicates': ['error'],
|
|
86
|
+
'import/no-self-import': ['error'],
|
|
87
|
+
'import/no-empty-named-blocks': ['error'],
|
|
88
|
+
'import/no-named-as-default': ['warn'],
|
|
89
|
+
'import/no-named-as-default-member': ['warn'],
|
|
90
|
+
'import/first': ['warn'],
|
|
91
|
+
|
|
92
|
+
// Unicorn
|
|
93
|
+
'unicorn/prefer-node-protocol': ['error'],
|
|
94
|
+
'unicorn/prefer-string-slice': ['warn'],
|
|
95
|
+
'unicorn/no-useless-undefined': ['warn'],
|
|
96
|
+
'unicorn/prefer-array-flat-map': ['warn'],
|
|
97
|
+
'unicorn/prefer-date-now': ['warn'],
|
|
98
|
+
'unicorn/prefer-regexp-test': ['warn'],
|
|
99
|
+
'unicorn/prefer-math-min-max': ['warn'],
|
|
100
|
+
'unicorn/prefer-string-replace-all': ['warn'],
|
|
101
|
+
'unicorn/prefer-number-properties': ['warn'],
|
|
102
|
+
'unicorn/no-instanceof-array': ['warn'],
|
|
103
|
+
'unicorn/no-typeof-undefined': ['warn'],
|
|
104
|
+
'unicorn/no-useless-promise-resolve-reject': ['warn'],
|
|
105
|
+
'unicorn/error-message': ['error'],
|
|
106
|
+
'unicorn/new-for-builtins': ['error'],
|
|
107
|
+
|
|
108
|
+
// Promise
|
|
109
|
+
'promise/no-new-statics': ['error'],
|
|
110
|
+
'promise/valid-params': ['error'],
|
|
111
|
+
'promise/param-names': ['warn'],
|
|
112
|
+
|
|
113
|
+
// Node
|
|
114
|
+
'node/no-new-require': ['error'],
|
|
115
|
+
'node/no-path-concat': ['error'],
|
|
46
116
|
},
|
|
47
117
|
};
|
|
48
118
|
|
package/src/react.mjs
CHANGED
|
@@ -10,6 +10,15 @@ const react = {
|
|
|
10
10
|
'react/no-this-in-sfc': ['warn'],
|
|
11
11
|
'react/jsx-boolean-value': ['warn'],
|
|
12
12
|
'react/jsx-pascal-case': ['warn'],
|
|
13
|
+
'react/button-has-type': ['error'],
|
|
14
|
+
'react/jsx-no-target-blank': ['error'],
|
|
15
|
+
'react/jsx-no-constructed-context-values': ['warn'],
|
|
16
|
+
'react/no-array-index-key': ['warn'],
|
|
17
|
+
'react/jsx-no-useless-fragment': ['warn'],
|
|
18
|
+
'react/self-closing-comp': ['warn'],
|
|
19
|
+
'react/jsx-curly-brace-presence': ['warn'],
|
|
20
|
+
'react/jsx-fragments': ['warn'],
|
|
21
|
+
'react/forward-ref-uses-ref': ['warn'],
|
|
13
22
|
},
|
|
14
23
|
};
|
|
15
24
|
|