@4mbl/lint 1.0.0-beta.2 → 1.0.0-beta.20
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 +125 -2
- package/README.md +80 -26
- package/bin/cli.js +56 -9
- package/dist/base.d.ts +310 -106
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +159 -108
- package/dist/base.js.map +1 -1
- package/dist/next.d.ts +539 -1
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +53 -38
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +330 -107
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +13 -2
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +393 -114
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +22 -7
- package/dist/react.js.map +1 -1
- package/package.json +6 -8
package/dist/next.js
CHANGED
|
@@ -1,61 +1,76 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import process from 'node:process';
|
|
1
3
|
import { defineConfig } from 'oxlint';
|
|
2
4
|
import { reactConfig } from './react.js';
|
|
3
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
4
5
|
const DEFAULT_OPTIONS = { uiPath: 'src/components/ui/' };
|
|
5
6
|
function nextConfig(options) {
|
|
6
7
|
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
8
|
+
const react = reactConfig(options);
|
|
7
9
|
return defineConfig({
|
|
8
|
-
extends: [
|
|
9
|
-
plugins: ['nextjs'],
|
|
10
|
+
extends: [react],
|
|
11
|
+
plugins: [...react.plugins, 'nextjs'],
|
|
10
12
|
rules: {
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
},
|
|
32
|
-
ignorePatterns: ['.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
33
|
-
overrides: [
|
|
13
|
+
'nextjs/google-font-display': 'warn',
|
|
14
|
+
'nextjs/google-font-preconnect': 'warn',
|
|
15
|
+
'nextjs/next-script-for-ga': 'warn',
|
|
16
|
+
'nextjs/no-async-client-component': 'warn',
|
|
17
|
+
'nextjs/no-before-interactive-script-outside-document': 'warn',
|
|
18
|
+
'nextjs/no-css-tags': 'warn',
|
|
19
|
+
'nextjs/no-head-element': 'warn',
|
|
20
|
+
'nextjs/no-html-link-for-pages': 'error',
|
|
21
|
+
'nextjs/no-page-custom-font': 'warn',
|
|
22
|
+
'nextjs/no-styled-jsx-in-document': 'warn',
|
|
23
|
+
'nextjs/no-sync-scripts': 'error',
|
|
24
|
+
'nextjs/no-title-in-document-head': 'warn',
|
|
25
|
+
'nextjs/no-typos': 'warn',
|
|
26
|
+
'nextjs/no-unwanted-polyfillio': 'warn',
|
|
27
|
+
'nextjs/inline-script-id': 'error',
|
|
28
|
+
'nextjs/no-assign-module-variable': 'error',
|
|
29
|
+
'nextjs/no-document-import-in-page': 'error',
|
|
30
|
+
'nextjs/no-duplicate-head': 'error',
|
|
31
|
+
'nextjs/no-head-import-in-document': 'error',
|
|
32
|
+
'nextjs/no-script-component-in-head': 'error',
|
|
34
33
|
// ignores warnings for special exports in page and layout files
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
'react/only-export-components': [
|
|
35
|
+
'warn',
|
|
36
|
+
{
|
|
37
|
+
// https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/src/index.ts
|
|
38
|
+
allowExportNames: [
|
|
39
|
+
// removed in next@16.0.0: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#version-history
|
|
40
|
+
// 'experimental_ppr',
|
|
41
|
+
'dynamic',
|
|
42
|
+
'dynamicParams',
|
|
43
|
+
'revalidate',
|
|
44
|
+
'fetchCache',
|
|
45
|
+
'runtime',
|
|
46
|
+
'preferredRegion',
|
|
47
|
+
'maxDuration',
|
|
48
|
+
'metadata',
|
|
49
|
+
'generateMetadata',
|
|
50
|
+
'viewport',
|
|
51
|
+
'generateViewport',
|
|
52
|
+
'generateImageMetadata',
|
|
53
|
+
'generateSitemaps',
|
|
54
|
+
'generateStaticParams',
|
|
44
55
|
],
|
|
45
56
|
},
|
|
46
|
-
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
ignorePatterns: ['.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
60
|
+
overrides: [
|
|
47
61
|
opts.uiPath === null
|
|
48
62
|
? { files: [], rules: {} }
|
|
49
63
|
: {
|
|
50
64
|
files: [
|
|
51
|
-
`${opts.uiPath}/**/*.{js,jsx,mjs,ts,tsx,mts,cts}`.replaceAll('//', '/'),
|
|
65
|
+
`${path.resolve(process.cwd(), opts.uiPath)}/**/*.{js,jsx,mjs,ts,tsx,mts,cts}`.replaceAll('//', '/'),
|
|
52
66
|
],
|
|
53
67
|
rules: {
|
|
54
|
-
'react
|
|
68
|
+
'react/only-export-components': 'off',
|
|
55
69
|
},
|
|
56
70
|
},
|
|
57
71
|
],
|
|
58
72
|
});
|
|
59
73
|
}
|
|
60
74
|
export { defineConfig, nextConfig };
|
|
75
|
+
export default nextConfig();
|
|
61
76
|
//# sourceMappingURL=next.js.map
|
package/dist/next.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;AAc5D,MAAM,eAAe,GAAgB,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;AAEtE,SAAS,UAAU,CAAC,OAA8B;IAChD,MAAM,IAAI,GAAG,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IAEhD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAEnC,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,KAAK,CAAC;QAChB,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC;QACrC,KAAK,EAAE;YACL,4BAA4B,EAAE,MAAM;YACpC,+BAA+B,EAAE,MAAM;YACvC,2BAA2B,EAAE,MAAM;YACnC,kCAAkC,EAAE,MAAM;YAC1C,sDAAsD,EAAE,MAAM;YAC9D,oBAAoB,EAAE,MAAM;YAC5B,wBAAwB,EAAE,MAAM;YAChC,+BAA+B,EAAE,OAAO;YACxC,4BAA4B,EAAE,MAAM;YACpC,kCAAkC,EAAE,MAAM;YAC1C,wBAAwB,EAAE,OAAO;YACjC,kCAAkC,EAAE,MAAM;YAC1C,iBAAiB,EAAE,MAAM;YACzB,+BAA+B,EAAE,MAAM;YACvC,yBAAyB,EAAE,OAAO;YAClC,kCAAkC,EAAE,OAAO;YAC3C,mCAAmC,EAAE,OAAO;YAC5C,0BAA0B,EAAE,OAAO;YACnC,mCAAmC,EAAE,OAAO;YAC5C,oCAAoC,EAAE,OAAO;YAE7C,gEAAgE;YAChE,8BAA8B,EAAE;gBAC9B,MAAM;gBACN;oBACE,oFAAoF;oBACpF,gBAAgB,EAAE;wBAChB,0HAA0H;wBAC1H,sBAAsB;wBAEtB,SAAS;wBACT,eAAe;wBACf,YAAY;wBACZ,YAAY;wBACZ,SAAS;wBACT,iBAAiB;wBACjB,aAAa;wBACb,UAAU;wBACV,kBAAkB;wBAClB,UAAU;wBACV,kBAAkB;wBAClB,uBAAuB;wBACvB,kBAAkB;wBAClB,sBAAsB;qBACvB;iBACF;aACF;SACF;QACD,cAAc,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC;QACnE,SAAS,EAAE;YACT,IAAI,CAAC,MAAM,KAAK,IAAI;gBAClB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;gBAC1B,CAAC,CAAC;oBACE,KAAK,EAAE;wBACL,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,mCAAmC,CAAC,UAAU,CACvF,IAAI,EACJ,GAAG,CACJ;qBACF;oBACD,KAAK,EAAE;wBACL,8BAA8B,EAAE,KAAK;qBACtC;iBACF;SACN;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAqB,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,eAAe,UAAU,EAAE,CAAC"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { defineConfig, type OxlintConfig } from 'oxlint';
|
|
2
2
|
type NodeOptions = {};
|
|
3
|
-
declare function nodeConfig(
|
|
3
|
+
declare function nodeConfig(options?: Partial<NodeOptions>): {
|
|
4
4
|
extends: {
|
|
5
|
-
plugins: ("unicorn" | "typescript")[];
|
|
5
|
+
plugins: ("unicorn" | "typescript" | "import")[];
|
|
6
6
|
jsPlugins: never[];
|
|
7
7
|
categories: {
|
|
8
|
-
correctness: "
|
|
8
|
+
correctness: "error";
|
|
9
|
+
suspicious: "warn";
|
|
10
|
+
pedantic: "off";
|
|
11
|
+
perf: "warn";
|
|
12
|
+
style: "warn";
|
|
13
|
+
restriction: "warn";
|
|
14
|
+
nursery: "off";
|
|
9
15
|
};
|
|
10
16
|
env: {
|
|
11
17
|
builtin: true;
|
|
@@ -14,115 +20,332 @@ declare function nodeConfig(_options?: Partial<NodeOptions>): {
|
|
|
14
20
|
typeAware: true;
|
|
15
21
|
};
|
|
16
22
|
rules: {
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'no-
|
|
22
|
-
'no-
|
|
23
|
-
'no-
|
|
24
|
-
'no-
|
|
25
|
-
'no-
|
|
26
|
-
'no-
|
|
27
|
-
'no-constant-
|
|
28
|
-
'no-
|
|
29
|
-
'no-
|
|
30
|
-
'no-
|
|
31
|
-
'no-
|
|
32
|
-
'no-dupe-else-if': "error";
|
|
33
|
-
'no-
|
|
34
|
-
'no-
|
|
35
|
-
'no-empty': "error";
|
|
36
|
-
'no-empty-
|
|
37
|
-
'no-empty-
|
|
38
|
-
'no-
|
|
39
|
-
'no-
|
|
40
|
-
'no-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
'no-
|
|
44
|
-
'no-
|
|
45
|
-
'no-
|
|
46
|
-
'no-
|
|
47
|
-
'no-
|
|
48
|
-
'no-
|
|
49
|
-
'no-
|
|
50
|
-
'no-nonoctal-decimal-escape': "error";
|
|
51
|
-
'no-obj-calls': "error";
|
|
52
|
-
'no-prototype-builtins': "error";
|
|
53
|
-
'no-redeclare': "error";
|
|
54
|
-
'no-regex-spaces': "error";
|
|
55
|
-
'no-self-assign': "error";
|
|
56
|
-
'no-
|
|
57
|
-
'no-
|
|
58
|
-
'no-
|
|
59
|
-
'no-
|
|
60
|
-
'no-
|
|
61
|
-
'no-
|
|
62
|
-
'no-
|
|
63
|
-
'no-
|
|
64
|
-
'no-
|
|
65
|
-
'no-
|
|
66
|
-
'no-
|
|
67
|
-
'no-
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
'no-
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
77
|
-
'no-
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
'
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
'
|
|
23
|
+
'eslint/no-var': "warn";
|
|
24
|
+
'eslint/prefer-const': "error";
|
|
25
|
+
'eslint/prefer-rest-params': "error";
|
|
26
|
+
'eslint/prefer-spread': "error";
|
|
27
|
+
'eslint/no-async-promise-executor': "error";
|
|
28
|
+
'eslint/no-case-declarations': "error";
|
|
29
|
+
'eslint/no-class-assign': "error";
|
|
30
|
+
'eslint/no-compare-neg-zero': "error";
|
|
31
|
+
'eslint/no-cond-assign': "error";
|
|
32
|
+
'eslint/no-const-assign': "error";
|
|
33
|
+
'eslint/no-constant-binary-expression': "error";
|
|
34
|
+
'eslint/no-constant-condition': "error";
|
|
35
|
+
'eslint/no-control-regex': "error";
|
|
36
|
+
'eslint/no-debugger': "error";
|
|
37
|
+
'eslint/no-delete-var': "error";
|
|
38
|
+
'eslint/no-dupe-else-if': "error";
|
|
39
|
+
'eslint/no-duplicate-case': "error";
|
|
40
|
+
'eslint/no-empty': "error";
|
|
41
|
+
'eslint/no-empty-character-class': "error";
|
|
42
|
+
'eslint/no-empty-pattern': "error";
|
|
43
|
+
'eslint/no-empty-static-block': "error";
|
|
44
|
+
'eslint/no-ex-assign': "error";
|
|
45
|
+
'eslint/no-extra-boolean-cast': "error";
|
|
46
|
+
'eslint/no-fallthrough': ["error", {
|
|
47
|
+
allowEmptyCase: boolean;
|
|
48
|
+
}];
|
|
49
|
+
'eslint/no-func-assign': "error";
|
|
50
|
+
'eslint/no-global-assign': "error";
|
|
51
|
+
'eslint/no-import-assign': "error";
|
|
52
|
+
'eslint/no-invalid-regexp': "error";
|
|
53
|
+
'eslint/no-irregular-whitespace': "error";
|
|
54
|
+
'eslint/no-loss-of-precision': "error";
|
|
55
|
+
'eslint/no-misleading-character-class': "error";
|
|
56
|
+
'eslint/no-nonoctal-decimal-escape': "error";
|
|
57
|
+
'eslint/no-obj-calls': "error";
|
|
58
|
+
'eslint/no-prototype-builtins': "error";
|
|
59
|
+
'eslint/no-redeclare': "error";
|
|
60
|
+
'eslint/no-regex-spaces': "error";
|
|
61
|
+
'eslint/no-self-assign': "error";
|
|
62
|
+
'eslint/no-shadow-restricted-names': "error";
|
|
63
|
+
'eslint/no-sparse-arrays': "error";
|
|
64
|
+
'eslint/no-unexpected-multiline': "error";
|
|
65
|
+
'eslint/no-unsafe-finally': "error";
|
|
66
|
+
'eslint/no-unsafe-negation': "error";
|
|
67
|
+
'eslint/no-unsafe-optional-chaining': "error";
|
|
68
|
+
'eslint/no-unused-labels': "error";
|
|
69
|
+
'eslint/no-unused-private-class-members': "error";
|
|
70
|
+
'eslint/no-unused-vars': "warn";
|
|
71
|
+
'eslint/no-useless-backreference': "error";
|
|
72
|
+
'eslint/no-useless-catch': "error";
|
|
73
|
+
'eslint/no-useless-escape': "error";
|
|
74
|
+
'eslint/require-yield': "error";
|
|
75
|
+
'eslint/use-isnan': "error";
|
|
76
|
+
'eslint/valid-typeof': "error";
|
|
77
|
+
'eslint/no-unused-expressions': "warn";
|
|
78
|
+
'typescript/ban-ts-comment': "error";
|
|
79
|
+
'typescript/no-duplicate-enum-values': "off";
|
|
80
|
+
'typescript/no-empty-object-type': "error";
|
|
81
|
+
'typescript/no-explicit-any': "error";
|
|
82
|
+
'typescript/no-extra-non-null-assertion': "error";
|
|
83
|
+
'typescript/no-misused-new': "error";
|
|
84
|
+
'typescript/no-namespace': "error";
|
|
85
|
+
'typescript/no-non-null-asserted-optional-chain': "error";
|
|
86
|
+
'typescript/no-require-imports': "error";
|
|
87
|
+
'typescript/no-this-alias': "error";
|
|
88
|
+
'typescript/no-unnecessary-type-constraint': "error";
|
|
89
|
+
'typescript/no-unsafe-declaration-merging': "error";
|
|
90
|
+
'typescript/no-unsafe-function-type': "error";
|
|
91
|
+
'typescript/no-wrapper-object-types': "error";
|
|
92
|
+
'typescript/prefer-as-const': "error";
|
|
93
|
+
'typescript/triple-slash-reference': "error";
|
|
94
|
+
'typescript/explicit-member-accessibility': ["warn", {
|
|
95
|
+
accessibility: "no-public";
|
|
96
|
+
}];
|
|
97
|
+
'eslint/id-length': "off";
|
|
98
|
+
'eslint/sort-keys': "off";
|
|
99
|
+
'eslint/capitalized-comments': "off";
|
|
100
|
+
'eslint/func-style': "off";
|
|
101
|
+
'eslint/complexity': "off";
|
|
102
|
+
'eslint/max-params': "off";
|
|
103
|
+
'eslint/no-ternary': "off";
|
|
104
|
+
'eslint/curly': "warn";
|
|
105
|
+
'typescript/consistent-type-definitions': ["warn", "type"];
|
|
106
|
+
'eslint/max-statements': "off";
|
|
107
|
+
'typescript/consistent-return': "off";
|
|
108
|
+
'unicorn/switch-case-braces': "warn";
|
|
109
|
+
'typescript/prefer-regexp-exec': "warn";
|
|
110
|
+
'eslint/init-declarations': "off";
|
|
111
|
+
'unicorn/no-null': "off";
|
|
112
|
+
'eslint/no-undefined': "off";
|
|
113
|
+
'eslint/no-console': "off";
|
|
114
|
+
'eslint/no-continue': "off";
|
|
115
|
+
'eslint/no-implicit-coercion': ["warn", {
|
|
116
|
+
allow: string[];
|
|
117
|
+
}];
|
|
118
|
+
'eslint/no-plusplus': "off";
|
|
119
|
+
'eslint/no-void': "off";
|
|
120
|
+
'eslint/no-nested-ternary': "off";
|
|
121
|
+
'eslint/no-empty-function': ["warn", {
|
|
122
|
+
allow: string[];
|
|
123
|
+
}];
|
|
124
|
+
'unicorn/no-instanceof-builtins': "off";
|
|
125
|
+
'unicorn/prefer-spread': "off";
|
|
126
|
+
'eslint/new-cap': "off";
|
|
127
|
+
'unicorn/no-await-expression-member': "off";
|
|
128
|
+
'eslint/no-duplicate-imports': ["warn", {
|
|
129
|
+
allowSeparateTypeImports: boolean;
|
|
130
|
+
}];
|
|
131
|
+
'import/no-named-export': "off";
|
|
132
|
+
'import/no-default-export': "off";
|
|
133
|
+
'import/prefer-default-export': "off";
|
|
134
|
+
'import/no-namespace': "off";
|
|
135
|
+
'import/exports-last': "off";
|
|
136
|
+
'import/no-unassigned-import': "off";
|
|
137
|
+
'import/group-exports': "off";
|
|
138
|
+
'import/consistent-type-specifier-style': "off";
|
|
139
|
+
'unicorn/no-new-array': "off";
|
|
140
|
+
'eslint/no-array-constructor': "warn";
|
|
141
|
+
'typescript/explicit-function-return-type': "off";
|
|
142
|
+
'typescript/explicit-module-boundary-types': "off";
|
|
143
|
+
'unicorn/no-anonymous-default-export': "off";
|
|
144
|
+
'eslint/sort-imports': "off";
|
|
145
|
+
'import/no-relative-parent-imports': "off";
|
|
146
|
+
'eslint/no-magic-numbers': "off";
|
|
147
|
+
'unicorn/prefer-modern-math-apis': "off";
|
|
148
|
+
'eslint/no-use-before-define': "off";
|
|
149
|
+
'eslint/constructor-super': "off";
|
|
150
|
+
'eslint/getter-return': "off";
|
|
151
|
+
'eslint/no-dupe-class-members': "off";
|
|
152
|
+
'eslint/no-dupe-keys': "off";
|
|
153
|
+
'eslint/no-new-native-nonconstructor': "off";
|
|
154
|
+
'eslint/no-setter-return': "off";
|
|
155
|
+
'eslint/no-this-before-super': "off";
|
|
156
|
+
'eslint/no-undef': "off";
|
|
157
|
+
'eslint/no-unreachable': "off";
|
|
158
|
+
'eslint/no-with': "off";
|
|
159
|
+
'unicorn/no-nested-ternary': "off";
|
|
160
|
+
'oxc/no-optional-chaining': "off";
|
|
161
|
+
'oxc/no-rest-spread-properties': "off";
|
|
162
|
+
'oxc/no-async-await': "off";
|
|
95
163
|
};
|
|
96
|
-
overrides: {
|
|
97
|
-
files: string[];
|
|
98
|
-
rules: {
|
|
99
|
-
'constructor-super': "off";
|
|
100
|
-
'getter-return': "off";
|
|
101
|
-
'no-class-assign': "off";
|
|
102
|
-
'no-const-assign': "off";
|
|
103
|
-
'no-dupe-class-members': "off";
|
|
104
|
-
'no-dupe-keys': "off";
|
|
105
|
-
'no-func-assign': "off";
|
|
106
|
-
'no-import-assign': "off";
|
|
107
|
-
'no-new-native-nonconstructor': "off";
|
|
108
|
-
'no-obj-calls': "off";
|
|
109
|
-
'no-redeclare': "off";
|
|
110
|
-
'no-setter-return': "off";
|
|
111
|
-
'no-this-before-super': "off";
|
|
112
|
-
'no-undef': "off";
|
|
113
|
-
'no-unreachable': "off";
|
|
114
|
-
'no-unsafe-negation': "off";
|
|
115
|
-
'no-var': "error";
|
|
116
|
-
'no-with': "off";
|
|
117
|
-
'prefer-const': "error";
|
|
118
|
-
'prefer-rest-params': "error";
|
|
119
|
-
'prefer-spread': "error";
|
|
120
|
-
};
|
|
121
|
-
}[];
|
|
122
164
|
}[];
|
|
165
|
+
plugins: ("unicorn" | "typescript" | "import")[];
|
|
123
166
|
env: {
|
|
124
167
|
node: true;
|
|
125
168
|
};
|
|
169
|
+
rules: {
|
|
170
|
+
'eslint/no-underscore-dangle': ["warn", {
|
|
171
|
+
allow: string[];
|
|
172
|
+
}];
|
|
173
|
+
'no-nodejs-modules': "off";
|
|
174
|
+
};
|
|
126
175
|
};
|
|
127
176
|
export { type OxlintConfig, defineConfig, nodeConfig };
|
|
177
|
+
declare const _default: {
|
|
178
|
+
extends: {
|
|
179
|
+
plugins: ("unicorn" | "typescript" | "import")[];
|
|
180
|
+
jsPlugins: never[];
|
|
181
|
+
categories: {
|
|
182
|
+
correctness: "error";
|
|
183
|
+
suspicious: "warn";
|
|
184
|
+
pedantic: "off";
|
|
185
|
+
perf: "warn";
|
|
186
|
+
style: "warn";
|
|
187
|
+
restriction: "warn";
|
|
188
|
+
nursery: "off";
|
|
189
|
+
};
|
|
190
|
+
env: {
|
|
191
|
+
builtin: true;
|
|
192
|
+
};
|
|
193
|
+
options: {
|
|
194
|
+
typeAware: true;
|
|
195
|
+
};
|
|
196
|
+
rules: {
|
|
197
|
+
'eslint/no-var': "warn";
|
|
198
|
+
'eslint/prefer-const': "error";
|
|
199
|
+
'eslint/prefer-rest-params': "error";
|
|
200
|
+
'eslint/prefer-spread': "error";
|
|
201
|
+
'eslint/no-async-promise-executor': "error";
|
|
202
|
+
'eslint/no-case-declarations': "error";
|
|
203
|
+
'eslint/no-class-assign': "error";
|
|
204
|
+
'eslint/no-compare-neg-zero': "error";
|
|
205
|
+
'eslint/no-cond-assign': "error";
|
|
206
|
+
'eslint/no-const-assign': "error";
|
|
207
|
+
'eslint/no-constant-binary-expression': "error";
|
|
208
|
+
'eslint/no-constant-condition': "error";
|
|
209
|
+
'eslint/no-control-regex': "error";
|
|
210
|
+
'eslint/no-debugger': "error";
|
|
211
|
+
'eslint/no-delete-var': "error";
|
|
212
|
+
'eslint/no-dupe-else-if': "error";
|
|
213
|
+
'eslint/no-duplicate-case': "error";
|
|
214
|
+
'eslint/no-empty': "error";
|
|
215
|
+
'eslint/no-empty-character-class': "error";
|
|
216
|
+
'eslint/no-empty-pattern': "error";
|
|
217
|
+
'eslint/no-empty-static-block': "error";
|
|
218
|
+
'eslint/no-ex-assign': "error";
|
|
219
|
+
'eslint/no-extra-boolean-cast': "error";
|
|
220
|
+
'eslint/no-fallthrough': ["error", {
|
|
221
|
+
allowEmptyCase: boolean;
|
|
222
|
+
}];
|
|
223
|
+
'eslint/no-func-assign': "error";
|
|
224
|
+
'eslint/no-global-assign': "error";
|
|
225
|
+
'eslint/no-import-assign': "error";
|
|
226
|
+
'eslint/no-invalid-regexp': "error";
|
|
227
|
+
'eslint/no-irregular-whitespace': "error";
|
|
228
|
+
'eslint/no-loss-of-precision': "error";
|
|
229
|
+
'eslint/no-misleading-character-class': "error";
|
|
230
|
+
'eslint/no-nonoctal-decimal-escape': "error";
|
|
231
|
+
'eslint/no-obj-calls': "error";
|
|
232
|
+
'eslint/no-prototype-builtins': "error";
|
|
233
|
+
'eslint/no-redeclare': "error";
|
|
234
|
+
'eslint/no-regex-spaces': "error";
|
|
235
|
+
'eslint/no-self-assign': "error";
|
|
236
|
+
'eslint/no-shadow-restricted-names': "error";
|
|
237
|
+
'eslint/no-sparse-arrays': "error";
|
|
238
|
+
'eslint/no-unexpected-multiline': "error";
|
|
239
|
+
'eslint/no-unsafe-finally': "error";
|
|
240
|
+
'eslint/no-unsafe-negation': "error";
|
|
241
|
+
'eslint/no-unsafe-optional-chaining': "error";
|
|
242
|
+
'eslint/no-unused-labels': "error";
|
|
243
|
+
'eslint/no-unused-private-class-members': "error";
|
|
244
|
+
'eslint/no-unused-vars': "warn";
|
|
245
|
+
'eslint/no-useless-backreference': "error";
|
|
246
|
+
'eslint/no-useless-catch': "error";
|
|
247
|
+
'eslint/no-useless-escape': "error";
|
|
248
|
+
'eslint/require-yield': "error";
|
|
249
|
+
'eslint/use-isnan': "error";
|
|
250
|
+
'eslint/valid-typeof': "error";
|
|
251
|
+
'eslint/no-unused-expressions': "warn";
|
|
252
|
+
'typescript/ban-ts-comment': "error";
|
|
253
|
+
'typescript/no-duplicate-enum-values': "off";
|
|
254
|
+
'typescript/no-empty-object-type': "error";
|
|
255
|
+
'typescript/no-explicit-any': "error";
|
|
256
|
+
'typescript/no-extra-non-null-assertion': "error";
|
|
257
|
+
'typescript/no-misused-new': "error";
|
|
258
|
+
'typescript/no-namespace': "error";
|
|
259
|
+
'typescript/no-non-null-asserted-optional-chain': "error";
|
|
260
|
+
'typescript/no-require-imports': "error";
|
|
261
|
+
'typescript/no-this-alias': "error";
|
|
262
|
+
'typescript/no-unnecessary-type-constraint': "error";
|
|
263
|
+
'typescript/no-unsafe-declaration-merging': "error";
|
|
264
|
+
'typescript/no-unsafe-function-type': "error";
|
|
265
|
+
'typescript/no-wrapper-object-types': "error";
|
|
266
|
+
'typescript/prefer-as-const': "error";
|
|
267
|
+
'typescript/triple-slash-reference': "error";
|
|
268
|
+
'typescript/explicit-member-accessibility': ["warn", {
|
|
269
|
+
accessibility: "no-public";
|
|
270
|
+
}];
|
|
271
|
+
'eslint/id-length': "off";
|
|
272
|
+
'eslint/sort-keys': "off";
|
|
273
|
+
'eslint/capitalized-comments': "off";
|
|
274
|
+
'eslint/func-style': "off";
|
|
275
|
+
'eslint/complexity': "off";
|
|
276
|
+
'eslint/max-params': "off";
|
|
277
|
+
'eslint/no-ternary': "off";
|
|
278
|
+
'eslint/curly': "warn";
|
|
279
|
+
'typescript/consistent-type-definitions': ["warn", "type"];
|
|
280
|
+
'eslint/max-statements': "off";
|
|
281
|
+
'typescript/consistent-return': "off";
|
|
282
|
+
'unicorn/switch-case-braces': "warn";
|
|
283
|
+
'typescript/prefer-regexp-exec': "warn";
|
|
284
|
+
'eslint/init-declarations': "off";
|
|
285
|
+
'unicorn/no-null': "off";
|
|
286
|
+
'eslint/no-undefined': "off";
|
|
287
|
+
'eslint/no-console': "off";
|
|
288
|
+
'eslint/no-continue': "off";
|
|
289
|
+
'eslint/no-implicit-coercion': ["warn", {
|
|
290
|
+
allow: string[];
|
|
291
|
+
}];
|
|
292
|
+
'eslint/no-plusplus': "off";
|
|
293
|
+
'eslint/no-void': "off";
|
|
294
|
+
'eslint/no-nested-ternary': "off";
|
|
295
|
+
'eslint/no-empty-function': ["warn", {
|
|
296
|
+
allow: string[];
|
|
297
|
+
}];
|
|
298
|
+
'unicorn/no-instanceof-builtins': "off";
|
|
299
|
+
'unicorn/prefer-spread': "off";
|
|
300
|
+
'eslint/new-cap': "off";
|
|
301
|
+
'unicorn/no-await-expression-member': "off";
|
|
302
|
+
'eslint/no-duplicate-imports': ["warn", {
|
|
303
|
+
allowSeparateTypeImports: boolean;
|
|
304
|
+
}];
|
|
305
|
+
'import/no-named-export': "off";
|
|
306
|
+
'import/no-default-export': "off";
|
|
307
|
+
'import/prefer-default-export': "off";
|
|
308
|
+
'import/no-namespace': "off";
|
|
309
|
+
'import/exports-last': "off";
|
|
310
|
+
'import/no-unassigned-import': "off";
|
|
311
|
+
'import/group-exports': "off";
|
|
312
|
+
'import/consistent-type-specifier-style': "off";
|
|
313
|
+
'unicorn/no-new-array': "off";
|
|
314
|
+
'eslint/no-array-constructor': "warn";
|
|
315
|
+
'typescript/explicit-function-return-type': "off";
|
|
316
|
+
'typescript/explicit-module-boundary-types': "off";
|
|
317
|
+
'unicorn/no-anonymous-default-export': "off";
|
|
318
|
+
'eslint/sort-imports': "off";
|
|
319
|
+
'import/no-relative-parent-imports': "off";
|
|
320
|
+
'eslint/no-magic-numbers': "off";
|
|
321
|
+
'unicorn/prefer-modern-math-apis': "off";
|
|
322
|
+
'eslint/no-use-before-define': "off";
|
|
323
|
+
'eslint/constructor-super': "off";
|
|
324
|
+
'eslint/getter-return': "off";
|
|
325
|
+
'eslint/no-dupe-class-members': "off";
|
|
326
|
+
'eslint/no-dupe-keys': "off";
|
|
327
|
+
'eslint/no-new-native-nonconstructor': "off";
|
|
328
|
+
'eslint/no-setter-return': "off";
|
|
329
|
+
'eslint/no-this-before-super': "off";
|
|
330
|
+
'eslint/no-undef': "off";
|
|
331
|
+
'eslint/no-unreachable': "off";
|
|
332
|
+
'eslint/no-with': "off";
|
|
333
|
+
'unicorn/no-nested-ternary': "off";
|
|
334
|
+
'oxc/no-optional-chaining': "off";
|
|
335
|
+
'oxc/no-rest-spread-properties': "off";
|
|
336
|
+
'oxc/no-async-await': "off";
|
|
337
|
+
};
|
|
338
|
+
}[];
|
|
339
|
+
plugins: ("unicorn" | "typescript" | "import")[];
|
|
340
|
+
env: {
|
|
341
|
+
node: true;
|
|
342
|
+
};
|
|
343
|
+
rules: {
|
|
344
|
+
'eslint/no-underscore-dangle': ["warn", {
|
|
345
|
+
allow: string[];
|
|
346
|
+
}];
|
|
347
|
+
'no-nodejs-modules': "off";
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
export default _default;
|
|
128
351
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBjD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,wBAA4B"}
|
package/dist/node.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { defineConfig } from 'oxlint';
|
|
2
2
|
import { baseConfig } from './base.js';
|
|
3
3
|
// const DEFAULT_OPTIONS: NodeOptions = {};
|
|
4
|
-
function nodeConfig(
|
|
4
|
+
function nodeConfig(options) {
|
|
5
5
|
// const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
6
|
+
const base = baseConfig(options);
|
|
6
7
|
return defineConfig({
|
|
7
|
-
extends: [
|
|
8
|
+
extends: [base],
|
|
9
|
+
// when changing plugins the parent plugins need to be extended, otherwise they are overridden
|
|
10
|
+
plugins: base.plugins,
|
|
8
11
|
env: {
|
|
9
12
|
node: true,
|
|
10
13
|
},
|
|
14
|
+
rules: {
|
|
15
|
+
'eslint/no-underscore-dangle': [
|
|
16
|
+
'warn',
|
|
17
|
+
{ allow: ['__dirname', '__filename'] },
|
|
18
|
+
],
|
|
19
|
+
'no-nodejs-modules': 'off',
|
|
20
|
+
},
|
|
11
21
|
});
|
|
12
22
|
}
|
|
13
23
|
export { defineConfig, nodeConfig };
|
|
24
|
+
export default nodeConfig();
|
|
14
25
|
//# sourceMappingURL=node.js.map
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,2CAA2C;AAE3C,SAAS,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,2CAA2C;AAE3C,SAAS,UAAU,CAAC,OAA8B;IAChD,mDAAmD;IAEnD,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjC,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,IAAI,CAAC;QACf,8FAA8F;QAC9F,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,EAAE;YACH,IAAI,EAAE,IAAI;SACX;QAED,KAAK,EAAE;YACL,6BAA6B,EAAE;gBAC7B,MAAM;gBACN,EAAE,KAAK,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE;aACvC;YACD,mBAAmB,EAAE,KAAK;SAC3B;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAqB,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,eAAe,UAAU,EAAE,CAAC"}
|