const globals = require('globals') module.exports = [ { ignores: ['*.html', 'node-os-utils'] }, { files: ['**/*.js'], languageOptions: { ecmaVersion: 'latest', sourceType: 'module', globals: { ...globals.node, ...globals.es2021, logger: 'readonly' } }, rules: { 'no-console': 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'template-curly-spacing': ['error', 'always'], 'default-case': 0, 'no-empty': 0, 'object-curly-spacing': ['error', 'always'], 'no-multi-spaces': ['error'], indent: ['error', 2, { SwitchCase: 1 }], quotes: ['error', 'single'], semi: ['error', 'never'], 'comma-dangle': ['error', 'never'], 'space-before-blocks': ['error', 'always'], 'space-in-parens': ['error', 'never'], 'keyword-spacing': ['error', { before: true, after: true }], 'no-redeclare': ['error', { builtinGlobals: true }], 'no-multi-assign': 0, 'no-restricted-globals': 0, 'no-case-declarations': 0, 'space-before-function-paren': 0, 'no-async-promise-executor': 0, 'one-var': 0, 'linebreak-style': 0, 'no-extra-boolean-cast': 0, 'no-constant-condition': 0, 'no-prototype-builtins': 0, 'no-regex-spaces': 0, 'no-unexpected-multiline': 0, 'no-fallthrough': 0, 'no-delete-var': 0, 'no-mixed-spaces-and-tabs': 0, 'no-class-assign': 0, 'no-param-reassign': 0, 'max-len': 0, 'func-names': 0, 'import/no-unresolved': 0, 'import/prefer-default-export': 0, 'no-const-assign': 1, 'no-unused-vars': 1, 'no-unsafe-negation': 1, 'use-isnan': 1, 'no-var': 2, 'no-empty-pattern': 2, eqeqeq: 2, 'no-cond-assign': 2, 'no-dupe-args': 2, 'no-dupe-keys': 2, 'no-duplicate-case': 2, 'no-func-assign': 2, 'no-inner-declarations': 2, 'no-sparse-arrays': 2, 'no-unreachable': 2, 'no-unsafe-finally': 2, 'valid-typeof': 2, 'prefer-const': 0, 'no-extra-parens': 0, 'no-extra-semi': 2, 'dot-notation': 0, 'dot-location': ['error', 'property'], 'no-else-return': 2, 'no-implicit-coercion': [2, { allow: ['!!', '~', '+'] }], 'no-trailing-spaces': 1, 'no-multiple-empty-lines': [1, { max: 1 }], 'no-useless-return': 2, 'wrap-iife': 0, yoda: 0, strict: 0, 'no-undef-init': 0, 'prefer-promise-reject-errors': 0, 'consistent-return': 0, 'no-new': 0, 'no-restricted-syntax': 0, 'no-plusplus': 0, 'import/extensions': 0, 'global-require': 0, 'no-return-assign': 0 } } ]