@pact-foundation/pact-core
Version:
Core of @pact-foundation/pact. You almost certainly don't want to depend on this directly.
69 lines (67 loc) • 1.81 kB
JavaScript
import eslint from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
export default [
eslint.configs.recommended,
{
files: ['**/*.ts'],
ignores: ['**/*.d.ts'],
languageOptions: {
parser: tsParser,
globals: {
// Node.js globals
Buffer: 'readonly',
require: 'readonly',
module: 'writable',
exports: 'writable',
process: 'readonly',
console: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
// Test globals
describe: 'readonly',
context: 'readonly',
it: 'readonly',
before: 'readonly',
after: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'no-redeclare': 'off',
},
},
{
files: ['**/*.js'],
languageOptions: {
sourceType: 'commonjs',
globals: {
module: 'writable',
exports: 'writable',
require: 'readonly',
Buffer: 'readonly',
console: 'readonly',
process: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
describe: 'readonly',
context: 'readonly',
it: 'readonly',
before: 'readonly',
after: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^(VERIFY_PROVIDER_RESPONSE|FfiFunctionResult|FfiLogLevelFilter|FnValidationStatus)$' }],
},
},
];