@open-turo/eslint-config-typescript 9.0.1 → 9.0.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/index.js
CHANGED
|
@@ -29,7 +29,7 @@ module.exports = {
|
|
|
29
29
|
"plugin:json/recommended",
|
|
30
30
|
"plugin:node/recommended",
|
|
31
31
|
"plugin:prettier/recommended",
|
|
32
|
-
"plugin:sonarjs/recommended",
|
|
32
|
+
"plugin:sonarjs/recommended-legacy",
|
|
33
33
|
"plugin:typescript-sort-keys/recommended",
|
|
34
34
|
"plugin:unicorn/recommended",
|
|
35
35
|
],
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"eslint": "8.57.0",
|
|
22
|
+
"jest": "29.7.0",
|
|
22
23
|
"prettier": "3.2.5"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"scripts": {
|
|
32
33
|
"build": "echo noop",
|
|
33
34
|
"lint": "echo noop",
|
|
34
|
-
"test": "
|
|
35
|
+
"test": "jest test.js"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"eslint": "^8.18.0",
|
|
@@ -41,5 +42,5 @@
|
|
|
41
42
|
"access": "public"
|
|
42
43
|
},
|
|
43
44
|
"repository": "https://github.com/open-turo/eslint-config-typescript",
|
|
44
|
-
"version": "9.0.
|
|
45
|
+
"version": "9.0.2"
|
|
45
46
|
}
|
package/test.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const { ESLint } = require("eslint");
|
|
3
|
+
|
|
4
|
+
describe("validate config", () => {
|
|
5
|
+
it(`load config file in ESLint to validate all rules are correct`, async () => {
|
|
6
|
+
const stringConfig = fs.readFileSync("./test.js", "utf8");
|
|
7
|
+
|
|
8
|
+
const cli = new ESLint({
|
|
9
|
+
overrideConfigFile: "./index.js",
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const lintResult = await cli.lintText(stringConfig);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* We just need to validate a value is returned.
|
|
16
|
+
* If there is an issue with the config, `cli.lintText` will error,
|
|
17
|
+
* and we will never hit this line so the test will fail.
|
|
18
|
+
*/
|
|
19
|
+
expect(lintResult).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
Binary file
|