@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.
@@ -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-09T07:40:51.164Z
136
+ at 2024-09-11T13:17:41.629Z
137
137
  </div>
138
138
  <script src="prettify.js"></script>
139
139
  <script>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1725867651173" clover="3.2.0">
3
- <project timestamp="1725867651173" name="All files">
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-09T07:40:51.164Z
142
+ at 2024-09-11T13:17:41.629Z
143
143
  </div>
144
144
  <script src="prettify.js"></script>
145
145
  <script>
@@ -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-09T07:40:51.164Z
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.8.2",
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.8.2",
44
- "@saashub/qoq-eslint-v9-ts": "^0.8.2",
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.8.2",
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.5.4",
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": "e6c19d713fafa0c3857f620bff9d13185ca85d80"
74
+ "gitHead": "d7ef49cf88dd75739e57b1104173aff09f7a8f60"
74
75
  }
package/qoq.config.js DELETED
@@ -1,3 +0,0 @@
1
- const config = require("../../qoq.config");
2
-
3
- module.exports = config;
package/rollup.config.mjs DELETED
@@ -1,3 +0,0 @@
1
- import config from '../../rollup.eslint.config.mjs';
2
-
3
- export default config;
@@ -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;
@@ -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
- });
@@ -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
@@ -1,4 +0,0 @@
1
- import baseConfig from './baseConfig';
2
- import eslintConfig from './eslintConfig';
3
-
4
- export default { baseConfig, eslintConfig };
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./lib"
5
- },
6
- "include": ["./src"]
7
- }
package/vitest.config.mjs DELETED
@@ -1,3 +0,0 @@
1
- import config from '../../vitest.config.mjs';
2
-
3
- export default config;