@agilebot/eslint-config 0.7.1 → 0.7.2
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/README.md +11 -0
- package/dist/{chunk-MQP5VK72.mjs → chunk-R26PCKQR.mjs} +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/index.js +5 -3
- package/dist/index.mjs +6 -4
- package/package.json +3 -3
package/README.md
CHANGED
@@ -9,9 +9,20 @@ npm install --save-dev eslint \
|
|
9
9
|
@agilebot/eslint-config
|
10
10
|
```
|
11
11
|
|
12
|
+
#### CommonJS
|
13
|
+
|
12
14
|
```js
|
13
15
|
// eslint.config.js
|
14
16
|
const { agilebot } = require('@agilebot/eslint-config');
|
15
17
|
|
16
18
|
module.exports = agilebot(__dirname);
|
17
19
|
```
|
20
|
+
|
21
|
+
#### ESM
|
22
|
+
|
23
|
+
```js
|
24
|
+
// eslint.config.mjs
|
25
|
+
import { agilebot } from '@agilebot/eslint-config';
|
26
|
+
|
27
|
+
export default agilebot(import.meta);
|
28
|
+
```
|
package/dist/cli.js
CHANGED
package/dist/cli.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.
|
2
|
+
* @license @agilebot/eslint-config v0.7.2
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -10,7 +10,7 @@
|
|
10
10
|
import {
|
11
11
|
CLI_NAME,
|
12
12
|
__require
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-R26PCKQR.mjs";
|
14
14
|
|
15
15
|
// src/cli/index.ts
|
16
16
|
import { isCI } from "@agilebot/eslint-utils";
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.
|
2
|
+
* @license @agilebot/eslint-config v0.7.2
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -618,6 +618,7 @@ function react(opts) {
|
|
618
618
|
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
619
619
|
"@eslint-react/dom/no-find-dom-node": "error",
|
620
620
|
"@eslint-react/dom/no-render-return-value": "error",
|
621
|
+
"@eslint-react/dom/no-unknown-property": "error",
|
621
622
|
// recommended rules from @eslint-react/hooks-extra
|
622
623
|
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
623
624
|
// recommended rules react-hooks
|
@@ -671,7 +672,6 @@ function reactJsOnly() {
|
|
671
672
|
"react/jsx-no-undef": "error",
|
672
673
|
"react/jsx-uses-react": "error",
|
673
674
|
"react/no-unescaped-entities": "error",
|
674
|
-
"react/no-unknown-property": "error",
|
675
675
|
"react/react-in-jsx-scope": "error",
|
676
676
|
"react/require-render-return": "error"
|
677
677
|
}
|
@@ -1016,8 +1016,10 @@ function factory(root, options) {
|
|
1016
1016
|
let rootDir;
|
1017
1017
|
if (typeof root === "string") {
|
1018
1018
|
rootDir = root;
|
1019
|
-
} else {
|
1019
|
+
} else if (root?.url) {
|
1020
1020
|
rootDir = import_node_path3.default.dirname((0, import_node_url.fileURLToPath)(root.url));
|
1021
|
+
} else {
|
1022
|
+
throw new Error("root must be a string or ImportMeta");
|
1021
1023
|
}
|
1022
1024
|
const tsconfigFiles = (0, import_eslint_utils3.findTsconfigFiles)(rootDir, {
|
1023
1025
|
absolute: true
|
package/dist/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.
|
2
|
+
* @license @agilebot/eslint-config v0.7.2
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -16,7 +16,7 @@ import {
|
|
16
16
|
VUE_GLOBS,
|
17
17
|
__dirname,
|
18
18
|
define_STANDARD_RULES_default
|
19
|
-
} from "./chunk-
|
19
|
+
} from "./chunk-R26PCKQR.mjs";
|
20
20
|
|
21
21
|
// src/factory/index.ts
|
22
22
|
import assert from "node:assert";
|
@@ -543,6 +543,7 @@ function react(opts) {
|
|
543
543
|
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
544
544
|
"@eslint-react/dom/no-find-dom-node": "error",
|
545
545
|
"@eslint-react/dom/no-render-return-value": "error",
|
546
|
+
"@eslint-react/dom/no-unknown-property": "error",
|
546
547
|
// recommended rules from @eslint-react/hooks-extra
|
547
548
|
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
548
549
|
// recommended rules react-hooks
|
@@ -596,7 +597,6 @@ function reactJsOnly() {
|
|
596
597
|
"react/jsx-no-undef": "error",
|
597
598
|
"react/jsx-uses-react": "error",
|
598
599
|
"react/no-unescaped-entities": "error",
|
599
|
-
"react/no-unknown-property": "error",
|
600
600
|
"react/react-in-jsx-scope": "error",
|
601
601
|
"react/require-render-return": "error"
|
602
602
|
}
|
@@ -939,8 +939,10 @@ function factory(root, options) {
|
|
939
939
|
let rootDir;
|
940
940
|
if (typeof root === "string") {
|
941
941
|
rootDir = root;
|
942
|
-
} else {
|
942
|
+
} else if (root?.url) {
|
943
943
|
rootDir = path2.dirname(fileURLToPath(root.url));
|
944
|
+
} else {
|
945
|
+
throw new Error("root must be a string or ImportMeta");
|
944
946
|
}
|
945
947
|
const tsconfigFiles = findTsconfigFiles(rootDir, {
|
946
948
|
absolute: true
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-config",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.2",
|
4
4
|
"description": "Agilebot's ESLint config",
|
5
5
|
"bin": {
|
6
6
|
"eslint-agilebot": "bin/eslint-agilebot"
|
@@ -58,7 +58,7 @@
|
|
58
58
|
"picocolors": "^1.1.0",
|
59
59
|
"vue-eslint-parser": "^9.4.3",
|
60
60
|
"yargs": "^17.7.2",
|
61
|
-
"@agilebot/eslint-utils": "0.7.
|
61
|
+
"@agilebot/eslint-utils": "0.7.2"
|
62
62
|
},
|
63
63
|
"devDependencies": {
|
64
64
|
"@types/yargs": "^17.0.33",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"eslint": "^8.57.0 || ^9.0.0",
|
69
|
-
"@agilebot/eslint-plugin": "0.7.
|
69
|
+
"@agilebot/eslint-plugin": "0.7.2"
|
70
70
|
},
|
71
71
|
"files": [
|
72
72
|
"bin",
|