init
This commit is contained in:
13
packages/eslint-config/README.md
Normal file
13
packages/eslint-config/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# @mintel/eslint-config
|
||||
|
||||
Shared ESLint configurations for Mintel projects.
|
||||
|
||||
## Usage
|
||||
|
||||
### Next.js
|
||||
In your `eslint.config.mjs`:
|
||||
```javascript
|
||||
import { nextConfig } from "@mintel/eslint-config/next";
|
||||
|
||||
export default nextConfig;
|
||||
```
|
||||
24
packages/eslint-config/next.js
Normal file
24
packages/eslint-config/next.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
});
|
||||
|
||||
export const nextConfig = [
|
||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||
{
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
||||
"@typescript-eslint/no-require-imports": "off",
|
||||
"prefer-const": "warn",
|
||||
"react/no-unescaped-entities": "off",
|
||||
"@next/next/no-img-element": "warn"
|
||||
}
|
||||
}
|
||||
];
|
||||
18
packages/eslint-config/package.json
Normal file
18
packages/eslint-config/package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "@mintel/eslint-config",
|
||||
"version": "1.0.0",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://npm.infra.mintel.me"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./next": "./next.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@eslint/eslintrc": "^3.0.0",
|
||||
"eslint-config-next": "15.1.6"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user