@saashub/qoq-eslint-v9-ts-vitest-rtl 0.16.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Łukasz Adamczyk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @saashub/qoq-eslint-v9-ts-vitest-rtl
2
+
3
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/saashub-it/qoq/main.yml) [![codecov](https://codecov.io/gh/saashub-it/qoq/graph/badge.svg?flag=eslint-v9-ts-vitest-rtl&token=PQ1XAQQ257)](https://codecov.io/gh/saashub-it/qoq/flags/eslint-v9-ts-vitest-rtl) ![NPM Version](https://img.shields.io/npm/v/%40saashub%2Fqoq-eslint-v9-ts-vitest-rtl)
4
+ ![NPM Type Definitions](https://img.shields.io/npm/types/%40saashub%2Fqoq-eslint-v9-ts-vitest-rtl) ![NPM Unpacked Size](https://img.shields.io/npm/unpacked-size/%40saashub%2Fqoq-eslint-v9-ts-vitest-rtl) ![NPM License](https://img.shields.io/npm/l/%40saashub%2Fqoq-eslint-v9-ts-vitest-rtl)
5
+
6
+ ## Rationale
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) , 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
+
10
+ ## Install
11
+
12
+ npm install @saashub/qoq-eslint-v9-ts-vitest-rtl
13
+
14
+ ## Usage
15
+
16
+ Package exports both CommonJS and ESM code just import it in Your eslint config file.
17
+
18
+ ### For CommonJS
19
+
20
+ ```js
21
+ const jsBaseConfig = require("@saashub/qoq-eslint-v9-ts-vitest-rtl");
22
+
23
+ module.exports = [
24
+ {
25
+ ...jsBaseConfig,
26
+ files: [...]
27
+ }
28
+ ]
29
+ ```
30
+
31
+ ### For ESM
32
+
33
+ ```js
34
+ import jsBaseConfig from '@saashub/qoq-eslint-v9-ts-vitest-rtl';
35
+
36
+ export default [
37
+ {
38
+ ...jsBaseConfig,
39
+ files: [...]
40
+ }
41
+ ];
42
+ ```
43
+
44
+ ### Last but not least
45
+
46
+ _Feel free to Yoin us, please read [General Contributing Guidelines](https://github.com/saashub-it/qoq/blob/master/.github/CONTRIBUTING.md)_
47
+
48
+ CLI technical documentation can be found [here](../eslint-v9/PROJECT.md)
package/lib/index.cjs ADDED
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ var tools = require('@saashub/qoq-eslint-v9-js/tools');
4
+ var qoqEslintV9JsVitestRtl = require('@saashub/qoq-eslint-v9-js-vitest-rtl');
5
+ var qoqEslintV9Ts = require('@saashub/qoq-eslint-v9-ts');
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 baseConfig = merge({},
29
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
30
+ tools.omitRules(qoqEslintV9JsVitestRtl.baseConfig, Object.keys(importPlugin__namespace.configs.recommended.rules)), qoqEslintV9Ts.baseConfig, {
31
+ name: '@saashub/qoq-eslint-v9-ts-vitest-rtl',
32
+ rules: {
33
+ 'sonarjs/no-duplicate-string': 0,
34
+ },
35
+ });
36
+
37
+ exports.baseConfig = baseConfig;
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { EslintConfig } from '@saashub/qoq-eslint-v9-js';
2
+ export declare const baseConfig: EslintConfig;
package/lib/index.mjs ADDED
@@ -0,0 +1,16 @@
1
+ import { omitRules } from '@saashub/qoq-eslint-v9-js/tools';
2
+ import { baseConfig as baseConfig$1 } from '@saashub/qoq-eslint-v9-js-vitest-rtl';
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';
6
+
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-rtl',
11
+ rules: {
12
+ 'sonarjs/no-duplicate-string': 0,
13
+ },
14
+ });
15
+
16
+ export { baseConfig };
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@saashub/qoq-eslint-v9-ts-vitest-rtl",
3
+ "version": "0.16.1",
4
+ "description": "Eslint flat config template for TS + Vitest + RTL",
5
+ "keywords": [
6
+ "eslint TypeScript + Vitest + RTL template",
7
+ "flat config",
8
+ "saashub",
9
+ "qoq",
10
+ "QualityOverQuantity"
11
+ ],
12
+ "homepage": "https://github.com/saashub-it/qoq/tree/master/packages/eslint-v9-ts-vitest-rtl",
13
+ "bugs": {
14
+ "url": "https://github.com/saashub-it/qoq/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+ssh://git@github.com/saashub-it/qoq.git",
19
+ "directory": "packages/eslint-v9-ts-vitest-rtl"
20
+ },
21
+ "license": "MIT",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./lib/index.d.ts",
25
+ "module": "./lib/index.mjs",
26
+ "import": "./lib/index.mjs",
27
+ "require": "./lib/index.cjs",
28
+ "default": "./lib/index.mjs"
29
+ }
30
+ },
31
+ "main": "./lib/index.cjs",
32
+ "module": "./lib/index.mjs",
33
+ "types": "./lib/index.d.js",
34
+ "scripts": {
35
+ "build": "rimraf ./lib && rollup -c --silent",
36
+ "inspect": "npm run build && eslint -c ./lib/eslintConfig.cjs --inspect-config",
37
+ "qoq:check": "qoq --check --skip-knip",
38
+ "qoq:fix": "qoq --fix --skip-knip",
39
+ "test": "vitest run --coverage"
40
+ },
41
+ "dependencies": {
42
+ "@saashub/qoq-eslint-v9-js-vitest-rtl": "^0.16.1",
43
+ "@saashub/qoq-eslint-v9-ts": "^0.16.1",
44
+ "lodash": "4.17.21"
45
+ },
46
+ "devDependencies": {
47
+ "@rollup/plugin-typescript": "12.1.2",
48
+ "@saashub/qoq-cli": "^0.16.1",
49
+ "@types/eslint": "^9",
50
+ "@types/lodash": "4.17.15",
51
+ "@vitest/coverage-v8": "3.0.4",
52
+ "rimraf": "6.0.1",
53
+ "rollup": "4.32.1",
54
+ "typescript": "5.7.3",
55
+ "vitest": "3.0.4"
56
+ },
57
+ "peerDependencies": {
58
+ "eslint": "^9.12.0"
59
+ },
60
+ "engines": {
61
+ "node": ">=18"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public"
65
+ },
66
+ "gitHead": "8b383c559664ac791c7b3bc669892f4f52060a06"
67
+ }