@ocavue/eslint-config 3.8.2 → 3.8.4
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/package-json.d.ts +2 -2
- package/dist/package-json.d.ts.map +1 -1
- package/dist/package-json.js +13 -8
- package/dist/package-json.js.map +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +16 -8
- package/dist/react.js.map +1 -1
- package/package.json +6 -6
package/dist/package-json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Config } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Sort package.json keys
|
|
4
4
|
*/
|
|
5
|
-
export declare function packageJson():
|
|
5
|
+
export declare function packageJson(): Config[];
|
|
6
6
|
//# sourceMappingURL=package-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,EAAE,CAuEtC"}
|
package/dist/package-json.js
CHANGED
|
@@ -3,22 +3,27 @@ import pkgJson from 'eslint-plugin-package-json';
|
|
|
3
3
|
* Sort package.json keys
|
|
4
4
|
*/
|
|
5
5
|
export function packageJson() {
|
|
6
|
+
const pkgJsonConfig = pkgJson.configs.recommended;
|
|
6
7
|
const config = {
|
|
7
|
-
...
|
|
8
|
+
...pkgJsonConfig,
|
|
8
9
|
rules: {
|
|
9
|
-
...
|
|
10
|
+
...pkgJsonConfig.rules,
|
|
10
11
|
'package-json/no-empty-fields': 'off',
|
|
11
|
-
'package-json/
|
|
12
|
-
'package-json/require-description': 'warn',
|
|
12
|
+
'package-json/require-description': 'off',
|
|
13
13
|
'package-json/sort-collections': [
|
|
14
14
|
'warn',
|
|
15
15
|
[
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'peerDependencies',
|
|
16
|
+
// Copied from the link below but remove "scripts" because we don't
|
|
17
|
+
// want to sort scripts
|
|
18
|
+
// https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/v0.88.1/src/rules/sort-collections.ts#L7
|
|
20
19
|
'config',
|
|
20
|
+
'dependencies',
|
|
21
|
+
'devDependencies',
|
|
21
22
|
'exports',
|
|
23
|
+
'optionalDependencies',
|
|
24
|
+
'overrides',
|
|
25
|
+
'peerDependencies',
|
|
26
|
+
'peerDependenciesMeta',
|
|
22
27
|
],
|
|
23
28
|
],
|
|
24
29
|
'package-json/order-properties': [
|
package/dist/package-json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAIhD;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,aAAa,GAAW,OAAO,CAAC,OAAO,CAAC,WAAW,CAAA;IACzD,MAAM,MAAM,GAAW;QACrB,GAAG,aAAa;QAChB,KAAK,EAAE;YACL,GAAG,aAAa,CAAC,KAAK;YACtB,8BAA8B,EAAE,KAAK;YACrC,kCAAkC,EAAE,KAAK;YACzC,+BAA+B,EAAE;gBAC/B,MAAM;gBACN;oBACE,mEAAmE;oBACnE,uBAAuB;oBACvB,8GAA8G;oBAC9G,QAAQ;oBACR,cAAc;oBACd,iBAAiB;oBACjB,SAAS;oBACT,sBAAsB;oBACtB,WAAW;oBACX,kBAAkB;oBAClB,sBAAsB;iBACvB;aACF;YACD,+BAA+B,EAAE;gBAC/B,MAAM;gBACN;oBACE,KAAK,EAAE;wBACL,MAAM;wBACN,aAAa;wBACb,WAAW;wBACX,MAAM;wBACN,SAAS;wBACT,SAAS;wBACT,gBAAgB;wBAChB,aAAa;wBACb,QAAQ;wBACR,SAAS;wBACT,SAAS;wBACT,UAAU;wBACV,YAAY;wBACZ,MAAM;wBACN,aAAa;wBACb,UAAU;wBACV,YAAY;wBACZ,aAAa;wBACb,MAAM;wBACN,QAAQ;wBACR,OAAO;wBACP,OAAO;wBACP,SAAS;wBACT,eAAe;wBACf,KAAK;wBACL,MAAM;wBACN,OAAO;wBACP,SAAS;wBACT,SAAS;wBACT,cAAc;wBACd,kBAAkB;wBAClB,sBAAsB;wBACtB,sBAAsB;wBACtB,iBAAiB;wBACjB,eAAe;wBACf,WAAW;wBACX,aAAa;qBACd;iBACF;aACF;SACF;KACF,CAAA;IACD,OAAO,CAAC,MAAM,CAAC,CAAA;AACjB,CAAC"}
|
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE,CA8CtD"}
|
package/dist/react.js
CHANGED
|
@@ -3,12 +3,15 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
|
3
3
|
import { resolveReactOptions } from './options.js';
|
|
4
4
|
export function react(options) {
|
|
5
5
|
const { files, reactCompiler, version } = resolveReactOptions(options);
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const reactConfig = eslintReact.configs['recommended-typescript'];
|
|
7
|
+
const reactHooksRecommendedConfig = reactHooksPlugin.configs.flat['recommended'];
|
|
8
|
+
const reactHooksRecommendedCompilerConfig = reactHooksPlugin.configs.flat['recommended-latest'];
|
|
9
|
+
const reactHooksConfig = reactCompiler
|
|
10
|
+
? reactHooksRecommendedCompilerConfig
|
|
11
|
+
: reactHooksRecommendedConfig;
|
|
9
12
|
const configs = [
|
|
10
13
|
{
|
|
11
|
-
...
|
|
14
|
+
...reactConfig,
|
|
12
15
|
name: 'react',
|
|
13
16
|
files: files,
|
|
14
17
|
settings: {
|
|
@@ -17,18 +20,23 @@ export function react(options) {
|
|
|
17
20
|
},
|
|
18
21
|
},
|
|
19
22
|
rules: {
|
|
20
|
-
...
|
|
23
|
+
...reactConfig.rules,
|
|
21
24
|
'@eslint-react/dom/no-flush-sync': 'off',
|
|
22
25
|
'@eslint-react/web-api/no-leaked-event-listener': 'off',
|
|
23
26
|
'@eslint-react/no-array-index-key': 'off',
|
|
27
|
+
'@eslint-react/naming-convention/context-name': 'off',
|
|
24
28
|
},
|
|
25
29
|
},
|
|
26
30
|
{
|
|
27
|
-
...
|
|
28
|
-
? reactHooksRecommendedCompiler
|
|
29
|
-
: reactHooksRecommended),
|
|
31
|
+
...reactHooksConfig,
|
|
30
32
|
name: 'react-hooks',
|
|
31
33
|
files: files,
|
|
34
|
+
rules: {
|
|
35
|
+
...reactHooksConfig.rules,
|
|
36
|
+
// Disable this rule because of https://github.com/facebook/react/issues/34775
|
|
37
|
+
// TODO: Enable this when the issue is fixed.
|
|
38
|
+
'react-hooks/refs': 'off',
|
|
39
|
+
},
|
|
32
40
|
},
|
|
33
41
|
];
|
|
34
42
|
return configs;
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,gBAAgB,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAA;AAGrE,MAAM,UAAU,KAAK,CAAC,OAAsB;IAC1C,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAEtE,MAAM,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,gBAAgB,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAA;AAGrE,MAAM,UAAU,KAAK,CAAC,OAAsB;IAC1C,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAEtE,MAAM,WAAW,GAAW,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAA;IAEzE,MAAM,2BAA2B,GAC/B,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC9C,MAAM,mCAAmC,GACvC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;IACrD,MAAM,gBAAgB,GAAW,aAAa;QAC5C,CAAC,CAAC,mCAAmC;QACrC,CAAC,CAAC,2BAA2B,CAAA;IAE/B,MAAM,OAAO,GAAa;QACxB;YACE,GAAG,WAAW;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE;gBACR,SAAS,EAAE;oBACT,OAAO,EAAE,OAAO;iBACjB;aACF;YACD,KAAK,EAAE;gBACL,GAAG,WAAW,CAAC,KAAK;gBACpB,iCAAiC,EAAE,KAAK;gBACxC,gDAAgD,EAAE,KAAK;gBACvD,kCAAkC,EAAE,KAAK;gBACzC,8CAA8C,EAAE,KAAK;aACtD;SACF;QAED;YACE,GAAG,gBAAgB;YACnB,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE;gBACL,GAAG,gBAAgB,CAAC,KAAK;gBACzB,8EAA8E;gBAC9E,6CAA6C;gBAC7C,kBAAkB,EAAE,KAAK;aAC1B;SACF;KACF,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocavue/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.8.
|
|
4
|
+
"version": "3.8.4",
|
|
5
5
|
"description": "Opinionated ESLint config preset",
|
|
6
6
|
"author": "ocavue <ocavue@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@eslint-react/eslint-plugin": "^2.
|
|
31
|
+
"@eslint-react/eslint-plugin": "^2.5.1",
|
|
32
32
|
"@eslint/js": "^9.39.2",
|
|
33
33
|
"@eslint/markdown": "^7.5.1",
|
|
34
|
-
"@unocss/eslint-config": "^66.5.
|
|
34
|
+
"@unocss/eslint-config": "^66.5.12",
|
|
35
35
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
36
36
|
"eslint-config-prettier": "^10.1.8",
|
|
37
37
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
38
|
-
"eslint-plugin-antfu": "^3.1.
|
|
38
|
+
"eslint-plugin-antfu": "^3.1.3",
|
|
39
39
|
"eslint-plugin-command": "^3.4.0",
|
|
40
40
|
"eslint-plugin-import-x": "^4.16.1",
|
|
41
41
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
42
|
-
"eslint-plugin-package-json": "^0.
|
|
42
|
+
"eslint-plugin-package-json": "^0.88.1",
|
|
43
43
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
44
44
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
45
45
|
"eslint-plugin-vue": "^10.6.2",
|
|
46
46
|
"globals": "^16.5.0",
|
|
47
|
-
"typescript-eslint": "^8.
|
|
47
|
+
"typescript-eslint": "^8.52.0",
|
|
48
48
|
"vue-eslint-parser": "^10.2.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|