44 lines
932 B
JavaScript
44 lines
932 B
JavaScript
import { createRequire } from "node:module"
|
|
import babelParser from "@babel/eslint-parser"
|
|
import js from "@eslint/js"
|
|
import eslintConfigPrettier from "eslint-config-prettier"
|
|
import onlyWarn from "eslint-plugin-only-warn"
|
|
import turboPlugin from "eslint-plugin-turbo"
|
|
|
|
const require = createRequire(import.meta.url)
|
|
|
|
/**
|
|
* A shared ESLint configuration for the repository.
|
|
*
|
|
* @type {import("eslint").Linter.Config[]}
|
|
*/
|
|
export const config = [
|
|
js.configs.recommended,
|
|
eslintConfigPrettier,
|
|
{
|
|
languageOptions: {
|
|
parser: babelParser,
|
|
parserOptions: {
|
|
requireConfigFile: false,
|
|
babelOptions: {
|
|
presets: [require.resolve("@babel/preset-typescript")],
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
turbo: turboPlugin,
|
|
},
|
|
rules: {
|
|
"turbo/no-undeclared-env-vars": "warn",
|
|
},
|
|
},
|
|
{
|
|
plugins: {
|
|
onlyWarn,
|
|
},
|
|
},
|
|
{
|
|
ignores: ["dist/**"],
|
|
},
|
|
]
|