@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/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: [reactConfig(options)],
9
- plugins: ['nextjs'],
10
+ extends: [react],
11
+ plugins: [...react.plugins, 'nextjs'],
10
12
  rules: {
11
- '@next/next/google-font-display': 'warn',
12
- '@next/next/google-font-preconnect': 'warn',
13
- '@next/next/next-script-for-ga': 'warn',
14
- '@next/next/no-async-client-component': 'warn',
15
- '@next/next/no-before-interactive-script-outside-document': 'warn',
16
- '@next/next/no-css-tags': 'warn',
17
- '@next/next/no-head-element': 'warn',
18
- '@next/next/no-html-link-for-pages': 'error',
19
- '@next/next/no-page-custom-font': 'warn',
20
- '@next/next/no-styled-jsx-in-document': 'warn',
21
- '@next/next/no-sync-scripts': 'error',
22
- '@next/next/no-title-in-document-head': 'warn',
23
- '@next/next/no-typos': 'warn',
24
- '@next/next/no-unwanted-polyfillio': 'warn',
25
- '@next/next/inline-script-id': 'error',
26
- '@next/next/no-assign-module-variable': 'error',
27
- '@next/next/no-document-import-in-page': 'error',
28
- '@next/next/no-duplicate-head': 'error',
29
- '@next/next/no-head-import-in-document': 'error',
30
- '@next/next/no-script-component-in-head': 'error',
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
- // https://github.com/ArnaudBarre/eslint-plugin-react-refresh?tab=readme-ov-file#next-config
36
- {
37
- files: ['**/*.{js,jsx,mjs,ts,tsx,mts,cts}'],
38
- rules: {
39
- 'react-refresh-js/only-export-components': [
40
- 'error',
41
- {
42
- allowExportNames: reactRefresh.configs.next.rules['react-refresh/only-export-components'][1]['allowExportNames'],
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-refresh-js/only-export-components': 'off',
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;AAC5D,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAcvD,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,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC,QAAQ,CAAC;QACnB,KAAK,EAAE;YACL,gCAAgC,EAAE,MAAM;YACxC,mCAAmC,EAAE,MAAM;YAC3C,+BAA+B,EAAE,MAAM;YACvC,sCAAsC,EAAE,MAAM;YAC9C,0DAA0D,EAAE,MAAM;YAClE,wBAAwB,EAAE,MAAM;YAChC,4BAA4B,EAAE,MAAM;YACpC,mCAAmC,EAAE,OAA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B;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(_options?: Partial<NodeOptions>): {
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: "off";
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
- 'constructor-super': "error";
18
- 'for-direction': "error";
19
- 'getter-return': "error";
20
- 'no-async-promise-executor': "error";
21
- 'no-case-declarations': "error";
22
- 'no-class-assign': "error";
23
- 'no-compare-neg-zero': "error";
24
- 'no-cond-assign': "error";
25
- 'no-const-assign': "error";
26
- 'no-constant-binary-expression': "error";
27
- 'no-constant-condition': "error";
28
- 'no-control-regex': "error";
29
- 'no-debugger': "error";
30
- 'no-delete-var': "error";
31
- 'no-dupe-class-members': "error";
32
- 'no-dupe-else-if': "error";
33
- 'no-dupe-keys': "error";
34
- 'no-duplicate-case': "error";
35
- 'no-empty': "error";
36
- 'no-empty-character-class': "error";
37
- 'no-empty-pattern': "error";
38
- 'no-empty-static-block': "error";
39
- 'no-ex-assign': "error";
40
- 'no-extra-boolean-cast': "error";
41
- 'no-fallthrough': "error";
42
- 'no-func-assign': "error";
43
- 'no-global-assign': "error";
44
- 'no-import-assign': "error";
45
- 'no-invalid-regexp': "error";
46
- 'no-irregular-whitespace': "error";
47
- 'no-loss-of-precision': "error";
48
- 'no-misleading-character-class': "error";
49
- 'no-new-native-nonconstructor': "error";
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-setter-return': "error";
57
- 'no-shadow-restricted-names': "error";
58
- 'no-sparse-arrays': "error";
59
- 'no-this-before-super': "error";
60
- 'no-undef': "error";
61
- 'no-unexpected-multiline': "error";
62
- 'no-unreachable': "error";
63
- 'no-unsafe-finally': "error";
64
- 'no-unsafe-negation': "error";
65
- 'no-unsafe-optional-chaining': "error";
66
- 'no-unused-labels': "error";
67
- 'no-unused-private-class-members': "error";
68
- 'no-unused-vars': "warn";
69
- 'no-useless-backreference': "error";
70
- 'no-useless-catch': "error";
71
- 'no-useless-escape': "error";
72
- 'no-with': "error";
73
- 'require-yield': "error";
74
- 'use-isnan': "error";
75
- 'valid-typeof': "error";
76
- '@typescript-eslint/ban-ts-comment': "error";
77
- 'no-array-constructor': "error";
78
- '@typescript-eslint/no-duplicate-enum-values': "error";
79
- '@typescript-eslint/no-empty-object-type': "error";
80
- '@typescript-eslint/no-explicit-any': "error";
81
- '@typescript-eslint/no-extra-non-null-assertion': "error";
82
- '@typescript-eslint/no-misused-new': "error";
83
- '@typescript-eslint/no-namespace': "error";
84
- '@typescript-eslint/no-non-null-asserted-optional-chain': "error";
85
- '@typescript-eslint/no-require-imports': "error";
86
- '@typescript-eslint/no-this-alias': "error";
87
- '@typescript-eslint/no-unnecessary-type-constraint': "error";
88
- '@typescript-eslint/no-unsafe-declaration-merging': "error";
89
- '@typescript-eslint/no-unsafe-function-type': "error";
90
- 'no-unused-expressions': "warn";
91
- '@typescript-eslint/no-wrapper-object-types': "error";
92
- '@typescript-eslint/prefer-as-const': "error";
93
- '@typescript-eslint/prefer-namespace-keyword': "error";
94
- '@typescript-eslint/triple-slash-reference': "error";
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
@@ -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,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,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(_options) {
4
+ function nodeConfig(options) {
5
5
  // const opts = { ...DEFAULT_OPTIONS, ...options };
6
+ const base = baseConfig(options);
6
7
  return defineConfig({
7
- extends: [baseConfig()],
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,QAA+B;IACjD,mDAAmD;IAEnD,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,UAAU,EAAE,CAAC;QACvB,GAAG,EAAE;YACH,IAAI,EAAE,IAAI;SACX;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAqB,YAAY,EAAE,UAAU,EAAE,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"}