UNPKG

check-pwnedpasswords

Version:

A simple Node.js module that checks against the https://haveibeenpwned.com database through its https://api.pwnedpasswords.com API.

41 lines (35 loc) 923 B
import jest from 'eslint-plugin-jest'; import globals from 'globals'; import path from 'node:path'; import {fileURLToPath} from 'node:url'; import js from '@eslint/js'; import {FlatCompat} from '@eslint/eslintrc'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended, allConfig: js.configs.all }); export default [...compat.extends('eslint:recommended'), { plugins: { jest, }, languageOptions: { globals: { ...globals.browser, ...globals.commonjs, ...jest.environments.globals.globals, require: true, module: true, }, ecmaVersion: 12, sourceType: 'module', }, rules: { indent: ['error', 2], 'linebreak-style': ['error', 'unix'], quotes: ['error', 'single'], semi: ['error', 'always'], }, }];