|
1 | 1 | // Copyright (C) 2025 Intel Corporation |
2 | 2 | // SPDX-License-Identifier: Apache-2.0 |
3 | 3 |
|
4 | | -import { FlatCompat } from '@eslint/eslintrc' |
| 4 | +import { FlatCompat } from "@eslint/eslintrc"; |
5 | 5 |
|
6 | 6 | const compat = new FlatCompat({ |
7 | 7 | // import.meta.dirname is available after Node.js v20.11.0 |
8 | 8 | baseDirectory: import.meta.dirname, |
9 | | -}) |
| 9 | +}); |
10 | 10 |
|
11 | 11 | const eslintConfig = [ |
| 12 | + { |
| 13 | + ignores: ["src/app/(payload)/admin", "eslint.config.mjs"], |
| 14 | + }, |
12 | 15 | ...compat.config({ |
13 | 16 | extends: [ |
14 | | - 'next', |
15 | | - 'next/core-web-vitals', |
16 | | - 'next/typescript', |
17 | | - 'plugin:prettier/recommended', |
18 | | - 'plugin:jsx-a11y/recommended', |
| 17 | + "next", |
| 18 | + "next/core-web-vitals", |
| 19 | + "next/typescript", |
| 20 | + "plugin:prettier/recommended", |
| 21 | + "plugin:jsx-a11y/recommended", |
19 | 22 | ], |
20 | | - plugins: ['prettier', 'jsx-a11y'], |
| 23 | + plugins: ["prettier", "jsx-a11y"], |
21 | 24 | rules: { |
22 | | - 'prettier/prettier': [ |
23 | | - 'error', |
| 25 | + "no-console": "error", |
| 26 | + "prettier/prettier": [ |
| 27 | + "error", |
24 | 28 | { |
25 | | - trailingComma: 'all', |
| 29 | + trailingComma: "all", |
26 | 30 | semi: false, |
27 | 31 | tabWidth: 2, |
28 | 32 | singleQuote: true, |
29 | 33 | printWidth: 80, |
30 | | - endOfLine: 'auto', |
31 | | - arrowParens: 'always', |
32 | | - plugins: ['prettier-plugin-tailwindcss'], |
| 34 | + endOfLine: "auto", |
| 35 | + arrowParens: "always", |
| 36 | + plugins: ["prettier-plugin-tailwindcss"], |
33 | 37 | }, |
34 | 38 | { |
35 | 39 | usePrettierrc: false, |
36 | 40 | }, |
37 | 41 | ], |
38 | | - 'react/react-in-jsx-scope': 'off', |
39 | | - 'jsx-a11y/media-has-caption': 'off', |
40 | | - 'jsx-a11y/alt-text': 'warn', |
41 | | - 'jsx-a11y/aria-props': 'warn', |
42 | | - 'jsx-a11y/aria-proptypes': 'warn', |
43 | | - 'jsx-a11y/aria-unsupported-elements': 'warn', |
44 | | - 'jsx-a11y/role-has-required-aria-props': 'warn', |
45 | | - 'jsx-a11y/role-supports-aria-props': 'warn', |
46 | | - '@typescript-eslint/naming-convention': [ |
47 | | - 'error', |
| 42 | + "react/react-in-jsx-scope": "off", |
| 43 | + "jsx-a11y/media-has-caption": "off", |
| 44 | + "jsx-a11y/alt-text": "warn", |
| 45 | + "jsx-a11y/aria-props": "warn", |
| 46 | + "jsx-a11y/aria-proptypes": "warn", |
| 47 | + "jsx-a11y/aria-unsupported-elements": "warn", |
| 48 | + "jsx-a11y/role-has-required-aria-props": "warn", |
| 49 | + "jsx-a11y/role-supports-aria-props": "warn", |
| 50 | + "@typescript-eslint/naming-convention": [ |
| 51 | + "error", |
48 | 52 | { |
49 | | - selector: 'variableLike', |
50 | | - format: ['UPPER_CASE', 'camelCase', 'PascalCase'], |
51 | | - leadingUnderscore: 'allow', |
52 | | - trailingUnderscore: 'forbid', |
| 53 | + selector: "variableLike", |
| 54 | + format: ["UPPER_CASE", "camelCase", "PascalCase"], |
| 55 | + leadingUnderscore: "allow", |
| 56 | + trailingUnderscore: "forbid", |
53 | 57 | }, |
54 | 58 | ], |
55 | 59 | }, |
56 | 60 | }), |
57 | | -] |
| 61 | +]; |
58 | 62 |
|
59 | | -export default eslintConfig |
| 63 | +export default eslintConfig; |
0 commit comments