@saashub/qoq-eslint-v9-ts-vitest 0.9.4 → 0.11.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 CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Rationale
7
7
 
8
- Beign tired of setting up [Eslint](https://www.npmjs.com/package/eslint) all over again for new projects on top of v9 [flatConfig](https://eslint.org/docs/latest/use/configure/configuration-files) I've created some base template for different setups (check all [@saashub/qoq-eslint-v9-\* packages](https://www.npmjs.com/search?q=%40saashub%2Fqoq-eslint-v9-)). Configs inherit from base ones and includes only necessary packages. Rules are configured from years of development experience and can be used without any tweaks or as base to Your own setup.
8
+ Beign tired of setting up [Eslint](https://www.npmjs.com/package/eslint) all over again for new projects, on top of v9 [flatConfig](https://eslint.org/docs/latest/use/configure/configuration-files) , we created some base template for different setups (check all [@saashub/qoq-eslint-v9-\* packages](https://www.npmjs.com/search?q=%40saashub%2Fqoq-eslint-v9-)). Configs inherit from base ones and includes all necessary packages and settings. Rules are opinionated, configured from years of development experience, can be used as full setup without any tweaks or as base to Your own configs.
9
9
 
10
10
  ## Install
11
11
 
@@ -13,12 +13,12 @@ Beign tired of setting up [Eslint](https://www.npmjs.com/package/eslint) all ove
13
13
 
14
14
  ## Usage
15
15
 
16
- Package exports both CommonJS and ES modules code just import it in Your eslint config file.
16
+ Package exports both CommonJS and ESM code just import it in Your eslint config file.
17
17
 
18
18
  ### For CommonJS
19
19
 
20
20
  ```js
21
- const jsBaseConfig = require("@saashub/qoq-eslint-v9-ts-vitest/baseConfig");
21
+ const jsBaseConfig = require("@saashub/qoq-eslint-v9-ts-vitest");
22
22
 
23
23
  module.exports = [
24
24
  {
@@ -28,10 +28,10 @@ module.exports = [
28
28
  ]
29
29
  ```
30
30
 
31
- ### For ES modules
31
+ ### For ESM
32
32
 
33
33
  ```js
34
- import jsBaseConfig from '@saashub/qoq-eslint-v9-ts-vitest/baseConfig';
34
+ import jsBaseConfig from '@saashub/qoq-eslint-v9-ts-vitest';
35
35
 
36
36
  export default [
37
37
  {
package/lib/index.cjs CHANGED
@@ -1,13 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var baseConfig = require('./baseConfig.cjs');
4
- var eslintConfig = require('./eslintConfig.cjs');
5
- require('@saashub/qoq-eslint-v9-js/tools');
6
- require('@saashub/qoq-eslint-v9-js-vitest/baseConfig');
7
- require('@saashub/qoq-eslint-v9-ts/baseConfig');
8
- require('eslint-plugin-import');
9
- require('lodash/merge.js');
3
+ var tools = require('@saashub/qoq-eslint-v9-js/tools');
4
+ var qoqEslintV9JsVitest = require('@saashub/qoq-eslint-v9-js-vitest');
5
+ var qoqEslintV9Ts = require('@saashub/qoq-eslint-v9-ts');
6
+ var importPlugin = require('eslint-plugin-import');
7
+ var merge = require('lodash/merge.js');
10
8
 
11
- var index = { baseConfig, eslintConfig: eslintConfig.default };
9
+ function _interopNamespaceDefault(e) {
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
12
25
 
13
- module.exports = index;
26
+ var importPlugin__namespace = /*#__PURE__*/_interopNamespaceDefault(importPlugin);
27
+
28
+ const baseConfig = merge({},
29
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
30
+ tools.omitRules(qoqEslintV9JsVitest.baseConfig, Object.keys(importPlugin__namespace.configs.recommended.rules)), qoqEslintV9Ts.baseConfig, {
31
+ name: '@saashub/qoq-eslint-v9-ts-vitest',
32
+ rules: {
33
+ 'sonarjs/no-duplicate-string': 0,
34
+ },
35
+ });
36
+
37
+ exports.baseConfig = baseConfig;
package/lib/index.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- declare const _default: {
2
- baseConfig: import("@saashub/qoq-eslint-v9-js").EslintConfig;
3
- eslintConfig: import("@saashub/qoq-eslint-v9-js").EslintConfig[];
4
- };
5
- export default _default;
1
+ import { EslintConfig } from '@saashub/qoq-eslint-v9-js';
2
+ export declare const baseConfig: EslintConfig;
package/lib/index.mjs CHANGED
@@ -1,11 +1,16 @@
1
- import config from './baseConfig.mjs';
2
- import eslintConfig from './eslintConfig.mjs';
3
- import '@saashub/qoq-eslint-v9-js/tools';
4
- import '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
5
- import '@saashub/qoq-eslint-v9-ts/baseConfig';
6
- import 'eslint-plugin-import';
7
- import 'lodash/merge.js';
1
+ import { omitRules } from '@saashub/qoq-eslint-v9-js/tools';
2
+ import { baseConfig as baseConfig$1 } from '@saashub/qoq-eslint-v9-js-vitest';
3
+ import { baseConfig as baseConfig$2 } from '@saashub/qoq-eslint-v9-ts';
4
+ import * as importPlugin from 'eslint-plugin-import';
5
+ import merge from 'lodash/merge.js';
8
6
 
9
- var index = { baseConfig: config, eslintConfig };
7
+ const baseConfig = merge({},
8
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
9
+ omitRules(baseConfig$1, Object.keys(importPlugin.configs.recommended.rules)), baseConfig$2, {
10
+ name: '@saashub/qoq-eslint-v9-ts-vitest',
11
+ rules: {
12
+ 'sonarjs/no-duplicate-string': 0,
13
+ },
14
+ });
10
15
 
11
- export { index as default };
16
+ export { baseConfig };
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.9.4",
5
+ "version": "0.11.0",
6
6
  "main": "./lib/index.cjs",
7
7
  "module": "./lib/index.mjs",
8
8
  "types": "./lib/index.d.js",
@@ -13,20 +13,6 @@
13
13
  "import": "./lib/index.mjs",
14
14
  "require": "./lib/index.cjs",
15
15
  "default": "./lib/index.mjs"
16
- },
17
- "./baseConfig": {
18
- "types": "./lib/baseConfig.d.ts",
19
- "module": "./lib/baseConfig.mjs",
20
- "import": "./lib/baseConfig.mjs",
21
- "require": "./lib/baseConfig.cjs",
22
- "default": "./lib/baseConfig.mjs"
23
- },
24
- "./eslintConfig": {
25
- "types": "./lib/eslintConfig.d.ts",
26
- "module": "./lib/eslintConfig.mjs",
27
- "import": "./lib/eslintConfig.mjs",
28
- "require": "./lib/eslintConfig.cjs",
29
- "default": "./lib/eslintConfig.mjs"
30
16
  }
31
17
  },
32
18
  "publishConfig": {
@@ -40,18 +26,18 @@
40
26
  "inspect": "npm run build && eslint -c ./lib/eslintConfig.cjs --inspect-config"
41
27
  },
42
28
  "dependencies": {
43
- "@saashub/qoq-eslint-v9-js-vitest": "^0.9.4",
44
- "@saashub/qoq-eslint-v9-ts": "^0.9.4",
29
+ "@saashub/qoq-eslint-v9-js-vitest": "^0.11.0",
30
+ "@saashub/qoq-eslint-v9-ts": "^0.11.0",
45
31
  "lodash": "4.17.21"
46
32
  },
47
33
  "devDependencies": {
48
- "@rollup/plugin-typescript": "11.1.6",
49
- "@saashub/qoq-cli": "^0.9.4",
34
+ "@rollup/plugin-typescript": "12.1.0",
35
+ "@saashub/qoq-cli": "^0.11.0",
50
36
  "@types/eslint": "^9",
51
- "@types/lodash": "4.17.7",
37
+ "@types/lodash": "4.17.9",
52
38
  "@vitest/coverage-v8": "2.1.1",
53
39
  "rimraf": "6.0.1",
54
- "rollup": "4.22.0",
40
+ "rollup": "4.22.4",
55
41
  "typescript": "5.6.2",
56
42
  "vitest": "2.1.1"
57
43
  },
@@ -71,5 +57,5 @@
71
57
  "directory": "packages/eslint-v9-ts-vitest"
72
58
  },
73
59
  "homepage": "https://github.com/saashub-it/qoq/tree/master/packages/eslint-v9-ts-vitest",
74
- "gitHead": "d6e2a5c6b0370b34dbe5d6ed8fdd6c0c5acc6c3c"
60
+ "gitHead": "1c4b02e30bbddf9dbf58c442532cf5cef35414c1"
75
61
  }
package/.prettierrc DELETED
@@ -1 +0,0 @@
1
- "@saashub/qoq-prettier"
package/eslint.config.js DELETED
@@ -1 +0,0 @@
1
- const config = require('./bin/eslint.config.js'); module.exports = config;
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- var tools = require('@saashub/qoq-eslint-v9-js/tools');
4
- var jsVitestBaseConfig = require('@saashub/qoq-eslint-v9-js-vitest/baseConfig');
5
- var tsBaseConfig = require('@saashub/qoq-eslint-v9-ts/baseConfig');
6
- var importPlugin = require('eslint-plugin-import');
7
- var merge = require('lodash/merge.js');
8
-
9
- function _interopNamespaceDefault(e) {
10
- var n = Object.create(null);
11
- if (e) {
12
- Object.keys(e).forEach(function (k) {
13
- if (k !== 'default') {
14
- var d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: function () { return e[k]; }
18
- });
19
- }
20
- });
21
- }
22
- n.default = e;
23
- return Object.freeze(n);
24
- }
25
-
26
- var importPlugin__namespace = /*#__PURE__*/_interopNamespaceDefault(importPlugin);
27
-
28
- const config = merge({},
29
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
30
- tools.omitRules(jsVitestBaseConfig, Object.keys(importPlugin__namespace.configs.recommended.rules)), tsBaseConfig, {
31
- name: '@saashub/qoq-eslint-v9-ts-vitest',
32
- rules: {
33
- 'sonarjs/no-duplicate-string': 0,
34
- },
35
- });
36
-
37
- module.exports = config;
@@ -1,3 +0,0 @@
1
- import { EslintConfig } from '@saashub/qoq-eslint-v9-js';
2
- declare const config: EslintConfig;
3
- export default config;
@@ -1,16 +0,0 @@
1
- import { omitRules } from '@saashub/qoq-eslint-v9-js/tools';
2
- import jsVitestBaseConfig from '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
3
- import tsBaseConfig from '@saashub/qoq-eslint-v9-ts/baseConfig';
4
- import * as importPlugin from 'eslint-plugin-import';
5
- import merge from 'lodash/merge.js';
6
-
7
- const config = merge({},
8
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
9
- omitRules(jsVitestBaseConfig, Object.keys(importPlugin.configs.recommended.rules)), tsBaseConfig, {
10
- name: '@saashub/qoq-eslint-v9-ts-vitest',
11
- rules: {
12
- 'sonarjs/no-duplicate-string': 0,
13
- },
14
- });
15
-
16
- export { config as default };
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var merge = require('lodash/merge.js');
6
- var baseConfig = require('./baseConfig.cjs');
7
- require('@saashub/qoq-eslint-v9-js/tools');
8
- require('@saashub/qoq-eslint-v9-js-vitest/baseConfig');
9
- require('@saashub/qoq-eslint-v9-ts/baseConfig');
10
- require('eslint-plugin-import');
11
-
12
- const filesExtensions = ['js', 'ts'];
13
- const getEslintConfig = (srcPath = 'src', files = [`${srcPath}/**/*.spec.{${filesExtensions.join(',')}}`], ignores = []) => [
14
- merge({}, baseConfig, {
15
- files,
16
- ignores,
17
- }),
18
- ];
19
- var eslintConfig = getEslintConfig();
20
-
21
- exports.default = eslintConfig;
22
- exports.getEslintConfig = getEslintConfig;
@@ -1,4 +0,0 @@
1
- import { EslintConfig } from '@saashub/qoq-eslint-v9-js';
2
- export declare const getEslintConfig: (srcPath?: string, files?: string[], ignores?: string[]) => EslintConfig[];
3
- declare const _default: EslintConfig[];
4
- export default _default;
@@ -1,17 +0,0 @@
1
- import merge from 'lodash/merge.js';
2
- import config from './baseConfig.mjs';
3
- import '@saashub/qoq-eslint-v9-js/tools';
4
- import '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
5
- import '@saashub/qoq-eslint-v9-ts/baseConfig';
6
- import 'eslint-plugin-import';
7
-
8
- const filesExtensions = ['js', 'ts'];
9
- const getEslintConfig = (srcPath = 'src', files = [`${srcPath}/**/*.spec.{${filesExtensions.join(',')}}`], ignores = []) => [
10
- merge({}, config, {
11
- files,
12
- ignores,
13
- }),
14
- ];
15
- var eslintConfig = getEslintConfig();
16
-
17
- export { eslintConfig as default, getEslintConfig };