create-cen-app
Version:
create an client-engineering-style app
51 lines (48 loc) • 1.78 kB
JavaScript
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");
/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: ["plugin:@typescript-eslint/recommended-requiring-type-checking"],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
// needs to be ignored in overrides, otherwise the disabled rules will be re-enabled
rules: {
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-empty-interface": "warn",
"@next/next/no-img-element": "off",
"prefer-const": "warn",
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint"],
extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
};
module.exports = config;