@4mbl/lint 1.0.0-beta.1 → 1.0.0-beta.11
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/CHANGELOG.md +75 -1
- package/README.md +80 -26
- package/bin/cli.js +56 -9
- package/dist/base.d.ts +321 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +176 -0
- package/dist/base.js.map +1 -0
- package/dist/next.d.ts +18 -0
- package/dist/next.d.ts.map +1 -0
- package/dist/next.js +59 -0
- package/dist/next.js.map +1 -0
- package/dist/node.d.ts +331 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +15 -0
- package/dist/node.js.map +1 -0
- package/dist/react.d.ts +451 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +75 -0
- package/dist/react.js.map +1 -0
- package/package.json +14 -11
- package/src/base.ts +0 -134
- package/src/next.ts +0 -81
- package/src/node.ts +0 -15
- package/src/react.ts +0 -76
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,84 @@
|
|
|
1
1
|
# @4mbl/lint
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.11
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 20b3dae: Use native rules for React when possible
|
|
8
|
+
|
|
9
|
+
## 1.0.0-beta.10
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 007a287: Configure more rules to reduce noise
|
|
14
|
+
- 007a287: Use native only-export-components rule instead of js plugin
|
|
15
|
+
- 007a287: Use correct namespace for Next.js rules
|
|
16
|
+
|
|
17
|
+
## 1.0.0-beta.9
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 491164e: Add --help flag to cli
|
|
22
|
+
- 491164e: Fallback to Oxlint config lookup if no preset is passed to CLI and Oxlint config exists within working directory.
|
|
23
|
+
|
|
24
|
+
## 1.0.0-beta.8
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- a78f42b: Configure rules to reduce noise
|
|
29
|
+
|
|
30
|
+
## 1.0.0-beta.7
|
|
31
|
+
|
|
32
|
+
### Minor Changes
|
|
33
|
+
|
|
34
|
+
- 7c82f22: Upgrade dependencies
|
|
35
|
+
|
|
36
|
+
## 1.0.0-beta.6
|
|
37
|
+
|
|
38
|
+
### Minor Changes
|
|
39
|
+
|
|
40
|
+
- 0422e86: Upgrade dependencies
|
|
41
|
+
|
|
42
|
+
## 1.0.0-beta.5
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- 125b851: Enable most rule categories
|
|
47
|
+
- 473bad0: Upgrade dependencies
|
|
48
|
+
|
|
49
|
+
## 1.0.0-beta.4
|
|
50
|
+
|
|
51
|
+
### Minor Changes
|
|
52
|
+
|
|
53
|
+
- 10abc93: Upgrade dependencies
|
|
54
|
+
|
|
55
|
+
## 1.0.0-beta.3
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- dd91a0d: Allow direct preset usage with default exports
|
|
60
|
+
- dd91a0d: Add `--preset` argument to use any preset directly from the CLI
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 51c5a6a: Resolve uiPath from cwd in next preset
|
|
65
|
+
|
|
66
|
+
## 1.0.0-beta.2
|
|
67
|
+
|
|
68
|
+
### Minor Changes
|
|
69
|
+
|
|
70
|
+
- ba4500a: Use named exports for config templates
|
|
71
|
+
- ba4500a: Re-export oxlint defineConfig
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- 2b77e08: Transpile configs to support usage from node_modules
|
|
76
|
+
|
|
3
77
|
## 1.0.0-beta.1
|
|
4
78
|
|
|
5
79
|
### Patch Changes
|
|
6
80
|
|
|
7
|
-
- 2c338b1:
|
|
81
|
+
- 2c338b1: Re-export `OxlintConfig` to make config portable
|
|
8
82
|
|
|
9
83
|
## 1.0.0-beta.0
|
|
10
84
|
|
package/README.md
CHANGED
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
> Linting configuration for various environments.
|
|
4
4
|
|
|
5
|
+
- [Installation](#installation)
|
|
5
6
|
- [Usage](#usage)
|
|
6
|
-
- [
|
|
7
|
-
|
|
8
|
-
- [
|
|
7
|
+
- [Using `lint` CLI](#using-lint-cli)
|
|
8
|
+
- [Setting up the `lint` CLI](#setting-up-the-lint-cli)
|
|
9
|
+
- [Choosing presets](#choosing-presets)
|
|
10
|
+
- [Beyond presets](#beyond-presets)
|
|
11
|
+
- [CLI default arguments](#cli-default-arguments)
|
|
12
|
+
- [Using `oxlint` directly](#using-oxlint-directly)
|
|
13
|
+
- [Oxlint CLI](#oxlint-cli)
|
|
14
|
+
- [Configuring oxlint](#configuring-oxlint)
|
|
15
|
+
- [Available presets](#available-presets)
|
|
9
16
|
- [Versioning](#versioning)
|
|
10
17
|
|
|
11
18
|
---
|
|
12
19
|
|
|
13
20
|
> [!NOTE]
|
|
14
|
-
> This package currently uses [oxlint](https://www.npmjs.com/package/oxlint) as the underlying linting tool.
|
|
21
|
+
> This package currently uses [oxlint](https://www.npmjs.com/package/oxlint) as the underlying linting tool. This may change in a future major release.
|
|
15
22
|
|
|
16
|
-
##
|
|
23
|
+
## Installation
|
|
17
24
|
|
|
18
25
|
Install the [`@4mbl/lint`](https://www.npmjs.com/package/@4mbl/lint) package.
|
|
19
26
|
|
|
@@ -21,32 +28,64 @@ Install the [`@4mbl/lint`](https://www.npmjs.com/package/@4mbl/lint) package.
|
|
|
21
28
|
npm install -D @4mbl/lint
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
|
|
31
|
+
## Usage
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
import defineConfig from '@4mbl/lint/next'; // <-- change `next` to the desired template
|
|
33
|
+
This package supports two ways of running the linting tool.
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
```
|
|
35
|
+
### Using `lint` CLI
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
Using the provided `lint` CLI is the recommended approach, as it abstracts away the underlying linting tool and allows it to be changed in the future with minimal impact on consumers.
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
While we aim to keep the CLI stable across tooling changes, some breaking changes may be unavoidable if the underlying tool changes.
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
#### Setting up the `lint` CLI
|
|
42
|
+
|
|
43
|
+
To use the provided CLI, simply call `lint` in your scripts.
|
|
37
44
|
|
|
38
45
|
```shell
|
|
39
46
|
npm pkg set scripts.lint="lint"
|
|
40
47
|
```
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
#### Choosing presets
|
|
50
|
+
|
|
51
|
+
The CLI uses the environment-agnostic `base` preset by default. To use a different preset, pass the `--preset` argument with the preset name.
|
|
52
|
+
|
|
53
|
+
```shell
|
|
54
|
+
npm pkg set scripts.lint="lint --preset node"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
_See the [available presets](#available-presets) section for a list of available presets._
|
|
58
|
+
|
|
59
|
+
#### Beyond presets
|
|
60
|
+
|
|
61
|
+
In some cases, the provided presets may not be sufficient for your use case. You can create an `oxlint.config.ts` file and pass it to the oxlint CLI directly.
|
|
62
|
+
|
|
63
|
+
```shell
|
|
64
|
+
npm pkg set scripts.lint="lint -- --config oxlint.config.ts"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
You can use the provided presets as a base for your custom configuration, as shown in the [Configuring oxlint](#configuring-oxlint) section.
|
|
68
|
+
|
|
69
|
+
#### CLI default arguments
|
|
70
|
+
|
|
71
|
+
By default, the CLI targets the `src` directory and uses the following oxlint arguments:
|
|
43
72
|
|
|
44
73
|
- `--max-warnings=0`
|
|
45
74
|
- `--report-unused-disable-directives`
|
|
46
75
|
|
|
47
|
-
|
|
76
|
+
You can override these arguments or pass additional arguments to the underlying oxlint tool.
|
|
77
|
+
|
|
78
|
+
```shell
|
|
79
|
+
npm pkg set scripts.lint="lint -- --max-warnings=10 --fix"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Using `oxlint` directly
|
|
83
|
+
|
|
84
|
+
For full control over the linting setup, you can use oxlint directly.
|
|
85
|
+
|
|
86
|
+
#### Oxlint CLI
|
|
48
87
|
|
|
49
|
-
|
|
88
|
+
Set the `lint` script in your `package.json` to use the `oxlint` binary.
|
|
50
89
|
|
|
51
90
|
```shell
|
|
52
91
|
npm pkg set scripts.lint="oxlint src"
|
|
@@ -54,25 +93,40 @@ npm pkg set scripts.lint="oxlint src"
|
|
|
54
93
|
|
|
55
94
|
You may need to explicitly allow the underlying linting packages to be used by your scripts.
|
|
56
95
|
|
|
57
|
-
For example, when using pnpm,
|
|
96
|
+
For example, when using pnpm, set `publicHoistPattern` in your `pnpm-workspace.yaml`.
|
|
97
|
+
|
|
98
|
+
#### Configuring oxlint
|
|
99
|
+
|
|
100
|
+
Create an `oxlint.config.ts` file in your package with the desired preset.
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
import nodeConfig from '@4mbl/lint/node';
|
|
104
|
+
|
|
105
|
+
export default nodeConfig();
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Some presets may accept additional options. For example, the `next` preset accepts a `uiPath` option.
|
|
109
|
+
|
|
110
|
+
_See the [available presets](#available-presets) section for a list of available presets._
|
|
58
111
|
|
|
59
112
|
```yaml
|
|
60
113
|
publicHoistPattern:
|
|
61
114
|
- oxlint
|
|
62
115
|
```
|
|
63
116
|
|
|
64
|
-
## Available
|
|
117
|
+
## Available presets
|
|
65
118
|
|
|
66
|
-
|
|
119
|
+
The following presets are currently available:
|
|
67
120
|
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
121
|
+
- **Base** – Environment-agnostic linting rules.
|
|
122
|
+
- **Next** – Additional linting rules for Next.js.
|
|
123
|
+
- **Node** – Additional linting rules for Node.js.
|
|
124
|
+
- **React** – Additional linting rules for React.
|
|
71
125
|
|
|
72
126
|
## Versioning
|
|
73
127
|
|
|
74
|
-
The package follows the
|
|
128
|
+
The package follows the versioning scheme `X.Y.Z`:
|
|
75
129
|
|
|
76
|
-
- `X`
|
|
77
|
-
- `Y`
|
|
78
|
-
- `Z`
|
|
130
|
+
- `X` – Reserved for linting provider changes, as these may introduce broader compatibility issues.
|
|
131
|
+
- `Y` – New linting rules. Rules are initially introduced as warnings and may be promoted to errors in a subsequent minor release.
|
|
132
|
+
- `Z` – Fixes for issues that made the previous release unusable.
|
package/bin/cli.js
CHANGED
|
@@ -1,21 +1,68 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
4
7
|
|
|
5
|
-
const
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
6
10
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const
|
|
11
|
+
const rawArgs = process.argv.slice(2);
|
|
12
|
+
|
|
13
|
+
const separatorIndex = rawArgs.indexOf('--');
|
|
14
|
+
|
|
15
|
+
const wrapperArgs =
|
|
16
|
+
separatorIndex === -1 ? rawArgs : rawArgs.slice(0, separatorIndex);
|
|
17
|
+
const toolArgs = separatorIndex === -1 ? [] : rawArgs.slice(separatorIndex + 1);
|
|
18
|
+
|
|
19
|
+
if (wrapperArgs.includes('--help') || rawArgs.includes('-h')) {
|
|
20
|
+
console.log(`
|
|
21
|
+
Usage:
|
|
22
|
+
lint [options] -- [oxlint options]
|
|
23
|
+
|
|
24
|
+
Options:
|
|
25
|
+
--preset <name> Use a preset config (default: base if no config within cwd)
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
lint
|
|
29
|
+
lint --preset node
|
|
30
|
+
lint -- src --fix
|
|
31
|
+
|
|
32
|
+
Notes:
|
|
33
|
+
Everything after "--" is passed directly to oxlint.
|
|
34
|
+
`);
|
|
35
|
+
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const presetArgIndex = wrapperArgs.findIndex((a) => a === '--preset');
|
|
40
|
+
|
|
41
|
+
const presetName =
|
|
42
|
+
presetArgIndex !== -1
|
|
43
|
+
? wrapperArgs[presetArgIndex + 1]
|
|
44
|
+
: !existsSync('./oxlint.config.ts') && !existsSync('./.oxlintrc.json')
|
|
45
|
+
? 'base'
|
|
46
|
+
: undefined;
|
|
47
|
+
|
|
48
|
+
const configPath = presetName
|
|
49
|
+
? path.resolve(__dirname, `../dist/${presetName}.js`)
|
|
50
|
+
: undefined;
|
|
51
|
+
|
|
52
|
+
const hasPath = toolArgs.some((a) => !a.startsWith('-'));
|
|
53
|
+
const hasMaxWarn = toolArgs.some((a) => a.startsWith('--max-warnings'));
|
|
54
|
+
const hasReportUnused = toolArgs.some((a) =>
|
|
10
55
|
a.startsWith('--report-unused-disable-directives'),
|
|
11
56
|
);
|
|
12
57
|
|
|
13
58
|
const finalArgs = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
59
|
+
configPath ? '--config' : undefined,
|
|
60
|
+
configPath,
|
|
61
|
+
hasPath ? undefined : 'src',
|
|
62
|
+
hasMaxWarn ? undefined : '--max-warnings=0',
|
|
63
|
+
hasReportUnused ? undefined : '--report-unused-disable-directives',
|
|
64
|
+
...toolArgs,
|
|
65
|
+
].filter((a) => a !== undefined);
|
|
19
66
|
|
|
20
67
|
const result = spawnSync('oxlint', finalArgs, {
|
|
21
68
|
stdio: 'inherit',
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { defineConfig, type OxlintConfig } from 'oxlint';
|
|
2
|
+
type BaseOptions = {};
|
|
3
|
+
declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
4
|
+
plugins: ("unicorn" | "typescript")[];
|
|
5
|
+
jsPlugins: never[];
|
|
6
|
+
categories: {
|
|
7
|
+
correctness: "error";
|
|
8
|
+
suspicious: "warn";
|
|
9
|
+
pedantic: "off";
|
|
10
|
+
perf: "warn";
|
|
11
|
+
style: "warn";
|
|
12
|
+
restriction: "warn";
|
|
13
|
+
nursery: "off";
|
|
14
|
+
};
|
|
15
|
+
env: {
|
|
16
|
+
builtin: true;
|
|
17
|
+
};
|
|
18
|
+
options: {
|
|
19
|
+
typeAware: true;
|
|
20
|
+
};
|
|
21
|
+
rules: {
|
|
22
|
+
'eslint/no-var': "warn";
|
|
23
|
+
'eslint/prefer-const': "error";
|
|
24
|
+
'eslint/prefer-rest-params': "error";
|
|
25
|
+
'eslint/prefer-spread': "error";
|
|
26
|
+
'eslint/no-async-promise-executor': "error";
|
|
27
|
+
'eslint/no-case-declarations': "error";
|
|
28
|
+
'eslint/no-class-assign': "error";
|
|
29
|
+
'eslint/no-compare-neg-zero': "error";
|
|
30
|
+
'eslint/no-cond-assign': "error";
|
|
31
|
+
'eslint/no-const-assign': "error";
|
|
32
|
+
'eslint/no-constant-binary-expression': "error";
|
|
33
|
+
'eslint/no-constant-condition': "error";
|
|
34
|
+
'eslint/no-control-regex': "error";
|
|
35
|
+
'eslint/no-debugger': "error";
|
|
36
|
+
'eslint/no-delete-var': "error";
|
|
37
|
+
'eslint/no-dupe-else-if': "error";
|
|
38
|
+
'eslint/no-duplicate-case': "error";
|
|
39
|
+
'eslint/no-empty': "error";
|
|
40
|
+
'eslint/no-empty-character-class': "error";
|
|
41
|
+
'eslint/no-empty-pattern': "error";
|
|
42
|
+
'eslint/no-empty-static-block': "error";
|
|
43
|
+
'eslint/no-ex-assign': "error";
|
|
44
|
+
'eslint/no-extra-boolean-cast': "error";
|
|
45
|
+
'eslint/no-fallthrough': ["error", {
|
|
46
|
+
allowEmptyCase: boolean;
|
|
47
|
+
}];
|
|
48
|
+
'eslint/no-func-assign': "error";
|
|
49
|
+
'eslint/no-global-assign': "error";
|
|
50
|
+
'eslint/no-import-assign': "error";
|
|
51
|
+
'eslint/no-invalid-regexp': "error";
|
|
52
|
+
'eslint/no-irregular-whitespace': "error";
|
|
53
|
+
'eslint/no-loss-of-precision': "error";
|
|
54
|
+
'eslint/no-misleading-character-class': "error";
|
|
55
|
+
'eslint/no-nonoctal-decimal-escape': "error";
|
|
56
|
+
'eslint/no-obj-calls': "error";
|
|
57
|
+
'eslint/no-prototype-builtins': "error";
|
|
58
|
+
'eslint/no-redeclare': "error";
|
|
59
|
+
'eslint/no-regex-spaces': "error";
|
|
60
|
+
'eslint/no-self-assign': "error";
|
|
61
|
+
'eslint/no-shadow-restricted-names': "error";
|
|
62
|
+
'eslint/no-sparse-arrays': "error";
|
|
63
|
+
'eslint/no-unexpected-multiline': "error";
|
|
64
|
+
'eslint/no-unsafe-finally': "error";
|
|
65
|
+
'eslint/no-unsafe-negation': "error";
|
|
66
|
+
'eslint/no-unsafe-optional-chaining': "error";
|
|
67
|
+
'eslint/no-unused-labels': "error";
|
|
68
|
+
'eslint/no-unused-private-class-members': "error";
|
|
69
|
+
'eslint/no-unused-vars': "warn";
|
|
70
|
+
'eslint/no-useless-backreference': "error";
|
|
71
|
+
'eslint/no-useless-catch': "error";
|
|
72
|
+
'eslint/no-useless-escape': "error";
|
|
73
|
+
'eslint/require-yield': "error";
|
|
74
|
+
'eslint/use-isnan': "error";
|
|
75
|
+
'eslint/valid-typeof': "error";
|
|
76
|
+
'eslint/no-unused-expressions': "warn";
|
|
77
|
+
'typescript/ban-ts-comment': "error";
|
|
78
|
+
'typescript/no-duplicate-enum-values': "off";
|
|
79
|
+
'typescript/no-empty-object-type': "error";
|
|
80
|
+
'typescript/no-explicit-any': "error";
|
|
81
|
+
'typescript/no-extra-non-null-assertion': "error";
|
|
82
|
+
'typescript/no-misused-new': "error";
|
|
83
|
+
'typescript/no-namespace': "error";
|
|
84
|
+
'typescript/no-non-null-asserted-optional-chain': "error";
|
|
85
|
+
'typescript/no-require-imports': "error";
|
|
86
|
+
'typescript/no-this-alias': "error";
|
|
87
|
+
'typescript/no-unnecessary-type-constraint': "error";
|
|
88
|
+
'typescript/no-unsafe-declaration-merging': "error";
|
|
89
|
+
'typescript/no-unsafe-function-type': "error";
|
|
90
|
+
'typescript/no-wrapper-object-types': "error";
|
|
91
|
+
'typescript/prefer-as-const': "error";
|
|
92
|
+
'typescript/triple-slash-reference': "error";
|
|
93
|
+
'typescript/explicit-member-accessibility': ["warn", {
|
|
94
|
+
accessibility: string;
|
|
95
|
+
}];
|
|
96
|
+
'eslint/id-length': "off";
|
|
97
|
+
'eslint/sort-keys': "off";
|
|
98
|
+
'eslint/capitalized-comments': "off";
|
|
99
|
+
'eslint/func-style': "off";
|
|
100
|
+
'eslint/complexity': "off";
|
|
101
|
+
'eslint/max-params': "off";
|
|
102
|
+
'eslint/no-ternary': "off";
|
|
103
|
+
'eslint/curly': "warn";
|
|
104
|
+
'typescript/consistent-type-definitions': ["warn", string];
|
|
105
|
+
'eslint/max-statements': "off";
|
|
106
|
+
'typescript/consistent-return': "off";
|
|
107
|
+
'unicorn/switch-case-braces': "warn";
|
|
108
|
+
'typescript/prefer-regexp-exec': "warn";
|
|
109
|
+
'eslint/init-declarations': "off";
|
|
110
|
+
'unicorn/no-null': "off";
|
|
111
|
+
'eslint/no-undefined': "off";
|
|
112
|
+
'eslint/no-console': "off";
|
|
113
|
+
'eslint/no-continue': "off";
|
|
114
|
+
'eslint/no-implicit-coercion': ["warn", {
|
|
115
|
+
allow: string[];
|
|
116
|
+
}];
|
|
117
|
+
'eslint/no-plusplus': "off";
|
|
118
|
+
'eslint/no-void': "off";
|
|
119
|
+
'eslint/no-nested-ternary': "off";
|
|
120
|
+
'eslint/no-empty-function': ["warn", {
|
|
121
|
+
allow: string[];
|
|
122
|
+
}];
|
|
123
|
+
'unicorn/no-instanceof-builtins': "off";
|
|
124
|
+
'unicorn/prefer-spread': "off";
|
|
125
|
+
'eslint/new-cap': "off";
|
|
126
|
+
'unicorn/no-await-expression-member': "off";
|
|
127
|
+
'eslint/no-duplicate-imports': ["warn", {
|
|
128
|
+
allowSeparateTypeImports: boolean;
|
|
129
|
+
}];
|
|
130
|
+
'import/no-named-export': "off";
|
|
131
|
+
'import/no-default-export': "off";
|
|
132
|
+
'import/prefer-default-export': "off";
|
|
133
|
+
'import/no-namespace': "off";
|
|
134
|
+
'import/exports-last': "off";
|
|
135
|
+
'import/no-unassigned-import': "off";
|
|
136
|
+
'unicorn/no-new-array': "off";
|
|
137
|
+
'eslint/no-array-constructor': "warn";
|
|
138
|
+
'typescript/explicit-function-return-type': "off";
|
|
139
|
+
'typescript/explicit-module-boundary-types': "off";
|
|
140
|
+
'unicorn/no-anonymous-default-export': "off";
|
|
141
|
+
'eslint/sort-imports': "off";
|
|
142
|
+
'eslint/no-magic-numbers': "off";
|
|
143
|
+
'unicorn/prefer-modern-math-apis': "off";
|
|
144
|
+
'eslint/no-use-before-define': "off";
|
|
145
|
+
'eslint/constructor-super': "off";
|
|
146
|
+
'eslint/getter-return': "off";
|
|
147
|
+
'eslint/no-dupe-class-members': "off";
|
|
148
|
+
'eslint/no-dupe-keys': "off";
|
|
149
|
+
'eslint/no-new-native-nonconstructor': "off";
|
|
150
|
+
'eslint/no-setter-return': "off";
|
|
151
|
+
'eslint/no-this-before-super': "off";
|
|
152
|
+
'eslint/no-undef': "off";
|
|
153
|
+
'eslint/no-unreachable': "off";
|
|
154
|
+
'eslint/no-with': "off";
|
|
155
|
+
'unicorn/no-nested-ternary': "off";
|
|
156
|
+
'oxc/no-optional-chaining': "off";
|
|
157
|
+
'oxc/no-rest-spread-properties': "off";
|
|
158
|
+
'oxc/no-async-await': "off";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
export { type OxlintConfig, defineConfig, baseConfig };
|
|
162
|
+
declare const _default: {
|
|
163
|
+
plugins: ("unicorn" | "typescript")[];
|
|
164
|
+
jsPlugins: never[];
|
|
165
|
+
categories: {
|
|
166
|
+
correctness: "error";
|
|
167
|
+
suspicious: "warn";
|
|
168
|
+
pedantic: "off";
|
|
169
|
+
perf: "warn";
|
|
170
|
+
style: "warn";
|
|
171
|
+
restriction: "warn";
|
|
172
|
+
nursery: "off";
|
|
173
|
+
};
|
|
174
|
+
env: {
|
|
175
|
+
builtin: true;
|
|
176
|
+
};
|
|
177
|
+
options: {
|
|
178
|
+
typeAware: true;
|
|
179
|
+
};
|
|
180
|
+
rules: {
|
|
181
|
+
'eslint/no-var': "warn";
|
|
182
|
+
'eslint/prefer-const': "error";
|
|
183
|
+
'eslint/prefer-rest-params': "error";
|
|
184
|
+
'eslint/prefer-spread': "error";
|
|
185
|
+
'eslint/no-async-promise-executor': "error";
|
|
186
|
+
'eslint/no-case-declarations': "error";
|
|
187
|
+
'eslint/no-class-assign': "error";
|
|
188
|
+
'eslint/no-compare-neg-zero': "error";
|
|
189
|
+
'eslint/no-cond-assign': "error";
|
|
190
|
+
'eslint/no-const-assign': "error";
|
|
191
|
+
'eslint/no-constant-binary-expression': "error";
|
|
192
|
+
'eslint/no-constant-condition': "error";
|
|
193
|
+
'eslint/no-control-regex': "error";
|
|
194
|
+
'eslint/no-debugger': "error";
|
|
195
|
+
'eslint/no-delete-var': "error";
|
|
196
|
+
'eslint/no-dupe-else-if': "error";
|
|
197
|
+
'eslint/no-duplicate-case': "error";
|
|
198
|
+
'eslint/no-empty': "error";
|
|
199
|
+
'eslint/no-empty-character-class': "error";
|
|
200
|
+
'eslint/no-empty-pattern': "error";
|
|
201
|
+
'eslint/no-empty-static-block': "error";
|
|
202
|
+
'eslint/no-ex-assign': "error";
|
|
203
|
+
'eslint/no-extra-boolean-cast': "error";
|
|
204
|
+
'eslint/no-fallthrough': ["error", {
|
|
205
|
+
allowEmptyCase: boolean;
|
|
206
|
+
}];
|
|
207
|
+
'eslint/no-func-assign': "error";
|
|
208
|
+
'eslint/no-global-assign': "error";
|
|
209
|
+
'eslint/no-import-assign': "error";
|
|
210
|
+
'eslint/no-invalid-regexp': "error";
|
|
211
|
+
'eslint/no-irregular-whitespace': "error";
|
|
212
|
+
'eslint/no-loss-of-precision': "error";
|
|
213
|
+
'eslint/no-misleading-character-class': "error";
|
|
214
|
+
'eslint/no-nonoctal-decimal-escape': "error";
|
|
215
|
+
'eslint/no-obj-calls': "error";
|
|
216
|
+
'eslint/no-prototype-builtins': "error";
|
|
217
|
+
'eslint/no-redeclare': "error";
|
|
218
|
+
'eslint/no-regex-spaces': "error";
|
|
219
|
+
'eslint/no-self-assign': "error";
|
|
220
|
+
'eslint/no-shadow-restricted-names': "error";
|
|
221
|
+
'eslint/no-sparse-arrays': "error";
|
|
222
|
+
'eslint/no-unexpected-multiline': "error";
|
|
223
|
+
'eslint/no-unsafe-finally': "error";
|
|
224
|
+
'eslint/no-unsafe-negation': "error";
|
|
225
|
+
'eslint/no-unsafe-optional-chaining': "error";
|
|
226
|
+
'eslint/no-unused-labels': "error";
|
|
227
|
+
'eslint/no-unused-private-class-members': "error";
|
|
228
|
+
'eslint/no-unused-vars': "warn";
|
|
229
|
+
'eslint/no-useless-backreference': "error";
|
|
230
|
+
'eslint/no-useless-catch': "error";
|
|
231
|
+
'eslint/no-useless-escape': "error";
|
|
232
|
+
'eslint/require-yield': "error";
|
|
233
|
+
'eslint/use-isnan': "error";
|
|
234
|
+
'eslint/valid-typeof': "error";
|
|
235
|
+
'eslint/no-unused-expressions': "warn";
|
|
236
|
+
'typescript/ban-ts-comment': "error";
|
|
237
|
+
'typescript/no-duplicate-enum-values': "off";
|
|
238
|
+
'typescript/no-empty-object-type': "error";
|
|
239
|
+
'typescript/no-explicit-any': "error";
|
|
240
|
+
'typescript/no-extra-non-null-assertion': "error";
|
|
241
|
+
'typescript/no-misused-new': "error";
|
|
242
|
+
'typescript/no-namespace': "error";
|
|
243
|
+
'typescript/no-non-null-asserted-optional-chain': "error";
|
|
244
|
+
'typescript/no-require-imports': "error";
|
|
245
|
+
'typescript/no-this-alias': "error";
|
|
246
|
+
'typescript/no-unnecessary-type-constraint': "error";
|
|
247
|
+
'typescript/no-unsafe-declaration-merging': "error";
|
|
248
|
+
'typescript/no-unsafe-function-type': "error";
|
|
249
|
+
'typescript/no-wrapper-object-types': "error";
|
|
250
|
+
'typescript/prefer-as-const': "error";
|
|
251
|
+
'typescript/triple-slash-reference': "error";
|
|
252
|
+
'typescript/explicit-member-accessibility': ["warn", {
|
|
253
|
+
accessibility: string;
|
|
254
|
+
}];
|
|
255
|
+
'eslint/id-length': "off";
|
|
256
|
+
'eslint/sort-keys': "off";
|
|
257
|
+
'eslint/capitalized-comments': "off";
|
|
258
|
+
'eslint/func-style': "off";
|
|
259
|
+
'eslint/complexity': "off";
|
|
260
|
+
'eslint/max-params': "off";
|
|
261
|
+
'eslint/no-ternary': "off";
|
|
262
|
+
'eslint/curly': "warn";
|
|
263
|
+
'typescript/consistent-type-definitions': ["warn", string];
|
|
264
|
+
'eslint/max-statements': "off";
|
|
265
|
+
'typescript/consistent-return': "off";
|
|
266
|
+
'unicorn/switch-case-braces': "warn";
|
|
267
|
+
'typescript/prefer-regexp-exec': "warn";
|
|
268
|
+
'eslint/init-declarations': "off";
|
|
269
|
+
'unicorn/no-null': "off";
|
|
270
|
+
'eslint/no-undefined': "off";
|
|
271
|
+
'eslint/no-console': "off";
|
|
272
|
+
'eslint/no-continue': "off";
|
|
273
|
+
'eslint/no-implicit-coercion': ["warn", {
|
|
274
|
+
allow: string[];
|
|
275
|
+
}];
|
|
276
|
+
'eslint/no-plusplus': "off";
|
|
277
|
+
'eslint/no-void': "off";
|
|
278
|
+
'eslint/no-nested-ternary': "off";
|
|
279
|
+
'eslint/no-empty-function': ["warn", {
|
|
280
|
+
allow: string[];
|
|
281
|
+
}];
|
|
282
|
+
'unicorn/no-instanceof-builtins': "off";
|
|
283
|
+
'unicorn/prefer-spread': "off";
|
|
284
|
+
'eslint/new-cap': "off";
|
|
285
|
+
'unicorn/no-await-expression-member': "off";
|
|
286
|
+
'eslint/no-duplicate-imports': ["warn", {
|
|
287
|
+
allowSeparateTypeImports: boolean;
|
|
288
|
+
}];
|
|
289
|
+
'import/no-named-export': "off";
|
|
290
|
+
'import/no-default-export': "off";
|
|
291
|
+
'import/prefer-default-export': "off";
|
|
292
|
+
'import/no-namespace': "off";
|
|
293
|
+
'import/exports-last': "off";
|
|
294
|
+
'import/no-unassigned-import': "off";
|
|
295
|
+
'unicorn/no-new-array': "off";
|
|
296
|
+
'eslint/no-array-constructor': "warn";
|
|
297
|
+
'typescript/explicit-function-return-type': "off";
|
|
298
|
+
'typescript/explicit-module-boundary-types': "off";
|
|
299
|
+
'unicorn/no-anonymous-default-export': "off";
|
|
300
|
+
'eslint/sort-imports': "off";
|
|
301
|
+
'eslint/no-magic-numbers': "off";
|
|
302
|
+
'unicorn/prefer-modern-math-apis': "off";
|
|
303
|
+
'eslint/no-use-before-define': "off";
|
|
304
|
+
'eslint/constructor-super': "off";
|
|
305
|
+
'eslint/getter-return': "off";
|
|
306
|
+
'eslint/no-dupe-class-members': "off";
|
|
307
|
+
'eslint/no-dupe-keys': "off";
|
|
308
|
+
'eslint/no-new-native-nonconstructor': "off";
|
|
309
|
+
'eslint/no-setter-return': "off";
|
|
310
|
+
'eslint/no-this-before-super': "off";
|
|
311
|
+
'eslint/no-undef': "off";
|
|
312
|
+
'eslint/no-unreachable': "off";
|
|
313
|
+
'eslint/no-with': "off";
|
|
314
|
+
'unicorn/no-nested-ternary': "off";
|
|
315
|
+
'oxc/no-optional-chaining': "off";
|
|
316
|
+
'oxc/no-rest-spread-properties': "off";
|
|
317
|
+
'oxc/no-async-await': "off";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
export default _default;
|
|
321
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsLlD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,wBAA4B"}
|