resolves #42 Co-authored-by: johba <johba@harb.eth> Reviewed-on: https://codeberg.org/johba/harb/pulls/49
29 lines
1 KiB
JavaScript
29 lines
1 KiB
JavaScript
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
|
|
export default [
|
|
{
|
|
files: ["src/**/*.ts"],
|
|
ignores: ["src/tests/**/*", "src/__generated__/**/*"],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: { project: "./tsconfig.json" }
|
|
},
|
|
plugins: { "@typescript-eslint": tsPlugin },
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{ selector: "function", format: ["camelCase"] },
|
|
{ selector: "variable", format: ["camelCase", "UPPER_CASE"] },
|
|
{ selector: "typeLike", format: ["PascalCase"] }
|
|
],
|
|
"max-len": ["error", { code: 140, ignoreStrings: true, ignoreTemplateLiterals: true }],
|
|
"no-console": "error",
|
|
"semi": ["error", "always"],
|
|
"indent": ["error", 2, { "SwitchCase": 1 }],
|
|
"prefer-const": "error"
|
|
}
|
|
}
|
|
];
|