@virmator/lint 14.10.2 → 14.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
@@ -11,7 +11,6 @@ A default plugin for [virmator](https://www.npmjs.com/package/virmator).
11
11
  - Examples
12
12
  - `virmator lint`
13
13
  - Configs
14
- - configs/tsconfig.eslint.json
15
14
  - eslint.config.ts
16
15
  - Deps
17
16
  - [eslint](https://npmjs.com/package/eslint)
@@ -6,8 +6,6 @@ import prettierEslintRecommended from 'eslint-plugin-prettier/recommended';
6
6
  import sonarJsEslint from 'eslint-plugin-sonarjs';
7
7
  import eslintPluginUnicorn from 'eslint-plugin-unicorn';
8
8
  import globals from 'globals';
9
- import {existsSync} from 'node:fs';
10
- import {join} from 'node:path';
11
9
  import tsEslint from 'typescript-eslint';
12
10
  import preferIfElseChainRule from '../src/rules/prefer-if-else-chain.lint.js';
13
11
  import preferParseUrlRule from '../src/rules/prefer-parse-url.lint.js';
@@ -17,24 +15,11 @@ export const globalVars = {
17
15
  ...globals.browser,
18
16
  };
19
17
 
20
- export function determineTsconfigPath(repoDir: string) {
21
- const eslintTsconfig = join(repoDir, 'configs', 'tsconfig.eslint.json');
22
- const rootTsconfig = join(repoDir, 'tsconfig.json');
23
-
24
- if (existsSync(eslintTsconfig)) {
25
- return eslintTsconfig;
26
- } else {
27
- return rootTsconfig;
28
- }
29
- }
30
-
31
18
  export function defineEslintConfig(repoDir: string) {
32
19
  const compat = new FlatCompat({
33
20
  baseDirectory: repoDir,
34
21
  });
35
22
 
36
- const tsConfigPath = determineTsconfigPath(repoDir);
37
-
38
23
  return [
39
24
  ...compat.plugins('require-extensions'),
40
25
  ...compat.extends('plugin:require-extensions/recommended'),
@@ -74,9 +59,8 @@ export function defineEslintConfig(repoDir: string) {
74
59
  {
75
60
  languageOptions: {
76
61
  parserOptions: {
77
- project: [
78
- tsConfigPath,
79
- ],
62
+ projectService: true,
63
+ tsconfigRootDir: repoDir,
80
64
  },
81
65
  globals: globalVars,
82
66
  },
package/dist/lint.d.ts CHANGED
@@ -21,30 +21,6 @@ export declare const virmatorLintPlugin: Readonly<Readonly<{
21
21
  };
22
22
  };
23
23
  readonly configFiles: {
24
- readonly eslintTsconfig: {
25
- readonly copyFromPath: string;
26
- readonly copyToPath: string;
27
- readonly env: {
28
- readonly node: true;
29
- readonly web: true;
30
- };
31
- readonly packageType: {
32
- readonly "mono-root": true;
33
- };
34
- readonly required: true;
35
- };
36
- readonly eslintTsconfigTopPackage: {
37
- readonly copyFromPath: string;
38
- readonly copyToPath: string;
39
- readonly env: {
40
- readonly node: true;
41
- readonly web: true;
42
- };
43
- readonly packageType: {
44
- readonly package: true;
45
- };
46
- readonly required: true;
47
- };
48
24
  readonly eslint: {
49
25
  readonly copyFromPath: string;
50
26
  readonly copyToPath: string;
@@ -250,30 +226,6 @@ export declare const virmatorLintPlugin: Readonly<Readonly<{
250
226
  };
251
227
  };
252
228
  readonly configFiles: {
253
- readonly eslintTsconfig: {
254
- readonly copyFromPath: string;
255
- readonly copyToPath: string;
256
- readonly env: {
257
- readonly node: true;
258
- readonly web: true;
259
- };
260
- readonly packageType: {
261
- readonly "mono-root": true;
262
- };
263
- readonly required: true;
264
- };
265
- readonly eslintTsconfigTopPackage: {
266
- readonly copyFromPath: string;
267
- readonly copyToPath: string;
268
- readonly env: {
269
- readonly node: true;
270
- readonly web: true;
271
- };
272
- readonly packageType: {
273
- readonly package: true;
274
- };
275
- readonly required: true;
276
- };
277
229
  readonly eslint: {
278
230
  readonly copyFromPath: string;
279
231
  readonly copyToPath: string;
package/dist/lint.js CHANGED
@@ -38,30 +38,6 @@ export const virmatorLintPlugin = defineVirmatorPlugin(import.meta.dirname, {
38
38
  },
39
39
  },
40
40
  configFiles: {
41
- eslintTsconfig: {
42
- copyFromPath: join('configs', 'tsconfig.eslint.json'),
43
- copyToPath: join('configs', 'tsconfig.eslint.json'),
44
- env: {
45
- [RuntimeEnv.Node]: true,
46
- [RuntimeEnv.Web]: true,
47
- },
48
- packageType: {
49
- [PackageType.MonoRoot]: true,
50
- },
51
- required: true,
52
- },
53
- eslintTsconfigTopPackage: {
54
- copyFromPath: join('configs', 'tsconfig.eslint.top-package.json'),
55
- copyToPath: join('configs', 'tsconfig.eslint.json'),
56
- env: {
57
- [RuntimeEnv.Node]: true,
58
- [RuntimeEnv.Web]: true,
59
- },
60
- packageType: {
61
- [PackageType.TopPackage]: true,
62
- },
63
- required: true,
64
- },
65
41
  eslint: {
66
42
  copyFromPath: join('configs', 'eslint.config.share.ts'),
67
43
  copyToPath: join('eslint.config.ts'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/lint",
3
- "version": "14.10.2",
3
+ "version": "14.11.0",
4
4
  "description": "Default ESLint linting plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -32,32 +32,32 @@
32
32
  "test:update": "npm test update"
33
33
  },
34
34
  "dependencies": {
35
- "@augment-vir/assert": "^31.68.1",
36
- "@augment-vir/common": "^31.68.1",
37
- "@augment-vir/node": "^31.68.1",
38
- "@virmator/core": "^14.10.2",
35
+ "@augment-vir/assert": "^31.68.3",
36
+ "@augment-vir/common": "^31.68.3",
37
+ "@augment-vir/node": "^31.68.3",
38
+ "@virmator/core": "^14.11.0",
39
39
  "jiti": "^2.6.1",
40
40
  "mri": "^1.2.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@augment-vir/test": "^31.68.1",
43
+ "@augment-vir/test": "^31.68.3",
44
44
  "@eslint/eslintrc": "^3.3.5",
45
45
  "@eslint/js": "9.39.2",
46
46
  "@stylistic/eslint-plugin": "^5.10.0",
47
47
  "@stylistic/eslint-plugin-ts": "^4.4.1",
48
48
  "@types/estree": "^1.0.8",
49
- "@types/node": "^25.3.0",
50
- "@typescript-eslint/eslint-plugin": "^8.57.0",
49
+ "@types/node": "^25.5.2",
50
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
51
51
  "c8": "^11.0.0",
52
52
  "eslint": "^9.39.2",
53
53
  "eslint-config-prettier": "^10.1.8",
54
- "eslint-plugin-jsdoc": "^62.7.1",
54
+ "eslint-plugin-jsdoc": "^62.9.0",
55
55
  "eslint-plugin-monorepo-cop": "^1.0.2",
56
- "eslint-plugin-playwright": "^2.9.0",
56
+ "eslint-plugin-playwright": "^2.10.1",
57
57
  "eslint-plugin-prettier": "^5.5.5",
58
58
  "eslint-plugin-require-extensions": "^0.1.3",
59
59
  "eslint-plugin-sonarjs": "^4.0.2",
60
- "eslint-plugin-unicorn": "^63.0.0",
60
+ "eslint-plugin-unicorn": "^64.0.0",
61
61
  "istanbul-smart-text-reporter": "^1.1.5",
62
62
  "typescript-eslint": "8.57.1"
63
63
  },
package/src/lint.ts CHANGED
@@ -41,30 +41,6 @@ export const virmatorLintPlugin = defineVirmatorPlugin(
41
41
  },
42
42
  },
43
43
  configFiles: {
44
- eslintTsconfig: {
45
- copyFromPath: join('configs', 'tsconfig.eslint.json'),
46
- copyToPath: join('configs', 'tsconfig.eslint.json'),
47
- env: {
48
- [RuntimeEnv.Node]: true,
49
- [RuntimeEnv.Web]: true,
50
- },
51
- packageType: {
52
- [PackageType.MonoRoot]: true,
53
- },
54
- required: true,
55
- },
56
- eslintTsconfigTopPackage: {
57
- copyFromPath: join('configs', 'tsconfig.eslint.top-package.json'),
58
- copyToPath: join('configs', 'tsconfig.eslint.json'),
59
- env: {
60
- [RuntimeEnv.Node]: true,
61
- [RuntimeEnv.Web]: true,
62
- },
63
- packageType: {
64
- [PackageType.TopPackage]: true,
65
- },
66
- required: true,
67
- },
68
44
  eslint: {
69
45
  copyFromPath: join('configs', 'eslint.config.share.ts'),
70
46
  copyToPath: join('eslint.config.ts'),
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "rootDir": ".."
4
- },
5
- "extends": "./tsconfig.base.json",
6
- "include": [
7
- "../eslint.config.ts",
8
- "../packages/**/*.ts"
9
- ]
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "rootDir": ".."
4
- },
5
- "extends": "../tsconfig.json",
6
- "include": ["../eslint.config.ts", "../src/**/*.ts"]
7
- }