@paratco/eslint-config 3.3.2 → 3.4.0
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 +35 -56
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,88 +1,65 @@
|
|
|
1
1
|
# `@paratco/eslint-config`
|
|
2
|
-
|
|
3
2
|
Paratco ESLint configs for JavaScript and TypeScript projects.
|
|
4
|
-
|
|
5
3
|
- TypeScript
|
|
6
4
|
- React (optional)
|
|
7
5
|
- Node.js
|
|
8
6
|
- Import plugin (optional)
|
|
9
7
|
- Stylistic or Prettier formatting
|
|
10
|
-
|
|
11
8
|
## Installation
|
|
12
|
-
|
|
13
|
-
|
|
14
9
|
NPM:
|
|
15
10
|
```bash
|
|
16
11
|
# prettier is optional, just use it if you want to use prettier formatting
|
|
17
12
|
npm install --save-dev @paratco/eslint-config eslint prettier
|
|
18
13
|
```
|
|
19
|
-
|
|
20
14
|
Yarn:
|
|
21
15
|
```bash
|
|
22
16
|
# prettier is optional, just use it if you want to use prettier formatting
|
|
23
17
|
yarn add -D @paratco/eslint-config eslint prettier
|
|
24
18
|
```
|
|
25
|
-
|
|
26
19
|
## Usage (ESLint Flat Config)
|
|
27
|
-
|
|
28
20
|
Create an `eslint.config.{js,mjs,ts}` file in your project root:
|
|
29
|
-
|
|
30
21
|
```javascript
|
|
31
22
|
import { createConfig } from "@paratco/eslint-config";
|
|
32
|
-
|
|
33
23
|
export default createConfig({
|
|
34
24
|
// Required: Specify the platform
|
|
35
25
|
platform: "node", // or "react"
|
|
36
|
-
|
|
37
26
|
// Required: Choose your formatting style
|
|
38
27
|
style: "prettier", // or "stylistic"
|
|
39
|
-
|
|
40
28
|
// Optional: Enable import plugin rules
|
|
41
29
|
useImport: true,
|
|
42
|
-
|
|
43
30
|
// Optional: TypeScript configuration
|
|
44
31
|
typescript: {
|
|
45
32
|
tsconfigRootDir: import.meta.dirname,
|
|
46
33
|
project: "./tsconfig.json"
|
|
47
34
|
},
|
|
48
|
-
|
|
49
35
|
// Optional: Add custom overrides
|
|
50
36
|
overrides: [
|
|
51
37
|
// Your custom ESLint configurations
|
|
52
38
|
],
|
|
53
|
-
|
|
54
39
|
// Optional: Specify patterns to ignore
|
|
55
40
|
ignores: ["dist/**", "node_modules/**"]
|
|
56
41
|
});
|
|
57
42
|
```
|
|
58
|
-
|
|
59
43
|
## Configuration Options
|
|
60
|
-
|
|
61
44
|
The `createConfig` function accepts an options object with the following properties:
|
|
62
|
-
|
|
63
45
|
| Option | Type | Required | Default | Description |
|
|
64
46
|
|--------|------|----------|---------|-------------|
|
|
65
47
|
| `platform` | `"node" \| "react"` | Yes | - | Specifies the platform for the ESLint configuration |
|
|
66
48
|
| `style` | `"stylistic" \| "prettier"` | Yes | - | Specifies the style formatter to use |
|
|
67
49
|
| `useImport` | `boolean` | No | `false` | Enable import plugin rules |
|
|
50
|
+
| `files` | `string[]` | No | `undefined` | Scope all rules to these file globs only |
|
|
68
51
|
| `typescript` | `TypescriptOptions` | No | `undefined` | TypeScript configuration options |
|
|
69
52
|
| `overrides` | `Linter.Config[]` | No | `undefined` | Additional ESLint configurations to override defaults |
|
|
70
53
|
| `ignores` | `string[]` | No | `undefined` | Patterns to ignore |
|
|
71
|
-
|
|
72
54
|
### TypeScript Options
|
|
73
|
-
|
|
74
55
|
| Option | Type | Required | Default | Description |
|
|
75
56
|
|--------|------|----------|---------|-------------|
|
|
76
57
|
| `tsconfigRootDir` | `string` | No | `undefined` | The root directory for TypeScript configuration |
|
|
77
58
|
| `project` | `string \| string[]` | No | `undefined` | Path to tsconfig.json file(s) |
|
|
78
|
-
|
|
79
59
|
## Examples
|
|
80
|
-
|
|
81
60
|
### Node.js Configuration
|
|
82
|
-
|
|
83
61
|
```javascript
|
|
84
62
|
import { createConfig } from "@paratco/eslint-config";
|
|
85
|
-
|
|
86
63
|
export default createConfig({
|
|
87
64
|
platform: "node",
|
|
88
65
|
style: "prettier",
|
|
@@ -92,12 +69,9 @@ export default createConfig({
|
|
|
92
69
|
}
|
|
93
70
|
});
|
|
94
71
|
```
|
|
95
|
-
|
|
96
72
|
### React Configuration
|
|
97
|
-
|
|
98
73
|
```javascript
|
|
99
74
|
import { createConfig } from "@paratco/eslint-config";
|
|
100
|
-
|
|
101
75
|
export default createConfig({
|
|
102
76
|
platform: "react",
|
|
103
77
|
style: "stylistic",
|
|
@@ -108,50 +82,69 @@ export default createConfig({
|
|
|
108
82
|
}
|
|
109
83
|
});
|
|
110
84
|
```
|
|
111
|
-
|
|
112
85
|
### JavaScript-only Configuration
|
|
113
|
-
|
|
114
86
|
```javascript
|
|
115
87
|
import { createConfig } from "@paratco/eslint-config";
|
|
116
|
-
|
|
117
88
|
export default createConfig({
|
|
118
89
|
platform: "node",
|
|
119
90
|
style: "prettier"
|
|
120
91
|
});
|
|
121
92
|
```
|
|
122
|
-
|
|
93
|
+
### Scoping Rules to Specific Directories
|
|
94
|
+
Use the `files` option to restrict all rules to a specific set of file globs. This is useful when a single ESLint config covers multiple platforms (e.g. an Electron app with a renderer and a main process each targeting a different `tsconfig.json`), or when working in a monorepo where different sub-trees have different configs.
|
|
95
|
+
When `files` is provided, `createConfig` internally wraps the returned configs with [`eslint.defineConfig()`](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file) so that all plugin registrations and rules are correctly scoped — no extra wrapper is needed in your config file.
|
|
96
|
+
```javascript
|
|
97
|
+
import { createConfig } from "@paratco/eslint-config";
|
|
98
|
+
export default [
|
|
99
|
+
// Renderer process — React + browser globals
|
|
100
|
+
...createConfig({
|
|
101
|
+
files: ["./src/**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
102
|
+
platform: "react",
|
|
103
|
+
style: "stylistic",
|
|
104
|
+
useImport: true,
|
|
105
|
+
typescript: {
|
|
106
|
+
tsconfigRootDir: import.meta.dirname,
|
|
107
|
+
project: "./tsconfig.app.json"
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
// Main process — Node.js globals
|
|
111
|
+
...createConfig({
|
|
112
|
+
files: ["./electron/**/*.{js,mjs,cjs,ts}"],
|
|
113
|
+
platform: "node",
|
|
114
|
+
style: "stylistic",
|
|
115
|
+
useImport: true,
|
|
116
|
+
typescript: {
|
|
117
|
+
tsconfigRootDir: import.meta.dirname,
|
|
118
|
+
project: "./tsconfig.electron.json"
|
|
119
|
+
}
|
|
120
|
+
}),
|
|
121
|
+
{
|
|
122
|
+
ignores: ["dist", "dist-electron", ".vite"]
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
```
|
|
126
|
+
> **Note:** When `files` is used and multiple `createConfig` calls are combined, spread each result (`...createConfig(...)`) into the top-level array instead of returning a single `createConfig` call directly.
|
|
123
127
|
## Using oxlint alongside ESLint
|
|
124
|
-
|
|
125
128
|
[oxlint](https://oxc-project.github.io/) is a fast JavaScript/TypeScript linter written in Rust that can be used alongside ESLint to improve performance and catch additional issues. This package supports using both linters together.
|
|
126
|
-
|
|
127
129
|
### Installation
|
|
128
|
-
|
|
129
130
|
Install oxlint alongside ESLint:
|
|
130
|
-
|
|
131
131
|
NPM:
|
|
132
132
|
```bash
|
|
133
133
|
npm install --save-dev --save-exact oxlint@1.7.0 eslint-plugin-oxlint@1.7.0
|
|
134
134
|
```
|
|
135
|
-
|
|
136
135
|
Yarn:
|
|
137
136
|
```bash
|
|
138
137
|
yarn add -D -E oxlint@1.7.0 eslint-plugin-oxlint@1.7.0
|
|
139
138
|
```
|
|
140
|
-
|
|
141
139
|
note: Ensure you have the latest and exact version of oxlint and eslint-plugin-oxlint installed.
|
|
142
|
-
|
|
143
140
|
### Configuration
|
|
144
|
-
|
|
145
141
|
1. Create an `.oxlintrc.json` file with @oxlint/migrate:
|
|
146
|
-
|
|
147
142
|
```bash
|
|
148
143
|
# version match with oxlint installed before
|
|
149
144
|
npx @oxlint/migrate@1.7.0
|
|
150
145
|
```
|
|
151
146
|
This will generate or update your `.oxlintrc.json` file based on your ESLint configuration. The tool analyzes your ESLint config and converts compatible rules to their oxlint equivalents.
|
|
152
|
-
|
|
153
147
|
2. Update your `package.json` scripts to run both linters (run oxlint first for performance):
|
|
154
|
-
|
|
155
148
|
```json
|
|
156
149
|
{
|
|
157
150
|
"scripts": {
|
|
@@ -160,53 +153,39 @@ This will generate or update your `.oxlintrc.json` file based on your ESLint con
|
|
|
160
153
|
}
|
|
161
154
|
}
|
|
162
155
|
```
|
|
163
|
-
|
|
164
156
|
3. integrate oxlint with ESLint by adding the ESLint plugin to your configuration:
|
|
165
|
-
|
|
166
157
|
```javascript
|
|
167
158
|
import { createConfig } from "@paratco/eslint-config";
|
|
168
159
|
import oxlintPlugin from "eslint-plugin-oxlint";
|
|
169
|
-
|
|
170
160
|
export default createConfig({
|
|
171
161
|
platform: "node", // or "react"
|
|
172
162
|
style: "prettier", // or "stylistic"
|
|
173
|
-
|
|
174
163
|
// Add oxlint plugin as the LAST item in your overrides
|
|
175
164
|
// This ensures ESLint rules that are handled by oxlint are turned off
|
|
176
165
|
overrides: [
|
|
177
166
|
// Your other overrides go here
|
|
178
|
-
|
|
179
167
|
// eslint-plugin-oxlint must be the last config
|
|
180
168
|
...oxlintPlugin.configs["flat/all"]
|
|
181
169
|
]
|
|
182
170
|
});
|
|
183
171
|
```
|
|
184
|
-
|
|
185
172
|
### Running Linters
|
|
186
|
-
|
|
187
173
|
Run both linters with a single command:
|
|
188
|
-
|
|
189
174
|
```bash
|
|
190
175
|
npm run lint
|
|
191
176
|
# or
|
|
192
177
|
yarn lint
|
|
193
178
|
```
|
|
194
|
-
|
|
195
179
|
Fix issues automatically when possible:
|
|
196
|
-
|
|
197
180
|
```bash
|
|
198
181
|
npm run lint:fix
|
|
199
182
|
# or
|
|
200
183
|
yarn lint:fix
|
|
201
184
|
```
|
|
202
|
-
|
|
203
185
|
### Benefits of Using Both Linters
|
|
204
|
-
|
|
205
186
|
- **Performance**: oxlint is significantly faster than ESLint, especially on large codebases
|
|
206
187
|
- **Complementary Rules**: Each linter has unique rules that can catch different issues
|
|
207
188
|
- **Gradual Migration**: You can gradually migrate from ESLint to oxlint or use both permanently
|
|
208
189
|
- **Modern JavaScript Support**: oxlint has excellent support for modern JavaScript and TypeScript features
|
|
209
|
-
|
|
210
190
|
## License
|
|
211
|
-
|
|
212
191
|
Licensed under [MIT License](./LICENSE)
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`globals`);c=s(c,1);let l=require(`eslint-plugin-react`);l=s(l,1);let u=require(`@eslint/js`);u=s(u,1);let d=require(`typescript-eslint`),f=require(`eslint-plugin-unicorn`);f=s(f,1);let p=require(`eslint-plugin-react-hooks`),m=require(`eslint-plugin-react-refresh`);m=s(m,1);let h=require(`eslint-plugin-import-x`),g=require(`eslint-import-resolver-typescript`),_=require(`eslint-plugin-unused-imports`);_=s(_,1);let v=require(`eslint-config-prettier`);v=s(v,1);let y=require(`@stylistic/eslint-plugin`);y=s(y,1);var b={eqeqeq:[`warn`],curly:[`warn`,`all`],"no-restricted-imports":[`error`,{patterns:[{regex:`^(node:)?process$`,message:`Please dont import node:process.`}]}],"no-unused-vars":[`error`,{args:`all`,argsIgnorePattern:`^_`,caughtErrors:`all`,caughtErrorsIgnorePattern:`^_`,destructuredArrayIgnorePattern:`^_`,ignoreRestSiblings:!0}],"no-fallthrough":[`error`,{allowEmptyCase:!0}]},x={"class-methods-use-this":`off`,"@typescript-eslint/class-methods-use-this":[`error`,{ignoreOverrideMethods:!0,ignoreClassesThatImplementAnInterface:!0}],"consistent-return":`off`,"@typescript-eslint/consistent-return":`off`,"@typescript-eslint/consistent-type-exports":[`error`,{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/consistent-type-imports":[`error`],"default-param-last":`off`,"@typescript-eslint/default-param-last":[`error`],"@typescript-eslint/explicit-function-return-type":[`error`,{allowExpressions:!0}],"@typescript-eslint/explicit-member-accessibility":[`error`,{accessibility:`no-public`,overrides:{constructors:`off`}}],"@typescript-eslint/explicit-module-boundary-types":[`error`],"init-declarations":`off`,"@typescript-eslint/init-declarations":[`off`],"max-params":`off`,"@typescript-eslint/max-params":[`off`],"@typescript-eslint/member-ordering":[`error`,{default:[`constructor`,`field`,`static-method`,`method`,`signature`]}],"@typescript-eslint/method-signature-style":[`error`],"@typescript-eslint/naming-convention":[`error`,{selector:`function`,format:[`PascalCase`,`camelCase`]}],"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":[`off`],"@typescript-eslint/no-import-type-side-effects":[`error`],"no-invalid-this":`off`,"@typescript-eslint/no-invalid-this":[`error`],"no-loop-func":`off`,"@typescript-eslint/no-loop-func":[`error`],"no-magic-numbers":`off`,"@typescript-eslint/no-magic-numbers":[`off`],"no-redeclare":`off`,"@typescript-eslint/no-redeclare":[`off`],"no-restricted-imports":`off`,"@typescript-eslint/no-restricted-imports":[`error`,{patterns:[{regex:`^(node:)?process$`,message:`Please dont import node:process.`}]}],"no-shadow":`off`,"@typescript-eslint/no-shadow":[`error`],"@typescript-eslint/no-unnecessary-parameter-property-assignment":[`off`],"@typescript-eslint/no-unnecessary-qualifier":[`warn`],"@typescript-eslint/no-unnecessary-type-conversion":[`warn`],"@typescript-eslint/no-unsafe-type-assertion":[`off`],"no-use-before-define":`off`,"@typescript-eslint/no-use-before-define":[`error`],"@typescript-eslint/no-useless-empty-export":[`warn`],"@typescript-eslint/parameter-properties":[`error`],"prefer-destructuring":`off`,"@typescript-eslint/prefer-destructuring":[`off`],"@typescript-eslint/prefer-enum-initializers":[`off`],"@typescript-eslint/prefer-readonly":[`warn`],"@typescript-eslint/prefer-readonly-parameter-types":[`off`],"@typescript-eslint/promise-function-async":[`error`],"@typescript-eslint/require-array-sort-compare":[`error`],"@typescript-eslint/strict-boolean-expressions":[`error`,{allowString:!1,allowNumber:!1,allowNullableObject:!1}],"@typescript-eslint/switch-exhaustiveness-check":[`error`],"@typescript-eslint/restrict-template-expressions":[`error`,{allowBoolean:!0,allowNumber:!0,allowRegExp:!0}],"@typescript-eslint/no-unnecessary-type-parameters":[`off`],"no-unused-vars":[`off`],"@typescript-eslint/no-unused-vars":[`error`,{args:`all`,argsIgnorePattern:`^_`,caughtErrors:`all`,caughtErrorsIgnorePattern:`^_`,destructuredArrayIgnorePattern:`^_`,ignoreRestSiblings:!0}],"@typescript-eslint/prefer-optional-chain":[`off`],"@typescript-eslint/no-unnecessary-type-assertion":[`off`]},S={"unicorn/catch-error-name":[`error`,{ignore:[String.raw`^error[\da-zA-Z_]*$`]}],"unicorn/filename-case":[`off`],"unicorn/prevent-abbreviations":[`off`],"unicorn/no-null":[`off`],"unicorn/no-negated-condition":[`off`],"unicorn/switch-case-braces":[`off`],"unicorn/prefer-spread":[`off`],"unicorn/prefer-at":[`off`],"unicorn/prefer-ternary":[`warn`,`only-single-line`],"unicorn/no-typeof-undefined":[`off`],"unicorn/no-static-only-class":[`off`]},C=[u.default.configs.recommended,...d.configs.strictTypeChecked,...d.configs.stylisticTypeChecked,f.default.configs.recommended,{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],rules:b},{files:[`**/*.{ts,tsx}`],rules:x},{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],rules:S}],w={"react/boolean-prop-naming":[`error`],"react/button-has-type":[`error`],"react/checked-requires-onchange-or-readonly":[`off`],"react/default-props-match-prop-types":[`error`],"react/destructuring-assignment":[`warn`],"react/display-name":[`error`],"react/forbid-component-props":[`off`],"react/forbid-dom-props":[`off`],"react/forbid-elements":[`off`],"react/forbid-foreign-prop-types":[`error`],"react/forbid-prop-types":[`error`],"react/forward-ref-uses-ref":[`off`],"react/function-component-definition":[`warn`],"react/hook-use-state":[`error`],"react/iframe-missing-sandbox":[`error`],"react/jsx-boolean-value":[`warn`,`always`],"react/jsx-child-element-spacing":[`error`],"react/jsx-closing-bracket-location":[`off`],"react/jsx-closing-tag-location":[`off`],"react/jsx-curly-brace-presence":[`off`],"react/jsx-curly-newline":[`off`],"react/jsx-curly-spacing":[`off`],"react/jsx-equals-spacing":[`off`],"react/jsx-filename-extension":[`error`,{allow:`always`,extensions:[`.tsx`]}],"react/jsx-first-prop-new-line":[`off`],"react/jsx-fragments":[`warn`,`element`],"react/jsx-handler-names":[`error`],"react/jsx-indent":[`off`],"react/jsx-indent-props":[`off`],"react/jsx-key":[`error`],"react/jsx-max-depth":[`off`],"react/jsx-max-props-per-line":[`off`],"react/jsx-newline":[`off`],"react/jsx-no-bind":[`error`,{allowArrowFunctions:!0}],"react/jsx-no-comment-textnodes":[`error`],"react/jsx-no-constructed-context-values":[`error`],"react/jsx-no-duplicate-props":[`error`],"react/jsx-no-leaked-render":[`warn`],"react/jsx-no-literals":[`off`],"react/jsx-no-script-url":[`error`],"react/jsx-no-target-blank":[`warn`],"react/jsx-no-undef":[`error`],"react/jsx-no-useless-fragment":[`warn`],"react/jsx-one-expression-per-line":[`off`],"react/jsx-pascal-case":[`off`],"react/jsx-props-no-multi-spaces":[`off`],"react/jsx-props-no-spread-multi":[`off`],"react/jsx-props-no-spreading":[`off`],"react/jsx-sort-props":[`off`],"react/jsx-tag-spacing":[`off`],"react/jsx-uses-react":[`error`],"react/jsx-uses-vars":[`error`],"react/jsx-wrap-multilines":[`off`],"react/no-access-state-in-setstate":[`error`],"react/no-adjacent-inline-elements":[`error`],"react/no-array-index-key":[`error`],"react/no-arrow-function-lifecycle":[`warn`],"react/no-children-prop":[`error`],"react/no-danger":[`error`],"react/no-danger-with-children":[`error`],"react/no-deprecated":[`error`],"react/no-did-mount-set-state":[`error`,`disallow-in-func`],"react/no-did-update-set-state":[`error`,`disallow-in-func`],"react/no-direct-mutation-state":[`error`],"react/no-find-dom-node":[`error`],"react/no-invalid-html-attribute":[`error`],"react/no-is-mounted":[`error`],"react/no-multi-comp":[`off`],"react/no-namespace":[`error`],"react/no-object-type-as-default-prop":[`error`],"react/no-redundant-should-component-update":[`error`],"react/no-render-return-value":[`error`],"react/no-set-state":[`error`],"react/no-string-refs":[`error`,{noTemplateLiterals:!0}],"react/no-this-in-sfc":[`error`],"react/no-typos":[`error`],"react/no-unescaped-entities":[`error`],"react/no-unknown-property":[`warn`],"react/no-unsafe":[`off`],"react/no-unstable-nested-components":[`error`],"react/no-unused-class-component-methods":[`error`],"react/no-unused-prop-types":[`error`],"react/no-unused-state":[`error`],"react/no-will-update-set-state":[`error`,`disallow-in-func`],"react/prefer-es6-class":[`error`],"react/prefer-exact-props":[`error`],"react/prefer-read-only-props":[`warn`],"react/prefer-stateless-function":[`error`],"react/prop-types":[`error`],"react/react-in-jsx-scope":[`off`],"react/require-default-props":[`off`],"react/require-optimization":[`error`],"react/require-render-return":[`error`],"react/self-closing-comp":[`warn`],"react/sort-comp":[`error`],"react/sort-default-props":[`off`],"react/sort-prop-types":[`off`],"react/state-in-constructor":[`error`],"react/static-property-placement":[`error`],"react/style-prop-object":[`error`],"react/void-dom-elements-no-children":[`error`]},T=[...C,p.configs.flat[`recommended-latest`],m.default.configs.recommended,{files:[`**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}`],...l.default.configs.flat.recommended,settings:{react:{version:`detect`}},rules:{...w}}],E={"import-x/no-deprecated":[`error`],"import-x/no-empty-named-blocks":[`warn`],"import-x/no-extraneous-dependencies":[`error`,{devDependencies:!1,optionalDependencies:!1}],"import-x/no-mutable-exports":[`error`],"import-x/no-rename-default":[`off`],"import-x/no-unused-modules":[`off`,{missingExports:!0}],"import-x/no-amd":[`error`],"import-x/no-commonjs":[`error`],"import-x/no-import-module-exports":[`warn`],"import-x/no-nodejs-modules":[`off`],"import-x/unambiguous":[`error`],"import-x/no-absolute-path":[`warn`],"import-x/no-cycle":[`error`],"import-x/no-dynamic-require":[`off`],"import-x/no-internal-modules":[`off`],"import-x/no-relative-packages":[`warn`],"import-x/no-relative-parent-imports":[`off`],"import-x/no-self-import":[`error`],"import-x/no-useless-path-segments":[`warn`,{noUselessIndex:!0}],"import-x/no-webpack-loader-syntax":[`error`],"import-x/consistent-type-specifier-style":[`warn`,`prefer-top-level`],"import-x/dynamic-import-chunkname":[`off`],"import-x/exports-last":[`off`],"import-x/extensions":[`error`,`never`],"import-x/first":[`warn`],"import-x/group-exports":[`off`],"import-x/max-dependencies":[`off`],"import-x/newline-after-import":[`warn`],"import-x/no-anonymous-default-export":[`error`,{allowArray:!1,allowArrowFunction:!0,allowAnonymousClass:!1,allowAnonymousFunction:!1,allowCallExpression:!0,allowNew:!1,allowLiteral:!1,allowObject:!1}],"import-x/no-default-export":[`off`],"import-x/no-named-default":[`off`],"import-x/no-named-export":[`off`],"import-x/no-namespace":[`warn`],"import-x/no-unassigned-import":[`error`,{allow:[`**/*.css`]}],"import-x/order":[`warn`],"import-x/prefer-default-export":[`off`]};function D(e){let t={alwaysTryTypes:!0,bun:!0};return e!==void 0&&(t.project=e.project),[h.flatConfigs.recommended,h.flatConfigs.typescript,{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],plugins:{"unused-imports":_.default},settings:{"import-x/resolver-next":[(0,g.createTypeScriptImportResolver)(t)]},rules:{...E,"unused-imports/no-unused-imports":[`error`]}}]}var O=[v.default],k=[y.default.configs.customize({jsx:!0,arrowParens:!0,blockSpacing:!0,braceStyle:`stroustrup`,commaDangle:`never`,indent:2,semi:!0,quotes:`double`,quoteProps:`always`}),{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},rules:{"@stylistic/array-bracket-newline":[`warn`],"@stylistic/array-bracket-spacing":[`warn`],"@stylistic/array-element-newline":[`warn`,`consistent`],"@stylistic/arrow-parens":[`warn`,`always`],"@stylistic/arrow-spacing":[`warn`],"@stylistic/block-spacing":[`warn`],"@stylistic/brace-style":[`warn`,`1tbs`],"@stylistic/comma-dangle":[`warn`],"@stylistic/comma-spacing":[`warn`],"@stylistic/comma-style":[`warn`],"@stylistic/computed-property-spacing":[`warn`],"@stylistic/curly-newline":[`warn`,`always`],"@stylistic/dot-location":[`warn`,`property`],"@stylistic/eol-last":[`warn`],"@stylistic/function-call-spacing":[`warn`],"@stylistic/function-call-argument-newline":[`warn`,`consistent`],"@stylistic/function-paren-newline":[`warn`,`consistent`],"@stylistic/generator-star-spacing":[`warn`],"@stylistic/implicit-arrow-linebreak":[`warn`],"@stylistic/indent":[`warn`,2],"@stylistic/indent-binary-ops":[`warn`,2],"@stylistic/jsx-child-element-spacing":[`error`],"@stylistic/jsx-closing-bracket-location":[`warn`],"@stylistic/jsx-closing-tag-location":[`warn`],"@stylistic/jsx-curly-brace-presence":[`warn`],"@stylistic/jsx-curly-newline":[`warn`],"@stylistic/jsx-curly-spacing":[`warn`],"@stylistic/jsx-equals-spacing":[`warn`],"@stylistic/jsx-first-prop-new-line":[`warn`],"@stylistic/jsx-function-call-newline":[`warn`],"@stylistic/jsx-indent-props":[`warn`,2],"@stylistic/jsx/jsx-max-props-per-line":[`off`],"@stylistic/jsx-newline":[`off`],"@stylistic/jsx-one-expression-per-line":[`warn`,{allow:`single-child`}],"@stylistic/jsx-pascal-case":[`error`],"@stylistic/jsx-quotes":[`warn`],"@stylistic/jsx-self-closing-comp":[`warn`],"@stylistic/jsx-sort-props":[`warn`,{callbacksLast:!0,shorthandFirst:!0,multiline:`last`,noSortAlphabetically:!0}],"@stylistic/jsx-tag-spacing":[`warn`,{closingSlash:`never`,beforeSelfClosing:`always`,afterOpening:`never`,beforeClosing:`never`}],"@stylistic/jsx-wrap-multilines":[`warn`,{declaration:`parens-new-line`,assignment:`parens-new-line`,return:`parens-new-line`,arrow:`parens-new-line`,condition:`parens-new-line`,logical:`parens-new-line`,prop:`parens-new-line`}],"@stylistic/key-spacing":`warn`,"@stylistic/keyword-spacing":`warn`,"@stylistic/line-comment-position":`warn`,"@stylistic/linebreak-style":`warn`,"@stylistic/lines-around-comment":[`warn`,{beforeBlockComment:!0,afterBlockComment:!1,beforeLineComment:!0,afterLineComment:!1,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,afterHashbangComment:!0}],"@stylistic/lines-between-class-members":[`warn`,{enforce:[{blankLine:`never`,prev:`field`,next:`field`},{blankLine:`always`,prev:`*`,next:`method`},{blankLine:`always`,prev:`method`,next:`*`}]}],"@stylistic/max-len":[`error`,{code:120,tabWidth:2,comments:120,ignoreComments:!0,ignoreTrailingComments:!0,ignoreUrls:!0,ignoreStrings:!0,ignoreTemplateLiterals:!0,ignoreRegExpLiterals:!0}],"@stylistic/max-statements-per-line":[`error`],"@stylistic/member-delimiter-style":[`warn`],"@stylistic/multiline-comment-style":[`off`],"@stylistic/multiline-ternary":[`warn`,`always-multiline`],"@stylistic/new-parens":[`warn`],"@stylistic/newline-per-chained-call":[`warn`],"@stylistic/no-confusing-arrow":[`warn`],"@stylistic/no-extra-parens":[`warn`],"@stylistic/no-extra-semi":[`warn`],"@stylistic/no-floating-decimal":[`warn`],"@stylistic/no-mixed-operators":[`error`],"@stylistic/no-mixed-spaces-and-tabs":[`error`],"@stylistic/no-multi-spaces":[`warn`],"@stylistic/no-multiple-empty-lines":[`warn`],"@stylistic/no-tabs":[`error`],"@stylistic/no-trailing-spaces":[`warn`],"@stylistic/no-whitespace-before-property":[`warn`],"@stylistic/nonblock-statement-body-position":[`warn`],"@stylistic/object-curly-newline":[`warn`,{consistent:!0}],"@stylistic/object-curly-spacing":[`warn`],"@stylistic/object-property-newline":[`warn`,{allowAllPropertiesOnSameLine:!0}],"@stylistic/one-var-declaration-per-line":[`warn`],"@stylistic/operator-linebreak":[`warn`],"@stylistic/padded-blocks":[`warn`,`never`],"@stylistic/padding-line-between-statements":[`warn`,{blankLine:`always`,prev:`*`,next:`return`},{blankLine:`always`,prev:`*`,next:`block-like`},{blankLine:`always`,prev:`block-like`,next:`*`},{blankLine:`always`,prev:`case`,next:`case`},{blankLine:`never`,prev:`*`,next:`break`},{blankLine:`always`,prev:`*`,next:`export`},{blankLine:`always`,prev:`*`,next:`interface`},{blankLine:`always`,prev:`interface`,next:`*`},{blankLine:`always`,prev:`*`,next:`class`},{blankLine:`always`,prev:`class`,next:`*`}],"@stylistic/quote-props":[`warn`,`as-needed`],"@stylistic/quotes":[`warn`],"@stylistic/rest-spread-spacing":[`warn`],"@stylistic/semi":[`warn`],"@stylistic/semi-spacing":[`warn`],"@stylistic/semi-style":[`warn`],"@stylistic/space-before-blocks":[`warn`],"@stylistic/space-before-function-paren":[`warn`,{anonymous:`always`,named:`never`,asyncArrow:`always`}],"@stylistic/space-in-parens":[`warn`],"@stylistic/space-infix-ops":[`warn`],"@stylistic/space-unary-ops":[`warn`],"@stylistic/spaced-comment":[`warn`],"@stylistic/switch-colon-spacing":[`warn`],"@stylistic/template-curly-spacing":[`warn`],"@stylistic/template-tag-spacing":[`warn`],"@stylistic/type-annotation-spacing":[`warn`],"@stylistic/type-generic-spacing":[`warn`],"@stylistic/type-named-tuple-spacing":[`warn`],"@stylistic/wrap-iife":[`warn`,`inside`],"@stylistic/wrap-regex":[`warn`],"@stylistic/yield-star-spacing":[`warn`,`after`]}}];function A(e){return{globals:c.default.node,parserOptions:{ecmaVersion:`latest`,tsconfigRootDir:e?.tsconfigRootDir,project:e?.project}}}function j(e){return{...l.default.configs.flat.recommended.languageOptions,globals:{...c.default.serviceworker,...c.default.browser},parserOptions:{tsconfigRootDir:e?.tsconfigRootDir,project:e?.project}}}function M(e){let t;return e.platform===`node`?(t=C,t.push({files:[`**/*.{ts,js}`],languageOptions:A(e.typescript)})):(t=T,t.push({files:[`**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}`],languageOptions:j(e.typescript)})),e.useImport===!0&&t.push(...D(e.typescript)),t.push(...e.style===`stylistic`?k:O),e.overrides!==void 0&&t.push(...e.overrides),e.ignores!==void 0&&t.push({ignores:e.ignores}),t}exports.createConfig=M;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`eslint/config`),l=require(`globals`);l=s(l,1);let u=require(`eslint-plugin-react`);u=s(u,1);let d=require(`@eslint/js`);d=s(d,1);let f=require(`typescript-eslint`),p=require(`eslint-plugin-unicorn`);p=s(p,1);let m=require(`eslint-plugin-react-hooks`),h=require(`eslint-plugin-react-refresh`);h=s(h,1);let g=require(`eslint-plugin-import-x`),_=require(`eslint-import-resolver-typescript`),v=require(`eslint-plugin-unused-imports`);v=s(v,1);let y=require(`eslint-config-prettier`);y=s(y,1);let b=require(`@stylistic/eslint-plugin`);b=s(b,1);var x={eqeqeq:[`warn`],curly:[`warn`,`all`],"no-restricted-imports":[`error`,{patterns:[{regex:`^(node:)?process$`,message:`Please dont import node:process.`}]}],"no-unused-vars":[`error`,{args:`all`,argsIgnorePattern:`^_`,caughtErrors:`all`,caughtErrorsIgnorePattern:`^_`,destructuredArrayIgnorePattern:`^_`,ignoreRestSiblings:!0}],"no-fallthrough":[`error`,{allowEmptyCase:!0}]},S={"class-methods-use-this":`off`,"@typescript-eslint/class-methods-use-this":[`error`,{ignoreOverrideMethods:!0,ignoreClassesThatImplementAnInterface:!0}],"consistent-return":`off`,"@typescript-eslint/consistent-return":`off`,"@typescript-eslint/consistent-type-exports":[`error`,{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/consistent-type-imports":[`error`],"default-param-last":`off`,"@typescript-eslint/default-param-last":[`error`],"@typescript-eslint/explicit-function-return-type":[`error`,{allowExpressions:!0}],"@typescript-eslint/explicit-member-accessibility":[`error`,{accessibility:`no-public`,overrides:{constructors:`off`}}],"@typescript-eslint/explicit-module-boundary-types":[`error`],"init-declarations":`off`,"@typescript-eslint/init-declarations":[`off`],"max-params":`off`,"@typescript-eslint/max-params":[`off`],"@typescript-eslint/member-ordering":[`error`,{default:[`constructor`,`field`,`static-method`,`method`,`signature`]}],"@typescript-eslint/method-signature-style":[`error`],"@typescript-eslint/naming-convention":[`error`,{selector:`function`,format:[`PascalCase`,`camelCase`]}],"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":[`off`],"@typescript-eslint/no-import-type-side-effects":[`error`],"no-invalid-this":`off`,"@typescript-eslint/no-invalid-this":[`error`],"no-loop-func":`off`,"@typescript-eslint/no-loop-func":[`error`],"no-magic-numbers":`off`,"@typescript-eslint/no-magic-numbers":[`off`],"no-redeclare":`off`,"@typescript-eslint/no-redeclare":[`off`],"no-restricted-imports":`off`,"@typescript-eslint/no-restricted-imports":[`error`,{patterns:[{regex:`^(node:)?process$`,message:`Please dont import node:process.`}]}],"no-shadow":`off`,"@typescript-eslint/no-shadow":[`error`],"@typescript-eslint/no-unnecessary-parameter-property-assignment":[`off`],"@typescript-eslint/no-unnecessary-qualifier":[`warn`],"@typescript-eslint/no-unnecessary-type-conversion":[`warn`],"@typescript-eslint/no-unsafe-type-assertion":[`off`],"no-use-before-define":`off`,"@typescript-eslint/no-use-before-define":[`error`],"@typescript-eslint/no-useless-empty-export":[`warn`],"@typescript-eslint/parameter-properties":[`error`],"prefer-destructuring":`off`,"@typescript-eslint/prefer-destructuring":[`off`],"@typescript-eslint/prefer-enum-initializers":[`off`],"@typescript-eslint/prefer-readonly":[`warn`],"@typescript-eslint/prefer-readonly-parameter-types":[`off`],"@typescript-eslint/promise-function-async":[`error`],"@typescript-eslint/require-array-sort-compare":[`error`],"@typescript-eslint/strict-boolean-expressions":[`error`,{allowString:!1,allowNumber:!1,allowNullableObject:!1}],"@typescript-eslint/switch-exhaustiveness-check":[`error`],"@typescript-eslint/restrict-template-expressions":[`error`,{allowBoolean:!0,allowNumber:!0,allowRegExp:!0}],"@typescript-eslint/no-unnecessary-type-parameters":[`off`],"no-unused-vars":[`off`],"@typescript-eslint/no-unused-vars":[`error`,{args:`all`,argsIgnorePattern:`^_`,caughtErrors:`all`,caughtErrorsIgnorePattern:`^_`,destructuredArrayIgnorePattern:`^_`,ignoreRestSiblings:!0}],"@typescript-eslint/prefer-optional-chain":[`off`],"@typescript-eslint/no-unnecessary-type-assertion":[`off`]},C={"unicorn/catch-error-name":[`error`,{ignore:[String.raw`^error[\da-zA-Z_]*$`]}],"unicorn/filename-case":[`off`],"unicorn/prevent-abbreviations":[`off`],"unicorn/no-null":[`off`],"unicorn/no-negated-condition":[`off`],"unicorn/switch-case-braces":[`off`],"unicorn/prefer-spread":[`off`],"unicorn/prefer-at":[`off`],"unicorn/prefer-ternary":[`warn`,`only-single-line`],"unicorn/no-typeof-undefined":[`off`],"unicorn/no-static-only-class":[`off`]},w=[d.default.configs.recommended,...f.configs.strictTypeChecked,...f.configs.stylisticTypeChecked,p.default.configs.recommended,{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],rules:x},{files:[`**/*.{ts,tsx}`],rules:S},{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],rules:C}],T={"react/boolean-prop-naming":[`error`],"react/button-has-type":[`error`],"react/checked-requires-onchange-or-readonly":[`off`],"react/default-props-match-prop-types":[`error`],"react/destructuring-assignment":[`warn`],"react/display-name":[`error`],"react/forbid-component-props":[`off`],"react/forbid-dom-props":[`off`],"react/forbid-elements":[`off`],"react/forbid-foreign-prop-types":[`error`],"react/forbid-prop-types":[`error`],"react/forward-ref-uses-ref":[`off`],"react/function-component-definition":[`warn`],"react/hook-use-state":[`error`],"react/iframe-missing-sandbox":[`error`],"react/jsx-boolean-value":[`warn`,`always`],"react/jsx-child-element-spacing":[`error`],"react/jsx-closing-bracket-location":[`off`],"react/jsx-closing-tag-location":[`off`],"react/jsx-curly-brace-presence":[`off`],"react/jsx-curly-newline":[`off`],"react/jsx-curly-spacing":[`off`],"react/jsx-equals-spacing":[`off`],"react/jsx-filename-extension":[`error`,{allow:`always`,extensions:[`.tsx`]}],"react/jsx-first-prop-new-line":[`off`],"react/jsx-fragments":[`warn`,`element`],"react/jsx-handler-names":[`error`],"react/jsx-indent":[`off`],"react/jsx-indent-props":[`off`],"react/jsx-key":[`error`],"react/jsx-max-depth":[`off`],"react/jsx-max-props-per-line":[`off`],"react/jsx-newline":[`off`],"react/jsx-no-bind":[`error`,{allowArrowFunctions:!0}],"react/jsx-no-comment-textnodes":[`error`],"react/jsx-no-constructed-context-values":[`error`],"react/jsx-no-duplicate-props":[`error`],"react/jsx-no-leaked-render":[`warn`],"react/jsx-no-literals":[`off`],"react/jsx-no-script-url":[`error`],"react/jsx-no-target-blank":[`warn`],"react/jsx-no-undef":[`error`],"react/jsx-no-useless-fragment":[`warn`],"react/jsx-one-expression-per-line":[`off`],"react/jsx-pascal-case":[`off`],"react/jsx-props-no-multi-spaces":[`off`],"react/jsx-props-no-spread-multi":[`off`],"react/jsx-props-no-spreading":[`off`],"react/jsx-sort-props":[`off`],"react/jsx-tag-spacing":[`off`],"react/jsx-uses-react":[`error`],"react/jsx-uses-vars":[`error`],"react/jsx-wrap-multilines":[`off`],"react/no-access-state-in-setstate":[`error`],"react/no-adjacent-inline-elements":[`error`],"react/no-array-index-key":[`error`],"react/no-arrow-function-lifecycle":[`warn`],"react/no-children-prop":[`error`],"react/no-danger":[`error`],"react/no-danger-with-children":[`error`],"react/no-deprecated":[`error`],"react/no-did-mount-set-state":[`error`,`disallow-in-func`],"react/no-did-update-set-state":[`error`,`disallow-in-func`],"react/no-direct-mutation-state":[`error`],"react/no-find-dom-node":[`error`],"react/no-invalid-html-attribute":[`error`],"react/no-is-mounted":[`error`],"react/no-multi-comp":[`off`],"react/no-namespace":[`error`],"react/no-object-type-as-default-prop":[`error`],"react/no-redundant-should-component-update":[`error`],"react/no-render-return-value":[`error`],"react/no-set-state":[`error`],"react/no-string-refs":[`error`,{noTemplateLiterals:!0}],"react/no-this-in-sfc":[`error`],"react/no-typos":[`error`],"react/no-unescaped-entities":[`error`],"react/no-unknown-property":[`warn`],"react/no-unsafe":[`off`],"react/no-unstable-nested-components":[`error`],"react/no-unused-class-component-methods":[`error`],"react/no-unused-prop-types":[`error`],"react/no-unused-state":[`error`],"react/no-will-update-set-state":[`error`,`disallow-in-func`],"react/prefer-es6-class":[`error`],"react/prefer-exact-props":[`error`],"react/prefer-read-only-props":[`warn`],"react/prefer-stateless-function":[`error`],"react/prop-types":[`error`],"react/react-in-jsx-scope":[`off`],"react/require-default-props":[`off`],"react/require-optimization":[`error`],"react/require-render-return":[`error`],"react/self-closing-comp":[`warn`],"react/sort-comp":[`error`],"react/sort-default-props":[`off`],"react/sort-prop-types":[`off`],"react/state-in-constructor":[`error`],"react/static-property-placement":[`error`],"react/style-prop-object":[`error`],"react/void-dom-elements-no-children":[`error`]},E=[...w,m.configs.flat[`recommended-latest`],h.default.configs.recommended,{files:[`**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}`],...u.default.configs.flat.recommended,settings:{react:{version:`detect`}},rules:{...T}}],D={"import-x/no-deprecated":[`error`],"import-x/no-empty-named-blocks":[`warn`],"import-x/no-extraneous-dependencies":[`error`,{devDependencies:!1,optionalDependencies:!1}],"import-x/no-mutable-exports":[`error`],"import-x/no-rename-default":[`off`],"import-x/no-unused-modules":[`off`,{missingExports:!0}],"import-x/no-amd":[`error`],"import-x/no-commonjs":[`error`],"import-x/no-import-module-exports":[`warn`],"import-x/no-nodejs-modules":[`off`],"import-x/unambiguous":[`error`],"import-x/no-absolute-path":[`warn`],"import-x/no-cycle":[`error`],"import-x/no-dynamic-require":[`off`],"import-x/no-internal-modules":[`off`],"import-x/no-relative-packages":[`warn`],"import-x/no-relative-parent-imports":[`off`],"import-x/no-self-import":[`error`],"import-x/no-useless-path-segments":[`warn`,{noUselessIndex:!0}],"import-x/no-webpack-loader-syntax":[`error`],"import-x/consistent-type-specifier-style":[`warn`,`prefer-top-level`],"import-x/dynamic-import-chunkname":[`off`],"import-x/exports-last":[`off`],"import-x/extensions":[`error`,`never`],"import-x/first":[`warn`],"import-x/group-exports":[`off`],"import-x/max-dependencies":[`off`],"import-x/newline-after-import":[`warn`],"import-x/no-anonymous-default-export":[`error`,{allowArray:!1,allowArrowFunction:!0,allowAnonymousClass:!1,allowAnonymousFunction:!1,allowCallExpression:!0,allowNew:!1,allowLiteral:!1,allowObject:!1}],"import-x/no-default-export":[`off`],"import-x/no-named-default":[`off`],"import-x/no-named-export":[`off`],"import-x/no-namespace":[`warn`],"import-x/no-unassigned-import":[`error`,{allow:[`**/*.css`]}],"import-x/order":[`warn`],"import-x/prefer-default-export":[`off`]};function O(e){let t={alwaysTryTypes:!0,bun:!0};return e!==void 0&&(t.project=e.project),[g.flatConfigs.recommended,g.flatConfigs.typescript,{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],plugins:{"unused-imports":v.default},settings:{"import-x/resolver-next":[(0,_.createTypeScriptImportResolver)(t)]},rules:{...D,"unused-imports/no-unused-imports":[`error`]}}]}var k=[y.default],A=[b.default.configs.customize({jsx:!0,arrowParens:!0,blockSpacing:!0,braceStyle:`stroustrup`,commaDangle:`never`,indent:2,semi:!0,quotes:`double`,quoteProps:`always`}),{files:[`**/*.{js,mjs,cjs,ts,jsx,tsx}`],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},rules:{"@stylistic/array-bracket-newline":[`warn`],"@stylistic/array-bracket-spacing":[`warn`],"@stylistic/array-element-newline":[`warn`,`consistent`],"@stylistic/arrow-parens":[`warn`,`always`],"@stylistic/arrow-spacing":[`warn`],"@stylistic/block-spacing":[`warn`],"@stylistic/brace-style":[`warn`,`1tbs`],"@stylistic/comma-dangle":[`warn`],"@stylistic/comma-spacing":[`warn`],"@stylistic/comma-style":[`warn`],"@stylistic/computed-property-spacing":[`warn`],"@stylistic/curly-newline":[`warn`,`always`],"@stylistic/dot-location":[`warn`,`property`],"@stylistic/eol-last":[`warn`],"@stylistic/function-call-spacing":[`warn`],"@stylistic/function-call-argument-newline":[`warn`,`consistent`],"@stylistic/function-paren-newline":[`warn`,`consistent`],"@stylistic/generator-star-spacing":[`warn`],"@stylistic/implicit-arrow-linebreak":[`warn`],"@stylistic/indent":[`warn`,2],"@stylistic/indent-binary-ops":[`warn`,2],"@stylistic/jsx-child-element-spacing":[`error`],"@stylistic/jsx-closing-bracket-location":[`warn`],"@stylistic/jsx-closing-tag-location":[`warn`],"@stylistic/jsx-curly-brace-presence":[`warn`],"@stylistic/jsx-curly-newline":[`warn`],"@stylistic/jsx-curly-spacing":[`warn`],"@stylistic/jsx-equals-spacing":[`warn`],"@stylistic/jsx-first-prop-new-line":[`warn`],"@stylistic/jsx-function-call-newline":[`warn`],"@stylistic/jsx-indent-props":[`warn`,2],"@stylistic/jsx/jsx-max-props-per-line":[`off`],"@stylistic/jsx-newline":[`off`],"@stylistic/jsx-one-expression-per-line":[`warn`,{allow:`single-child`}],"@stylistic/jsx-pascal-case":[`error`],"@stylistic/jsx-quotes":[`warn`],"@stylistic/jsx-self-closing-comp":[`warn`],"@stylistic/jsx-sort-props":[`warn`,{callbacksLast:!0,shorthandFirst:!0,multiline:`last`,noSortAlphabetically:!0}],"@stylistic/jsx-tag-spacing":[`warn`,{closingSlash:`never`,beforeSelfClosing:`always`,afterOpening:`never`,beforeClosing:`never`}],"@stylistic/jsx-wrap-multilines":[`warn`,{declaration:`parens-new-line`,assignment:`parens-new-line`,return:`parens-new-line`,arrow:`parens-new-line`,condition:`parens-new-line`,logical:`parens-new-line`,prop:`parens-new-line`}],"@stylistic/key-spacing":`warn`,"@stylistic/keyword-spacing":`warn`,"@stylistic/line-comment-position":`warn`,"@stylistic/linebreak-style":`warn`,"@stylistic/lines-around-comment":[`warn`,{beforeBlockComment:!0,afterBlockComment:!1,beforeLineComment:!0,afterLineComment:!1,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,afterHashbangComment:!0}],"@stylistic/lines-between-class-members":[`warn`,{enforce:[{blankLine:`never`,prev:`field`,next:`field`},{blankLine:`always`,prev:`*`,next:`method`},{blankLine:`always`,prev:`method`,next:`*`}]}],"@stylistic/max-len":[`error`,{code:120,tabWidth:2,comments:120,ignoreComments:!0,ignoreTrailingComments:!0,ignoreUrls:!0,ignoreStrings:!0,ignoreTemplateLiterals:!0,ignoreRegExpLiterals:!0}],"@stylistic/max-statements-per-line":[`error`],"@stylistic/member-delimiter-style":[`warn`],"@stylistic/multiline-comment-style":[`off`],"@stylistic/multiline-ternary":[`warn`,`always-multiline`],"@stylistic/new-parens":[`warn`],"@stylistic/newline-per-chained-call":[`warn`],"@stylistic/no-confusing-arrow":[`warn`],"@stylistic/no-extra-parens":[`warn`],"@stylistic/no-extra-semi":[`warn`],"@stylistic/no-floating-decimal":[`warn`],"@stylistic/no-mixed-operators":[`error`],"@stylistic/no-mixed-spaces-and-tabs":[`error`],"@stylistic/no-multi-spaces":[`warn`],"@stylistic/no-multiple-empty-lines":[`warn`],"@stylistic/no-tabs":[`error`],"@stylistic/no-trailing-spaces":[`warn`],"@stylistic/no-whitespace-before-property":[`warn`],"@stylistic/nonblock-statement-body-position":[`warn`],"@stylistic/object-curly-newline":[`warn`,{consistent:!0}],"@stylistic/object-curly-spacing":[`warn`],"@stylistic/object-property-newline":[`warn`,{allowAllPropertiesOnSameLine:!0}],"@stylistic/one-var-declaration-per-line":[`warn`],"@stylistic/operator-linebreak":[`warn`],"@stylistic/padded-blocks":[`warn`,`never`],"@stylistic/padding-line-between-statements":[`warn`,{blankLine:`always`,prev:`*`,next:`return`},{blankLine:`always`,prev:`*`,next:`block-like`},{blankLine:`always`,prev:`block-like`,next:`*`},{blankLine:`always`,prev:`case`,next:`case`},{blankLine:`never`,prev:`*`,next:`break`},{blankLine:`always`,prev:`*`,next:`export`},{blankLine:`always`,prev:`*`,next:`interface`},{blankLine:`always`,prev:`interface`,next:`*`},{blankLine:`always`,prev:`*`,next:`class`},{blankLine:`always`,prev:`class`,next:`*`}],"@stylistic/quote-props":[`warn`,`as-needed`],"@stylistic/quotes":[`warn`],"@stylistic/rest-spread-spacing":[`warn`],"@stylistic/semi":[`warn`],"@stylistic/semi-spacing":[`warn`],"@stylistic/semi-style":[`warn`],"@stylistic/space-before-blocks":[`warn`],"@stylistic/space-before-function-paren":[`warn`,{anonymous:`always`,named:`never`,asyncArrow:`always`}],"@stylistic/space-in-parens":[`warn`],"@stylistic/space-infix-ops":[`warn`],"@stylistic/space-unary-ops":[`warn`],"@stylistic/spaced-comment":[`warn`],"@stylistic/switch-colon-spacing":[`warn`],"@stylistic/template-curly-spacing":[`warn`],"@stylistic/template-tag-spacing":[`warn`],"@stylistic/type-annotation-spacing":[`warn`],"@stylistic/type-generic-spacing":[`warn`],"@stylistic/type-named-tuple-spacing":[`warn`],"@stylistic/wrap-iife":[`warn`,`inside`],"@stylistic/wrap-regex":[`warn`],"@stylistic/yield-star-spacing":[`warn`,`after`]}}];function j(e){return{globals:l.default.node,parserOptions:{ecmaVersion:`latest`,tsconfigRootDir:e?.tsconfigRootDir,project:e?.project}}}function M(e){return{...u.default.configs.flat.recommended.languageOptions,globals:{...l.default.serviceworker,...l.default.browser},parserOptions:{tsconfigRootDir:e?.tsconfigRootDir,project:e?.project}}}function N(e){let t;return t=e.platform===`node`?[...w,{files:[`**/*.{ts,js}`],languageOptions:j(e.typescript)}]:[...E,{files:[`**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}`],languageOptions:M(e.typescript)}],e.useImport===!0&&t.push(...O(e.typescript)),t.push(...e.style===`stylistic`?A:k),e.overrides!==void 0&&t.push(...e.overrides),e.ignores!==void 0&&t.push({ignores:e.ignores}),e.files!==void 0&&e.files.length>0?(0,c.defineConfig)({files:e.files,extends:t}):t}exports.createConfig=N;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|