43 lines
740 B
JavaScript
43 lines
740 B
JavaScript
const { resolve } = require("node:path");
|
|
|
|
const project = resolve(process.cwd(), "tsconfig.json");
|
|
|
|
/** @type {import("eslint").Linter.Config} */
|
|
module.exports = {
|
|
extends: [
|
|
"eslint:recommended",
|
|
"prettier",
|
|
require.resolve("@vercel/style-guide/eslint/next"),
|
|
"turbo",
|
|
],
|
|
globals: {
|
|
React: true,
|
|
JSX: true,
|
|
},
|
|
env: {
|
|
node: true,
|
|
},
|
|
plugins: ["only-warn"],
|
|
settings: {
|
|
"import/resolver": {
|
|
typescript: {
|
|
project,
|
|
},
|
|
},
|
|
},
|
|
ignorePatterns: [
|
|
// Ignore dotfiles
|
|
".*.js",
|
|
"node_modules/",
|
|
],
|
|
overrides: [
|
|
{ files: ["*.js?(x)", "*.ts?(x)"] },
|
|
{
|
|
files: ["*.ts", "*.tsx"],
|
|
rules: {
|
|
"no-undef": "off",
|
|
},
|
|
},
|
|
],
|
|
};
|