@saashub/qoq-eslint-v9-ts-vitest 0.8.2 → 0.9.1
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/coverage/baseConfig.ts.html +1 -1
- package/coverage/clover.xml +2 -2
- package/coverage/eslintConfig.ts.html +1 -1
- package/coverage/index.html +1 -1
- package/package.json +9 -8
- package/qoq.config.js +0 -3
- package/rollup.config.mjs +0 -3
- package/src/baseConfig.spec.ts +0 -15
- package/src/baseConfig.ts +0 -21
- package/src/eslintConfig.spec.ts +0 -26
- package/src/eslintConfig.ts +0 -23
- package/src/index.ts +0 -4
- package/tsconfig.json +0 -7
- package/vitest.config.mjs +0 -3
@@ -133,7 +133,7 @@ export default config;
|
|
133
133
|
<div class='footer quiet pad2 space-top1 center small'>
|
134
134
|
Code coverage generated by
|
135
135
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
136
|
-
at 2024-09-
|
136
|
+
at 2024-09-11T13:17:41.629Z
|
137
137
|
</div>
|
138
138
|
<script src="prettify.js"></script>
|
139
139
|
<script>
|
package/coverage/clover.xml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<coverage generated="
|
3
|
-
<project timestamp="
|
2
|
+
<coverage generated="1726060661643" clover="3.2.0">
|
3
|
+
<project timestamp="1726060661644" name="All files">
|
4
4
|
<metrics statements="34" coveredstatements="34" conditionals="1" coveredconditionals="1" methods="1" coveredmethods="1" elements="36" coveredelements="36" complexity="0" loc="34" ncloc="34" packages="1" files="2" classes="2"/>
|
5
5
|
<file name="baseConfig.ts" path="/home/ladamczyk/Desktop/projects/qoq/packages/eslint-v9-ts-vitest/src/baseConfig.ts">
|
6
6
|
<metrics statements="18" coveredstatements="18" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
@@ -139,7 +139,7 @@ export default getEslintConfig();
|
|
139
139
|
<div class='footer quiet pad2 space-top1 center small'>
|
140
140
|
Code coverage generated by
|
141
141
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
142
|
-
at 2024-09-
|
142
|
+
at 2024-09-11T13:17:41.629Z
|
143
143
|
</div>
|
144
144
|
<script src="prettify.js"></script>
|
145
145
|
<script>
|
package/coverage/index.html
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
117
117
|
Code coverage generated by
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
119
|
-
at 2024-09-
|
119
|
+
at 2024-09-11T13:17:41.629Z
|
120
120
|
</div>
|
121
121
|
<script src="prettify.js"></script>
|
122
122
|
<script>
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@saashub/qoq-eslint-v9-ts-vitest",
|
3
3
|
"description": "Eslint flat config template for TS + Vitest",
|
4
4
|
"license": "MIT",
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.9.1",
|
6
6
|
"main": "./lib/index.cjs",
|
7
7
|
"module": "./lib/index.mjs",
|
8
8
|
"types": "./lib/index.d.js",
|
@@ -35,23 +35,24 @@
|
|
35
35
|
"scripts": {
|
36
36
|
"build": "rimraf ./lib && rollup -c --silent",
|
37
37
|
"test": "vitest run --coverage",
|
38
|
-
"qoq:check": "qoq check",
|
39
|
-
"qoq:fix": "qoq fix",
|
38
|
+
"qoq:check": "qoq --check",
|
39
|
+
"qoq:fix": "qoq --fix",
|
40
40
|
"inspect": "npm run build && eslint -c ./lib/eslintConfig.cjs --inspect-config"
|
41
41
|
},
|
42
42
|
"dependencies": {
|
43
|
-
"@saashub/qoq-eslint-v9-js-vitest": "^0.
|
44
|
-
"@saashub/qoq-eslint-v9-ts": "^0.
|
43
|
+
"@saashub/qoq-eslint-v9-js-vitest": "^0.9.1",
|
44
|
+
"@saashub/qoq-eslint-v9-ts": "^0.9.1",
|
45
45
|
"lodash": "4.17.21"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@rollup/plugin-typescript": "11.1.6",
|
49
|
-
"@saashub/qoq-cli": "^0.
|
49
|
+
"@saashub/qoq-cli": "^0.9.1",
|
50
50
|
"@types/eslint": "^9",
|
51
51
|
"@types/lodash": "4.17.7",
|
52
|
+
"@vitest/coverage-v8": "2.0.5",
|
52
53
|
"rimraf": "6.0.1",
|
53
54
|
"rollup": "4.21.2",
|
54
|
-
"typescript": "5.
|
55
|
+
"typescript": "5.6.2",
|
55
56
|
"vitest": "2.0.5"
|
56
57
|
},
|
57
58
|
"peerDependencies": {
|
@@ -70,5 +71,5 @@
|
|
70
71
|
"directory": "packages/eslint-v9-ts-vitest"
|
71
72
|
},
|
72
73
|
"homepage": "https://github.com/saashub-it/qoq/tree/master/packages/eslint-v9-ts-vitest",
|
73
|
-
"gitHead": "
|
74
|
+
"gitHead": "d7ef49cf88dd75739e57b1104173aff09f7a8f60"
|
74
75
|
}
|
package/qoq.config.js
DELETED
package/rollup.config.mjs
DELETED
package/src/baseConfig.spec.ts
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { ESLint } from 'eslint';
|
2
|
-
import { describe, test, expect } from 'vitest';
|
3
|
-
|
4
|
-
import baseConfig from './baseConfig';
|
5
|
-
|
6
|
-
describe('baseConfig', () => {
|
7
|
-
test('can constuct Eslint object', () => {
|
8
|
-
expect(
|
9
|
-
() =>
|
10
|
-
new ESLint({
|
11
|
-
baseConfig,
|
12
|
-
})
|
13
|
-
).not.toThrowError();
|
14
|
-
});
|
15
|
-
});
|
package/src/baseConfig.ts
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
import { EslintConfig } from '@saashub/qoq-eslint-v9-js';
|
2
|
-
import { omitRules } from '@saashub/qoq-eslint-v9-js/tools';
|
3
|
-
import jsVitestBaseConfig from '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
|
4
|
-
import tsBaseConfig from '@saashub/qoq-eslint-v9-ts/baseConfig';
|
5
|
-
import * as importPlugin from 'eslint-plugin-import';
|
6
|
-
import merge from 'lodash/merge.js';
|
7
|
-
|
8
|
-
const config: EslintConfig = merge(
|
9
|
-
{},
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
11
|
-
omitRules(jsVitestBaseConfig, Object.keys(importPlugin.configs.recommended.rules)),
|
12
|
-
tsBaseConfig,
|
13
|
-
{
|
14
|
-
name: '@saashub/qoq-eslint-v9-ts-vitest',
|
15
|
-
rules: {
|
16
|
-
'sonarjs/no-duplicate-string': 0,
|
17
|
-
},
|
18
|
-
}
|
19
|
-
);
|
20
|
-
|
21
|
-
export default config;
|
package/src/eslintConfig.spec.ts
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
import { execSync } from 'child_process';
|
2
|
-
|
3
|
-
import { ESLint } from 'eslint';
|
4
|
-
import { describe, test, expect } from 'vitest';
|
5
|
-
|
6
|
-
import { getEslintConfig } from './eslintConfig';
|
7
|
-
|
8
|
-
describe('baseConfig', () => {
|
9
|
-
test('can constuct Eslint object', () => {
|
10
|
-
expect(
|
11
|
-
() =>
|
12
|
-
new ESLint({
|
13
|
-
baseConfig: getEslintConfig(),
|
14
|
-
})
|
15
|
-
).not.toThrowError();
|
16
|
-
});
|
17
|
-
|
18
|
-
test('can execute Eslint with compiled config', () => {
|
19
|
-
const projectPath = __dirname.replace('/src', '');
|
20
|
-
|
21
|
-
expect(() =>
|
22
|
-
// eslint-disable-next-line sonarjs/os-command
|
23
|
-
execSync(`eslint ${projectPath}/lib/index.cjs -c ${projectPath}/lib/eslintConfig.mjs`)
|
24
|
-
).not.toThrowError();
|
25
|
-
});
|
26
|
-
});
|
package/src/eslintConfig.ts
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
import { EslintConfig } from '@saashub/qoq-eslint-v9-js';
|
2
|
-
import merge from 'lodash/merge.js';
|
3
|
-
|
4
|
-
import baseConfig from './baseConfig';
|
5
|
-
|
6
|
-
const filesExtensions = ['js', 'ts'];
|
7
|
-
|
8
|
-
export const getEslintConfig: (
|
9
|
-
srcPath?: string,
|
10
|
-
files?: string[],
|
11
|
-
ignores?: string[]
|
12
|
-
) => EslintConfig[] = (
|
13
|
-
srcPath = 'src',
|
14
|
-
files = [`${srcPath}/**/*.spec.{${filesExtensions.join(',')}}`],
|
15
|
-
ignores = []
|
16
|
-
) => [
|
17
|
-
merge({}, baseConfig, {
|
18
|
-
files,
|
19
|
-
ignores,
|
20
|
-
}),
|
21
|
-
];
|
22
|
-
|
23
|
-
export default getEslintConfig();
|
package/src/index.ts
DELETED
package/tsconfig.json
DELETED
package/vitest.config.mjs
DELETED