Merged in chore/migrate-from-next-lint (pull request #3263)
chore: Migrate from next lint to eslint * Migrate scandic-web * Migrate partner-sas * Enable any rule in partner-sas Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -12,6 +12,22 @@ const compat = new FlatCompat({
|
||||
})
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
ignores: [
|
||||
".next/**",
|
||||
"node_modules/**",
|
||||
"dist/**",
|
||||
"build/**",
|
||||
"public/**",
|
||||
"playwright-report/**",
|
||||
"test-results/**",
|
||||
"coverage/**",
|
||||
"*.config.js",
|
||||
"*.config.ts",
|
||||
"*.config.mjs",
|
||||
"next-env.d.ts",
|
||||
],
|
||||
},
|
||||
{
|
||||
extends: compat.extends(
|
||||
"next/core-web-vitals",
|
||||
@@ -80,6 +96,8 @@ export default defineConfig([
|
||||
],
|
||||
|
||||
"@typescript-eslint/consistent-type-imports": "error",
|
||||
"@typescript-eslint/no-empty-object-type": "off",
|
||||
"@typescript-eslint/no-require-imports": "off",
|
||||
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
|
||||
@@ -2,13 +2,11 @@ import path from "node:path"
|
||||
|
||||
const WEB_ROOT = path.join(process.cwd(), "apps/partner-sas/")
|
||||
|
||||
// https://nextjs.org/docs/app/building-your-application/configuring/eslint#lint-staged
|
||||
const buildEslintCommand = (filenames) => {
|
||||
const cmd = `next lint --fix --max-warnings 0 --file ${filenames
|
||||
const files = filenames
|
||||
.map((f) => `'${path.relative(WEB_ROOT, f)}'`)
|
||||
.join(" --file ")}`
|
||||
|
||||
return cmd
|
||||
.join(" ")
|
||||
return `eslint --fix --no-warn-ignored --max-warnings 0 ${files}`
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
"dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3001 NEXT_PUBLIC_PORT=3001 next dev --turbo",
|
||||
"build": "next build",
|
||||
"start": "node .next/standalone/server.js",
|
||||
"lint": "next lint --max-warnings 0 && tsgo --noEmit",
|
||||
"lint:fix": "next lint --fix && tsgo --noEmit",
|
||||
"lint": "eslint --max-warnings 0 . && tsgo --noEmit",
|
||||
"lint:fix": "eslint --fix . && tsgo --noEmit",
|
||||
"check-types": "tsgo --noEmit",
|
||||
"typegen": "next typegen",
|
||||
"clean": "rm -rf .next",
|
||||
@@ -42,7 +42,6 @@
|
||||
"usehooks-ts": "3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "^9.26.0",
|
||||
"@playwright/test": "^1.53.1",
|
||||
"@scandic-hotels/common": "workspace:*",
|
||||
@@ -53,6 +52,7 @@
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
||||
"@typescript-eslint/parser": "^8.32.0",
|
||||
"@typescript/native-preview": "^7.0.0-dev.20251104.1",
|
||||
"babel-plugin-formatjs": "^10.5.39",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "15.3.2",
|
||||
|
||||
1
apps/partner-sas/types/window.d.ts
vendored
1
apps/partner-sas/types/window.d.ts
vendored
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
interface Window {
|
||||
dataLayer: {
|
||||
[key: string]: any
|
||||
|
||||
Reference in New Issue
Block a user