Files
fredy/eslint.config.js

49 lines
1.1 KiB
JavaScript
Raw Normal View History

2025-12-11 10:40:55 +01:00
/*
* Copyright (c) 2026 by Christian Kellner.
2025-12-11 10:40:55 +01:00
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
2025-08-31 20:09:38 +02:00
// eslint.config.js
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
import react from 'eslint-plugin-react';
export default [
2025-09-03 14:22:04 +02:00
{
ignores: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/public/**', 'db/**', 'conf/**'],
},
2026-02-16 13:50:50 +01:00
2025-08-31 20:09:38 +02:00
{
2026-02-16 13:50:50 +01:00
files: ['**/*.{js,jsx}'],
2025-08-31 20:09:38 +02:00
languageOptions: {
2026-02-16 13:50:50 +01:00
ecmaVersion: 'latest',
2025-08-31 20:09:38 +02:00
sourceType: 'module',
2026-02-16 13:50:50 +01:00
parserOptions: {
ecmaFeatures: { jsx: true },
},
2025-08-31 20:09:38 +02:00
globals: {
...globals.browser,
...globals.node,
2026-03-16 14:26:58 +01:00
...globals.jest,
2025-08-31 20:09:38 +02:00
Promise: 'readonly',
fetch: 'readonly',
describe: 'readonly',
after: 'readonly',
it: 'readonly',
2026-03-16 14:26:58 +01:00
beforeEach: 'readonly',
afterEach: 'readonly',
vi: 'readonly',
2025-08-31 20:09:38 +02:00
},
},
2025-09-03 14:22:04 +02:00
plugins: { react },
2026-02-16 13:50:50 +01:00
settings: { react: { version: 'detect' } },
2025-08-31 20:09:38 +02:00
rules: {
2026-02-16 13:50:50 +01:00
...js.configs.recommended.rules,
2025-08-31 20:09:38 +02:00
'no-console': ['error', { allow: ['warn', 'error'] }],
},
},
2026-02-16 13:50:50 +01:00
prettier,
2025-08-31 20:09:38 +02:00
];