]> Git Repo - pico-vscode.git/blob - eslint.config.mjs
Merge branch 'main' into main
[pico-vscode.git] / eslint.config.mjs
1 import globals from "globals";
2
3 import tseslint from "typescript-eslint";
4
5 import js from "@eslint/js";
6 import eslintConfigPrettier from "eslint-config-prettier";
7
8 export default [
9   js.configs.recommended,
10   ...tseslint.configs.recommendedTypeChecked,
11   eslintConfigPrettier,
12   {
13     languageOptions: {
14       ecmaVersion: 14,
15       sourceType: "module",
16       globals: {
17         ...globals.node,
18         ...globals.es6,
19         ...globals.commonjs
20       },
21       parserOptions: {
22         project: true,
23         tsconfigRootDir: import.meta.dirname
24       }
25     },
26     files: ["src/**/*.mts"],
27     rules: {
28       "@typescript-eslint/naming-convention": "warn",
29       "@typescript-eslint/no-unused-vars": "warn",
30       "@typescript-eslint/no-explicit-any": "warn",
31       "@typescript-eslint/array-type": ["error", { default: "array-simple" }],
32       "@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
33       "@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true }],
34       "@typescript-eslint/consistent-type-exports": "error",
35       "semi": "warn",
36       curly: "warn",
37       eqeqeq: "warn",
38       "no-throw-literal": "warn",
39       semi: "off",
40       "no-mixed-requires": "error",
41       "no-this-before-super": "warn",
42       "no-unreachable": "warn",
43       "no-unused-vars": "off",
44       "max-len": ["warn", { code: 80, comments: 100, ignoreComments: false }],
45       "no-fallthrough": "warn",
46       "newline-before-return": "warn",
47       "no-return-await": "warn",
48       "arrow-body-style": ["error", "as-needed"],
49       "no-unexpected-multiline": "error"
50     },
51     ignores: [
52       "out/",
53       "dist/",
54       "**/*.d.ts",
55       "web/**/*.js",
56     ]
57   }
58 ];
This page took 0.02624 seconds and 4 git commands to generate.