|  | 
|  | 1 | +import js from "@eslint/js"; | 
|  | 2 | +import simpleImportSort from "eslint-plugin-simple-import-sort"; | 
|  | 3 | +import solid from "eslint-plugin-solid/configs/typescript"; | 
|  | 4 | +import globals from "globals"; | 
|  | 5 | +import tseslint from "typescript-eslint"; | 
|  | 6 | + | 
|  | 7 | +export default tseslint.config( | 
|  | 8 | +  { | 
|  | 9 | +    // config with just ignores is the replacement for `.eslintignore` | 
|  | 10 | +    ignores: ["**/build/**", "**/coverage/**", "**/dist/**", "**/node_modules/**"], | 
|  | 11 | +  }, | 
|  | 12 | +  js.configs.recommended, | 
|  | 13 | +  tseslint.configs.strict, | 
|  | 14 | +  { | 
|  | 15 | +    plugins: { | 
|  | 16 | +      "simple-import-sort": simpleImportSort, | 
|  | 17 | +    }, | 
|  | 18 | +    rules: { | 
|  | 19 | +      "simple-import-sort/imports": "error", | 
|  | 20 | +      "simple-import-sort/exports": "error", | 
|  | 21 | +    }, | 
|  | 22 | +  }, | 
|  | 23 | +  { | 
|  | 24 | +    files: ["**/*.ts", "**/*.tsx"], | 
|  | 25 | +    languageOptions: { | 
|  | 26 | +      parser: tseslint.parser, | 
|  | 27 | +      parserOptions: { | 
|  | 28 | +        sourceType: "module", | 
|  | 29 | +        project: "./tsconfig.json", | 
|  | 30 | +        ecmaFeatures: { | 
|  | 31 | +          jsx: true, | 
|  | 32 | +        }, | 
|  | 33 | +      }, | 
|  | 34 | +      globals: { | 
|  | 35 | +        ...globals.browser, | 
|  | 36 | +        ...globals.es2022, | 
|  | 37 | +      }, | 
|  | 38 | +    }, | 
|  | 39 | +    plugins: solid.plugins, | 
|  | 40 | +    rules: { | 
|  | 41 | +      ...solid.rules, | 
|  | 42 | +      "@typescript-eslint/no-non-null-assertion": "off", | 
|  | 43 | +      "no-unused-vars": "off", | 
|  | 44 | +      "@typescript-eslint/no-unused-vars": [ | 
|  | 45 | +        "error", | 
|  | 46 | +        { | 
|  | 47 | +          varsIgnorePattern: "^_", | 
|  | 48 | +          argsIgnorePattern: "^_", | 
|  | 49 | +          destructuredArrayIgnorePattern: "^_", | 
|  | 50 | +        }, | 
|  | 51 | +      ], | 
|  | 52 | +    }, | 
|  | 53 | +  }, | 
|  | 54 | +  { | 
|  | 55 | +    files: ["__tests__/**/*.ts", "__tests__/**/*.tsx"], | 
|  | 56 | +    languageOptions: { | 
|  | 57 | +      globals: { | 
|  | 58 | +        ...globals.node, | 
|  | 59 | +        ...globals.vitest, | 
|  | 60 | +      }, | 
|  | 61 | +    }, | 
|  | 62 | +  }, | 
|  | 63 | +); | 
0 commit comments