Skip to content

Commit 7b30729

Browse files
committed
chore: Upgraded eslint and fixed messy test suite.
1 parent c757cd8 commit 7b30729

File tree

5 files changed

+56
-40
lines changed

5 files changed

+56
-40
lines changed

.eslintrc

-29
This file was deleted.

bun.lockb

17.2 KB
Binary file not shown.

eslint.config.mjs

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
2+
import tsParser from '@typescript-eslint/parser';
3+
import solid from 'eslint-plugin-solid/configs/recommended';
4+
import globals from 'globals';
5+
6+
export default [
7+
{
8+
ignores: ['dist/**/*', '**/*.js', '**/*.cjs', '**/*.mjs'],
9+
},
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
...solid,
13+
},
14+
{
15+
plugins: {
16+
'@typescript-eslint': typescriptEslint,
17+
},
18+
languageOptions: {
19+
parser: tsParser,
20+
ecmaVersion: 'latest',
21+
sourceType: 'module',
22+
globals: {
23+
...globals.node,
24+
},
25+
},
26+
27+
rules: {
28+
'@typescript-eslint/no-unused-vars': [
29+
1,
30+
{
31+
argsIgnorePattern: '^_',
32+
varsIgnorePattern: '^_',
33+
},
34+
],
35+
'solid/no-unknown-namespaces': [
36+
'off',
37+
{
38+
// an array of additional namespace names to allow
39+
allowedNamespaces: [], // Array<string>
40+
},
41+
],
42+
},
43+
},
44+
];

package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"publish-ci": "bun run lint && bun run build && changeset publish",
5151
"format": "prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"",
5252
"lint": "concurrently bun:lint:*",
53-
"lint:code": "eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}",
54-
"lint:types": "tsc --noEmit",
53+
"lint:code": "eslint .",
54+
"lint:types": "tsc --noemit",
5555
"update-deps": "bunx npm-check-updates --format group --interactive",
5656
"version": "auto-changelog -p && git add CHANGELOG.md"
5757
},
@@ -63,15 +63,16 @@
6363
"@changesets/cli": "^2.27.11",
6464
"@mdx-js/rollup": "^3.0.1",
6565
"@types/node": "^22.7.6",
66-
"@typescript-eslint/eslint-plugin": "^8.10.0",
67-
"@typescript-eslint/parser": "^8.10.0",
66+
"@typescript-eslint/eslint-plugin": "^8.19.1",
67+
"@typescript-eslint/parser": "^8.19.1",
6868
"autoprefixer": "^10.4.20",
6969
"concurrently": "^9.0.1",
7070
"esbuild": "^0.24.0",
7171
"esbuild-plugin-solid": "^0.6.0",
72-
"eslint": "^9.12.0",
72+
"eslint": "^9.18.0",
7373
"eslint-plugin-eslint-comments": "^3.2.0",
7474
"eslint-plugin-no-only-tests": "^3.3.0",
75+
"eslint-plugin-solid": "^0.14.5",
7576
"fluid-tailwind": "^1.0.3",
7677
"jsdom": "^25.0.1",
7778
"postcss": "^8.4.47",
@@ -89,7 +90,7 @@
8990
"vike-solid": "^0.7.6",
9091
"vite": "^5.4.9",
9192
"vite-plugin-solid": "^2.10.2",
92-
"vitest": "^2.1.3"
93+
"vitest": "^1.6.0"
9394
},
9495
"keywords": [
9596
"solid",

vitest.config.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { defineConfig } from 'vitest/config'
2-
import solidPlugin from 'vite-plugin-solid'
1+
import solidPlugin from 'vite-plugin-solid';
2+
import { defineConfig } from 'vitest/config';
33

44
export default defineConfig(({ mode }) => {
55
// to test in server environment, run with "--mode ssr" or "--mode test:ssr" flag
66
// loads only server.test.ts file
7-
const testSSR = mode === 'test:ssr' || mode === 'ssr'
7+
const testSSR = mode === 'test:ssr' || mode === 'ssr';
88

99
return {
1010
plugins: [
@@ -38,5 +38,5 @@ export default defineConfig(({ mode }) => {
3838
resolve: {
3939
conditions: testSSR ? ['node'] : ['browser', 'development'],
4040
},
41-
}
42-
})
41+
};
42+
});

0 commit comments

Comments
 (0)