Skip to content

User Guide

Install

npm:

bash
npm i eslint-plugin-ntnyq -D

yarn

bash
yarn add eslint-plugin-ntnyq -D

pnpm

bash
pnpm add eslint-plugin-ntnyq -D

Usage

Config in eslint.config.mjs

js
import pluginNtnyq from 'eslint-plugin-ntnyq'

export default [
  ...pluginNtnyq.configs.recommended,
  // Or
  // ...pluginNtnyq.configs.all,
]

The recommended config enables a subset of the rules that should be most useful to most users.

See src/configs/recommended.ts for more details.

The all preset

The all config enables all the the rules.

See src/configs/all.ts for more details.

Advanced Configuration

Override/add specific rules configurations.

See also: http://eslint.org/docs/user-guide/configuring.

js
import pluginNtnyq from 'eslint-plugin-ntnyq'

export default [
  {
    files: ['**/*.ts'],
    plugins: {
      ntnyq: pluginNtnyq,
    },
    rules: {
      'ntnyq/no-member-accessibility': 'error',
    },
  },
]