@ntnyq/eslint-config 3.0.0-beta.16 → 3.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,9 +21,9 @@ pnpm add eslint prettier typescript @ntnyq/eslint-config @ntnyq/prettier-config
21
21
  Highly recommended using **`eslint.config.mjs`** as the config file :
22
22
 
23
23
  ```js
24
- import { ntnyq } from '@ntnyq/eslint-config'
24
+ import { defineESLintConfig } from '@ntnyq/eslint-config'
25
25
 
26
- export default ntnyq()
26
+ export default defineESLintConfig()
27
27
  ```
28
28
 
29
29
  Add scripts `lint` in `package.json`:
@@ -156,7 +156,7 @@ export interface ConfigOptions {
156
156
 
157
157
  vue?: boolean | ConfigVueOptions
158
158
 
159
- test?: boolean | ConfigVitestOptions
159
+ test?: boolean | ConfigTestOptions
160
160
  }
161
161
  ```
162
162
 
package/dist/index.cjs CHANGED
@@ -60,6 +60,8 @@ __export(src_exports, {
60
60
  antfu: () => antfu,
61
61
  command: () => command,
62
62
  comments: () => comments,
63
+ createConfigNtnyq: () => createConfigNtnyq,
64
+ defineESLintConfig: () => defineESLintConfig,
63
65
  getOverrides: () => getOverrides,
64
66
  gitignore: () => gitignore,
65
67
  hasTypeScript: () => hasTypeScript,
@@ -89,6 +91,7 @@ __export(src_exports, {
89
91
  pluginJsonc: () => import_eslint_plugin_jsonc.default,
90
92
  pluginMarkdown: () => import_markdown.default,
91
93
  pluginNode: () => import_eslint_plugin_n.default,
94
+ pluginNtnyq: () => import_eslint_plugin_ntnyq.default,
92
95
  pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
93
96
  pluginPrettier: () => import_eslint_plugin_prettier.default,
94
97
  pluginRegexp: () => pluginRegexp,
@@ -228,6 +231,7 @@ var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
228
231
  var import_eslint_plugin_vue = __toESM(require("eslint-plugin-vue"), 1);
229
232
  var import_eslint_plugin_yml = __toESM(require("eslint-plugin-yml"), 1);
230
233
  var import_eslint_plugin_toml = __toESM(require("eslint-plugin-toml"), 1);
234
+ var import_eslint_plugin_ntnyq = __toESM(require("eslint-plugin-ntnyq"), 1);
231
235
  var import_markdown = __toESM(require("@eslint/markdown"), 1);
232
236
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
233
237
  var import_eslint_plugin_jsdoc = __toESM(require("eslint-plugin-jsdoc"), 1);
@@ -994,6 +998,7 @@ var antfu = (options = {}) => [
994
998
  // 'antfu/consistent-list-newline': 'error',
995
999
  "antfu/import-dedupe": "error",
996
1000
  "antfu/top-level-function": "error",
1001
+ // Overrides rules
997
1002
  ...options.overrides
998
1003
  }
999
1004
  }
@@ -1075,6 +1080,21 @@ var jsonc = (options = {}) => [
1075
1080
  }
1076
1081
  ];
1077
1082
 
1083
+ // src/configs/ntnyq.ts
1084
+ var createConfigNtnyq = (options = {}) => [
1085
+ {
1086
+ name: "ntnyq/ntnyq",
1087
+ plugins: {
1088
+ ntnyq: import_eslint_plugin_ntnyq.default
1089
+ },
1090
+ rules: {
1091
+ "ntnyq/no-member-accessibility": "error",
1092
+ // Overrides rules
1093
+ ...options.overrides
1094
+ }
1095
+ }
1096
+ ];
1097
+
1078
1098
  // src/configs/regexp.ts
1079
1099
  var regexp = (options = {}) => [
1080
1100
  /**
@@ -1795,7 +1815,7 @@ function getOverrides(options, key) {
1795
1815
  }
1796
1816
 
1797
1817
  // src/core.ts
1798
- function ntnyq(options = {}, userConfigs = []) {
1818
+ function defineESLintConfig(options = {}, userConfigs = []) {
1799
1819
  const configs = [];
1800
1820
  if (options.gitignore ?? true) {
1801
1821
  configs.push(
@@ -1945,6 +1965,7 @@ function ntnyq(options = {}, userConfigs = []) {
1945
1965
  );
1946
1966
  return composer;
1947
1967
  }
1968
+ var ntnyq = defineESLintConfig;
1948
1969
  // Annotate the CommonJS export names for ESM import in node:
1949
1970
  0 && (module.exports = {
1950
1971
  GLOB_ALL_SRC,
@@ -1977,6 +1998,8 @@ function ntnyq(options = {}, userConfigs = []) {
1977
1998
  antfu,
1978
1999
  command,
1979
2000
  comments,
2001
+ createConfigNtnyq,
2002
+ defineESLintConfig,
1980
2003
  getOverrides,
1981
2004
  gitignore,
1982
2005
  hasTypeScript,
@@ -2006,6 +2029,7 @@ function ntnyq(options = {}, userConfigs = []) {
2006
2029
  pluginJsonc,
2007
2030
  pluginMarkdown,
2008
2031
  pluginNode,
2032
+ pluginNtnyq,
2009
2033
  pluginPerfectionist,
2010
2034
  pluginPrettier,
2011
2035
  pluginRegexp,
package/dist/index.d.cts CHANGED
@@ -17,6 +17,7 @@ export { default as pluginNode } from 'eslint-plugin-n';
17
17
  export { default as pluginVue } from 'eslint-plugin-vue';
18
18
  export { default as pluginYaml } from 'eslint-plugin-yml';
19
19
  export { default as pluginToml } from 'eslint-plugin-toml';
20
+ export { default as pluginNtnyq } from 'eslint-plugin-ntnyq';
20
21
  export { default as pluginMarkdown } from '@eslint/markdown';
21
22
  export { default as pluginAntfu } from 'eslint-plugin-antfu';
22
23
  export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
@@ -2991,6 +2992,11 @@ interface RuleOptions {
2991
2992
  * @deprecated
2992
2993
  */
2993
2994
  'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition>;
2995
+ /**
2996
+ * Disallow usage of typescript member accessibility
2997
+ * @see https://eslint-plugin.ntnyq.com/rules/no-member-accessibility.html
2998
+ */
2999
+ 'ntnyq/no-member-accessibility'?: Linter.RuleEntry<[]>;
2994
3000
  /**
2995
3001
  * Enforce consistent line breaks after opening and before closing braces
2996
3002
  * @see https://eslint.org/docs/latest/rules/object-curly-newline
@@ -12211,7 +12217,7 @@ type Yoda = [] | [("always" | "never")] | [
12211
12217
  onlyEquality?: boolean;
12212
12218
  }
12213
12219
  ];
12214
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12220
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12215
12221
 
12216
12222
  /**
12217
12223
  * Typed flat config item
@@ -12258,6 +12264,8 @@ interface ConfigNodeOptions extends OptionsOverrides {
12258
12264
  }
12259
12265
  interface ConfigAntfuOptions extends OptionsOverrides {
12260
12266
  }
12267
+ interface ConfigNtnyqOptions extends OptionsOverrides {
12268
+ }
12261
12269
  interface ConfigPrettierOptions extends OptionsOverrides {
12262
12270
  /**
12263
12271
  * Prettier level
@@ -12357,6 +12365,10 @@ interface ConfigOptions {
12357
12365
  * @internal
12358
12366
  */
12359
12367
  antfu?: boolean | ConfigAntfuOptions;
12368
+ /**
12369
+ * @internal
12370
+ */
12371
+ ntnyq?: boolean | ConfigNtnyqOptions;
12360
12372
  comments?: boolean | ConfigCommentsOptions;
12361
12373
  jsdoc?: boolean | ConfigJsdocOptions;
12362
12374
  unocss?: boolean | ConfigUnoCSSOptions;
@@ -12370,13 +12382,17 @@ interface ConfigOptions {
12370
12382
  }
12371
12383
 
12372
12384
  /**
12373
- * @file presets
12385
+ * @file factory function to create ESLint config
12374
12386
  */
12375
12387
 
12376
12388
  /**
12377
12389
  * Config factory
12378
12390
  */
12379
- declare function ntnyq(options?: ConfigOptions, userConfigs?: Arrayable<TypedConfigItem>): FlatConfigComposer<TypedConfigItem, ConfigNames>;
12391
+ declare function defineESLintConfig(options?: ConfigOptions, userConfigs?: Arrayable<TypedConfigItem>): FlatConfigComposer<TypedConfigItem, ConfigNames>;
12392
+ /**
12393
+ * @deprecated use `defineESLintConfig` instead
12394
+ */
12395
+ declare const ntnyq: typeof defineESLintConfig;
12380
12396
 
12381
12397
  /**
12382
12398
  * @file globs constants
@@ -12455,6 +12471,8 @@ declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
12455
12471
 
12456
12472
  declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
12457
12473
 
12474
+ declare const createConfigNtnyq: (options?: ConfigNtnyqOptions) => TypedConfigItem[];
12475
+
12458
12476
  declare const regexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
12459
12477
 
12460
12478
  declare const unocss: (options?: ConfigUnoCSSOptions) => TypedConfigItem[];
@@ -12490,4 +12508,4 @@ declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConf
12490
12508
 
12491
12509
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
12492
12510
 
12493
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, specials, test, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
12511
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, createConfigNtnyq, defineESLintConfig, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, specials, test, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { default as pluginNode } from 'eslint-plugin-n';
17
17
  export { default as pluginVue } from 'eslint-plugin-vue';
18
18
  export { default as pluginYaml } from 'eslint-plugin-yml';
19
19
  export { default as pluginToml } from 'eslint-plugin-toml';
20
+ export { default as pluginNtnyq } from 'eslint-plugin-ntnyq';
20
21
  export { default as pluginMarkdown } from '@eslint/markdown';
21
22
  export { default as pluginAntfu } from 'eslint-plugin-antfu';
22
23
  export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
@@ -2991,6 +2992,11 @@ interface RuleOptions {
2991
2992
  * @deprecated
2992
2993
  */
2993
2994
  'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition>;
2995
+ /**
2996
+ * Disallow usage of typescript member accessibility
2997
+ * @see https://eslint-plugin.ntnyq.com/rules/no-member-accessibility.html
2998
+ */
2999
+ 'ntnyq/no-member-accessibility'?: Linter.RuleEntry<[]>;
2994
3000
  /**
2995
3001
  * Enforce consistent line breaks after opening and before closing braces
2996
3002
  * @see https://eslint.org/docs/latest/rules/object-curly-newline
@@ -12211,7 +12217,7 @@ type Yoda = [] | [("always" | "never")] | [
12211
12217
  onlyEquality?: boolean;
12212
12218
  }
12213
12219
  ];
12214
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12220
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12215
12221
 
12216
12222
  /**
12217
12223
  * Typed flat config item
@@ -12258,6 +12264,8 @@ interface ConfigNodeOptions extends OptionsOverrides {
12258
12264
  }
12259
12265
  interface ConfigAntfuOptions extends OptionsOverrides {
12260
12266
  }
12267
+ interface ConfigNtnyqOptions extends OptionsOverrides {
12268
+ }
12261
12269
  interface ConfigPrettierOptions extends OptionsOverrides {
12262
12270
  /**
12263
12271
  * Prettier level
@@ -12357,6 +12365,10 @@ interface ConfigOptions {
12357
12365
  * @internal
12358
12366
  */
12359
12367
  antfu?: boolean | ConfigAntfuOptions;
12368
+ /**
12369
+ * @internal
12370
+ */
12371
+ ntnyq?: boolean | ConfigNtnyqOptions;
12360
12372
  comments?: boolean | ConfigCommentsOptions;
12361
12373
  jsdoc?: boolean | ConfigJsdocOptions;
12362
12374
  unocss?: boolean | ConfigUnoCSSOptions;
@@ -12370,13 +12382,17 @@ interface ConfigOptions {
12370
12382
  }
12371
12383
 
12372
12384
  /**
12373
- * @file presets
12385
+ * @file factory function to create ESLint config
12374
12386
  */
12375
12387
 
12376
12388
  /**
12377
12389
  * Config factory
12378
12390
  */
12379
- declare function ntnyq(options?: ConfigOptions, userConfigs?: Arrayable<TypedConfigItem>): FlatConfigComposer<TypedConfigItem, ConfigNames>;
12391
+ declare function defineESLintConfig(options?: ConfigOptions, userConfigs?: Arrayable<TypedConfigItem>): FlatConfigComposer<TypedConfigItem, ConfigNames>;
12392
+ /**
12393
+ * @deprecated use `defineESLintConfig` instead
12394
+ */
12395
+ declare const ntnyq: typeof defineESLintConfig;
12380
12396
 
12381
12397
  /**
12382
12398
  * @file globs constants
@@ -12455,6 +12471,8 @@ declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
12455
12471
 
12456
12472
  declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
12457
12473
 
12474
+ declare const createConfigNtnyq: (options?: ConfigNtnyqOptions) => TypedConfigItem[];
12475
+
12458
12476
  declare const regexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
12459
12477
 
12460
12478
  declare const unocss: (options?: ConfigUnoCSSOptions) => TypedConfigItem[];
@@ -12490,4 +12508,4 @@ declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConf
12490
12508
 
12491
12509
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
12492
12510
 
12493
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, specials, test, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
12511
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, createConfigNtnyq, defineESLintConfig, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, specials, test, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.js CHANGED
@@ -105,18 +105,19 @@ import { default as default2 } from "eslint-plugin-n";
105
105
  import { default as default3 } from "eslint-plugin-vue";
106
106
  import { default as default4 } from "eslint-plugin-yml";
107
107
  import { default as default5 } from "eslint-plugin-toml";
108
- import { default as default6 } from "@eslint/markdown";
109
- import { default as default7 } from "eslint-plugin-antfu";
110
- import { default as default8 } from "eslint-plugin-jsdoc";
111
- import { default as default9 } from "eslint-plugin-jsonc";
112
- import { default as default10 } from "@unocss/eslint-plugin";
113
- import { default as default11 } from "@vitest/eslint-plugin";
114
- import { default as default12 } from "eslint-plugin-import-x";
115
- import { default as default13 } from "eslint-plugin-unicorn";
116
- import { default as default14 } from "eslint-plugin-prettier";
117
- import { default as default15 } from "eslint-plugin-perfectionist";
118
- import { default as default16 } from "eslint-plugin-unused-imports";
119
- import { default as default17 } from "@eslint-community/eslint-plugin-eslint-comments";
108
+ import { default as default6 } from "eslint-plugin-ntnyq";
109
+ import { default as default7 } from "@eslint/markdown";
110
+ import { default as default8 } from "eslint-plugin-antfu";
111
+ import { default as default9 } from "eslint-plugin-jsdoc";
112
+ import { default as default10 } from "eslint-plugin-jsonc";
113
+ import { default as default11 } from "@unocss/eslint-plugin";
114
+ import { default as default12 } from "@vitest/eslint-plugin";
115
+ import { default as default13 } from "eslint-plugin-import-x";
116
+ import { default as default14 } from "eslint-plugin-unicorn";
117
+ import { default as default15 } from "eslint-plugin-prettier";
118
+ import { default as default16 } from "eslint-plugin-perfectionist";
119
+ import { default as default17 } from "eslint-plugin-unused-imports";
120
+ import { default as default18 } from "@eslint-community/eslint-plugin-eslint-comments";
120
121
 
121
122
  // src/configs/typescript.ts
122
123
  import process from "node:process";
@@ -848,11 +849,11 @@ var vitest = (options = {}) => [
848
849
  {
849
850
  name: "ntnyq/vitest",
850
851
  plugins: {
851
- vitest: default11
852
+ vitest: default12
852
853
  },
853
854
  files: [...GLOB_TEST],
854
855
  rules: {
855
- ...default11.configs.recommended.rules,
856
+ ...default12.configs.recommended.rules,
856
857
  // Overrides rules
857
858
  ...options.overridesVitestRules
858
859
  }
@@ -864,13 +865,14 @@ var antfu = (options = {}) => [
864
865
  {
865
866
  name: "ntnyq/antfu",
866
867
  plugins: {
867
- antfu: default7
868
+ antfu: default8
868
869
  },
869
870
  rules: {
870
871
  // required `object-curly-newline` to be disabled
871
872
  // 'antfu/consistent-list-newline': 'error',
872
873
  "antfu/import-dedupe": "error",
873
874
  "antfu/top-level-function": "error",
875
+ // Overrides rules
874
876
  ...options.overrides
875
877
  }
876
878
  }
@@ -881,7 +883,7 @@ var jsdoc = (options = {}) => [
881
883
  {
882
884
  name: "ntnyq/jsdoc",
883
885
  plugins: {
884
- jsdoc: default8
886
+ jsdoc: default9
885
887
  },
886
888
  rules: {
887
889
  "jsdoc/check-access": "warn",
@@ -913,13 +915,13 @@ var jsonc = (options = {}) => [
913
915
  name: "ntnyq/jsonc",
914
916
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
915
917
  plugins: {
916
- jsonc: default9
918
+ jsonc: default10
917
919
  },
918
920
  languageOptions: {
919
921
  parser: parserJsonc
920
922
  },
921
923
  rules: {
922
- ...default9.configs["recommended-with-jsonc"].rules,
924
+ ...default10.configs["recommended-with-jsonc"].rules,
923
925
  "jsonc/array-bracket-spacing": ["error", "never"],
924
926
  "jsonc/comma-dangle": ["error", "never"],
925
927
  "jsonc/comma-style": ["error", "last"],
@@ -952,6 +954,21 @@ var jsonc = (options = {}) => [
952
954
  }
953
955
  ];
954
956
 
957
+ // src/configs/ntnyq.ts
958
+ var createConfigNtnyq = (options = {}) => [
959
+ {
960
+ name: "ntnyq/ntnyq",
961
+ plugins: {
962
+ ntnyq: default6
963
+ },
964
+ rules: {
965
+ "ntnyq/no-member-accessibility": "error",
966
+ // Overrides rules
967
+ ...options.overrides
968
+ }
969
+ }
970
+ ];
971
+
955
972
  // src/configs/regexp.ts
956
973
  var regexp = (options = {}) => [
957
974
  /**
@@ -970,7 +987,7 @@ var unocss = (options = {}) => [
970
987
  {
971
988
  name: "ntnyq/unocss",
972
989
  plugins: {
973
- unocss: default10
990
+ unocss: default11
974
991
  },
975
992
  rules: {
976
993
  "unocss/order": "error",
@@ -1008,7 +1025,7 @@ var imports = (options = {}) => [
1008
1025
  {
1009
1026
  name: "ntnyq/imports",
1010
1027
  plugins: {
1011
- import: default12
1028
+ import: default13
1012
1029
  },
1013
1030
  settings: {
1014
1031
  "import/resolver": {
@@ -1039,7 +1056,7 @@ var unicorn = (options = {}) => [
1039
1056
  {
1040
1057
  name: "ntnyq/unicorn",
1041
1058
  plugins: {
1042
- unicorn: default13
1059
+ unicorn: default14
1043
1060
  },
1044
1061
  rules: {
1045
1062
  // Disabled for now
@@ -1155,10 +1172,10 @@ var comments = (options = {}) => [
1155
1172
  {
1156
1173
  name: "ntnyq/eslint-comments",
1157
1174
  plugins: {
1158
- "@eslint-community/eslint-comments": default17
1175
+ "@eslint-community/eslint-comments": default18
1159
1176
  },
1160
1177
  rules: {
1161
- ...default17.configs.recommended.rules,
1178
+ ...default18.configs.recommended.rules,
1162
1179
  "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
1163
1180
  // Overrides rules
1164
1181
  ...options.overrides
@@ -1168,9 +1185,9 @@ var comments = (options = {}) => [
1168
1185
 
1169
1186
  // src/configs/markdown.ts
1170
1187
  var markdown = (options = {}) => {
1171
- if (!Array.isArray(default6.configs?.processor)) return [];
1188
+ if (!Array.isArray(default7.configs?.processor)) return [];
1172
1189
  return [
1173
- ...default6.configs.processor.map((config) => ({
1190
+ ...default7.configs.processor.map((config) => ({
1174
1191
  ...config,
1175
1192
  name: `ntnyq/${config.name}`
1176
1193
  })),
@@ -1210,7 +1227,7 @@ var prettier = (options = {}) => [
1210
1227
  {
1211
1228
  name: "ntnyq/prettier",
1212
1229
  plugins: {
1213
- prettier: default14
1230
+ prettier: default15
1214
1231
  },
1215
1232
  rules: {
1216
1233
  "vue/array-bracket-newline": "off",
@@ -1250,7 +1267,7 @@ var prettier = (options = {}) => [
1250
1267
  "vue/space-infix-ops": "off",
1251
1268
  "vue/space-unary-ops": "off",
1252
1269
  "vue/template-curly-spacing": "off",
1253
- ...default14.configs.recommended.rules,
1270
+ ...default15.configs.recommended.rules,
1254
1271
  "prettier/prettier": options.level || "warn",
1255
1272
  // Overrides rules
1256
1273
  ...options.overrides
@@ -1263,7 +1280,7 @@ var prettier = (options = {}) => [
1263
1280
  name: "ntnyq/prettier/disabled",
1264
1281
  files: [GLOB_TOML],
1265
1282
  plugins: {
1266
- prettier: default14
1283
+ prettier: default15
1267
1284
  },
1268
1285
  rules: {
1269
1286
  "prettier/prettier": "off"
@@ -1518,7 +1535,7 @@ var perfectionist = (options = {}) => [
1518
1535
  {
1519
1536
  name: "ntnyq/perfectionist",
1520
1537
  plugins: {
1521
- perfectionist: default15
1538
+ perfectionist: default16
1522
1539
  },
1523
1540
  rules: {
1524
1541
  "perfectionist/sort-imports": [
@@ -1604,7 +1621,7 @@ var unusedImports = (options = {}) => [
1604
1621
  {
1605
1622
  name: "ntnyq/unused-imports",
1606
1623
  plugins: {
1607
- "unused-imports": default16
1624
+ "unused-imports": default17
1608
1625
  },
1609
1626
  rules: {
1610
1627
  "@typescript-eslint/no-unused-vars": "off",
@@ -1672,7 +1689,7 @@ function getOverrides(options, key) {
1672
1689
  }
1673
1690
 
1674
1691
  // src/core.ts
1675
- function ntnyq(options = {}, userConfigs = []) {
1692
+ function defineESLintConfig(options = {}, userConfigs = []) {
1676
1693
  const configs = [];
1677
1694
  if (options.gitignore ?? true) {
1678
1695
  configs.push(
@@ -1822,6 +1839,7 @@ function ntnyq(options = {}, userConfigs = []) {
1822
1839
  );
1823
1840
  return composer;
1824
1841
  }
1842
+ var ntnyq = defineESLintConfig;
1825
1843
  export {
1826
1844
  GLOB_ALL_SRC,
1827
1845
  GLOB_CSS,
@@ -1853,6 +1871,8 @@ export {
1853
1871
  antfu,
1854
1872
  command,
1855
1873
  comments,
1874
+ createConfigNtnyq,
1875
+ defineESLintConfig,
1856
1876
  getOverrides,
1857
1877
  gitignore,
1858
1878
  hasTypeScript,
@@ -1875,21 +1895,22 @@ export {
1875
1895
  parserVue,
1876
1896
  parserYaml,
1877
1897
  perfectionist,
1878
- default7 as pluginAntfu,
1879
- default17 as pluginComments,
1880
- default12 as pluginImport,
1881
- default8 as pluginJsdoc,
1882
- default9 as pluginJsonc,
1883
- default6 as pluginMarkdown,
1898
+ default8 as pluginAntfu,
1899
+ default18 as pluginComments,
1900
+ default13 as pluginImport,
1901
+ default9 as pluginJsdoc,
1902
+ default10 as pluginJsonc,
1903
+ default7 as pluginMarkdown,
1884
1904
  default2 as pluginNode,
1885
- default15 as pluginPerfectionist,
1886
- default14 as pluginPrettier,
1905
+ default6 as pluginNtnyq,
1906
+ default16 as pluginPerfectionist,
1907
+ default15 as pluginPrettier,
1887
1908
  pluginRegexp,
1888
1909
  default5 as pluginToml,
1889
- default13 as pluginUnicorn,
1890
- default10 as pluginUnoCSS,
1891
- default16 as pluginUnusedImports,
1892
- default11 as pluginVitest,
1910
+ default14 as pluginUnicorn,
1911
+ default11 as pluginUnoCSS,
1912
+ default17 as pluginUnusedImports,
1913
+ default12 as pluginVitest,
1893
1914
  default3 as pluginVue,
1894
1915
  default4 as pluginYaml,
1895
1916
  prettier,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.0-beta.16",
4
+ "version": "3.0.0-beta.17",
5
5
  "packageManager": "pnpm@9.11.0",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
@@ -70,6 +70,7 @@
70
70
  "eslint-plugin-jsdoc": "^50.2.4",
71
71
  "eslint-plugin-jsonc": "^2.16.0",
72
72
  "eslint-plugin-n": "^17.10.3",
73
+ "eslint-plugin-ntnyq": "^0.5.0",
73
74
  "eslint-plugin-perfectionist": "^3.6.0",
74
75
  "eslint-plugin-prettier": "^5.2.1",
75
76
  "eslint-plugin-regexp": "^2.6.0",