ваше сообщение коммита
This commit is contained in:
31
backend/eslint.config.cjs
Normal file
31
backend/eslint.config.cjs
Normal file
@@ -0,0 +1,31 @@
|
||||
const globals = require('globals');
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
ignores: ['node_modules/**', 'artifacts/**', 'sessions/**', 'logs/**', 'data/**'],
|
||||
},
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module', // Оставляем module, т.к. ESLint может анализировать ES модули
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.es2021,
|
||||
// Для тестов Mocha
|
||||
describe: 'readonly',
|
||||
it: 'readonly',
|
||||
beforeEach: 'readonly',
|
||||
before: 'readonly',
|
||||
after: 'readonly',
|
||||
afterEach: 'readonly',
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': 'warn', // Лучше warn, чем off
|
||||
'no-console': 'off', // Оставляем off для логов в Node.js
|
||||
'no-undef': 'error',
|
||||
'no-duplicate-imports': 'error',
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user