import js from '@eslint/js'; import globals from 'globals'; export default [ js.configs.recommended, { languageOptions: { ecmaVersion: 2024, globals: { ...globals.node, ...globals.es2024, }, }, rules: { 'arrow-spacing': [1, { before: true, after: true }], 'comma-dangle': [1, { arrays: 'always-multiline', objects: 'always-multiline' }], 'comma-spacing': 1, 'comma-style': 'error', 'curly': ['error', 'multi-line', 'consistent'], 'dot-location': ['error', 'property'], 'handle-callback-err': 'off', 'indent': [1, 'tab'], 'keyword-spacing': 1, 'max-nested-callbacks': ['error', { max: 4 }], 'max-statements-per-line': ['error', { max: 2 }], 'no-console': 'off', 'no-empty': 1, 'no-empty-function': 1, 'no-floating-decimal': 'error', 'no-lonely-if': 1, 'no-multi-spaces': 1, 'no-multiple-empty-lines': [1, { max: 3, maxEOF: 1, maxBOF: 0 }], 'no-shadow': ['error', { allow: ['err', 'resolve', 'reject'] }], 'no-trailing-spaces': 1, 'no-unreachable': 1, 'no-unused-vars': 1, 'no-use-before-define': ['error', { functions: false, classes: true }], 'no-var': 'error', 'object-curly-spacing': [1, 'always'], 'prefer-const': 'error', 'quotes': [1, 'single'], 'semi': [1, 'always'], 'sort-vars': 1, 'space-before-blocks': 1, 'space-before-function-paren': [1, { anonymous: 'never', named: 'never', asyncArrow: 'always' }], 'space-in-parens': 1, 'space-infix-ops': 1, 'space-unary-ops': 1, 'spaced-comment': 1, 'wrap-regex': 1, 'yoda': 'error', }, ignores: ['node_modules', '*min.js', '*bundle*', 'build/*', 'dist/*'], }, ];