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

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
@@ -156,7 +156,7 @@ export interface ConfigOptions {
156
156
 
157
157
  vue?: boolean | ConfigVueOptions
158
158
 
159
- vitest?: boolean | ConfigVitestOptions
159
+ test?: boolean | ConfigVitestOptions
160
160
  }
161
161
  ```
162
162
 
package/dist/index.cjs CHANGED
@@ -60,7 +60,6 @@ __export(src_exports, {
60
60
  antfu: () => antfu,
61
61
  command: () => command,
62
62
  comments: () => comments,
63
- disables: () => disables,
64
63
  getOverrides: () => getOverrides,
65
64
  gitignore: () => gitignore,
66
65
  hasTypeScript: () => hasTypeScript,
@@ -106,6 +105,7 @@ __export(src_exports, {
106
105
  sortI18nLocale: () => sortI18nLocale,
107
106
  sortPackageJson: () => sortPackageJson,
108
107
  sortTsConfig: () => sortTsConfig,
108
+ specials: () => specials,
109
109
  test: () => test,
110
110
  toArray: () => toArray,
111
111
  toml: () => toml,
@@ -1235,10 +1235,11 @@ var unicorn = (options = {}) => [
1235
1235
  }
1236
1236
  ];
1237
1237
 
1238
- // src/configs/disables.ts
1239
- var disables = () => [
1238
+ // src/configs/specials.ts
1239
+ var import_globals = __toESM(require("globals"), 1);
1240
+ var specials = () => [
1240
1241
  {
1241
- name: "ntnyq/disables/scripts",
1242
+ name: "ntnyq/specials/scripts",
1242
1243
  files: [`**/scripts/${GLOB_SRC}`],
1243
1244
  rules: {
1244
1245
  "no-console": "off",
@@ -1246,12 +1247,29 @@ var disables = () => [
1246
1247
  }
1247
1248
  },
1248
1249
  {
1249
- name: "ntnyq/disables/cli",
1250
+ name: "ntnyq/specials/cli",
1250
1251
  files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1251
1252
  rules: {
1252
1253
  "no-console": "off",
1253
1254
  "@typescript-eslint/explicit-function-return-type": "off"
1254
1255
  }
1256
+ },
1257
+ {
1258
+ name: "ntnyq/specials/userscript",
1259
+ files: [`**/*.user.${GLOB_SRC_EXT}`],
1260
+ languageOptions: {
1261
+ globals: {
1262
+ ...import_globals.default.greasemonkey
1263
+ }
1264
+ },
1265
+ rules: {
1266
+ camelcase: [
1267
+ "error",
1268
+ {
1269
+ allow: ["^GM_.+"]
1270
+ }
1271
+ ]
1272
+ }
1255
1273
  }
1256
1274
  ];
1257
1275
 
@@ -1387,7 +1405,7 @@ var gitignore = (options = {}) => [
1387
1405
 
1388
1406
  // src/configs/javascript.ts
1389
1407
  var import_js = __toESM(require("@eslint/js"), 1);
1390
- var import_globals = __toESM(require("globals"), 1);
1408
+ var import_globals2 = __toESM(require("globals"), 1);
1391
1409
  var javascript = (options = {}) => {
1392
1410
  const strictRules = {
1393
1411
  complexity: ["error", { max: 30 }],
@@ -1420,9 +1438,9 @@ var javascript = (options = {}) => {
1420
1438
  name: "ntnyq/js/core",
1421
1439
  languageOptions: {
1422
1440
  globals: {
1423
- ...import_globals.default.browser,
1424
- ...import_globals.default.es2021,
1425
- ...import_globals.default.node
1441
+ ...import_globals2.default.browser,
1442
+ ...import_globals2.default.es2021,
1443
+ ...import_globals2.default.node
1426
1444
  },
1427
1445
  sourceType: "module"
1428
1446
  },
@@ -1913,7 +1931,7 @@ function ntnyq(options = {}, userConfigs = []) {
1913
1931
  })
1914
1932
  );
1915
1933
  }
1916
- const configDisables = disables();
1934
+ const configSpecials = specials();
1917
1935
  const configPrettier = options.prettier ?? true ? prettier({
1918
1936
  ...resolveSubOptions(options, "prettier"),
1919
1937
  overrides: getOverrides(options, "prettier")
@@ -1922,7 +1940,7 @@ function ntnyq(options = {}, userConfigs = []) {
1922
1940
  composer.append(
1923
1941
  ...configs,
1924
1942
  ...toArray(userConfigs),
1925
- ...configDisables,
1943
+ ...configSpecials,
1926
1944
  ...configPrettier
1927
1945
  );
1928
1946
  return composer;
@@ -1959,7 +1977,6 @@ function ntnyq(options = {}, userConfigs = []) {
1959
1977
  antfu,
1960
1978
  command,
1961
1979
  comments,
1962
- disables,
1963
1980
  getOverrides,
1964
1981
  gitignore,
1965
1982
  hasTypeScript,
@@ -2005,6 +2022,7 @@ function ntnyq(options = {}, userConfigs = []) {
2005
2022
  sortI18nLocale,
2006
2023
  sortPackageJson,
2007
2024
  sortTsConfig,
2025
+ specials,
2008
2026
  test,
2009
2027
  toArray,
2010
2028
  toml,
package/dist/index.d.cts CHANGED
@@ -12470,7 +12470,7 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
12470
12470
 
12471
12471
  declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
12472
12472
 
12473
- declare const disables: () => TypedConfigItem[];
12473
+ declare const specials: () => TypedConfigItem[];
12474
12474
 
12475
12475
  declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
12476
12476
 
@@ -12490,4 +12490,4 @@ declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConf
12490
12490
 
12491
12491
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
12492
12492
 
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, disables, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, test, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
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 };
package/dist/index.d.ts CHANGED
@@ -12470,7 +12470,7 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
12470
12470
 
12471
12471
  declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
12472
12472
 
12473
- declare const disables: () => TypedConfigItem[];
12473
+ declare const specials: () => TypedConfigItem[];
12474
12474
 
12475
12475
  declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
12476
12476
 
@@ -12490,4 +12490,4 @@ declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConf
12490
12490
 
12491
12491
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
12492
12492
 
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, disables, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, test, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
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 };
package/dist/index.js CHANGED
@@ -1112,10 +1112,11 @@ var unicorn = (options = {}) => [
1112
1112
  }
1113
1113
  ];
1114
1114
 
1115
- // src/configs/disables.ts
1116
- var disables = () => [
1115
+ // src/configs/specials.ts
1116
+ import globals from "globals";
1117
+ var specials = () => [
1117
1118
  {
1118
- name: "ntnyq/disables/scripts",
1119
+ name: "ntnyq/specials/scripts",
1119
1120
  files: [`**/scripts/${GLOB_SRC}`],
1120
1121
  rules: {
1121
1122
  "no-console": "off",
@@ -1123,12 +1124,29 @@ var disables = () => [
1123
1124
  }
1124
1125
  },
1125
1126
  {
1126
- name: "ntnyq/disables/cli",
1127
+ name: "ntnyq/specials/cli",
1127
1128
  files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1128
1129
  rules: {
1129
1130
  "no-console": "off",
1130
1131
  "@typescript-eslint/explicit-function-return-type": "off"
1131
1132
  }
1133
+ },
1134
+ {
1135
+ name: "ntnyq/specials/userscript",
1136
+ files: [`**/*.user.${GLOB_SRC_EXT}`],
1137
+ languageOptions: {
1138
+ globals: {
1139
+ ...globals.greasemonkey
1140
+ }
1141
+ },
1142
+ rules: {
1143
+ camelcase: [
1144
+ "error",
1145
+ {
1146
+ allow: ["^GM_.+"]
1147
+ }
1148
+ ]
1149
+ }
1132
1150
  }
1133
1151
  ];
1134
1152
 
@@ -1264,7 +1282,7 @@ var gitignore = (options = {}) => [
1264
1282
 
1265
1283
  // src/configs/javascript.ts
1266
1284
  import jsConfig from "@eslint/js";
1267
- import globals from "globals";
1285
+ import globals2 from "globals";
1268
1286
  var javascript = (options = {}) => {
1269
1287
  const strictRules = {
1270
1288
  complexity: ["error", { max: 30 }],
@@ -1297,9 +1315,9 @@ var javascript = (options = {}) => {
1297
1315
  name: "ntnyq/js/core",
1298
1316
  languageOptions: {
1299
1317
  globals: {
1300
- ...globals.browser,
1301
- ...globals.es2021,
1302
- ...globals.node
1318
+ ...globals2.browser,
1319
+ ...globals2.es2021,
1320
+ ...globals2.node
1303
1321
  },
1304
1322
  sourceType: "module"
1305
1323
  },
@@ -1790,7 +1808,7 @@ function ntnyq(options = {}, userConfigs = []) {
1790
1808
  })
1791
1809
  );
1792
1810
  }
1793
- const configDisables = disables();
1811
+ const configSpecials = specials();
1794
1812
  const configPrettier = options.prettier ?? true ? prettier({
1795
1813
  ...resolveSubOptions(options, "prettier"),
1796
1814
  overrides: getOverrides(options, "prettier")
@@ -1799,7 +1817,7 @@ function ntnyq(options = {}, userConfigs = []) {
1799
1817
  composer.append(
1800
1818
  ...configs,
1801
1819
  ...toArray(userConfigs),
1802
- ...configDisables,
1820
+ ...configSpecials,
1803
1821
  ...configPrettier
1804
1822
  );
1805
1823
  return composer;
@@ -1835,7 +1853,6 @@ export {
1835
1853
  antfu,
1836
1854
  command,
1837
1855
  comments,
1838
- disables,
1839
1856
  getOverrides,
1840
1857
  gitignore,
1841
1858
  hasTypeScript,
@@ -1881,6 +1898,7 @@ export {
1881
1898
  sortI18nLocale,
1882
1899
  sortPackageJson,
1883
1900
  sortTsConfig,
1901
+ specials,
1884
1902
  test,
1885
1903
  toArray,
1886
1904
  toml,
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.15",
4
+ "version": "3.0.0-beta.16",
5
5
  "packageManager": "pnpm@9.11.0",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [