Update ESLint configuration
CI Pipeline / test (20) (pull_request) Successful in 3m16s
CI Pipeline / test (18) (pull_request) Successful in 3m51s
CI Pipeline / e2e (chromium) (pull_request) Successful in 3m43s
CI Pipeline / e2e (firefox) (pull_request) Successful in 3m29s
CI Pipeline / e2e (webkit) (pull_request) Successful in 4m33s
CI Pipeline / visual-regression (pull_request) Successful in 6m18s
CI Pipeline / storybook (pull_request) Failing after 59s
CI Pipeline / performance (pull_request) Successful in 3m25s
CI Pipeline / lint (pull_request) Failing after 1m59s
CI Pipeline / build (pull_request) Failing after 2m25s

This commit is contained in:
adilallo
2026-01-26 08:19:49 -07:00
parent 9e8b767128
commit d707ed8b58
4 changed files with 121 additions and 37 deletions
+89 -16
View File
@@ -1,24 +1,97 @@
// ESLint flat config for Next.js 16
// Note: Using a workaround for FlatCompat circular reference issue
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format // For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import storybook from "eslint-plugin-storybook"; import storybook from "eslint-plugin-storybook";
import js from "@eslint/js";
import { dirname } from "path"; import tseslint from "@typescript-eslint/eslint-plugin";
import { fileURLToPath } from "url"; import tsparser from "@typescript-eslint/parser";
import { FlatCompat } from "@eslint/eslintrc"; import nextPlugin from "@next/eslint-plugin-next";
import globals from "globals";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [ const eslintConfig = [
...compat.extends("next/core-web-vitals"), // Base JavaScript recommended rules
{ js.configs.recommended,
files: ["**/*.js", "**/*.jsx", "**/*.mjs"], // Storybook config
ignores: ["**/*.ts", "**/*.tsx"],
},
...storybook.configs["flat/recommended"], ...storybook.configs["flat/recommended"],
// Global ignores
{
ignores: [
".next/**",
"node_modules/**",
"dist/**",
"build/**",
"coverage/**",
"storybook-static/**",
"playwright-report/**",
"test-results/**",
"lhci-results/**",
"docs/**",
],
},
// JavaScript files configuration
{
files: ["**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.node,
...globals.browser,
...globals.es2021,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
},
// TypeScript files configuration
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: tsparser,
globals: {
...globals.node,
...globals.browser,
...globals.es2021,
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": tseslint,
"@next/next": nextPlugin,
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-explicit-any": "warn",
// Next.js rules
"@next/next/no-html-link-for-pages": "off",
"@next/next/no-img-element": "warn",
},
},
// All files - basic rules
{
files: ["**/*.{ts,tsx,js,jsx}"],
rules: {
// Basic rules
"react/no-unescaped-entities": "off",
"no-console": "warn",
},
},
]; ];
export default eslintConfig; export default eslintConfig;
+26 -11
View File
@@ -21,7 +21,7 @@
}, },
"devDependencies": { "devDependencies": {
"@axe-core/playwright": "^4.10.2", "@axe-core/playwright": "^4.10.2",
"@eslint/eslintrc": "^3", "@eslint/eslintrc": "^3.3.3",
"@lhci/cli": "^0.15.1", "@lhci/cli": "^0.15.1",
"@playwright/test": "^1.55.0", "@playwright/test": "^1.55.0",
"@storybook/addon-a11y": "^8.3.0", "@storybook/addon-a11y": "^8.3.0",
@@ -47,6 +47,7 @@
"eslint": "^9", "eslint": "^9",
"eslint-config-next": "^16.0.0", "eslint-config-next": "^16.0.0",
"eslint-plugin-storybook": "^9.0.7", "eslint-plugin-storybook": "^9.0.7",
"globals": "^17.1.0",
"jest-axe": "^10.0.0", "jest-axe": "^10.0.0",
"jsdom": "^26.1.0", "jsdom": "^26.1.0",
"msw": "^2.10.5", "msw": "^2.10.5",
@@ -57,6 +58,7 @@
"storybook": "^8.3.0", "storybook": "^8.3.0",
"tailwindcss": "^4.0.0", "tailwindcss": "^4.0.0",
"typescript": "^5.9.2", "typescript": "^5.9.2",
"typescript-eslint": "^8.53.1",
"vitest": "^3.2.4", "vitest": "^3.2.4",
"wait-on": "^8.0.4", "wait-on": "^8.0.4",
"web-vitals": "^4.2.4", "web-vitals": "^4.2.4",
@@ -2805,9 +2807,9 @@
} }
}, },
"node_modules/@eslint/eslintrc": { "node_modules/@eslint/eslintrc": {
"version": "3.3.1", "version": "3.3.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz",
"integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -2817,7 +2819,7 @@
"globals": "^14.0.0", "globals": "^14.0.0",
"ignore": "^5.2.0", "ignore": "^5.2.0",
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.1",
"minimatch": "^3.1.2", "minimatch": "^3.1.2",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
}, },
@@ -2845,6 +2847,19 @@
"url": "https://github.com/sponsors/epoberezkin" "url": "https://github.com/sponsors/epoberezkin"
} }
}, },
"node_modules/@eslint/eslintrc/node_modules/globals": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -15850,9 +15865,9 @@
} }
}, },
"node_modules/globals": { "node_modules/globals": {
"version": "14.0.0", "version": "17.1.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-17.1.0.tgz",
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "integrity": "sha512-8HoIcWI5fCvG5NADj4bDav+er9B9JMj2vyL2pI8D0eismKyUvPLTSs+Ln3wqhwcp306i73iyVnEKx3F6T47TGw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -19207,9 +19222,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "4.1.0", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
+4 -2
View File
@@ -6,7 +6,7 @@
"dev": "next dev --turbopack", "dev": "next dev --turbopack",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint", "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"postinstall": "npm rebuild lightningcss", "postinstall": "npm rebuild lightningcss",
"storybook": "storybook dev -p 6006", "storybook": "storybook dev -p 6006",
"storybook:local": "storybook dev -p 6006", "storybook:local": "storybook dev -p 6006",
@@ -56,7 +56,7 @@
}, },
"devDependencies": { "devDependencies": {
"@axe-core/playwright": "^4.10.2", "@axe-core/playwright": "^4.10.2",
"@eslint/eslintrc": "^3", "@eslint/eslintrc": "^3.3.3",
"@lhci/cli": "^0.15.1", "@lhci/cli": "^0.15.1",
"@playwright/test": "^1.55.0", "@playwright/test": "^1.55.0",
"@storybook/addon-a11y": "^8.3.0", "@storybook/addon-a11y": "^8.3.0",
@@ -82,6 +82,7 @@
"eslint": "^9", "eslint": "^9",
"eslint-config-next": "^16.0.0", "eslint-config-next": "^16.0.0",
"eslint-plugin-storybook": "^9.0.7", "eslint-plugin-storybook": "^9.0.7",
"globals": "^17.1.0",
"jest-axe": "^10.0.0", "jest-axe": "^10.0.0",
"jsdom": "^26.1.0", "jsdom": "^26.1.0",
"msw": "^2.10.5", "msw": "^2.10.5",
@@ -92,6 +93,7 @@
"storybook": "^8.3.0", "storybook": "^8.3.0",
"tailwindcss": "^4.0.0", "tailwindcss": "^4.0.0",
"typescript": "^5.9.2", "typescript": "^5.9.2",
"typescript-eslint": "^8.53.1",
"vitest": "^3.2.4", "vitest": "^3.2.4",
"wait-on": "^8.0.4", "wait-on": "^8.0.4",
"web-vitals": "^4.2.4", "web-vitals": "^4.2.4",
+2 -8
View File
@@ -1,11 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2017", "target": "ES2017",
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": false, "strict": false,
@@ -36,7 +32,5 @@
"**/*.jsx", "**/*.jsx",
".next/dev/types/**/*.ts" ".next/dev/types/**/*.ts"
], ],
"exclude": [ "exclude": ["node_modules"]
"node_modules"
]
} }