Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adeira/eslint-fixtures-tester

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adeira/eslint-fixtures-tester

Eslint fixtures tester utility.

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source
yarn add --dev @adeira/eslint-fixtures-tester

Usage:

import path from 'path';
import testFixtures from '@adeira/eslint-fixtures-tester';

const fixturesPath = path.join(__dirname, 'fixtures', 'no-concatenated-classes');
const validFixturesPath = path.join(fixturesPath, 'valid');
const invalidFixturesPath = path.join(fixturesPath, 'invalid');

testFixtures({
  rule: require('../no-concatenated-classes'),
  validFixturesPath,
  invalidFixturesPath,
});

Where no-concatenated-classes folder has this structure:

/src/rules/__tests__/fixtures/no-concatenated-classes
├── invalid
│   ├── basic.js
│   ├── complex-classname.js
│   └── custom-sx-names.js
└── valid
    ├── basic.js
    ├── simple-template-literal.js
    └── sx-multiple-arguments.js

2 directories, 6 files

Where each JS file is a valid or invalid real-life code example. Invalid fixtures must have the following header:

/**
 * @eslintExpectedError Exact error message 1 here.
 * @eslintExpectedError Exact error message 2 here.
 */

You can optionally specify the error boundaries:

/**
 * @eslintExpectedError (1:2;3:4) Exact error message 1 here.
 * @eslintExpectedError (1:2;3:4) Exact error message 2 here.
 */

The format is: (line:column;endLine:endColumn)

FAQs

Package last updated on 22 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc