UNPKG

codewithgarry

Version:

Girish Sharma's NPX business card - DevOps Engineer & Cloud Architect - Connect with me directly via terminal!

73 lines (69 loc) 2.06 kB
/** * ESLint Configuration for CodeWithGarry NPX Card * Compatible with CommonJS and ESLint v9 */ const js = require('@eslint/js'); module.exports = [ js.configs.recommended, { languageOptions: { ecmaVersion: 2021, sourceType: 'commonjs', globals: { console: 'readonly', process: 'readonly', Buffer: 'readonly', __dirname: 'readonly', __filename: 'readonly', module: 'readonly', require: 'readonly', exports: 'readonly', global: 'readonly', setTimeout: 'readonly', clearTimeout: 'readonly', setInterval: 'readonly', clearInterval: 'readonly' } }, rules: { // Error Prevention 'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], 'no-undef': 'error', 'no-console': 'off', // Allow console for CLI tool 'no-debugger': 'error', // Code Quality 'prefer-const': 'warn', 'no-var': 'warn', 'eqeqeq': ['error', 'always'], 'curly': ['error', 'all'], 'no-eval': 'error', // Style (warnings only for production) 'indent': ['warn', 4, { 'SwitchCase': 1 }], 'quotes': ['warn', 'single', { 'allowTemplateLiterals': true }], 'semi': ['warn', 'always'], 'comma-dangle': ['warn', 'never'] } }, { files: ['test/**/*.js'], languageOptions: { globals: { describe: 'readonly', it: 'readonly', expect: 'readonly' } } }, { ignores: [ 'node_modules/', 'dist/', 'build/', '*.min.js', 'coverage/' ] } ];