@ntnyq/eslint-config 3.0.0-beta.16 → 3.0.0-beta.18
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 +3 -3
- package/dist/index.cjs +25 -1
- package/dist/index.d.cts +111 -50
- package/dist/index.d.ts +111 -50
- package/dist/index.js +64 -43
- package/package.json +14 -13
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 {
|
|
24
|
+
import { defineESLintConfig } from '@ntnyq/eslint-config'
|
|
25
25
|
|
|
26
|
-
export default
|
|
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 |
|
|
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
|
|
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,
|