Skip to content

Guide

Install

shell
npm i eslint-plugin-ntnyq -D
shell
yarn add eslint-plugin-ntnyq -D
shell
pnpm add eslint-plugin-ntnyq -D

Basic Usage

Highly recommended to use eslint.config.mjs as config file.

eslint.config.mjs
ts
// @ts-check

import { 
defineConfig
} from 'eslint/config'
import
pluginNtnyq
from 'eslint-plugin-ntnyq'
export default
defineConfig
([
// other configs {
name
: 'ntnyq',
plugins
: {
ntnyq:
pluginNtnyq
,
Type '{ meta: { name: string; version: string; }; rules: { 'no-duplicate-exports': ESLintRuleModule<Options$1>; 'no-member-accessibility': ESLintRuleModule<[]>; 'prefer-newline-after-file-header': ESLintRuleModule<...>; }; }' is not assignable to type 'Plugin'. Types of property 'rules' are incompatible. Type '{ 'no-duplicate-exports': ESLintRuleModule<Options$1>; 'no-member-accessibility': ESLintRuleModule<[]>; 'prefer-newline-after-file-header': ESLintRuleModule<...>; }' is not assignable to type 'Record<string, RuleModule>'. Property ''no-duplicate-exports'' is incompatible with index signature. Type 'ESLintRuleModule<Options$1>' is not assignable to type 'RuleModule'. Types of property 'create' are incompatible. Type '(context: RuleContext) => NodeListener' is not assignable to type '(context: RuleContext) => RuleListener'. Types of parameters 'context' and 'context' are incompatible. Type 'import("/vercel/path0/node_modules/.pnpm/@types+eslint@9.6.1/node_modules/@types/eslint/index").Rule.RuleContext' is not assignable to type 'import("/vercel/path0/node_modules/.pnpm/eslint@9.29.0_jiti@2.4.2/node_modules/eslint/lib/types/index").Rule.RuleContext'. Types of property 'sourceCode' are incompatible. Type 'SourceCode' is missing the following properties from type 'SourceCode': getLoc, getRange, isGlobalReference, traverse
},
rules
: {
'ntnyq/no-duplicate-exports': 'error', }, }, ])