Skip to content

Commit fb314fe

Browse files
committed
feat: replace eslint -> oxlint
feat: bump min Node version to 22 migrate: circleCI to github actions
1 parent 4dcfd85 commit fb314fe

13 files changed

Lines changed: 10825 additions & 11248 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

.oxlintrc.json

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["unicorn", "typescript", "oxc"],
4+
"categories": {},
5+
"rules": {
6+
"for-direction": "warn",
7+
"no-console": "error",
8+
"no-async-promise-executor": "warn",
9+
"no-caller": "warn",
10+
"no-class-assign": "warn",
11+
"no-compare-neg-zero": "warn",
12+
"no-cond-assign": "warn",
13+
"no-const-assign": "warn",
14+
"no-constant-binary-expression": "warn",
15+
"no-constant-condition": "warn",
16+
"no-control-regex": "warn",
17+
"no-debugger": "warn",
18+
"no-delete-var": "warn",
19+
"no-dupe-class-members": "warn",
20+
"no-dupe-else-if": "warn",
21+
"no-dupe-keys": "warn",
22+
"no-duplicate-case": "warn",
23+
"no-empty-character-class": "warn",
24+
"no-empty-pattern": "warn",
25+
"no-empty-static-block": "warn",
26+
"no-eval": "warn",
27+
"no-ex-assign": "warn",
28+
"no-extra-boolean-cast": "warn",
29+
"no-func-assign": "warn",
30+
"no-global-assign": "warn",
31+
"no-import-assign": "warn",
32+
"no-invalid-regexp": "warn",
33+
"no-irregular-whitespace": "warn",
34+
"no-loss-of-precision": "warn",
35+
"no-new-native-nonconstructor": "warn",
36+
"no-nonoctal-decimal-escape": "warn",
37+
"no-obj-calls": "warn",
38+
"no-self-assign": "warn",
39+
"no-setter-return": "warn",
40+
"no-shadow-restricted-names": "warn",
41+
"no-sparse-arrays": "warn",
42+
"no-this-before-super": "warn",
43+
"no-unassigned-vars": "warn",
44+
"no-unsafe-finally": "warn",
45+
"no-unsafe-negation": "warn",
46+
"no-unsafe-optional-chaining": "warn",
47+
"no-unused-expressions": "warn",
48+
"no-unused-labels": "warn",
49+
"no-unused-private-class-members": "warn",
50+
"no-unused-vars": "warn",
51+
"no-useless-backreference": "warn",
52+
"no-useless-catch": "warn",
53+
"no-useless-escape": "warn",
54+
"no-useless-rename": "warn",
55+
"no-with": "warn",
56+
"require-yield": "warn",
57+
"use-isnan": "warn",
58+
"valid-typeof": "warn",
59+
"oxc/bad-array-method-on-arguments": "warn",
60+
"oxc/bad-char-at-comparison": "warn",
61+
"oxc/bad-comparison-sequence": "warn",
62+
"oxc/bad-min-max-func": "warn",
63+
"oxc/bad-object-literal-comparison": "warn",
64+
"oxc/bad-replace-all-arg": "warn",
65+
"oxc/const-comparisons": "warn",
66+
"oxc/double-comparisons": "warn",
67+
"oxc/erasing-op": "warn",
68+
"oxc/missing-throw": "warn",
69+
"oxc/number-arg-out-of-range": "warn",
70+
"oxc/only-used-in-recursion": "warn",
71+
"oxc/uninvoked-array-callback": "warn",
72+
"typescript/await-thenable": "warn",
73+
"typescript/no-array-delete": "warn",
74+
"typescript/no-base-to-string": "warn",
75+
"typescript/no-duplicate-enum-values": "warn",
76+
"typescript/no-duplicate-type-constituents": "warn",
77+
"typescript/no-extra-non-null-assertion": "warn",
78+
"typescript/no-floating-promises": "warn",
79+
"typescript/no-for-in-array": "warn",
80+
"typescript/no-implied-eval": "warn",
81+
"typescript/no-meaningless-void-operator": "warn",
82+
"typescript/no-misused-new": "warn",
83+
"typescript/no-misused-spread": "warn",
84+
"typescript/no-non-null-asserted-optional-chain": "warn",
85+
"typescript/no-redundant-type-constituents": "warn",
86+
"typescript/no-this-alias": "warn",
87+
"typescript/no-unnecessary-parameter-property-assignment": "warn",
88+
"typescript/no-unsafe-declaration-merging": "warn",
89+
"typescript/no-unsafe-unary-minus": "warn",
90+
"typescript/no-useless-empty-export": "warn",
91+
"typescript/no-wrapper-object-types": "warn",
92+
"typescript/prefer-as-const": "warn",
93+
"typescript/require-array-sort-compare": "warn",
94+
"typescript/restrict-template-expressions": "warn",
95+
"typescript/triple-slash-reference": "warn",
96+
"typescript/unbound-method": "warn",
97+
"unicorn/no-await-in-promise-methods": "warn",
98+
"unicorn/no-empty-file": "warn",
99+
"unicorn/no-invalid-fetch-options": "warn",
100+
"unicorn/no-invalid-remove-event-listener": "warn",
101+
"unicorn/no-new-array": "warn",
102+
"unicorn/no-single-promise-in-promise-methods": "warn",
103+
"unicorn/no-thenable": "warn",
104+
"unicorn/no-unnecessary-await": "warn",
105+
"unicorn/no-useless-fallback-in-spread": "warn",
106+
"unicorn/no-useless-length-check": "warn",
107+
"unicorn/no-useless-spread": "warn",
108+
"unicorn/prefer-set-size": "warn",
109+
"unicorn/prefer-string-starts-ends-with": "warn"
110+
},
111+
"settings": {
112+
"jsx-a11y": {
113+
"polymorphicPropName": null,
114+
"components": {},
115+
"attributes": {}
116+
},
117+
"next": {
118+
"rootDir": []
119+
},
120+
"react": {
121+
"formComponents": [],
122+
"linkComponents": []
123+
},
124+
"jsdoc": {
125+
"ignorePrivate": false,
126+
"ignoreInternal": false,
127+
"ignoreReplacesDocs": true,
128+
"overrideReplacesDocs": true,
129+
"augmentsExtendsReplacesDocs": false,
130+
"implementsReplacesDocs": false,
131+
"exemptDestructuredRootsFromChecks": false,
132+
"tagNamePreference": {}
133+
},
134+
"vitest": {
135+
"typecheck": false
136+
}
137+
},
138+
"env": {
139+
"builtin": true
140+
},
141+
"globals": {},
142+
"ignorePatterns": []
143+
}

__tests__/fixture/postgres/usecase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ const db = pgp('postgres://username:password@host:port/databaset');
1010
display_name: customers['display_name'];
1111
} = await db.query('SELECT (email, display_name) FROM customers');
1212

13-
// tslint:disable-next-line
13+
// oxlint-disable-next-line no-console
1414
console.log(emailAndDisplayName);
1515
})();

__tests__/integration/cli.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('schemats cli tool integration testing', () => {
1717
{ encoding: 'utf-8' }
1818
);
1919

20-
// tslint:disable-next-line:no-console
20+
// oxlint-disable-next-line no-console:no-console
2121
console.log(stdout.toString(), stderr.toString());
2222
expect(status).toBe(0);
2323
});
@@ -35,7 +35,7 @@ describe('schemats cli tool integration testing', () => {
3535
'-o',
3636
'/tmp/schemats_cli_mysql.ts',
3737
]);
38-
// tslint:disable-next-line:no-console
38+
// oxlint-disable-next-line no-console:no-console
3939
console.log(stdout.toString(), stderr.toString());
4040
expect(status).toBe(0);
4141
});

__tests__/integration/schemaGeneration/__snapshots__/mysql.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`schema generation integration testing mysql Basic generation 1`] = `
44
"/* tslint:disable */

__tests__/integration/schemaGeneration/__snapshots__/postgres.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`schema generation integration testing postgres Basic generation 1`] = `
44
"/* tslint:disable */

__tests__/unit/__snapshots__/typescript.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`Typescript generateTableInterface empty table definition object 1`] = `
44
"

0 commit comments

Comments
 (0)