Skip to content

Commit 4a32ee9

Browse files
committed
chore: react 19, clean up
1 parent 9dd2307 commit 4a32ee9

13 files changed

Lines changed: 2625 additions & 1509 deletions

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.14
1+
22.13.1

eslint.config.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// @ts-nocheck
2+
3+
import eslint from "@eslint/js";
4+
import react from "eslint-plugin-react/configs/recommended.js";
5+
import globals from "globals";
6+
import tsLint from "typescript-eslint";
7+
8+
export default tsLint.config(
9+
{
10+
ignores: [
11+
"dist/*",
12+
// Temporary compiled files
13+
"**/*.ts.build-*.mjs",
14+
15+
// JS files at the root of the project
16+
"*.js",
17+
"*.cjs",
18+
"*.mjs",
19+
],
20+
},
21+
eslint.configs.recommended,
22+
...tsLint.configs.recommended,
23+
{
24+
languageOptions: {
25+
parserOptions: {
26+
sourceType: "module",
27+
ecmaVersion: "latest",
28+
},
29+
},
30+
},
31+
{
32+
rules: {
33+
// common
34+
semi: ['error', 'always'],
35+
'arrow-parens': ['error', 'always'],
36+
'no-unused-vars': 'off',
37+
'comma-dangle': ['error', 'always-multiline'],
38+
'comma-spacing': [2, { before: false, after: true }],
39+
// typescript
40+
'@typescript-eslint/no-explicit-any': 'off',
41+
'@typescript-eslint/no-var-requires': 'off',
42+
'@typescript-eslint/no-namespace': 'off',
43+
'@typescript-eslint/explicit-module-boundary-types': 'off',
44+
'@typescript-eslint/consistent-type-imports': 'error',
45+
'@typescript-eslint/no-unused-expressions': 'off',
46+
"@typescript-eslint/no-unused-vars": [
47+
1,
48+
{
49+
argsIgnorePattern: "^_",
50+
},
51+
],
52+
// other
53+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
54+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
55+
},
56+
},
57+
58+
{
59+
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
60+
...react,
61+
languageOptions: {
62+
...react.languageOptions,
63+
globals: {
64+
...globals.serviceworker,
65+
...globals.browser,
66+
},
67+
},
68+
69+
settings: {
70+
react: {
71+
version: "detect",
72+
},
73+
},
74+
},
75+
);

npmize

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ cp package.json lib
99
cp README.md lib
1010
cp LICENSE lib
1111

12+
npx json -f lib/package.json -I -e "delete this.devDependencies"
13+
npx json -f lib/package.json -I -e "delete this.scripts"
14+
1215
cat >lib/mjs/package.json <<!EOF
1316
{
1417
"type": "module"

0 commit comments

Comments
 (0)