@4mbl/lint 0.0.0-alpha.c07b435 → 0.0.0-alpha.d2c640f
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 +106 -0
- package/bin/cli.js +31 -3
- package/dist/base.d.ts +296 -212
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +158 -108
- package/dist/base.js.map +1 -1
- package/dist/next.d.ts +538 -2
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +49 -37
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +311 -213
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +12 -2
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +325 -227
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +21 -7
- package/dist/react.js.map +1 -1
- package/package.json +6 -9
package/dist/next.js
CHANGED
|
@@ -2,50 +2,62 @@ import path from 'node:path';
|
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import { defineConfig } from 'oxlint';
|
|
4
4
|
import { reactConfig } from './react.js';
|
|
5
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
6
5
|
const DEFAULT_OPTIONS = { uiPath: 'src/components/ui/' };
|
|
7
6
|
function nextConfig(options) {
|
|
8
7
|
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
8
|
+
const react = reactConfig(options);
|
|
9
9
|
return defineConfig({
|
|
10
|
-
extends: [
|
|
11
|
-
plugins: ['nextjs'],
|
|
10
|
+
extends: [react],
|
|
11
|
+
plugins: [...react.plugins, 'nextjs'],
|
|
12
12
|
rules: {
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
},
|
|
34
|
-
ignorePatterns: ['.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
35
|
-
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',
|
|
36
33
|
// ignores warnings for special exports in page and layout files
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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',
|
|
46
55
|
],
|
|
47
56
|
},
|
|
48
|
-
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
ignorePatterns: ['.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
60
|
+
overrides: [
|
|
49
61
|
opts.uiPath === null
|
|
50
62
|
? { files: [], rules: {} }
|
|
51
63
|
: {
|
|
@@ -53,7 +65,7 @@ function nextConfig(options) {
|
|
|
53
65
|
`${path.resolve(process.cwd(), opts.uiPath)}/**/*.{js,jsx,mjs,ts,tsx,mts,cts}`.replaceAll('//', '/'),
|
|
54
66
|
],
|
|
55
67
|
rules: {
|
|
56
|
-
'react
|
|
68
|
+
'react/only-export-components': 'off',
|
|
57
69
|
},
|
|
58
70
|
},
|
|
59
71
|
],
|
package/dist/next.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM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