@enke.dev/lint 0.11.8 → 0.11.10

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
@@ -24,30 +24,27 @@ import config from '@enke.dev/lint';
24
24
  export default config;
25
25
  ```
26
26
 
27
+ > [!NOTE]
28
+ > Using Typescript may requires the root directory where to find the `tsconfig.json` to be specified.\
29
+ > Therefore, a convenience function `setTsConfigRootDir` is provided to configure this option globally.
30
+
27
31
  ### Extending a config
28
32
 
29
33
  For example for setting up the Typescript parser, you can extend the base config like this:
30
34
 
31
35
  ```ts
32
- import config from '@enke.dev/lint';
36
+ import config, { setTsConfigRootDir } from '@enke.dev/lint';
33
37
 
34
38
  export default defineConfig([
35
39
  // extend the base config
36
40
  ...config,
37
41
  // configure typescript parser to your needs
38
- {
39
- languageOptions: {
40
- parserOptions: {
41
- project: true,
42
- tsconfigRootDir: import.meta.dirname,
43
- },
44
- },
45
- },
42
+ setTsConfigRootDir(import.meta.dirname),
46
43
  ]);
47
44
  ```
48
45
 
49
46
  > [!TIP]
50
- > This applies to all configs exported by this package, e.g. for Prettier as well.
47
+ > Extending configurations works the same way with all other configs provided by this package.
51
48
 
52
49
  ### Using Monorepos
53
50
 
@@ -1,3 +1,5 @@
1
+ import type { Config } from 'eslint/config';
1
2
  import { defineConfig } from 'eslint/config';
3
+ export declare function setTsConfigRootDir(dir: string): Config;
2
4
  declare const config: ReturnType<typeof defineConfig>;
3
5
  export default config;
package/eslint.config.js CHANGED
@@ -30,12 +30,14 @@ if (existsSync(pathToGitIgnore)) {
30
30
  const parserOptions = {
31
31
  ecmaVersion: 'latest',
32
32
  sourceType: 'module',
33
- project: true,
34
- tsconfigRootDir: import.meta.dirname,
35
33
  };
34
+ export function setTsConfigRootDir(dir) {
35
+ return { languageOptions: { parserOptions: { project: true, tsconfigRootDir: dir } } };
36
+ }
36
37
  const config = defineConfig([
37
38
  globalIgnores([...gitIgnoreLines, 'dist/']),
38
39
  eslintPluginPrettierRecommended,
40
+ setTsConfigRootDir(import.meta.dirname),
39
41
  // Javascript and Typescript files
40
42
  {
41
43
  files: ['**/*.js', '**/*.ts'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enke.dev/lint",
3
- "version": "0.11.8",
3
+ "version": "0.11.10",
4
4
  "description": "Meta package to provide linting for web projects",
5
5
  "homepage": "https://github.com/enke-dev/lint",
6
6
  "repository": {
@@ -54,8 +54,8 @@
54
54
  "@eslint/compat": "2.0.0",
55
55
  "@eslint/js": "9.39.1",
56
56
  "@eslint/json": "0.14.0",
57
- "@html-eslint/eslint-plugin": "0.49.0",
58
- "@html-eslint/parser": "0.49.0",
57
+ "@html-eslint/eslint-plugin": "0.50.0",
58
+ "@html-eslint/parser": "0.50.0",
59
59
  "eslint-config-prettier": "10.1.8",
60
60
  "eslint-import-resolver-typescript": "4.4.4",
61
61
  "eslint-plugin-html": "8.1.3",
@@ -70,17 +70,17 @@
70
70
  "eslint-plugin-wc": "3.0.2"
71
71
  },
72
72
  "devDependencies": {
73
- "@awmottaz/prettier-plugin-void-html": "1.9.0",
73
+ "@awmottaz/prettier-plugin-void-html": "1.10.0",
74
74
  "@eslint/config-inspector": "1.4.2",
75
75
  "@types/node": "24.10.1",
76
76
  "eslint": "9.39.1",
77
77
  "jiti": "2.6.1",
78
- "prettier": "3.6.2",
79
- "stylelint": "16.26.0",
78
+ "prettier": "3.7.4",
79
+ "stylelint": "16.26.1",
80
80
  "stylelint-config-rational-order": "0.1.2",
81
81
  "stylelint-config-standard-scss": "16.0.0",
82
82
  "stylelint-order": "7.0.0",
83
83
  "typescript": "5.9.3",
84
- "typescript-eslint": "8.47.0"
84
+ "typescript-eslint": "8.48.1"
85
85
  }
86
86
  }