@code-pushup/eslint-plugin 0.44.2 → 0.45.0
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 +2 -2
- package/index.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Detected ESLint rules are mapped to Code PushUp audits. Audit reports are calcul
|
|
|
43
43
|
|
|
44
44
|
4. Add this plugin to the `plugins` array in your Code PushUp CLI config file (e.g. `code-pushup.config.js`).
|
|
45
45
|
|
|
46
|
-
Pass in the glob patterns for which files you wish to target (relative to `process.cwd()`).
|
|
46
|
+
Pass in the path to your ESLint config file, along with glob patterns for which files you wish to target (relative to `process.cwd()`).
|
|
47
47
|
|
|
48
48
|
```js
|
|
49
49
|
import eslintPlugin from '@code-pushup/eslint-plugin';
|
|
@@ -52,7 +52,7 @@ Detected ESLint rules are mapped to Code PushUp audits. Audit reports are calcul
|
|
|
52
52
|
// ...
|
|
53
53
|
plugins: [
|
|
54
54
|
// ...
|
|
55
|
-
await eslintPlugin(['src/**/*.js']),
|
|
55
|
+
await eslintPlugin({ eslintrc: '.eslintrc.js', patterns: ['src/**/*.js'] }),
|
|
56
56
|
],
|
|
57
57
|
};
|
|
58
58
|
```
|
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
|
|
5
5
|
// packages/plugin-eslint/package.json
|
|
6
6
|
var name = "@code-pushup/eslint-plugin";
|
|
7
|
-
var version = "0.
|
|
7
|
+
var version = "0.45.0";
|
|
8
8
|
|
|
9
9
|
// packages/plugin-eslint/src/lib/config.ts
|
|
10
10
|
import { z as z16 } from "zod";
|
|
@@ -1403,7 +1403,7 @@ function getLintFilePatterns(project) {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
function getEslintConfig(project) {
|
|
1405
1405
|
const options = project.targets?.["lint"]?.options;
|
|
1406
|
-
return options?.eslintConfig
|
|
1406
|
+
return options?.eslintConfig ?? `./${project.root}/.eslintrc.json`;
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
1409
|
// packages/plugin-eslint/src/lib/nx/projects-to-config.ts
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@code-pushup/utils": "0.
|
|
7
|
-
"@code-pushup/models": "0.
|
|
6
|
+
"@code-pushup/utils": "0.45.0",
|
|
7
|
+
"@code-pushup/models": "0.45.0",
|
|
8
8
|
"eslint": "^8.46.0",
|
|
9
9
|
"zod": "^3.22.4"
|
|
10
10
|
},
|