@saashub/qoq-eslint-v9-ts-vitest 0.6.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/LICENSE +21 -0
- package/README.md +1 -0
- package/lib/baseConfig.d.ts +3 -0
- package/lib/baseConfig.js +11 -0
- package/lib/baseConfig.mjs +9 -0
- package/lib/eslintConfig.d.ts +3 -0
- package/lib/eslintConfig.js +17 -0
- package/lib/eslintConfig.mjs +15 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +12 -0
- package/lib/index.mjs +10 -0
- package/package.json +62 -0
- package/rollup.config.js +3 -0
- package/src/baseConfig.spec.ts +15 -0
- package/src/baseConfig.ts +12 -0
- package/src/eslintConfig.spec.ts +15 -0
- package/src/eslintConfig.ts +18 -0
- package/src/index.ts +4 -0
- package/tsconfig.json +7 -0
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 @@
|
|
1
|
+
# QoQ Eslint v9 TS + Jest
|
@@ -0,0 +1,11 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var jsVitestBaseComfig = require('@saashub/qoq-eslint-v9-js-vitest/baseConfig');
|
4
|
+
var tsBaseConfig = require('@saashub/qoq-eslint-v9-ts/baseConfig');
|
5
|
+
var merge = require('lodash/merge.js');
|
6
|
+
|
7
|
+
const config = merge({}, jsVitestBaseComfig, tsBaseConfig, {
|
8
|
+
name: '@saashub/qoq-eslint-v9-ts-vitest',
|
9
|
+
});
|
10
|
+
|
11
|
+
module.exports = config;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import jsVitestBaseComfig from '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
|
2
|
+
import tsBaseConfig from '@saashub/qoq-eslint-v9-ts/baseConfig';
|
3
|
+
import merge from 'lodash/merge.js';
|
4
|
+
|
5
|
+
const config = merge({}, jsVitestBaseComfig, tsBaseConfig, {
|
6
|
+
name: '@saashub/qoq-eslint-v9-ts-vitest',
|
7
|
+
});
|
8
|
+
|
9
|
+
export { config as default };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var tsEslintConfig = require('@saashub/qoq-eslint-v9-ts/eslintConfig');
|
4
|
+
var merge = require('lodash/merge.js');
|
5
|
+
var baseConfig = require('./baseConfig.js');
|
6
|
+
require('@saashub/qoq-eslint-v9-js-vitest/baseConfig');
|
7
|
+
require('@saashub/qoq-eslint-v9-ts/baseConfig');
|
8
|
+
|
9
|
+
const filesExtensions = ['js', 'ts'];
|
10
|
+
const eslintConfig = [
|
11
|
+
...tsEslintConfig,
|
12
|
+
merge({}, baseConfig, {
|
13
|
+
files: [`src/**/*.spec.{${filesExtensions.join(',')}}`],
|
14
|
+
}),
|
15
|
+
];
|
16
|
+
|
17
|
+
module.exports = eslintConfig;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import tsEslintConfig from '@saashub/qoq-eslint-v9-ts/eslintConfig';
|
2
|
+
import merge from 'lodash/merge.js';
|
3
|
+
import config from './baseConfig.mjs';
|
4
|
+
import '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
|
5
|
+
import '@saashub/qoq-eslint-v9-ts/baseConfig';
|
6
|
+
|
7
|
+
const filesExtensions = ['js', 'ts'];
|
8
|
+
const eslintConfig = [
|
9
|
+
...tsEslintConfig,
|
10
|
+
merge({}, config, {
|
11
|
+
files: [`src/**/*.spec.{${filesExtensions.join(',')}}`],
|
12
|
+
}),
|
13
|
+
];
|
14
|
+
|
15
|
+
export { eslintConfig as default };
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var baseConfig = require('./baseConfig.js');
|
4
|
+
var eslintConfig = require('./eslintConfig.js');
|
5
|
+
require('@saashub/qoq-eslint-v9-js-vitest/baseConfig');
|
6
|
+
require('@saashub/qoq-eslint-v9-ts/baseConfig');
|
7
|
+
require('lodash/merge.js');
|
8
|
+
require('@saashub/qoq-eslint-v9-ts/eslintConfig');
|
9
|
+
|
10
|
+
var index = { baseConfig, eslintConfig };
|
11
|
+
|
12
|
+
module.exports = index;
|
package/lib/index.mjs
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
import config from './baseConfig.mjs';
|
2
|
+
import eslintConfig from './eslintConfig.mjs';
|
3
|
+
import '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
|
4
|
+
import '@saashub/qoq-eslint-v9-ts/baseConfig';
|
5
|
+
import 'lodash/merge.js';
|
6
|
+
import '@saashub/qoq-eslint-v9-ts/eslintConfig';
|
7
|
+
|
8
|
+
var index = { baseConfig: config, eslintConfig };
|
9
|
+
|
10
|
+
export { index as default };
|
package/package.json
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
{
|
2
|
+
"name": "@saashub/qoq-eslint-v9-ts-vitest",
|
3
|
+
"license": "MIT",
|
4
|
+
"version": "0.6.0",
|
5
|
+
"main": "./lib/index.js",
|
6
|
+
"module": "./lib/index.mjs",
|
7
|
+
"types": "./lib/index.d.js",
|
8
|
+
"exports": {
|
9
|
+
".": {
|
10
|
+
"types": "./lib/index.d.ts",
|
11
|
+
"module": "./lib/index.mjs",
|
12
|
+
"import": "./lib/index.mjs",
|
13
|
+
"require": "./lib/index.js",
|
14
|
+
"default": "./lib/index.mjs"
|
15
|
+
},
|
16
|
+
"./baseConfig": {
|
17
|
+
"types": "./lib/baseConfig.d.ts",
|
18
|
+
"module": "./lib/baseConfig.mjs",
|
19
|
+
"import": "./lib/baseConfig.mjs",
|
20
|
+
"require": "./lib/baseConfig.js",
|
21
|
+
"default": "./lib/baseConfig.mjs"
|
22
|
+
},
|
23
|
+
"./eslintConfig": {
|
24
|
+
"types": "./lib/eslintConfig.d.ts",
|
25
|
+
"module": "./lib/eslintConfig.mjs",
|
26
|
+
"import": "./lib/eslintConfig.mjs",
|
27
|
+
"require": "./lib/eslintConfig.js",
|
28
|
+
"default": "./lib/eslintConfig.mjs"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"publishConfig": {
|
32
|
+
"access": "public"
|
33
|
+
},
|
34
|
+
"scripts": {
|
35
|
+
"build": "rimraf ./lib && rollup -c --silent",
|
36
|
+
"test": "vitest run"
|
37
|
+
},
|
38
|
+
"dependencies": {
|
39
|
+
"@saashub/qoq-eslint-v9-js-vitest": "^0.6.0",
|
40
|
+
"@saashub/qoq-eslint-v9-ts": "^0.6.0",
|
41
|
+
"lodash": "4.17.21"
|
42
|
+
},
|
43
|
+
"devDependencies": {
|
44
|
+
"@rollup/plugin-typescript": "11.1.6",
|
45
|
+
"@types/eslint": "^9",
|
46
|
+
"@types/lodash": "4.17.7",
|
47
|
+
"rimraf": "6.0.1",
|
48
|
+
"rollup": "4.21.0",
|
49
|
+
"typescript": "5.5.4",
|
50
|
+
"vitest": "2.0.5"
|
51
|
+
},
|
52
|
+
"peerDependencies": {
|
53
|
+
"eslint": "^9"
|
54
|
+
},
|
55
|
+
"repository": {
|
56
|
+
"type": "git",
|
57
|
+
"url": "git+ssh://git@github.com/saashub-it/qoq.git",
|
58
|
+
"directory": "packages/eslint-v9-ts-vitest"
|
59
|
+
},
|
60
|
+
"homepage": "https://github.com/saashub-it/qoq/tree/master/packages/eslint-v9-ts-vitest",
|
61
|
+
"gitHead": "f0c6cd562f4263e783d865d567fa3934f2f5aef0"
|
62
|
+
}
|
package/rollup.config.js
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import { describe, test, expect } from 'vitest';
|
2
|
+
import { ESLint } from 'eslint';
|
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
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import jsVitestBaseComfig from '@saashub/qoq-eslint-v9-js-vitest/baseConfig';
|
2
|
+
import tsBaseConfig from '@saashub/qoq-eslint-v9-ts/baseConfig';
|
3
|
+
|
4
|
+
import merge from 'lodash/merge.js';
|
5
|
+
|
6
|
+
import type { Linter } from 'eslint';
|
7
|
+
|
8
|
+
const config = merge({}, jsVitestBaseComfig, tsBaseConfig, {
|
9
|
+
name: '@saashub/qoq-eslint-v9-ts-vitest',
|
10
|
+
}) as unknown as Linter.Config;
|
11
|
+
|
12
|
+
export default config;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { describe, test, expect } from 'vitest';
|
2
|
+
import { ESLint } from 'eslint';
|
3
|
+
|
4
|
+
import eslintConfig from './eslintConfig';
|
5
|
+
|
6
|
+
describe('eslintConfig', () => {
|
7
|
+
test('can constuct Eslint object', () => {
|
8
|
+
expect(
|
9
|
+
() =>
|
10
|
+
new ESLint({
|
11
|
+
baseConfig: eslintConfig,
|
12
|
+
})
|
13
|
+
).not.toThrowError();
|
14
|
+
});
|
15
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import tsEslintConfig from '@saashub/qoq-eslint-v9-ts/eslintConfig';
|
2
|
+
|
3
|
+
import merge from 'lodash/merge.js';
|
4
|
+
|
5
|
+
import baseConfig from './baseConfig';
|
6
|
+
|
7
|
+
import type { Linter } from 'eslint';
|
8
|
+
|
9
|
+
const filesExtensions = ['js', 'ts'];
|
10
|
+
|
11
|
+
const eslintConfig = [
|
12
|
+
...tsEslintConfig,
|
13
|
+
merge({}, baseConfig, {
|
14
|
+
files: [`src/**/*.spec.{${filesExtensions.join(',')}}`],
|
15
|
+
}),
|
16
|
+
] as unknown as Linter.Config;
|
17
|
+
|
18
|
+
export default eslintConfig;
|
package/src/index.ts
ADDED