@mkizka/eslint-plugin-aaa
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@mkizka/eslint-plugin-aaa

This ESLint plugin checks that arrange, act, and assert comments are present in test files.

test("sample test", () => {
  // arrange
  setupSomething();
  // act
  const actual = testFunction();
  // assert
  expect(actual).toBe(expected);
});

Installation

npm i -D @mkizka/eslint-plugin-aaa

Example

// eslint.config.js
import { arrangeActAssert } from "@mkizka/eslint-plugin-aaa";

export default [arrangeActAssert];

or

// eslint.config.js
import { arrangeActAssertPlugin } from "@mkizka/eslint-plugin-aaa";

export default [
  {
    plugins: {
      aaa: arrangeActAssertPlugin,
    },
    rules: {
      "aaa/arrange-act-assert": "warn",
    },
  },
];

Dependents (0)

Package Sidebar

Install

npm i @mkizka/eslint-plugin-aaa

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

9.07 kB

Total Files

6

Last publish

Collaborators

  • mkizka