2026-07-07 09:27:28 +02:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
import js from "@eslint/js";
|
|
|
|
|
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
|
|
|
import tsParser from "@typescript-eslint/parser";
|
|
|
|
|
import solidPlugin from "eslint-plugin-solid";
|
2026-07-16 08:49:09 +02:00
|
|
|
import typegpuPlugin from "eslint-plugin-typegpu";
|
2026-07-07 09:27:28 +02:00
|
|
|
import globals from "globals";
|
|
|
|
|
|
|
|
|
|
export default [
|
|
|
|
|
js.configs.recommended,
|
2026-07-16 08:49:09 +02:00
|
|
|
{
|
|
|
|
|
...typegpuPlugin.configs.recommended,
|
|
|
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
|
|
|
},
|
2026-07-07 09:27:28 +02:00
|
|
|
{
|
|
|
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
|
|
|
languageOptions: {
|
|
|
|
|
parser: tsParser,
|
|
|
|
|
parserOptions: {
|
|
|
|
|
ecmaVersion: "latest",
|
|
|
|
|
sourceType: "module",
|
|
|
|
|
ecmaFeatures: {
|
|
|
|
|
jsx: true,
|
|
|
|
|
},
|
|
|
|
|
project: "./tsconfig.app.json",
|
|
|
|
|
tsconfigRootDir: import.meta.dirname, // ESM way to get __dirname
|
|
|
|
|
},
|
|
|
|
|
globals: {
|
|
|
|
|
...globals.browser,
|
|
|
|
|
...globals.node,
|
|
|
|
|
// Vite `define` (see vite.config.ts); declared in src/vite-env.d.ts
|
|
|
|
|
APP_VERSION: "readonly",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
plugins: {
|
|
|
|
|
"@typescript-eslint": tsPlugin,
|
|
|
|
|
solid: solidPlugin,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
"solid/reactivity": "off",
|
|
|
|
|
// Additional helpful SolidJS rules
|
|
|
|
|
"solid/no-destructure": "warn",
|
|
|
|
|
"solid/jsx-no-undef": "error",
|
|
|
|
|
"solid/jsx-uses-vars": "error",
|
|
|
|
|
// Disable base no-unused-vars in favor of TypeScript version
|
|
|
|
|
"no-unused-vars": "off",
|
|
|
|
|
// Disable no-redeclare to allow TypeScript function overloads
|
|
|
|
|
"no-redeclare": "off",
|
|
|
|
|
// TypeScript rules
|
|
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
|
"warn",
|
|
|
|
|
{ argsIgnorePattern: "^_" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// Ignore patterns
|
|
|
|
|
ignores: [
|
|
|
|
|
"node_modules/**",
|
|
|
|
|
"dist/**",
|
|
|
|
|
"dist-ssr/**",
|
|
|
|
|
"*.config.js",
|
|
|
|
|
"*.config.ts",
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|