@open-turo/eslint-config-typescript 11.0.6 → 11.0.7
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/.pre-commit-config.yaml +1 -1
- package/pack/open-turo-eslint-config-typescript-11.0.7.tgz +0 -0
- package/package.json +6 -6
- package/test/__snapshots__/test.spec.js.snap +2552 -0
- package/test/sample.ts +0 -0
- package/{test.js → test/test.spec.js} +10 -1
- package/pack/open-turo-eslint-config-typescript-11.0.6.tgz +0 -0
package/test/sample.ts
ADDED
|
File without changes
|
|
@@ -3,12 +3,21 @@ const { ESLint } = require("eslint");
|
|
|
3
3
|
|
|
4
4
|
describe("validate config", () => {
|
|
5
5
|
it(`load config file in ESLint to validate all rules are correct`, async () => {
|
|
6
|
-
const stringConfig = fs.readFileSync("./test.
|
|
6
|
+
const stringConfig = fs.readFileSync("./test/sample.ts", "utf8");
|
|
7
7
|
|
|
8
8
|
const cli = new ESLint({
|
|
9
9
|
overrideConfigFile: "./index.js",
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
+
const calculatedConfig =
|
|
13
|
+
await cli.calculateConfigForFile("./test/sample.ts");
|
|
14
|
+
|
|
15
|
+
// remove parser property from calculated config because it is env specific (fails in CI)
|
|
16
|
+
const { parser, ...calculatedConfigWithoutParserProperty } =
|
|
17
|
+
calculatedConfig;
|
|
18
|
+
// print all the rules
|
|
19
|
+
expect(calculatedConfigWithoutParserProperty).toMatchSnapshot();
|
|
20
|
+
|
|
12
21
|
const lintResult = await cli.lintText(stringConfig);
|
|
13
22
|
|
|
14
23
|
/**
|
|
Binary file
|