@ntnyq/eslint-config 3.0.0-beta.11 → 3.0.0-beta.13

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
@@ -6,6 +6,10 @@
6
6
  [![NPM DOWNLOADS](https://img.shields.io/npm/dy/@ntnyq/eslint-config)](https://www.npmjs.com/package/@ntnyq/eslint-config)
7
7
  [![NPM VERSION](https://img.shields.io/npm/v/@ntnyq/eslint-config/latest.svg)](https://www.npmjs.com/package/@ntnyq/eslint-config/v/latest)
8
8
 
9
+ ## Features
10
+
11
+ - 🚦 Designed to work alongside with Prettier
12
+
9
13
  ## Install
10
14
 
11
15
  ```bash
@@ -14,7 +18,7 @@ pnpm add eslint prettier typescript @ntnyq/eslint-config @ntnyq/prettier-config
14
18
 
15
19
  ## Usage
16
20
 
17
- Highly recommended for using `eslint.config.mjs` as the config file :
21
+ Highly recommended using **`eslint.config.mjs`** as the config file :
18
22
 
19
23
  ```js
20
24
  import { ntnyq } from '@ntnyq/eslint-config'
package/dist/index.cjs CHANGED
@@ -60,6 +60,7 @@ __export(src_exports, {
60
60
  antfu: () => antfu,
61
61
  command: () => command,
62
62
  comments: () => comments,
63
+ disables: () => disables,
63
64
  getOverrides: () => getOverrides,
64
65
  gitignore: () => gitignore,
65
66
  hasTypeScript: () => hasTypeScript,
@@ -268,7 +269,20 @@ var typescriptCore = (options = {}) => {
268
269
  ignoreRestSiblings: true
269
270
  }
270
271
  ],
271
- "@typescript-eslint/no-redeclare": "error",
272
+ "@typescript-eslint/no-redeclare": [
273
+ "error",
274
+ {
275
+ builtinGlobals: false
276
+ }
277
+ ],
278
+ "@typescript-eslint/no-unused-expressions": [
279
+ "error",
280
+ {
281
+ allowShortCircuit: true,
282
+ allowTernary: true,
283
+ allowTaggedTemplates: true
284
+ }
285
+ ],
272
286
  "@typescript-eslint/consistent-type-imports": [
273
287
  "error",
274
288
  {
@@ -332,11 +346,6 @@ var typescript = (options = {}) => [
332
346
  "no-unused-expressions": "off",
333
347
  "max-lines-per-function": "off"
334
348
  }
335
- },
336
- {
337
- name: "ntnyq/ts/cjs",
338
- files: [GLOB_JS],
339
- rules: {}
340
349
  }
341
350
  ];
342
351
 
@@ -1198,6 +1207,26 @@ var unicorn = (options = {}) => [
1198
1207
  }
1199
1208
  ];
1200
1209
 
1210
+ // src/configs/disables.ts
1211
+ var disables = () => [
1212
+ {
1213
+ name: "ntnyq/disables/scripts",
1214
+ files: [`**/scripts/${GLOB_SRC}`],
1215
+ rules: {
1216
+ "no-console": "off",
1217
+ "@typescript-eslint/explicit-function-return-type": "off"
1218
+ }
1219
+ },
1220
+ {
1221
+ name: "ntnyq/disables/cli",
1222
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1223
+ rules: {
1224
+ "no-console": "off",
1225
+ "@typescript-eslint/explicit-function-return-type": "off"
1226
+ }
1227
+ }
1228
+ ];
1229
+
1201
1230
  // src/configs/comments.ts
1202
1231
  var comments = (options = {}) => [
1203
1232
  {
@@ -1544,13 +1573,6 @@ var javascript = (options = {}) => {
1544
1573
  ...options.overrides
1545
1574
  }
1546
1575
  },
1547
- {
1548
- name: "ntnyq/js/scripts",
1549
- files: ["**/scripts/*", "**/cli.*"],
1550
- rules: {
1551
- "no-console": "off"
1552
- }
1553
- },
1554
1576
  {
1555
1577
  name: "ntnyq/js/test",
1556
1578
  files: ["**/*.{test,spec}.js?(x)"],
@@ -1867,6 +1889,7 @@ function ntnyq(options = {}, userConfigs = []) {
1867
1889
  })
1868
1890
  );
1869
1891
  }
1892
+ const configDisables = disables();
1870
1893
  const configPrettier = options.prettier ?? true ? prettier({
1871
1894
  ...resolveSubOptions(options, "prettier"),
1872
1895
  overrides: getOverrides(options, "prettier")
@@ -1875,6 +1898,7 @@ function ntnyq(options = {}, userConfigs = []) {
1875
1898
  composer.append(
1876
1899
  ...configs,
1877
1900
  ...toArray(userConfigs),
1901
+ ...configDisables,
1878
1902
  ...configPrettier
1879
1903
  );
1880
1904
  return composer;
@@ -1911,6 +1935,7 @@ function ntnyq(options = {}, userConfigs = []) {
1911
1935
  antfu,
1912
1936
  command,
1913
1937
  comments,
1938
+ disables,
1914
1939
  getOverrides,
1915
1940
  gitignore,
1916
1941
  hasTypeScript,