60 lines
1.3 KiB
JavaScript
60 lines
1.3 KiB
JavaScript
import js from '@eslint/js';
|
|
import react from 'eslint-plugin-react';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import globals from 'globals';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['**/node_modules/**', '**/dist/**', '**/coverage/**', 'files/**'],
|
|
},
|
|
js.configs.recommended,
|
|
{
|
|
files: ['backend/**/*.js'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: globals.node,
|
|
},
|
|
},
|
|
{
|
|
files: ['e2e/**/*.js', 'playwright.config.js'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: globals.node,
|
|
},
|
|
},
|
|
{
|
|
files: ['ecosystem.config.cjs'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'commonjs',
|
|
globals: globals.node,
|
|
},
|
|
},
|
|
{
|
|
files: ['frontend/**/*.{js,jsx}'],
|
|
plugins: {
|
|
react,
|
|
'react-hooks': reactHooks,
|
|
},
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
parserOptions: {
|
|
ecmaFeatures: { jsx: true },
|
|
},
|
|
globals: globals.browser,
|
|
},
|
|
settings: {
|
|
react: { version: 'detect' },
|
|
},
|
|
rules: {
|
|
...react.configs.recommended.rules,
|
|
...reactHooks.configs.recommended.rules,
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/prop-types': 'off',
|
|
},
|
|
},
|
|
];
|