@1stg/oxlint-config 0.0.0 → 1.1.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/CHANGELOG.md +40 -0
- package/README.md +142 -0
- package/lib/index.d.ts +19 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +99 -0
- package/lib/index.js.map +1 -0
- package/package.json +35 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#430](https://github.com/1stG/configs/pull/430) [`5643939`](https://github.com/1stG/configs/commit/5643939d348c5b70f4a883eacca8a26a18aef415) Thanks [@JounQin](https://github.com/JounQin)! - Enable the structural TypeScript-friendly `no-magic-numbers` defaults (array
|
|
8
|
+
indexes, default values, type indexes and numeric literal types) plus
|
|
9
|
+
`enforceConst`, curate the shared ignore list to common values, and expose all
|
|
10
|
+
rule options through `noMagicNumbers`, whose `ignore` is merged with the
|
|
11
|
+
shared list. `rules` overrides remain as-is. Named declarations (enums,
|
|
12
|
+
readonly/class fields and default parameters) count as naming the number;
|
|
13
|
+
`detectObjects` stays opt-in.
|
|
14
|
+
|
|
15
|
+
## 1.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- [#423](https://github.com/1stG/configs/pull/423) [`89733fb`](https://github.com/1stG/configs/commit/89733fbfa47f64ef1fb794d037f3a65a9836ee65) Thanks [@JounQin](https://github.com/JounQin)! - First public release of the Oxfmt and Oxlint configs.
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [#420](https://github.com/1stG/configs/pull/420) [`dde6235`](https://github.com/1stG/configs/commit/dde6235d72b2e72b8413adeab9069b585af1c849) Thanks [@JounQin](https://github.com/JounQin)! - Enable the remaining Oxlint-supported rules from the previous ESLint config,
|
|
24
|
+
including `no-magic-numbers` with the historical ignore list, `no-fallthrough`,
|
|
25
|
+
`no-redeclare`, `prefer-object-spread` and the other style/suspicious rules
|
|
26
|
+
that the automatic migration audit found missing.
|
|
27
|
+
|
|
28
|
+
- [#421](https://github.com/1stG/configs/pull/421) [`e3b113d`](https://github.com/1stG/configs/commit/e3b113d17a63c9d8b85a7d955c6128a4c4cf08cd) Thanks [@JounQin](https://github.com/JounQin)! - Enable the type-aware `typescript/no-deprecated` rule, covering the
|
|
29
|
+
`sonarjs/deprecation` behavior that needs TypeScript type information.
|
|
30
|
+
|
|
31
|
+
- [#425](https://github.com/1stG/configs/pull/425) [`c5dd9a7`](https://github.com/1stG/configs/commit/c5dd9a7fd420eebf7961c4a097bd69c9ba69fdda) Thanks [@JounQin](https://github.com/JounQin)! - Enable Oxlint's `perf` category as a warning and load the `react-perf` plugin
|
|
32
|
+
when React is enabled. The repository currently reports no perf findings, but
|
|
33
|
+
consumers get the suggestions without a hard failure.
|
|
34
|
+
|
|
35
|
+
- [#419](https://github.com/1stG/configs/pull/419) [`4915585`](https://github.com/1stG/configs/commit/491558590071181e30226c3d8d6d5dddae4a6900) Thanks [@JounQin](https://github.com/JounQin)! - Add a `typeAware` option that enables Oxlint's type-aware rules. It defaults
|
|
36
|
+
to whether `oxlint-tsgolint` is installed and can be disabled explicitly.
|
|
37
|
+
|
|
38
|
+
## 1.0.0
|
|
39
|
+
|
|
40
|
+
- Initial release.
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# @1stg/oxlint-config
|
|
2
|
+
|
|
3
|
+
Personal but Shareable [Oxlint](https://oxc.rs/docs/guide/usage/linter) Configuration for all 1stG.me projects.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
// oxlint.config.ts
|
|
9
|
+
import { defineConfig } from '@1stg/oxlint-config'
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
react: true,
|
|
13
|
+
vitest: true,
|
|
14
|
+
})
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
oxlint .
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The default export is the zero-config version, for tools that can import a
|
|
22
|
+
config object directly.
|
|
23
|
+
|
|
24
|
+
The default export can be re-exported directly:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
export { default } from '@1stg/oxlint-config'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use `defineConfig` only when you need options.
|
|
31
|
+
|
|
32
|
+
## Options
|
|
33
|
+
|
|
34
|
+
| Option | Default | Description |
|
|
35
|
+
| ---------------- | ---------------------------------------- | ------------------------------------------------------------ |
|
|
36
|
+
| `categories` | `{ correctness: 'error', perf: 'warn' }` | Oxlint categories. |
|
|
37
|
+
| `jsdoc` | `true` | Enable the JSDoc plugin. |
|
|
38
|
+
| `jsPlugins` | `[]` | ESLint plugins to load (alpha). |
|
|
39
|
+
| `rules` | `{}` | Extra rule overrides. |
|
|
40
|
+
| `ignorePatterns` | `[]` | Native Oxlint ignore patterns. |
|
|
41
|
+
| `node` | `true` | Node.js globals and rules. |
|
|
42
|
+
| `promise` | `true` | Enable the Promise plugin. |
|
|
43
|
+
| `react` | installed `react` | React, JSX accessibility and perf rules. |
|
|
44
|
+
| `vue` | installed `vue` | Vue rules. |
|
|
45
|
+
| `vitest` | installed `vitest` | Vitest globals and rules. |
|
|
46
|
+
| `jest` | installed `jest` | Jest globals and rules. |
|
|
47
|
+
| `typeAware` | installed `oxlint-tsgolint` | Enable rules requiring type info. |
|
|
48
|
+
| `noMagicNumbers` | `undefined` | Options merged into `no-magic-numbers`; `false` disables it. |
|
|
49
|
+
|
|
50
|
+
`ignorePatterns` is the native Oxlint field and can be passed directly; there
|
|
51
|
+
is no separate `ignores` alias.
|
|
52
|
+
|
|
53
|
+
## `no-magic-numbers`
|
|
54
|
+
|
|
55
|
+
The shared rule ignores common identity, time/calendar, timeout and
|
|
56
|
+
decimal/binary values (`-1` through `3600`) by default, while leaving
|
|
57
|
+
project-specific constants to consumers. Structural positions are ignored by default
|
|
58
|
+
(`ignoreArrayIndexes`, `ignoreDefaultValues`, `ignoreNumericLiteralTypes`,
|
|
59
|
+
`ignoreTypeIndexes`), and named declarations count as intentional
|
|
60
|
+
(`enforceConst`, `ignoreEnums`, `ignoreReadonlyClassProperties`,
|
|
61
|
+
`ignoreClassFieldInitialValues`). The class-field options overlap: set both
|
|
62
|
+
`ignoreReadonlyClassProperties` and `ignoreClassFieldInitialValues` to `false`
|
|
63
|
+
to report readonly field initializers. Oxlint currently still reports numeric
|
|
64
|
+
literal interface properties despite `ignoreNumericLiteralTypes`; add those
|
|
65
|
+
values through `noMagicNumbers.ignore` when needed. `detectObjects` stays
|
|
66
|
+
opt-in. Add domain constants with the dedicated option:
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
export default defineConfig({
|
|
70
|
+
noMagicNumbers: {
|
|
71
|
+
ignore: [16, 64],
|
|
72
|
+
ignoreEnums: false,
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
All other `no-magic-numbers` options are accepted and override the defaults;
|
|
78
|
+
`ignore` is merged with the shared list. `rules` overrides are passed through
|
|
79
|
+
as-is, so use `noMagicNumbers` when defaults should be merged. Passing `false`
|
|
80
|
+
disables the rule.
|
|
81
|
+
|
|
82
|
+
Import sorting is **not** a lint rule here: Oxfmt's built-in `sortImports` does
|
|
83
|
+
it at format time, so `oxlint` and `oxfmt` stay independent.
|
|
84
|
+
|
|
85
|
+
## Third-party ESLint plugins
|
|
86
|
+
|
|
87
|
+
Oxlint can load ESLint plugins through `jsPlugins` (alpha, not semver-stable):
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
import { defineConfig } from '@1stg/oxlint-config'
|
|
91
|
+
|
|
92
|
+
export default defineConfig({
|
|
93
|
+
jsPlugins: ['eslint-plugin-sonarjs'],
|
|
94
|
+
rules: {
|
|
95
|
+
'sonarjs/no-identical-functions': 'warn',
|
|
96
|
+
'sonarjs/cognitive-complexity': 'warn',
|
|
97
|
+
},
|
|
98
|
+
})
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Plugins resolve relative to the Oxlint config file, so install them in the
|
|
102
|
+
project that enables them. Processors and plugins relying on the full ESLint
|
|
103
|
+
`SourceCode` API may not work; Oxlint's built-in plugins (TypeScript, unicorn,
|
|
104
|
+
import, jsdoc, react, vue, node, promise, Vitest, Jest) cover the rest.
|
|
105
|
+
|
|
106
|
+
## Notes
|
|
107
|
+
|
|
108
|
+
- Oxlint parses JavaScript, TypeScript, JSX and Vue. Markdown, JSON, YAML and
|
|
109
|
+
TOML are formatted by `@1stg/oxfmt-config` instead of linted.
|
|
110
|
+
- Type-aware rules require the `oxlint-tsgolint` package. `oxlint --type-aware`
|
|
111
|
+
enables Oxlint's own type-aware defaults, but the extra rules added by this
|
|
112
|
+
preset (for example `typescript/no-misused-promises`) are guarded by
|
|
113
|
+
`typeAware` and need `typeAware: true` (or an installed `oxlint-tsgolint`, which
|
|
114
|
+
is the default).
|
|
115
|
+
|
|
116
|
+
## Sponsors and Backers
|
|
117
|
+
|
|
118
|
+
[](https://github.com/sponsors/JounQin)
|
|
119
|
+
|
|
120
|
+
### Sponsors
|
|
121
|
+
|
|
122
|
+
| 1stG | RxTS | UnTS |
|
|
123
|
+
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
124
|
+
| [](https://opencollective.com/1stG) | [](https://opencollective.com/rxts) | [](https://opencollective.com/unts) |
|
|
125
|
+
|
|
126
|
+
### Backers
|
|
127
|
+
|
|
128
|
+
| 1stG | RxTS | UnTS |
|
|
129
|
+
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
130
|
+
| [](https://opencollective.com/1stG) | [](https://opencollective.com/rxts) | [](https://opencollective.com/unts) |
|
|
131
|
+
|
|
132
|
+
## Changelog
|
|
133
|
+
|
|
134
|
+
Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
[MIT][] © [JounQin][]@[1stG.me][]
|
|
139
|
+
|
|
140
|
+
[1stG.me]: https://www.1stG.me
|
|
141
|
+
[JounQin]: https://github.com/JounQin
|
|
142
|
+
[MIT]: http://opensource.org/licenses/MIT
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OxlintConfig } from 'oxlint';
|
|
2
|
+
type OxlintRules = NonNullable<OxlintConfig['rules']>;
|
|
3
|
+
type NoMagicNumbersRule = NonNullable<OxlintRules['no-magic-numbers']>;
|
|
4
|
+
type NoMagicNumbersOptions = Extract<NoMagicNumbersRule, [unknown, unknown]>[1];
|
|
5
|
+
export interface OxlintConfigOptions extends OxlintConfig {
|
|
6
|
+
jsdoc?: boolean;
|
|
7
|
+
node?: boolean;
|
|
8
|
+
promise?: boolean;
|
|
9
|
+
react?: boolean;
|
|
10
|
+
vue?: boolean;
|
|
11
|
+
vitest?: boolean;
|
|
12
|
+
jest?: boolean;
|
|
13
|
+
typeAware?: boolean;
|
|
14
|
+
noMagicNumbers?: false | NoMagicNumbersOptions;
|
|
15
|
+
}
|
|
16
|
+
export declare const defineConfig: ({ categories, jest, typeAware, noMagicNumbers, jsdoc, node, promise, react, vitest, vue, plugins: extraPlugins, env: extraEnv, rules: extraRules, overrides: extraOverrides, ignorePatterns: extraIgnorePatterns, ...options }?: OxlintConfigOptions) => OxlintConfig;
|
|
17
|
+
declare const _default: OxlintConfig;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,KAAK,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAA;AACrD,KAAK,kBAAkB,GAAG,WAAW,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAA;AACtE,KAAK,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAkB/E,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IAEvD,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,cAAc,CAAC,EAAE,KAAK,GAAG,qBAAqB,CAAA;CAC/C;AAMD,eAAO,MAAM,YAAY,oOAiBtB,mBAAmB,KAAQ,YA4H7B,CAAA"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { isPkgAvailable } from '@pkgr/utils';
|
|
13
|
+
const DEFAULT_MAGIC_NUMBERS = [
|
|
14
|
+
-1, 0, 1, 2, 3, 5, 7, 10, 12, 15, 20, 24, 28, 29, 30, 31, 50, 60, 100, 365, 366, 500, 1000, 1024,
|
|
15
|
+
3600,
|
|
16
|
+
];
|
|
17
|
+
const DEFAULT_NO_MAGIC_NUMBERS_OPTIONS = {
|
|
18
|
+
enforceConst: true,
|
|
19
|
+
ignoreArrayIndexes: true,
|
|
20
|
+
ignoreClassFieldInitialValues: true,
|
|
21
|
+
ignoreDefaultValues: true,
|
|
22
|
+
ignoreEnums: true,
|
|
23
|
+
ignoreNumericLiteralTypes: true,
|
|
24
|
+
ignoreReadonlyClassProperties: true,
|
|
25
|
+
ignoreTypeIndexes: true,
|
|
26
|
+
};
|
|
27
|
+
export const defineConfig = (_a = {}) => {
|
|
28
|
+
var _b;
|
|
29
|
+
var { categories = { correctness: 'error', perf: 'warn' }, jest = isPkgAvailable('jest'), typeAware = isPkgAvailable('oxlint-tsgolint/package.json'), noMagicNumbers, jsdoc = true, node = true, promise = true, react = isPkgAvailable('react'), vitest = isPkgAvailable('vitest'), vue = isPkgAvailable('vue'), plugins: extraPlugins = [], env: extraEnv, rules: extraRules, overrides: extraOverrides, ignorePatterns: extraIgnorePatterns } = _a, options = __rest(_a, ["categories", "jest", "typeAware", "noMagicNumbers", "jsdoc", "node", "promise", "react", "vitest", "vue", "plugins", "env", "rules", "overrides", "ignorePatterns"]);
|
|
30
|
+
const plugins = ['oxc', 'unicorn', 'typescript', 'import'];
|
|
31
|
+
if (promise) {
|
|
32
|
+
plugins.push('promise');
|
|
33
|
+
}
|
|
34
|
+
if (jsdoc) {
|
|
35
|
+
plugins.push('jsdoc');
|
|
36
|
+
}
|
|
37
|
+
if (node) {
|
|
38
|
+
plugins.push('node');
|
|
39
|
+
}
|
|
40
|
+
if (react) {
|
|
41
|
+
plugins.push('react', 'jsx-a11y', 'react-perf');
|
|
42
|
+
}
|
|
43
|
+
if (vue) {
|
|
44
|
+
plugins.push('vue');
|
|
45
|
+
}
|
|
46
|
+
if (vitest) {
|
|
47
|
+
plugins.push('vitest');
|
|
48
|
+
}
|
|
49
|
+
if (jest) {
|
|
50
|
+
plugins.push('jest');
|
|
51
|
+
}
|
|
52
|
+
plugins.push(...extraPlugins);
|
|
53
|
+
const noMagicNumbersRule = noMagicNumbers === false
|
|
54
|
+
? 'off'
|
|
55
|
+
: [
|
|
56
|
+
'error',
|
|
57
|
+
Object.assign(Object.assign(Object.assign({}, DEFAULT_NO_MAGIC_NUMBERS_OPTIONS), noMagicNumbers), { ignore: [...new Set([...DEFAULT_MAGIC_NUMBERS, ...((_b = noMagicNumbers === null || noMagicNumbers === void 0 ? void 0 : noMagicNumbers.ignore) !== null && _b !== void 0 ? _b : [])])] }),
|
|
58
|
+
];
|
|
59
|
+
return Object.assign(Object.assign({}, options), { options: Object.assign(Object.assign({}, options.options), (typeAware && { typeAware: true })), plugins,
|
|
60
|
+
categories, env: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ builtin: true }, (node && { node: true })), (react && { browser: true })), (vue && { vue: true })), (vitest && { vitest: true })), (jest && { jest: true })), extraEnv), rules: Object.assign(Object.assign(Object.assign({}, (typeAware && {
|
|
61
|
+
'typescript/await-thenable': 'error',
|
|
62
|
+
'typescript/no-deprecated': 'error',
|
|
63
|
+
'typescript/no-floating-promises': 'error',
|
|
64
|
+
'typescript/no-misused-promises': 'error',
|
|
65
|
+
'typescript/no-unnecessary-condition': 'error',
|
|
66
|
+
'typescript/no-unnecessary-qualifier': 'error',
|
|
67
|
+
'typescript/no-unnecessary-type-arguments': 'error',
|
|
68
|
+
'typescript/prefer-optional-chain': 'error',
|
|
69
|
+
'typescript/prefer-readonly': 'error',
|
|
70
|
+
'typescript/prefer-reduce-type-parameter': 'error',
|
|
71
|
+
'typescript/require-array-sort-compare': ['error', { ignoreStringArrays: true }],
|
|
72
|
+
'typescript/restrict-plus-operands': 'error',
|
|
73
|
+
})), { 'arrow-body-style': 'error', curly: ['error', 'all'], eqeqeq: ['error', 'always'], 'no-case-declarations': 'error', 'no-else-return': ['error', { allowElseIf: false }], 'no-empty': ['error', { allowEmptyCatch: true }], 'no-empty-function': 'error', 'no-fallthrough': 'error', 'no-magic-numbers': noMagicNumbersRule, 'no-negated-condition': 'error', 'no-prototype-builtins': 'error', 'no-redeclare': 'error', 'no-regex-spaces': 'error', 'no-var': 'error', 'object-shorthand': 'error', 'prefer-const': ['error', { destructuring: 'all' }], 'prefer-object-spread': 'error', 'prefer-regex-literals': 'error', 'preserve-caught-error': 'error', 'import/newline-after-import': 'error', 'import/no-duplicates': 'error', 'typescript/consistent-type-definitions': ['error', 'interface'], 'typescript/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], 'unicorn/prefer-node-protocol': 'error', 'unicorn/prefer-number-properties': 'error', 'unicorn/prefer-string-starts-ends-with': 'error' }), extraRules), overrides: [
|
|
74
|
+
{
|
|
75
|
+
files: ['**/*.d.{ts,mts,cts}', '**/*.d.*.{ts,mts,cts}'],
|
|
76
|
+
rules: {
|
|
77
|
+
'typescript/no-explicit-any': 'off',
|
|
78
|
+
'typescript/no-unused-vars': 'off',
|
|
79
|
+
'import/no-duplicates': 'off',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
...(extraOverrides !== null && extraOverrides !== void 0 ? extraOverrides : []),
|
|
83
|
+
], ignorePatterns: [
|
|
84
|
+
'**/.dsh',
|
|
85
|
+
'**/.history',
|
|
86
|
+
'**/.type-coverage',
|
|
87
|
+
'**/.vercel',
|
|
88
|
+
'**/.yarn',
|
|
89
|
+
'**/coverage',
|
|
90
|
+
'**/dist',
|
|
91
|
+
'**/lib',
|
|
92
|
+
'**/CHANGELOG.md',
|
|
93
|
+
'**/*.log',
|
|
94
|
+
'**/*.patch',
|
|
95
|
+
...(extraIgnorePatterns !== null && extraIgnorePatterns !== void 0 ? extraIgnorePatterns : []),
|
|
96
|
+
] });
|
|
97
|
+
};
|
|
98
|
+
export default defineConfig();
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAO5C,MAAM,qBAAqB,GAAG;IAC5B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI;IAChG,IAAI;CACL,CAAA;AAED,MAAM,gCAAgC,GAAG;IACvC,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,IAAI;IACxB,6BAA6B,EAAE,IAAI;IACnC,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,IAAI;IACjB,yBAAyB,EAAE,IAAI;IAC/B,6BAA6B,EAAE,IAAI;IACnC,iBAAiB,EAAE,IAAI;CACf,CAAA;AA2BV,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAiBJ,EAAE,EAAgB,EAAE;;QAjBhB,EAC3B,UAAU,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EACnD,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,EAC7B,SAAS,GAAG,cAAc,CAAC,8BAA8B,CAAC,EAC1D,cAAc,EACd,KAAK,GAAG,IAAI,EACZ,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,IAAI,EACd,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,EAC/B,MAAM,GAA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B,mBAAmB,GAAI,EAAE,CAAC;SAC/B,IACF;AACH,CAAC,CAAA;AAED,eAAe,YAAY,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1stg/oxlint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Personal but Shareable Oxlint Configuration for all 1stG.me projects",
|
|
6
|
+
"repository": "git+https://github.com/1stG/configs.git",
|
|
7
|
+
"homepage": "https://github.com/1stG/configs/tree/master/packages/oxlint-config",
|
|
8
|
+
"author": "JounQin <admin@1stg.me> (https://www.1stG.me)",
|
|
9
|
+
"funding": "https://opencollective.com/configs",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": "^22.18.0 || >=24.11.0"
|
|
13
|
+
},
|
|
14
|
+
"main": "./lib/index.js",
|
|
15
|
+
"types": "./lib/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"lib"
|
|
25
|
+
],
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"oxlint": ">=1.80.0",
|
|
28
|
+
"oxlint-tsgolint": "^7.0.2005"
|
|
29
|
+
},
|
|
30
|
+
"peerDependenciesMeta": {
|
|
31
|
+
"oxlint-tsgolint": {
|
|
32
|
+
"optional": true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@pkgr/utils": "^4.1.0"
|
|
37
|
+
},
|
|
4
38
|
"publishConfig": {
|
|
5
39
|
"access": "public"
|
|
6
40
|
}
|