@imranbarbhuiya/oxc-config 0.0.1
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/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/api-error.d.ts +6 -0
- package/dist/api-error.js +12 -0
- package/dist/api-error.js.map +1 -0
- package/dist/central-icons.d.ts +6 -0
- package/dist/central-icons.js +12 -0
- package/dist/central-icons.js.map +1 -0
- package/dist/common.d.ts +6 -0
- package/dist/common.js +296 -0
- package/dist/common.js.map +1 -0
- package/dist/edge.d.ts +6 -0
- package/dist/edge.js +18 -0
- package/dist/edge.js.map +1 -0
- package/dist/i18n.d.ts +6 -0
- package/dist/i18n.js +15 -0
- package/dist/i18n.js.map +1 -0
- package/dist/jsdoc.d.ts +6 -0
- package/dist/jsdoc.js +43 -0
- package/dist/jsdoc.js.map +1 -0
- package/dist/jsx.d.ts +6 -0
- package/dist/jsx.js +78 -0
- package/dist/jsx.js.map +1 -0
- package/dist/mdx.d.ts +6 -0
- package/dist/mdx.js +25 -0
- package/dist/mdx.js.map +1 -0
- package/dist/module.d.ts +6 -0
- package/dist/module.js +12 -0
- package/dist/module.js.map +1 -0
- package/dist/native-tailwind.d.ts +6 -0
- package/dist/native-tailwind.js +12 -0
- package/dist/native-tailwind.js.map +1 -0
- package/dist/native.d.ts +6 -0
- package/dist/native.js +51 -0
- package/dist/native.js.map +1 -0
- package/dist/nest.d.ts +6 -0
- package/dist/nest.js +13 -0
- package/dist/nest.js.map +1 -0
- package/dist/next.d.ts +6 -0
- package/dist/next.js +33 -0
- package/dist/next.js.map +1 -0
- package/dist/node.d.ts +6 -0
- package/dist/node.js +80 -0
- package/dist/node.js.map +1 -0
- package/dist/plugins/api-error.d.ts +6 -0
- package/dist/plugins/api-error.js +169 -0
- package/dist/plugins/api-error.js.map +1 -0
- package/dist/plugins/central-icons.d.ts +6 -0
- package/dist/plugins/central-icons.js +61 -0
- package/dist/plugins/central-icons.js.map +1 -0
- package/dist/plugins/i18n.d.ts +6 -0
- package/dist/plugins/i18n.js +58 -0
- package/dist/plugins/i18n.js.map +1 -0
- package/dist/plugins/native-tailwind.d.ts +6 -0
- package/dist/plugins/native-tailwind.js +110 -0
- package/dist/plugins/native-tailwind.js.map +1 -0
- package/dist/react.d.ts +6 -0
- package/dist/react.js +65 -0
- package/dist/react.js.map +1 -0
- package/dist/tailwind.d.ts +6 -0
- package/dist/tailwind.js +18 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/tsdoc.d.ts +6 -0
- package/dist/tsdoc.js +21 -0
- package/dist/tsdoc.js.map +1 -0
- package/dist/typescript.d.ts +6 -0
- package/dist/typescript.js +200 -0
- package/dist/typescript.js.map +1 -0
- package/package.json +180 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Parbez <imranbarbhuiya.fsd@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Mahir ESLint Config
|
|
2
|
+
|
|
3
|
+
The ultimate ESLint shareable config. This config includes all of the ESLint rules that I use in my projects.
|
|
4
|
+
|
|
5
|
+
> [!Important]
|
|
6
|
+
> This is a highly opinionated config. It's based on my personal preferences and the way I write code.
|
|
7
|
+
> I don't recommend using this config as is as I'll update it based on my preferences without any notice.
|
|
8
|
+
|
|
9
|
+
<div align="center">
|
|
10
|
+
<br />
|
|
11
|
+
<p>
|
|
12
|
+
<a href="https://www.npmjs.com/package/eslint-config-mahir"><img src="https://img.shields.io/npm/v/eslint-config-mahir.svg?maxAge=3600" alt="npm version" /></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/eslint-config-mahir"><img src="https://img.shields.io/npm/dw/eslint-config-mahir.svg?maxAge=3600" alt="npm downloads" /></a>
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install --save-dev eslint eslint-config-mahir
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Setup (CLI)
|
|
24
|
+
|
|
25
|
+
The easiest way to set up ESLint with this config is using the CLI:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx eslint-config-mahir
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This will interactively guide you through selecting a preset and options. You can also use flags:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx eslint-config-mahir --preset nextjs --tailwind
|
|
35
|
+
npx eslint-config-mahir -p react -y
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Available options:
|
|
39
|
+
|
|
40
|
+
- `-p, --preset <name>` - Preset to use (nextjs, react, node, native, library)
|
|
41
|
+
- `-t, --tailwind` - Include Tailwind CSS support
|
|
42
|
+
- `--no-tailwind` - Exclude Tailwind CSS support
|
|
43
|
+
- `--i18n` / `--no-i18n` - Include/exclude next-intl i18n rules (Next.js)
|
|
44
|
+
- `--native-tailwind` / `--no-native-tailwind` - Include/exclude React Native Tailwind className rules
|
|
45
|
+
- `--central-icons` / `--no-central-icons` - Include/exclude central-icons barrel-import rules
|
|
46
|
+
- `--api-error` / `--no-api-error` - Include/exclude ApiError rules for queryFn/mutationFn
|
|
47
|
+
- `--query` / `--no-query` - Include/exclude TanStack Query ESLint rules (`@tanstack/eslint-plugin-query`)
|
|
48
|
+
- `-y, --yes` - Skip prompts and use defaults
|
|
49
|
+
- `--cwd <path>` - Working directory
|
|
50
|
+
- `-h, --help` - Show help
|
|
51
|
+
|
|
52
|
+
The CLI offers the `i18n`, `native-tailwind`, `central-icons`, `query`, and `api-error` options only when they are relevant to your project (for example, `i18n` for Next.js, and `query` when `@tanstack/react-query` is detected).
|
|
53
|
+
|
|
54
|
+
## Manual Usage
|
|
55
|
+
|
|
56
|
+
Add in your eslint.config.js (for esm projects) or eslint.config.mjs
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
import common from 'eslint-config-mahir/common';
|
|
60
|
+
import node from 'eslint-config-mahir/node';
|
|
61
|
+
import module from 'eslint-config-mahir/module';
|
|
62
|
+
import typescript from 'eslint-config-mahir/typescript';
|
|
63
|
+
import jsx from 'eslint-config-mahir/jsx';
|
|
64
|
+
import react from 'eslint-config-mahir/react';
|
|
65
|
+
import next from 'eslint-config-mahir/next';
|
|
66
|
+
import mdx from 'eslint-config-mahir/mdx';
|
|
67
|
+
import edge from 'eslint-config-mahir/edge';
|
|
68
|
+
import jsdoc from 'eslint-config-mahir/jsdoc';
|
|
69
|
+
import tsdoc from 'eslint-config-mahir/tsdoc';
|
|
70
|
+
import native from 'eslint-config-mahir/native';
|
|
71
|
+
import tailwind from 'eslint-config-mahir/tailwind';
|
|
72
|
+
import i18n from 'eslint-config-mahir/i18n';
|
|
73
|
+
import nativeTailwind from 'eslint-config-mahir/native-tailwind';
|
|
74
|
+
import centralIcons from 'eslint-config-mahir/central-icons';
|
|
75
|
+
import apiError from 'eslint-config-mahir/api-error';
|
|
76
|
+
|
|
77
|
+
export default [
|
|
78
|
+
...common,
|
|
79
|
+
...node,
|
|
80
|
+
...module,
|
|
81
|
+
...typescript,
|
|
82
|
+
...jsx,
|
|
83
|
+
...react, // when using react, you can omit jsx as it's already included with react
|
|
84
|
+
...next,
|
|
85
|
+
...mdx,
|
|
86
|
+
...edge,
|
|
87
|
+
...jsdoc,
|
|
88
|
+
...tsdoc, // when using tsdoc, you can omit jsdoc as it's already included with tsdoc
|
|
89
|
+
...native, // when using native, you can omit react as it's already included with native
|
|
90
|
+
...tailwind, // for projects using Tailwind CSS (requires eslint-plugin-better-tailwindcss)
|
|
91
|
+
...i18n, // for Next.js projects using next-intl
|
|
92
|
+
...nativeTailwind, // for React Native projects using Tailwind (use with native + tailwind)
|
|
93
|
+
...centralIcons, // for React/React Native projects using @central-icons-react* packages
|
|
94
|
+
...apiError, // for projects using TanStack Query — require ApiError in queryFn/mutationFn
|
|
95
|
+
];
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
You can remove any of the configs you don't need.
|
|
99
|
+
|
|
100
|
+
`api-error` accepts `allowedErrors` (default `['ApiError', 'FormValidationError']`). That list is what you may `throw new Class(...)` or `throw Class.from(...)` inside `queryFn` / `mutationFn`. Other constructors (`new Error`) and other factories (`Other.from(...)`) are reported:
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
{
|
|
104
|
+
rules: {
|
|
105
|
+
'mahir-api-error/require-api-error': [
|
|
106
|
+
'error',
|
|
107
|
+
{ allowedErrors: ['ApiError', 'FormValidationError'] },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> **Note**:
|
|
114
|
+
|
|
115
|
+
For typescript users, typed linting is done via `projectService`. You can learn more about it from https://typescript-eslint.io/getting-started/typed-linting/#faqs and customize it as per your need.
|
|
116
|
+
|
|
117
|
+
```js
|
|
118
|
+
/**
|
|
119
|
+
* @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray}
|
|
120
|
+
*/
|
|
121
|
+
export default [
|
|
122
|
+
...
|
|
123
|
+
{
|
|
124
|
+
languageOptions: {
|
|
125
|
+
parserOptions: {
|
|
126
|
+
projectService: {
|
|
127
|
+
allowDefaultProject: [
|
|
128
|
+
'files-outside-tsconfig.json',
|
|
129
|
+
],
|
|
130
|
+
defaultProject: 'tsconfig.json',
|
|
131
|
+
},
|
|
132
|
+
tsconfigRootDir: process.cwd(),
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
> **Warning**:
|
|
139
|
+
> If you are using both `mdx` and `typescript` config, make sure add files to avoid conflicts
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
/**
|
|
143
|
+
* @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray}
|
|
144
|
+
*/
|
|
145
|
+
export default [
|
|
146
|
+
// ... other configs
|
|
147
|
+
...mdx.map((config) => ({
|
|
148
|
+
files: ['**/*.mdx'],
|
|
149
|
+
...config,
|
|
150
|
+
})),
|
|
151
|
+
...typescript.map((config) => ({
|
|
152
|
+
files: ['**/*.tsx', '**/*.ts', '**/*.cjs', '**/*.jsx', '**/*.js'],
|
|
153
|
+
...config,
|
|
154
|
+
})),
|
|
155
|
+
// ... other configs
|
|
156
|
+
];
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Configs
|
|
160
|
+
|
|
161
|
+
This package contains eslint config for
|
|
162
|
+
|
|
163
|
+
- `common` rules common for all configs
|
|
164
|
+
- `node` rules for nodejs projects
|
|
165
|
+
- `module` rules for esm projects
|
|
166
|
+
- `typescript` rules for typescript projects
|
|
167
|
+
- `jsx` rules for jsx/tsx projects
|
|
168
|
+
- `react` rules for react projects (this config contains all the `jsx` rules too)
|
|
169
|
+
- `native` rules for react native projects (this config contains all the `react` rules too)
|
|
170
|
+
- `next` rules for nextjs projects
|
|
171
|
+
- `mdx` rules for mdx projects
|
|
172
|
+
- `edge` rules for projects running in edge
|
|
173
|
+
- `jsdoc` jsdoc related config
|
|
174
|
+
- `tsdoc` tsdoc related config (this config contains all the `jsdoc` rules too)
|
|
175
|
+
- `tailwind` rules for Tailwind CSS projects (requires `eslint-plugin-better-tailwindcss`)
|
|
176
|
+
|
|
177
|
+
The following configs are opt-in and are offered by the CLI only when relevant to your project. They are intentionally not bundled into `next` or `native`:
|
|
178
|
+
|
|
179
|
+
- `i18n` rules for Next.js projects using [`next-intl`](https://next-intl.dev) (enforces static `t()` keys and disallows passing `t` around). Use alongside `next`.
|
|
180
|
+
- `native-tailwind` rules for React Native projects using Tailwind (forbids `flex`/`flex-col`). Use alongside `native` and `tailwind`.
|
|
181
|
+
- `central-icons` rules for React or React Native projects using `@central-icons-react*` packages (forbids barrel imports and autofixes to direct subpath imports). Use alongside `react`, `native`, or `next`.
|
|
182
|
+
- `api-error` rules for TanStack Query projects (requires an allowed error class instead of `Error` inside `queryFn`/`mutationFn`, including extracted handlers). Allows `new ApiError(...)` and `ApiError.from(...)`; reports other constructors and factories. Override `allowedErrors` in your ESLint config if your class names differ. Use alongside `react`, `native`, or `next`.
|
|
183
|
+
|
|
184
|
+
## Contributors ✨
|
|
185
|
+
|
|
186
|
+
Thanks goes to these wonderful people:
|
|
187
|
+
|
|
188
|
+
<a href="https://github.com/imranbarbhuiya/eslint-config-mahir/graphs/contributors">
|
|
189
|
+
<img src="https://contrib.rocks/image?repo=imranbarbhuiya/eslint-config-mahir" />
|
|
190
|
+
</a>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import plugin from "./plugins/api-error.js";
|
|
2
|
+
|
|
3
|
+
//#region src/api-error.ts
|
|
4
|
+
const config = [{
|
|
5
|
+
name: "mahir/api-error",
|
|
6
|
+
plugins: { "mahir-api-error": plugin },
|
|
7
|
+
rules: { "mahir-api-error/require-api-error": 2 }
|
|
8
|
+
}];
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { config as default };
|
|
12
|
+
//# sourceMappingURL=api-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-error.js","names":["pluginApiError"],"sources":["../src/api-error.ts"],"sourcesContent":["import pluginApiError from './plugins/api-error.js';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/api-error',\n\t\tplugins: {\n\t\t\t'mahir-api-error': pluginApiError,\n\t\t},\n\t\trules: {\n\t\t\t'mahir-api-error/require-api-error': 2,\n\t\t},\n\t},\n];\n\nexport default config;\n"],"mappings":";;;AAIA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,SAAS,EACR,mBAAmBA,OACpB;CACA,OAAO,EACN,qCAAqC,EACtC;AACD,CACD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import plugin from "./plugins/central-icons.js";
|
|
2
|
+
|
|
3
|
+
//#region src/central-icons.ts
|
|
4
|
+
const config = [{
|
|
5
|
+
name: "mahir/central-icons",
|
|
6
|
+
plugins: { "mahir-central-icons": plugin },
|
|
7
|
+
rules: { "mahir-central-icons/no-central-icons-barrel-import": 2 }
|
|
8
|
+
}];
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { config as default };
|
|
12
|
+
//# sourceMappingURL=central-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"central-icons.js","names":["pluginCentralIcons"],"sources":["../src/central-icons.ts"],"sourcesContent":["import pluginCentralIcons from './plugins/central-icons.js';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/central-icons',\n\t\tplugins: {\n\t\t\t'mahir-central-icons': pluginCentralIcons,\n\t\t},\n\t\trules: {\n\t\t\t'mahir-central-icons/no-central-icons-barrel-import': 2,\n\t\t},\n\t},\n];\n\nexport default config;\n"],"mappings":";;;AAIA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,SAAS,EACR,uBAAuBA,OACxB;CACA,OAAO,EACN,sDAAsD,EACvD;AACD,CACD"}
|
package/dist/common.d.ts
ADDED
package/dist/common.js
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import eslintPluginImportX from "eslint-plugin-import-x";
|
|
2
|
+
import eslintPluginPromise from "eslint-plugin-promise";
|
|
3
|
+
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
|
4
|
+
|
|
5
|
+
//#region src/common.ts
|
|
6
|
+
const config = [{
|
|
7
|
+
name: "mahir/common",
|
|
8
|
+
linterOptions: { reportUnusedDisableDirectives: "warn" },
|
|
9
|
+
languageOptions: {
|
|
10
|
+
ecmaVersion: "latest",
|
|
11
|
+
sourceType: "module",
|
|
12
|
+
parserOptions: {
|
|
13
|
+
requireConfigFile: false,
|
|
14
|
+
ecmaFeatures: {
|
|
15
|
+
globalReturn: false,
|
|
16
|
+
impliedStrict: true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
plugins: {
|
|
21
|
+
"import-x": eslintPluginImportX,
|
|
22
|
+
unicorn: eslintPluginUnicorn,
|
|
23
|
+
promise: eslintPluginPromise
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
"array-callback-return": 2,
|
|
27
|
+
"arrow-body-style": [2, "as-needed"],
|
|
28
|
+
"block-scoped-var": 2,
|
|
29
|
+
"consistent-return": 2,
|
|
30
|
+
"consistent-this": [2, "self"],
|
|
31
|
+
"constructor-super": 2,
|
|
32
|
+
curly: [2, "multi-or-nest"],
|
|
33
|
+
"default-case": 2,
|
|
34
|
+
"default-case-last": 2,
|
|
35
|
+
"default-param-last": 2,
|
|
36
|
+
"dot-notation": 2,
|
|
37
|
+
eqeqeq: 2,
|
|
38
|
+
"for-direction": 2,
|
|
39
|
+
"func-name-matching": 2,
|
|
40
|
+
"func-names": [2, "as-needed"],
|
|
41
|
+
"func-style": [
|
|
42
|
+
2,
|
|
43
|
+
"declaration",
|
|
44
|
+
{ allowArrowFunctions: true }
|
|
45
|
+
],
|
|
46
|
+
"getter-return": 2,
|
|
47
|
+
"grouped-accessor-pairs": [2, "getBeforeSet"],
|
|
48
|
+
"guard-for-in": 2,
|
|
49
|
+
"import-x/export": 2,
|
|
50
|
+
"import-x/first": 2,
|
|
51
|
+
"import-x/newline-after-import": 2,
|
|
52
|
+
"import-x/no-absolute-path": 2,
|
|
53
|
+
"import-x/no-amd": 2,
|
|
54
|
+
"import-x/no-duplicates": 2,
|
|
55
|
+
"import-x/no-dynamic-require": 2,
|
|
56
|
+
"import-x/no-extraneous-dependencies": [2, {
|
|
57
|
+
devDependencies: true,
|
|
58
|
+
optionalDependencies: true,
|
|
59
|
+
peerDependencies: true
|
|
60
|
+
}],
|
|
61
|
+
"import-x/no-mutable-exports": 2,
|
|
62
|
+
"import-x/no-self-import": 2,
|
|
63
|
+
"import-x/no-useless-path-segments": 2,
|
|
64
|
+
"import-x/no-webpack-loader-syntax": 2,
|
|
65
|
+
"import-x/order": [2, {
|
|
66
|
+
alphabetize: {
|
|
67
|
+
caseInsensitive: true,
|
|
68
|
+
order: "asc"
|
|
69
|
+
},
|
|
70
|
+
groups: [
|
|
71
|
+
"builtin",
|
|
72
|
+
"index",
|
|
73
|
+
"external",
|
|
74
|
+
"internal",
|
|
75
|
+
"sibling",
|
|
76
|
+
"parent",
|
|
77
|
+
"type"
|
|
78
|
+
],
|
|
79
|
+
"newlines-between": "always"
|
|
80
|
+
}],
|
|
81
|
+
"no-alert": 2,
|
|
82
|
+
"no-array-constructor": 2,
|
|
83
|
+
"no-async-promise-executor": 2,
|
|
84
|
+
"no-caller": 2,
|
|
85
|
+
"no-case-declarations": 2,
|
|
86
|
+
"no-class-assign": 2,
|
|
87
|
+
"no-compare-neg-zero": 2,
|
|
88
|
+
"no-cond-assign": 2,
|
|
89
|
+
"no-const-assign": 2,
|
|
90
|
+
"no-constructor-return": 2,
|
|
91
|
+
"no-control-regex": 2,
|
|
92
|
+
"no-debugger": 2,
|
|
93
|
+
"no-delete-var": 2,
|
|
94
|
+
"no-dupe-args": 2,
|
|
95
|
+
"no-dupe-class-members": 2,
|
|
96
|
+
"no-dupe-else-if": 2,
|
|
97
|
+
"no-dupe-keys": 2,
|
|
98
|
+
"no-duplicate-case": 2,
|
|
99
|
+
"no-empty-character-class": 2,
|
|
100
|
+
"no-empty-pattern": 2,
|
|
101
|
+
"no-eval": 2,
|
|
102
|
+
"no-ex-assign": 2,
|
|
103
|
+
"no-extend-native": 2,
|
|
104
|
+
"no-extra-bind": 2,
|
|
105
|
+
"no-extra-boolean-cast": 2,
|
|
106
|
+
"no-extra-label": 2,
|
|
107
|
+
"no-fallthrough": 2,
|
|
108
|
+
"no-func-assign": 2,
|
|
109
|
+
"no-global-assign": 2,
|
|
110
|
+
"no-implicit-coercion": 2,
|
|
111
|
+
"no-implicit-globals": 2,
|
|
112
|
+
"no-implied-eval": 2,
|
|
113
|
+
"no-import-assign": 2,
|
|
114
|
+
"no-inner-declarations": 2,
|
|
115
|
+
"no-invalid-regexp": 2,
|
|
116
|
+
"no-irregular-whitespace": 2,
|
|
117
|
+
"no-iterator": 2,
|
|
118
|
+
"no-label-var": 2,
|
|
119
|
+
"no-labels": 2,
|
|
120
|
+
"no-lone-blocks": 2,
|
|
121
|
+
"no-lonely-if": 2,
|
|
122
|
+
"no-loss-of-precision": 2,
|
|
123
|
+
"no-misleading-character-class": 2,
|
|
124
|
+
"no-multi-assign": 2,
|
|
125
|
+
"no-multi-str": 2,
|
|
126
|
+
"no-new-func": 2,
|
|
127
|
+
"no-new-wrappers": 2,
|
|
128
|
+
"no-nonoctal-decimal-escape": 2,
|
|
129
|
+
"no-obj-calls": 2,
|
|
130
|
+
"no-octal": 2,
|
|
131
|
+
"no-octal-escape": 2,
|
|
132
|
+
"no-promise-executor-return": 2,
|
|
133
|
+
"no-proto": 2,
|
|
134
|
+
"no-prototype-builtins": 2,
|
|
135
|
+
"no-redeclare": [2, { builtinGlobals: true }],
|
|
136
|
+
"no-regex-spaces": 2,
|
|
137
|
+
"no-return-assign": 2,
|
|
138
|
+
"no-script-url": 2,
|
|
139
|
+
"no-self-assign": 2,
|
|
140
|
+
"no-self-compare": 2,
|
|
141
|
+
"no-sequences": 2,
|
|
142
|
+
"no-setter-return": 2,
|
|
143
|
+
"no-shadow": [2, {
|
|
144
|
+
builtinGlobals: false,
|
|
145
|
+
hoist: "all"
|
|
146
|
+
}],
|
|
147
|
+
"no-shadow-restricted-names": 2,
|
|
148
|
+
"no-template-curly-in-string": 2,
|
|
149
|
+
"no-this-before-super": 2,
|
|
150
|
+
"no-throw-literal": 2,
|
|
151
|
+
"no-undef": 2,
|
|
152
|
+
"no-undef-init": 2,
|
|
153
|
+
"no-unexpected-multiline": 2,
|
|
154
|
+
"no-unmodified-loop-condition": 2,
|
|
155
|
+
"no-unneeded-ternary": 2,
|
|
156
|
+
"no-unreachable-loop": 2,
|
|
157
|
+
"no-unsafe-finally": 2,
|
|
158
|
+
"no-unsafe-negation": 2,
|
|
159
|
+
"no-unsafe-optional-chaining": 2,
|
|
160
|
+
"no-unused-expressions": 2,
|
|
161
|
+
"no-unused-labels": 2,
|
|
162
|
+
"no-unused-vars": 2,
|
|
163
|
+
"no-use-before-define": [2, {
|
|
164
|
+
classes: true,
|
|
165
|
+
functions: false,
|
|
166
|
+
variables: true
|
|
167
|
+
}],
|
|
168
|
+
"no-useless-backreference": 2,
|
|
169
|
+
"no-useless-call": 2,
|
|
170
|
+
"no-useless-catch": 2,
|
|
171
|
+
"no-useless-computed-key": 2,
|
|
172
|
+
"no-useless-concat": 2,
|
|
173
|
+
"no-useless-constructor": 2,
|
|
174
|
+
"no-useless-escape": 2,
|
|
175
|
+
"no-useless-rename": [2, {
|
|
176
|
+
ignoreDestructuring: false,
|
|
177
|
+
ignoreExport: false,
|
|
178
|
+
ignoreImport: false
|
|
179
|
+
}],
|
|
180
|
+
"no-useless-return": 2,
|
|
181
|
+
"no-var": 2,
|
|
182
|
+
"no-with": 2,
|
|
183
|
+
"object-shorthand": [2, "always"],
|
|
184
|
+
"one-var": [2, "never"],
|
|
185
|
+
"operator-assignment": [2, "always"],
|
|
186
|
+
"prefer-arrow-callback": 2,
|
|
187
|
+
"prefer-const": 2,
|
|
188
|
+
"prefer-exponentiation-operator": 2,
|
|
189
|
+
"prefer-named-capture-group": 1,
|
|
190
|
+
"prefer-numeric-literals": 2,
|
|
191
|
+
"prefer-object-has-own": 2,
|
|
192
|
+
"prefer-object-spread": 2,
|
|
193
|
+
"prefer-promise-reject-errors": 2,
|
|
194
|
+
"prefer-regex-literals": [2, { disallowRedundantWrapping: true }],
|
|
195
|
+
"prefer-rest-params": 2,
|
|
196
|
+
"prefer-spread": 2,
|
|
197
|
+
"promise/param-names": 2,
|
|
198
|
+
"promise/prefer-await-to-callbacks": 1,
|
|
199
|
+
"promise/prefer-await-to-then": 2,
|
|
200
|
+
"promise/valid-params": 2,
|
|
201
|
+
radix: 2,
|
|
202
|
+
"require-yield": 2,
|
|
203
|
+
"sort-vars": 2,
|
|
204
|
+
strict: [2, "never"],
|
|
205
|
+
"symbol-description": 2,
|
|
206
|
+
"unicode-bom": [2, "never"],
|
|
207
|
+
"unicorn/catch-error-name": [2, { name: "error" }],
|
|
208
|
+
"unicorn/consistent-function-scoping": 2,
|
|
209
|
+
"unicorn/empty-brace-spaces": 2,
|
|
210
|
+
"unicorn/error-message": 2,
|
|
211
|
+
"unicorn/escape-case": 2,
|
|
212
|
+
"unicorn/new-for-builtins": 2,
|
|
213
|
+
"unicorn/no-abusive-eslint-disable": 2,
|
|
214
|
+
"unicorn/no-for-each": 1,
|
|
215
|
+
"unicorn/no-array-method-this-argument": 2,
|
|
216
|
+
"unicorn/no-await-in-promise-methods": 2,
|
|
217
|
+
"unicorn/no-document-cookie": 2,
|
|
218
|
+
"unicorn/no-empty-file": 2,
|
|
219
|
+
"unicorn/no-for-loop": 2,
|
|
220
|
+
"unicorn/prefer-unicode-code-point-escapes": 2,
|
|
221
|
+
"unicorn/no-instanceof-array": 2,
|
|
222
|
+
"unicorn/no-invalid-remove-event-listener": 2,
|
|
223
|
+
"unicorn/no-lonely-if": 2,
|
|
224
|
+
"unicorn/no-negated-condition": 2,
|
|
225
|
+
"unicorn/no-new-array": 2,
|
|
226
|
+
"unicorn/no-new-buffer": 2,
|
|
227
|
+
"unicorn/no-object-as-default-parameter": 2,
|
|
228
|
+
"unicorn/no-single-promise-in-promise-methods": 2,
|
|
229
|
+
"unicorn/no-static-only-class": 2,
|
|
230
|
+
"unicorn/no-thenable": 2,
|
|
231
|
+
"unicorn/no-this-assignment": 2,
|
|
232
|
+
"unicorn/no-typeof-undefined": 2,
|
|
233
|
+
"unicorn/no-unnecessary-await": 2,
|
|
234
|
+
"unicorn/no-unreadable-iife": 2,
|
|
235
|
+
"unicorn/no-unused-properties": 2,
|
|
236
|
+
"unicorn/no-useless-fallback-in-spread": 2,
|
|
237
|
+
"unicorn/no-useless-length-check": 2,
|
|
238
|
+
"unicorn/no-useless-promise-resolve-reject": 2,
|
|
239
|
+
"unicorn/no-useless-spread": 2,
|
|
240
|
+
"unicorn/no-useless-switch-case": 2,
|
|
241
|
+
"unicorn/no-zero-fractions": 2,
|
|
242
|
+
"unicorn/numeric-separators-style": [2, {
|
|
243
|
+
binary: { onlyIfContainsSeparator: true },
|
|
244
|
+
hexadecimal: { onlyIfContainsSeparator: true },
|
|
245
|
+
number: {
|
|
246
|
+
groupLength: 3,
|
|
247
|
+
minimumDigits: 0
|
|
248
|
+
},
|
|
249
|
+
octal: { onlyIfContainsSeparator: true }
|
|
250
|
+
}],
|
|
251
|
+
"unicorn/prefer-array-find": 2,
|
|
252
|
+
"unicorn/prefer-array-flat": 2,
|
|
253
|
+
"unicorn/prefer-array-flat-map": 2,
|
|
254
|
+
"unicorn/prefer-array-index-of": 2,
|
|
255
|
+
"unicorn/prefer-array-some": 2,
|
|
256
|
+
"unicorn/prefer-code-point": 2,
|
|
257
|
+
"unicorn/prefer-date-now": 2,
|
|
258
|
+
"unicorn/prefer-default-parameters": 2,
|
|
259
|
+
"unicorn/prefer-export-from": 2,
|
|
260
|
+
"unicorn/prefer-includes": 2,
|
|
261
|
+
"unicorn/prefer-math-trunc": 2,
|
|
262
|
+
"unicorn/prefer-modern-math-apis": 2,
|
|
263
|
+
"unicorn/prefer-native-coercion-functions": 2,
|
|
264
|
+
"unicorn/prefer-number-properties": 2,
|
|
265
|
+
"unicorn/prefer-object-from-entries": 2,
|
|
266
|
+
"unicorn/prefer-optional-catch-binding": 2,
|
|
267
|
+
"unicorn/prefer-query-selector": 2,
|
|
268
|
+
"unicorn/prefer-reflect-apply": 2,
|
|
269
|
+
"unicorn/prefer-regexp-test": 2,
|
|
270
|
+
"unicorn/prefer-set-size": 2,
|
|
271
|
+
"unicorn/prefer-string-replace-all": 2,
|
|
272
|
+
"unicorn/prefer-string-slice": 2,
|
|
273
|
+
"unicorn/prefer-string-starts-ends-with": 2,
|
|
274
|
+
"unicorn/prefer-string-trim-start-end": 2,
|
|
275
|
+
"unicorn/prefer-type-error": 2,
|
|
276
|
+
"unicorn/relative-url-style": [2, "never"],
|
|
277
|
+
"unicorn/require-array-join-separator": 2,
|
|
278
|
+
"unicorn/require-number-to-fixed-digits-argument": 2,
|
|
279
|
+
"unicorn/require-post-message-target-origin": 2,
|
|
280
|
+
"unicorn/template-indent": 2,
|
|
281
|
+
"unicorn/text-encoding-identifier-case": 2,
|
|
282
|
+
"unicorn/throw-new-error": 2,
|
|
283
|
+
"use-isnan": 2,
|
|
284
|
+
"valid-typeof": [2, { requireStringLiterals: true }],
|
|
285
|
+
"vars-on-top": 2,
|
|
286
|
+
yoda: [2, "never"]
|
|
287
|
+
},
|
|
288
|
+
settings: {
|
|
289
|
+
"import-x/extensions": [".js"],
|
|
290
|
+
"import-x/resolver": { node: { extensions: [".js"] } }
|
|
291
|
+
}
|
|
292
|
+
}];
|
|
293
|
+
|
|
294
|
+
//#endregion
|
|
295
|
+
export { config as default };
|
|
296
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","names":[],"sources":["../src/common.ts"],"sourcesContent":["import eslintPluginImportX from 'eslint-plugin-import-x';\n// @ts-expect-error -- eslint-plugin-promise is not typed\nimport eslintPluginPromise from 'eslint-plugin-promise';\nimport eslintPluginUnicorn from 'eslint-plugin-unicorn';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'array-callback-return': 2,\n\t'arrow-body-style': [2, 'as-needed'],\n\t'block-scoped-var': 2,\n\t'consistent-return': 2,\n\t'consistent-this': [2, 'self'],\n\t'constructor-super': 2,\n\tcurly: [2, 'multi-or-nest'],\n\t'default-case': 2,\n\t'default-case-last': 2,\n\t'default-param-last': 2,\n\t'dot-notation': 2,\n\teqeqeq: 2,\n\t'for-direction': 2,\n\t'func-name-matching': 2,\n\t'func-names': [2, 'as-needed'],\n\t'func-style': [\n\t\t2,\n\t\t'declaration',\n\t\t{\n\t\t\tallowArrowFunctions: true,\n\t\t},\n\t],\n\t'getter-return': 2,\n\t'grouped-accessor-pairs': [2, 'getBeforeSet'],\n\t'guard-for-in': 2,\n\t'import-x/export': 2,\n\t'import-x/first': 2,\n\t'import-x/newline-after-import': 2,\n\t'import-x/no-absolute-path': 2,\n\t'import-x/no-amd': 2,\n\t'import-x/no-duplicates': 2,\n\t'import-x/no-dynamic-require': 2,\n\t'import-x/no-extraneous-dependencies': [\n\t\t2,\n\t\t{\n\t\t\tdevDependencies: true,\n\t\t\toptionalDependencies: true,\n\t\t\tpeerDependencies: true,\n\t\t},\n\t],\n\t'import-x/no-mutable-exports': 2,\n\t'import-x/no-self-import': 2,\n\t'import-x/no-useless-path-segments': 2,\n\t'import-x/no-webpack-loader-syntax': 2,\n\t'import-x/order': [\n\t\t2,\n\t\t{\n\t\t\talphabetize: {\n\t\t\t\tcaseInsensitive: true,\n\t\t\t\torder: 'asc',\n\t\t\t},\n\t\t\tgroups: ['builtin', 'index', 'external', 'internal', 'sibling', 'parent', 'type'],\n\t\t\t'newlines-between': 'always',\n\t\t},\n\t],\n\t'no-alert': 2,\n\t'no-array-constructor': 2,\n\t'no-async-promise-executor': 2,\n\t'no-caller': 2,\n\t'no-case-declarations': 2,\n\t'no-class-assign': 2,\n\t'no-compare-neg-zero': 2,\n\t'no-cond-assign': 2,\n\t'no-const-assign': 2,\n\t'no-constructor-return': 2,\n\t'no-control-regex': 2,\n\t'no-debugger': 2,\n\t'no-delete-var': 2,\n\t'no-dupe-args': 2,\n\t'no-dupe-class-members': 2,\n\t'no-dupe-else-if': 2,\n\t'no-dupe-keys': 2,\n\t'no-duplicate-case': 2,\n\t'no-empty-character-class': 2,\n\t'no-empty-pattern': 2,\n\t'no-eval': 2,\n\t'no-ex-assign': 2,\n\t'no-extend-native': 2,\n\t'no-extra-bind': 2,\n\t'no-extra-boolean-cast': 2,\n\t'no-extra-label': 2,\n\t'no-fallthrough': 2,\n\t'no-func-assign': 2,\n\t'no-global-assign': 2,\n\t'no-implicit-coercion': 2,\n\t'no-implicit-globals': 2,\n\t'no-implied-eval': 2,\n\t'no-import-assign': 2,\n\t'no-inner-declarations': 2,\n\t'no-invalid-regexp': 2,\n\t'no-irregular-whitespace': 2,\n\t'no-iterator': 2,\n\t'no-label-var': 2,\n\t'no-labels': 2,\n\t'no-lone-blocks': 2,\n\t'no-lonely-if': 2,\n\t'no-loss-of-precision': 2,\n\t'no-misleading-character-class': 2,\n\t'no-multi-assign': 2,\n\t'no-multi-str': 2,\n\t'no-new-func': 2,\n\t'no-new-wrappers': 2,\n\t'no-nonoctal-decimal-escape': 2,\n\t'no-obj-calls': 2,\n\t'no-octal': 2,\n\t'no-octal-escape': 2,\n\t'no-promise-executor-return': 2,\n\t'no-proto': 2,\n\t'no-prototype-builtins': 2,\n\t'no-redeclare': [\n\t\t2,\n\t\t{\n\t\t\tbuiltinGlobals: true,\n\t\t},\n\t],\n\t'no-regex-spaces': 2,\n\t'no-return-assign': 2,\n\t'no-script-url': 2,\n\t'no-self-assign': 2,\n\t'no-self-compare': 2,\n\t'no-sequences': 2,\n\t'no-setter-return': 2,\n\t'no-shadow': [\n\t\t2,\n\t\t{\n\t\t\tbuiltinGlobals: false,\n\t\t\thoist: 'all',\n\t\t},\n\t],\n\t'no-shadow-restricted-names': 2,\n\t'no-template-curly-in-string': 2,\n\t'no-this-before-super': 2,\n\t'no-throw-literal': 2,\n\t'no-undef': 2,\n\t'no-undef-init': 2,\n\t'no-unexpected-multiline': 2,\n\t'no-unmodified-loop-condition': 2,\n\t'no-unneeded-ternary': 2,\n\t'no-unreachable-loop': 2,\n\t'no-unsafe-finally': 2,\n\t'no-unsafe-negation': 2,\n\t'no-unsafe-optional-chaining': 2,\n\t'no-unused-expressions': 2,\n\t'no-unused-labels': 2,\n\t'no-unused-vars': 2,\n\t'no-use-before-define': [\n\t\t2,\n\t\t{\n\t\t\tclasses: true,\n\t\t\tfunctions: false,\n\t\t\tvariables: true,\n\t\t},\n\t],\n\t'no-useless-backreference': 2,\n\t'no-useless-call': 2,\n\t'no-useless-catch': 2,\n\t'no-useless-computed-key': 2,\n\t'no-useless-concat': 2,\n\t'no-useless-constructor': 2,\n\t'no-useless-escape': 2,\n\t'no-useless-rename': [\n\t\t2,\n\t\t{\n\t\t\tignoreDestructuring: false,\n\t\t\tignoreExport: false,\n\t\t\tignoreImport: false,\n\t\t},\n\t],\n\t'no-useless-return': 2,\n\t'no-var': 2,\n\t'no-with': 2,\n\t'object-shorthand': [2, 'always'],\n\t'one-var': [2, 'never'],\n\t'operator-assignment': [2, 'always'],\n\t'prefer-arrow-callback': 2,\n\t'prefer-const': 2,\n\t'prefer-exponentiation-operator': 2,\n\t'prefer-named-capture-group': 1,\n\t'prefer-numeric-literals': 2,\n\t'prefer-object-has-own': 2,\n\t'prefer-object-spread': 2,\n\t'prefer-promise-reject-errors': 2,\n\t'prefer-regex-literals': [\n\t\t2,\n\t\t{\n\t\t\tdisallowRedundantWrapping: true,\n\t\t},\n\t],\n\t'prefer-rest-params': 2,\n\t'prefer-spread': 2,\n\t'promise/param-names': 2,\n\t'promise/prefer-await-to-callbacks': 1,\n\t'promise/prefer-await-to-then': 2,\n\t'promise/valid-params': 2,\n\tradix: 2,\n\t'require-yield': 2,\n\t'sort-vars': 2,\n\tstrict: [2, 'never'],\n\t'symbol-description': 2,\n\t'unicode-bom': [2, 'never'],\n\t'unicorn/catch-error-name': [\n\t\t2,\n\t\t{\n\t\t\tname: 'error',\n\t\t},\n\t],\n\t'unicorn/consistent-function-scoping': 2,\n\t'unicorn/empty-brace-spaces': 2,\n\t'unicorn/error-message': 2,\n\t'unicorn/escape-case': 2,\n\t'unicorn/new-for-builtins': 2,\n\t'unicorn/no-abusive-eslint-disable': 2,\n\t'unicorn/no-for-each': 1,\n\t'unicorn/no-array-method-this-argument': 2,\n\t'unicorn/no-await-in-promise-methods': 2,\n\t'unicorn/no-document-cookie': 2,\n\t'unicorn/no-empty-file': 2,\n\t'unicorn/no-for-loop': 2,\n\t'unicorn/prefer-unicode-code-point-escapes': 2,\n\t'unicorn/no-instanceof-array': 2,\n\t'unicorn/no-invalid-remove-event-listener': 2,\n\t'unicorn/no-lonely-if': 2,\n\t'unicorn/no-negated-condition': 2,\n\t'unicorn/no-new-array': 2,\n\t'unicorn/no-new-buffer': 2,\n\t'unicorn/no-object-as-default-parameter': 2,\n\t'unicorn/no-single-promise-in-promise-methods': 2,\n\t'unicorn/no-static-only-class': 2,\n\t'unicorn/no-thenable': 2,\n\t'unicorn/no-this-assignment': 2,\n\t'unicorn/no-typeof-undefined': 2,\n\t'unicorn/no-unnecessary-await': 2,\n\t'unicorn/no-unreadable-iife': 2,\n\t'unicorn/no-unused-properties': 2,\n\t'unicorn/no-useless-fallback-in-spread': 2,\n\t'unicorn/no-useless-length-check': 2,\n\t'unicorn/no-useless-promise-resolve-reject': 2,\n\t'unicorn/no-useless-spread': 2,\n\t'unicorn/no-useless-switch-case': 2,\n\t'unicorn/no-zero-fractions': 2,\n\t'unicorn/numeric-separators-style': [\n\t\t2,\n\t\t{\n\t\t\tbinary: {\n\t\t\t\tonlyIfContainsSeparator: true,\n\t\t\t},\n\t\t\thexadecimal: {\n\t\t\t\tonlyIfContainsSeparator: true,\n\t\t\t},\n\t\t\tnumber: {\n\t\t\t\tgroupLength: 3,\n\t\t\t\tminimumDigits: 0,\n\t\t\t},\n\t\t\toctal: {\n\t\t\t\tonlyIfContainsSeparator: true,\n\t\t\t},\n\t\t},\n\t],\n\t'unicorn/prefer-array-find': 2,\n\t'unicorn/prefer-array-flat': 2,\n\t'unicorn/prefer-array-flat-map': 2,\n\t'unicorn/prefer-array-index-of': 2,\n\t'unicorn/prefer-array-some': 2,\n\t'unicorn/prefer-code-point': 2,\n\t'unicorn/prefer-date-now': 2,\n\t'unicorn/prefer-default-parameters': 2,\n\t'unicorn/prefer-export-from': 2,\n\t'unicorn/prefer-includes': 2,\n\t'unicorn/prefer-math-trunc': 2,\n\t'unicorn/prefer-modern-math-apis': 2,\n\t'unicorn/prefer-native-coercion-functions': 2,\n\t'unicorn/prefer-number-properties': 2,\n\t'unicorn/prefer-object-from-entries': 2,\n\t'unicorn/prefer-optional-catch-binding': 2,\n\t'unicorn/prefer-query-selector': 2,\n\t'unicorn/prefer-reflect-apply': 2,\n\t'unicorn/prefer-regexp-test': 2,\n\t'unicorn/prefer-set-size': 2,\n\t'unicorn/prefer-string-replace-all': 2,\n\t'unicorn/prefer-string-slice': 2,\n\t'unicorn/prefer-string-starts-ends-with': 2,\n\t'unicorn/prefer-string-trim-start-end': 2,\n\t'unicorn/prefer-type-error': 2,\n\t'unicorn/relative-url-style': [2, 'never'],\n\t'unicorn/require-array-join-separator': 2,\n\t'unicorn/require-number-to-fixed-digits-argument': 2,\n\t'unicorn/require-post-message-target-origin': 2,\n\t'unicorn/template-indent': 2,\n\t'unicorn/text-encoding-identifier-case': 2,\n\t'unicorn/throw-new-error': 2,\n\t'use-isnan': 2,\n\t'valid-typeof': [\n\t\t2,\n\t\t{\n\t\t\trequireStringLiterals: true,\n\t\t},\n\t],\n\t'vars-on-top': 2,\n\tyoda: [2, 'never'],\n};\n\nconst settings: TSESLint.FlatConfig.Settings = {\n\t'import-x/extensions': ['.js'],\n\t'import-x/resolver': {\n\t\tnode: {\n\t\t\textensions: ['.js'],\n\t\t},\n\t},\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/common',\n\t\tlinterOptions: {\n\t\t\treportUnusedDisableDirectives: 'warn',\n\t\t},\n\t\tlanguageOptions: {\n\t\t\tecmaVersion: 'latest',\n\t\t\tsourceType: 'module',\n\t\t\tparserOptions: {\n\t\t\t\trequireConfigFile: false,\n\t\t\t\tecmaFeatures: {\n\t\t\t\t\tglobalReturn: false,\n\t\t\t\t\timpliedStrict: true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tplugins: {\n\t\t\t'import-x': eslintPluginImportX,\n\t\t\tunicorn: eslintPluginUnicorn,\n\t\t\tpromise: eslintPluginPromise,\n\t\t},\n\t\trules,\n\t\tsettings,\n\t},\n];\n\nexport default config;\n"],"mappings":";;;;;AA8TA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,eAAe,EACd,+BAA+B,OAChC;CACA,iBAAiB;EAChB,aAAa;EACb,YAAY;EACZ,eAAe;GACd,mBAAmB;GACnB,cAAc;IACb,cAAc;IACd,eAAe;GAChB;EACD;CACD;CACA,SAAS;EACR,YAAY;EACZ,SAAS;EACT,SAAS;CACV;CACA;EA5UD,yBAAyB;EACzB,oBAAoB,CAAC,GAAG,WAAW;EACnC,oBAAoB;EACpB,qBAAqB;EACrB,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B;EAC/B,0CAA0C;EAC1C,wCAAwC;EACxC,6BAA6B;EAC7B,8BAA8B,CAAC,GAAG,OAAO;EACzC,wCAAwC;EACxC,mDAAmD;EACnD,8CAA8C;EAC9C,2BAA2B;EAC3B,yCAAyC;EACzC,2BAA2B;EAC3B,aAAa;EACb,gBAAgB,CACf,GACA,EACC,uBAAuB,KACxB,CACD;EACA,eAAe;EACf,MAAM,CAAC,GAAG,OAAO;CAkCZ;CACJ;EA/BD,uBAAuB,CAAC,KAAK;EAC7B,qBAAqB,EACpB,MAAM,EACL,YAAY,CAAC,KAAK,EACnB,EACD;CA0BQ;AACR,CACD"}
|
package/dist/edge.d.ts
ADDED
package/dist/edge.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/edge.ts
|
|
2
|
+
const config = [{
|
|
3
|
+
name: "mahir/edge",
|
|
4
|
+
rules: {
|
|
5
|
+
"n/prefer-global/buffer": [2, "always"],
|
|
6
|
+
"n/prefer-global/console": [2, "always"],
|
|
7
|
+
"n/prefer-global/process": [2, "always"],
|
|
8
|
+
"n/prefer-global/text-decoder": [2, "always"],
|
|
9
|
+
"n/prefer-global/text-encoder": [2, "always"],
|
|
10
|
+
"n/prefer-global/url": [2, "always"],
|
|
11
|
+
"n/prefer-global/url-search-params": [2, "always"],
|
|
12
|
+
"no-restricted-globals": 0
|
|
13
|
+
}
|
|
14
|
+
}];
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { config as default };
|
|
18
|
+
//# sourceMappingURL=edge.js.map
|
package/dist/edge.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.js","names":[],"sources":["../src/edge.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'n/prefer-global/buffer': [2, 'always'],\n\t'n/prefer-global/console': [2, 'always'],\n\t'n/prefer-global/process': [2, 'always'],\n\t'n/prefer-global/text-decoder': [2, 'always'],\n\t'n/prefer-global/text-encoder': [2, 'always'],\n\t'n/prefer-global/url': [2, 'always'],\n\t'n/prefer-global/url-search-params': [2, 'always'],\n\t'no-restricted-globals': 0,\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/edge',\n\t\trules,\n\t},\n];\n\nexport default config;\n"],"mappings":";AAaA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN;EAbD,0BAA0B,CAAC,GAAG,QAAQ;EACtC,2BAA2B,CAAC,GAAG,QAAQ;EACvC,2BAA2B,CAAC,GAAG,QAAQ;EACvC,gCAAgC,CAAC,GAAG,QAAQ;EAC5C,gCAAgC,CAAC,GAAG,QAAQ;EAC5C,uBAAuB,CAAC,GAAG,QAAQ;EACnC,qCAAqC,CAAC,GAAG,QAAQ;EACjD,yBAAyB;CAMpB;AACL,CACD"}
|
package/dist/i18n.d.ts
ADDED
package/dist/i18n.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import plugin from "./plugins/i18n.js";
|
|
2
|
+
|
|
3
|
+
//#region src/i18n.ts
|
|
4
|
+
const config = [{
|
|
5
|
+
name: "mahir/i18n",
|
|
6
|
+
plugins: { "mahir-i18n": plugin },
|
|
7
|
+
rules: {
|
|
8
|
+
"mahir-i18n/static-t-arguments": 2,
|
|
9
|
+
"mahir-i18n/no-t-as-parameter": 2
|
|
10
|
+
}
|
|
11
|
+
}];
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { config as default };
|
|
15
|
+
//# sourceMappingURL=i18n.js.map
|
package/dist/i18n.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["pluginI18n"],"sources":["../src/i18n.ts"],"sourcesContent":["import pluginI18n from './plugins/i18n.js';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/i18n',\n\t\tplugins: {\n\t\t\t'mahir-i18n': pluginI18n,\n\t\t},\n\t\trules: {\n\t\t\t'mahir-i18n/static-t-arguments': 2,\n\t\t\t'mahir-i18n/no-t-as-parameter': 2,\n\t\t},\n\t},\n];\n\nexport default config;\n"],"mappings":";;;AAIA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,SAAS,EACR,cAAcA,OACf;CACA,OAAO;EACN,iCAAiC;EACjC,gCAAgC;CACjC;AACD,CACD"}
|