feat: add shared ESLint config package (@repo/eslint-config)
This commit is contained in:
17
packages/eslint-config/base.js
Normal file
17
packages/eslint-config/base.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import eslintConfigPrettier from "eslint-config-prettier";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import turboPlugin from "eslint-plugin-turbo";
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{ ignores: ["dist/**", "node_modules/**"] },
|
||||||
|
js.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
eslintConfigPrettier,
|
||||||
|
{
|
||||||
|
plugins: { turbo: turboPlugin },
|
||||||
|
rules: {
|
||||||
|
"turbo/no-undeclared-env-vars": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
6
packages/eslint-config/next.js
Normal file
6
packages/eslint-config/next.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import baseConfig from "./base.js";
|
||||||
|
|
||||||
|
export default [
|
||||||
|
...baseConfig,
|
||||||
|
{ ignores: [".next/**", "out/**"] },
|
||||||
|
];
|
||||||
20
packages/eslint-config/package.json
Normal file
20
packages/eslint-config/package.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "@repo/eslint-config",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
"./base": "./base.js",
|
||||||
|
"./next": "./next.js",
|
||||||
|
"./react-internal": "./react-internal.js"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.20.0",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
||||||
|
"@typescript-eslint/parser": "^8.25.0",
|
||||||
|
"eslint": "^9.20.0",
|
||||||
|
"eslint-config-prettier": "^10.1.0",
|
||||||
|
"eslint-plugin-turbo": "^2.4.0",
|
||||||
|
"typescript-eslint": "^8.25.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
3
packages/eslint-config/react-internal.js
vendored
Normal file
3
packages/eslint-config/react-internal.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import baseConfig from "./base.js";
|
||||||
|
|
||||||
|
export default [...baseConfig];
|
||||||
Reference in New Issue
Block a user